lau1944 / just_audio_cache

Collection of extension function of just_audio package for auto-handle caching
MIT License
12 stars 3 forks source link

Is it possible to cache m3u8 format audio? #6

Open katsikas-kostas opened 1 year ago

katsikas-kostas commented 1 year ago

Hello, congrats for your great work on the project. From my understanding it seems that the package does not support m3u8/HLS caching.

I wonder if it would be enough to use a Package like flutter_hls_parser to retrieve all the different segments of m3u8 list and provide them to the method dynamicSetAll .

Any ideas on how I would be able to cache m3u8 audio?

lau1944 commented 1 year ago

Any problem occurs when you try to store m3u8 audio? Because under the hood, we store everything as a file, no matter what format they are.

katsikas-kostas commented 1 year ago

The problem is that a m3u8 file is just a playlist that points to a list of aac audio files where the actual data is stored. So caching only the m3u8 file does not make any difference since its only a fraction of the audio data that we need to store.

Even if add all individual items calling the dynamicSetAll method wouldn't make any difference ether as they are not going to be handled from setFilePath. My guess is that it needs a different approach, something similar of better_player

lau1944 commented 1 year ago

This seems promising. I am currently working on something else, so i might not have the time to add this feature. But you are welcome to contribute your code.

My guess is that it needs a different approach, something similar of better_player

emersonsiega commented 11 months ago

Any updates on this?