simple_player 2.1.0 copy "simple_player: ^2.1.0" to clipboard
simple_player: ^2.1.0 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;

// By disposing of the controller
// This method does not need to be called in normal cases, SimplePlayer already has an AutoDispose to facilitate its correct use.
 simpleController.delete()

// Hear player position (return Duration)
simpleController.listenPosition().listen((event) {
    Duration stremPosition = event.toString();
});

Result: #

Simple Player   Simple Player

FullScreen: #

Simple Player

Good coding! 😎💙 #

Follow me on: https://github.com/InaldoManso

Developed by: Inaldo Manso


6
likes
140
points
96
downloads

Publisher

unverified uploader

Weekly Downloads

SimplePlayer offers all the essential tools for viewing videos in your mobile applications in a simplified way!

Repository (GitHub)

Documentation

API reference

License

BSD-3-Clause (license)

Dependencies

flutter, screen_brightness, video_player

More

Packages that depend on simple_player