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

outdated

kplayer.

kplayer #

Flutter player (currently only audio)

sopport #

  • windows,linux -> dart_vlc
  • web, ios, android, macos -> just_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 #

for specific platform configuration visit just_audioand dart_vlc

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.create(asset: PlayerMedia.assets("/assets/sound.mp3"), autoPlay: true, once: true).init();

you have also:

 var palyer = Player.create(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; // setter an getter like seek()
var duration = player.duration;
var status= player.status; // { uninitialized, initialized, playing, paused, stopped, completed } 
var playing= player.playing;
...
// streams
var stream= player.positionStream;

// control
player.play();
player.pause();
player.toggle();
player.stop();
player.seek(newPosition);
player.volume = 0.8; // setter getter
player.speed = 1.2; // Rate

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

Support ☺️ #

you can buy me a coffee.

engoj :)

next plan: sopport video...