simple_player 1.1.2
simple_player: ^1.1.2 copied to clipboard
SimplePlayer offers all the essential tools for viewing videos in your mobile applications in a simplified way!
Simple Player 🎬 #
Welcome to the simplest user-friendly player ever made! #
Applicable preferences: #
- Label (String)
- AspectRatio (double)
- AutoPlay (bool)
- LoopMode (bool)
- ForceAspectRatio (bool)
- ColorAccent (Color)
//Example:
SimpleController simpleController = SimpleController();
String url =
'https://flutter.github.io/assets-for-api-docs/assets/videos/bee.mp4';
SimplePlayer(
simpleController: simpleController,
simplePlayerSettings: SimplePlayerSettings.network(
path: url,
label: 'Bee',
aspectRatio: 16 / 9,
autoPlay: false,
loopMode: true,
forceAspectRatio: false,
colorAccent: Colors.red,
),
),
SimplePlayer(
simpleController: simpleController,
simplePlayerSettings: SimplePlayerSettings.assets(
path: url,
label: 'Bee',
aspectRatio: 16 / 9,
autoPlay: false,
loopMode: true,
forceAspectRatio: false,
colorAccent: Colors.red,
),
),
//Examples of controller usage.
//Play:
simpleController.play();
//Pause:
simpleController.pause()
//Get current position: (return Duration)
simpleController.position;
//Hear player position: (return Duration)
simpleController.listenPosition().listen((event) {
Duration stremPosition = event.toString();
});
Result: #
FullScreen: #