Flutter plugin to play audio from streams, files, assets and DASH/HLS streams. Works with audio_service to play audio in the background.
A Flutter plugin to play audio from URLs, files, assets and DASH/HLS streams. This plugin can be used with audio_service to play audio in the background and control playback from the lock screen, Android notifications, the iOS Control Center, and headset buttons.
|read from URL||✅||✅|
|read from file||✅||(untested)|
|read from asset||✅||(untested)|
final player = AudioPlayer(); var duration = await player.setUrl('https://foo.com/bar.mp3');
player.play(); await player.seek(Duration(seconds: 10)); await player.pause(); await player.stop();
await player.setClip(start: Duration(seconds: 10), end: Duration(seconds: 20)); await player.play(); // Waits for playback to finish
- FLAC support
- Web support
- Gapless playback