florent37 / Flutter-AssetsAudioPlayer

Play simultaneously music/audio from assets/network/file directly from Flutter, compatible with android / ios / web / macos, displays notifications
https://pub.dartlang.org/packages/assets_audio_player
Apache License 2.0
752 stars 357 forks source link

add audio.network `url_callback` and `headers_callback` #780

Open cuifengcn opened 1 year ago

cuifengcn commented 1 year ago

I'm using Playlist(audio: network_audios) to open songs, but every song url is variable, i should get the right url before play it, so url_callback and headers_callback could be very helpful.

Audio audio1 = Audio.network(..., url_callback: xxx, headers_callback: xxx);
Audio audio2 = Audio.network(...);
audioPlayer.open(Playlist(audios: audios));