Baseflow / flutter_cache_manager

Generic cache manager for flutter
https://baseflow.com
MIT License
739 stars 427 forks source link

Downloading and Caching HLS streams like m3u8 in app #386

Open seanjackson opened 1 year ago

seanjackson commented 1 year ago

I am developing an application like netflix and youtube where users can download the videos in app.I want to use the flutter cache manager.Please can someone guide me on how to downloads hls streams with flutter cache manager. I am on a serious deadline Thanks

lianfanghua commented 1 year ago

May be you can download m3u8 file first, and then use flutter_hls_parser to parse m3u8 file, and get the media url from m3u8 file. after that, you can download the media file yourself.

Or you can use better_player, it provides caching solution(but you can't manage it yourself).

codesniper9315 commented 1 year ago

Hi, @lianfanghua The better_player supports cache option while playing the HLS video?

lianfanghua commented 1 year ago

Hi, @lianfanghua The better_player supports cache option while playing the HLS video?

Yes, you can see better_player's office documentation about caching. At the tail of the document, there is an explanation of the caching scheme of HLS

lianfanghua commented 1 year ago

But better_player only provides a caching solution, not an Offline solution, if you want users to be able to download HLS media manually, you still have to provide it yourself.

seanjackson commented 1 year ago

@lianfanghua Thanks for everything.You are the best! do you know how to implement hls download like Netflix or YouTube whereby users can watch the movies in app.

lianfanghua commented 1 year ago

@lianfanghua Thanks for everything.You are the best! do you know how to implement hls download like Netflix or YouTube whereby users can watch the movies in app.

I don't think it has anything to do with HLS's caching solution or offline solution, I have no experience with this.