Strange behaviour with Dynamic M3U8 Live Stream in Flutter using Just_Audio

114 Views Asked by At

I am developing a Flutter application where I am using the just_audio package to play a live audio stream from an M3U8 file. My application allows for dynamic content, meaning new files are continuously added to the M3U8 playlist.

Issue: The problem occurs when the stream reaches the end of the initially loaded M3U8 playlist. Despite new files being added to the playlist, the stream does not continue playing these new files and gets stuck on buffering.

Environment:

  • Just_Audio Version: 0.9.36
  • Using HlsAudioSource pointing to the .m3u8 link

Example m3u8 File:

#EXTM3U
#EXT-X-VERSION:3
#EXT-X-TARGETDURATION:9
#EXT-X-PLAYLIST-TYPE:EVENT
#EXTINF:8.616,
https://storage.googleapis.com/.._1.mp3
#EXTINF:8.328,
https://storage.googleapis.com/.._2.mp3
#EXTINF:5.016,
https://storage.googleapis.com/.._3.mp3
#EXTINF:3.288,
https://storage.googleapis.com/.._4.mp3

Questions

Is there any additional configuration required for HlsAudioSource to handle dynamic M3U8 files in just_audio?

Are there any known workarounds or alternative approaches within Flutter/just_audio to handle this kind of dynamic live streaming scenario?

Is it possible to use ConcatenatingAudioSource with a queue of HlsAudioSource sources?

Any insights or suggestions would be greatly appreciated. Thank you in advance!

0

There are 0 best solutions below