TheWidlarzGroup / react-native-video

A <Video /> component for react-native
MIT License
7.08k stars 2.85k forks source link

HLS caching #2830

Open lnxct opened 1 year ago

lnxct commented 1 year ago

Feature Request

HLS caching

Why it is needed

It continues to hit the CDN URL even after playing one time. so it is increased cost, use of user's data continues.

Possible implementation

hls caching allow to the storage of .ts and m3u8 file.

flexgrip commented 1 year ago

I'm unsure what RNV would have to do with this. Caching hls would be pretty tough on storage requirements. And it's not a good format for storage. Just for streaming.

Also, iOS natively caches chunks for quicker timeline scrubbing.

But no. I don't think rnv should be responsible for this. I have an app that lets the user stream a video, or download it for later. If I made it automatically store the videos, they'd fill up their storage quick.

evoactivity commented 1 year ago

@flexgrip just so you are aware, caching is something that is being worked on for android in this branch https://github.com/react-native-video/react-native-video/pull/2708

I don't think the idea is to store everything forever, rather they stick around for the session and the cache size is limited

nguyenvanphituoc commented 7 months ago

hello, I have implement hls cache, that suitable with react-native-video: https://github.com/nguyenvanphituoc/react-native-cache-video#readme