Flutter Audio Desktop Save Abandoned

[WIP] An ? audio playback library for Flutter Desktop. Supports Windows & Linux. Based on miniaudio.

Project README

libwinmedia is sequel to this project.

It provides network playback, better format support, control & features.








An audio playback library for Flutter Desktop.

Feel free to open issue anytime.

Installing

Mention in your pubspec.yaml:

dependencies:
  ...
  flutter_audio_desktop: ^0.1.0

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

Open Source Agenda is not affiliated with "Flutter Audio Desktop" Project. README Source: alexmercerind/flutter_audio_desktop
Stars
41
Open Issues
6
Last Commit
2 years ago
License
MIT

Open Source Agenda Badge

Open Source Agenda Rating