TheWidlarzGroup / react-native-video

A <Video /> component for react-native
https://docs.thewidlarzgroup.com/react-native-video/
MIT License
7.23k stars 2.9k forks source link

Add support for HLS videos caching on android #4272

Closed IslamRustamov closed 1 week ago

IslamRustamov commented 3 weeks ago

Summary

This PR adds a conditional check whether to include HLS video caching or not for Android devices. We already have a bufferConfig prop that enables caching in most cases, but we don't utilise the useCache variable in case of HLS video streaming.

Motivation

Every time the same HLS video is being played - it gets loaded again and again which is counter-efficient.

Changes

Test plan

Open App Inspector in Android Studio (or proxyman or any other sniffing tool) and check whether HLS videos are getting downloaded with and without bufferConfig prop.

freeboub commented 2 weeks ago

looks good to me

douzal34 commented 6 days ago

Hi @freeboub,

I have seen the new version 6.8.0 and the new HLS cache managing from this PR. However, i've seen on this link that caching is not available for .m3u8 yet.

Does HLS caching managing is possible on rnv component or not ? If yes, can you share an example of it like a basic rnv component with the option needed.

Thanks for your time and have a nice day !

IslamRustamov commented 6 days ago

@douzal34 probably docs were not updated