Not every feature is available on every platform yet. Use this table to keep track of our work and progress, and please help if you want :)
Note: LLM means Low Latency Mode.
Feature/Platform | Android | iOS | macOS | web |
---|---|---|---|---|
Audio Source | ||||
local file on device | yes | yes | yes | no |
local asset | yes | yes | yes | yes |
external URL file | yes | yes | yes | yes |
external URL stream | yes | yes | yes | yes |
byte array | SDK >=23 | not yet | not yet | not yet |
Audio Config | ||||
set url | yes | yes | yes | yes |
audio cache (pre-load) | yes | yes | yes | yes |
low latency mode | SDK >=21 | no | no | no |
Audio Control Commands | ||||
resume / pause / stop | yes | yes | yes | yes |
release / release mode | yes | yes | yes | not yet |
volume | yes | yes | yes | yes |
seek | yes | yes | yes | not yet |
Advanced Audio Control Commands | ||||
playback rate | SDK >= 23 | yes | yes | yes |
duck audio | yes (except LLM) | no | no | no |
respect silence | yes (except LLM) | yes | no | no |
stay awake | yes (except LLM) | yes | no | no |
recording active | not yet | yes | no | no |
playing route | yes (except LLM) | yes | no | no |
Streams | ||||
duration event | yes | yes | yes | not yet |
position event | yes | yes | yes | yes |
state event | yes | yes | yes | not yet |
completion event | yes | yes | yes | not yet |
error event | yes | yes | yes | not yet |
Apart from the main features for playing audio, some unrelated features to notification and lock screen management were added to audioplayers.
This is not the best home for them though. We are working with @ryanheise to eventually extract the existing notification related code from audioplayers and either:
- create a new package, audioplayers_notifications for it
- merge this code into the existing audio_service package
audio_service is already a package that provides much more advanced notification/lock screen controls. Please follow this example to implement all AudioPlayers features with and audio_service.
So please do not send any PRs or additions to the notifications/lock screen for now, unless it's part of our separation effort.
I will update this file as we move forward with this.
Some features are totally out of scope for the audioplayers
package. The goal of this library is to provide a unified place to play audio media, be it songs, background musics, sound effects, etc, from different sources, and providing an array of advanced controls and listeners to control it via code.
Non-goals: if the existing solutions proposed below are not good or do not work well with audioplayers, I am happy to collaborate to create an audioplayers_x
separated package (eg audioplayers_recorder
).
- notifications/locks screen: see section above, use this for now or audio_service;
- interfaces: nothing related to interface building concerns audioplayers; you can use Flutter to build your interfaces;
- audio recording: recording audio from the microphone into audio files and streams; there is already a package for this called audio_recorder.
- playlist: you can implement playlists as you wish by playing multiple audios or songs in sequence. Doesn't make sense for this package to have any builtin playlist mechanism.
- music metadata: some file formats include music metadata, like MP3 files that have author, track. This is a library dedicated for playing audio. It is a non-goal to provide this functionality.