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

outdated

this package is just wrapper for just_audio and dart_vlc to support all platforms.

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.asset("/assets/sound.mp3").play();

Play from network:

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

or:

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

you have also:

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

// callback
palyer.callback = (PlayerEvent event){};

// info
var package = player.package; // "just_audio" or "dart_vlc"
var position= player.position; // setter an getter like seek()
var duration = player.duration; // getter
var status= player.status; // 
var playing= player.playing;
...
// streams
player.streams.playing.stream;
player.streams.position.stream;
player.streams.status.stream;
player.streams.volume.stream;
player.streams.speed.stream;

// 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...

55
likes
0
pub points
79%
popularity

Publisher

verified publisherphysia.dev

this package is just wrapper for just_audio and dart_vlc to support all platforms.

Repository (GitHub)
View/report issues

License

unknown (license)

Dependencies

flutter, kplayer_platform_interface, kplayer_with_dart_vlc, kplayer_with_just_audio

More

Packages that depend on kplayer