Using RNVSimpleCache.INSTANCE for HlsMediaSource.Factory (HLS Caching on Android) #4271
-
As we know - this library does not support HLS video caching on Android. So, I dug deeper into the source code of this lib and found out in ReactExoplayerView.java in buildMediaSource method (line 1053) this line:
can actually be changed to this:
And after this change - i checked network inspector in Android Studio and saw that my HLS videos are not being downloaded again (presumably, they are being saved to cache). So, why didn't authors of this package made this available for HLS video caching if it seems rather easy to do? What are the drawbacks of this? (I'm not proficient in Android development, so maybe the change I did is a bad thing to do) |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
If I remember well the SimpleCache was working only with mp4. I reviewed the doc again and I don't see this limitation anymore! So I think your change can be integrated without problem! If you want to create a pull request with this change, it's welcome! |
Beta Was this translation helpful? Give feedback.
If I remember well the SimpleCache was working only with mp4. I reviewed the doc again and I don't see this limitation anymore! So I think your change can be integrated without problem! If you want to create a pull request with this change, it's welcome!