kplayer 0.0.3 copy "kplayer: ^0.0.3" to clipboard
kplayer: ^0.0.3 copied to clipboard

outdated

Flutter player

kplayer #

Flutter player (currently only audio)

this package is just wrapper for just_audio and dart_vlc to support all platformsthis packege is just wrapper forjust_audio and dart_vlc to support all platforms

Getting Started #

main.dart

void main() {
  Player.boot(); //add this  line
  runApp(MyApp());
}

Play from assets:

Player.assets("/assets/sound.mp3").play();

Play from network:

Player.network("https://example.com/sound.mp3").play();

or:

Player.start(asset: PlayerMedia.assets("/assets/sound.mp3"), autoPlay: true, once: true).init();

you have also:

var palyer = Player.start(asset: PlayerMedia.assets("/assets/sound.mp3"),autoPlay: true, once: true).init();

// info
var package = player.package; // "just_audio" or "dart_vlc"
var position= player.position;
var duration = player.duration;
var status= player.status; // { uninitialized, initialized, playing, paused, stopped, completed } 
var playing= player.playing;
...

// control
player.play();
player.pouse();
player.toggle();
player.stop();
player.seek(newPosition);
player.setVolume(0.8);
player.setSpeed(1.2); // Rate

//other
player.dispose();
player.player; // the package player instance

Support ☺️ #

you can buy me a coffee.

engoj :)

next plan: sopport video...