flutter_audio_desktop 0.0.9 copy "flutter_audio_desktop: ^0.0.9" to clipboard
flutter_audio_desktop: ^0.0.9 copied to clipboard

discontinuedreplaced by: dart_vlc
outdated

A simple audio playback library for Flutter Desktop. Supports MP3, FLAC & WAV on Windows & Linux.

flutter_audio_desktop #

An audio playback library for Flutter Desktop.

Feel free to open issue anytime.

Installing #

Mention in your pubspec.yaml:

dependencies:
  ...
  flutter_audio_desktop: ^0.0.9

Using #

// Create new instance.
var audioPlayer = new AudioPlayer(id: 0)
..stream.listen(
  (Audio audio) {
    // Listen to playback events.
  },
);
// Load audio source
audioPlayer.load(
  new AudioSource.fromFile(
    new File('/home/alexmercerind/music.mp3'),
  ),
);
// Start playback.
audioPlayer.play();
// Get audio duration.
audioPlayer.audio.duration;
// Change playback volume.
audioPlayer.setVolume(0.5);
// Change playback position.
audioPlayer.setPosition(Duration(seconds: 10));
// Get playback position.
audioPlayer.audio.position;
Timer(Duration(seconds: 10), () {
    // Pause playback.
    audioPlayer.pause();
}
// Few other things.
audioPlayer.audio.file;
audioPlayer.audio.isPlaying;
audioPlayer.audio.isCompleted;
audioPlayer.audio.isStopped;

Other classes & methods are documented in their docstrings very well.

See this example for a better overview.

Windows

Linux

Support #

If you want to be kind to me, then consider buying me a coffee.

Thankyou!

Progress #

Platform Status
Linux Working
Microsoft Windows Working
MacOS Learn More

License #

I don't want to put any restrictions on how you distribute your Flutter Desktop apps, so this library comes under very permissive software, MIT license.

Since, other libraries like libvlcpp or libvlc come under GPL & LGPL licenses respectively, so there will be many restrictions if I plan to use them.

Thus, this project uses miniaudio and miniaudio_engine from David Reid under MIT license.

Acknowledgments #

22
likes
0
pub points
32%
popularity

Publisher

unverified uploader

A simple audio playback library for Flutter Desktop. Supports MP3, FLAC & WAV on Windows & Linux.

Repository (GitHub)
View/report issues

Documentation

Documentation

License

unknown (license)

Dependencies

flutter, path, path_provider

More

Packages that depend on flutter_audio_desktop