any_video_player 0.0.4 any_video_player: ^0.0.4 copied to clipboard
The video_player plugin gives low level access for the video playback. Advanced video player based on video_player and Chewie.
any_video_player #
The video_player plugin gives low level access for the video playback. Advanced video player based on video_player and Chewie.
Installation #
In your pubspec.yaml
file within your Flutter Project:
dependencies:
any_video_player: <latest_version>
Usage #
import 'package:chewie/chewie.dart';
AnyVideoPlayerController anyVideoPlayerController = AnyVideoPlayerController(
dataSource: VideoPlayerDataSource.network('https://flutter.github.io/assets-for-api-docs/assets/videos/butterfly.mp4'),
controlsConf: ControlsConfiguration(paddingBottom: 10))
final playerWidget = AnyVideoPlayer(
controller: anyVideoPlayerController,
);
Please make sure to dispose both controller widgets after use. For example by overriding the dispose method of the a StatefulWidget
:
@override
void dispose() {
anyVideoPlayerController.dispose();
super.dispose();
}