You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello, I was wondering if I can implement your library to cache HLS videos. Since it is written in the description that it can add caching support to ExoPlayer, I wanted to know if it was possible. thanks!
@nano92 ExoPlayer hasn't native support for caching direct links. That is why you can use AndroidVideoCache for ExoPlayer. But ExoPlayer has great native support for HLS, SmoothStreaming, Dash. There is no reason to implement it in AndroidVideoCache.
I was trying to cache a HLS video using your library but it can't seem to work. I have implemented the ExoPlayer on my application to play videos. Maybe I'm using wrong your library. Have you tried to cache HLS videos being played by ExoPlayer?
It is impossible to use library for any adaptive streaming technology. You can use it only for direct links on video file. For adaptive streaming use ExoPlayer.
AndroidVideoCache is pretty simple. It downloads video file from direct link and saves it as file on a disc. Any streaming protocol is more complex than 'file on internet'. Streaming servers divides file on chunks with different quality , describes them in special metadata and provides these chunks depends on internet channel. Obviously it is possible to implement caching (exoPlayer can) but it will has complex implementation. But I wanna keep my library as simple as possible. The second reason why I don't want implement caching for streaming is that has beean already implemented by Google in exoPlayer.
Reacted by Pkmmte Xeleon, zhanggao, kulong51, MickeCast and Patrissol Juns
Activity
danikula commentedon Sep 28, 2015
@nano92 ExoPlayer hasn't native support for caching direct links. That is why you can use
AndroidVideoCachefor ExoPlayer. But ExoPlayer has great native support for HLS, SmoothStreaming, Dash. There is no reason to implement it inAndroidVideoCache.nano92 commentedon Sep 29, 2015
I was trying to cache a HLS video using your library but it can't seem to work. I have implemented the ExoPlayer on my application to play videos. Maybe I'm using wrong your library. Have you tried to cache HLS videos being played by ExoPlayer?
danikula commentedon Sep 29, 2015
It is impossible to use library for any adaptive streaming technology. You can use it only for direct links on video file. For adaptive streaming use ExoPlayer.
nano92 commentedon Sep 29, 2015
I cannot cache HLS video with ExoPlayer, I was hoping to use your library for that purpose
danikula commentedon Sep 29, 2015
It is totally impossible.
nano92 commentedon Sep 29, 2015
Oh well, thank you!
danikula commentedon Sep 30, 2015
AndroidVideoCache is pretty simple. It downloads video file from direct link and saves it as file on a disc. Any streaming protocol is more complex than 'file on internet'. Streaming servers divides file on chunks with different quality , describes them in special metadata and provides these chunks depends on internet channel. Obviously it is possible to implement caching (exoPlayer can) but it will has complex implementation. But I wanna keep my library as simple as possible. The second reason why I don't want implement caching for streaming is that has beean already implemented by Google in exoPlayer.
ojw28 commentedon Apr 3, 2017
It's worth noting that ExoPlayer does now provide support for caching "file on internet" type media.
danikula commentedon Apr 3, 2017
@ojw28 can you provide proof link?
ojw28 commentedon Apr 3, 2017
Support was added in google/ExoPlayer@bd7be1b.
If you hook a CacheDataSource into the DataSource request chain it should "just work".
There's ongoing work/improvements being made to ExoPlayer's caching layer in general:
https://github.com/google/ExoPlayer/commits/dev-v2/library/src/main/java/com/google/android/exoplayer2/upstream/cache
danikula commentedon Apr 3, 2017
@ojw28 really good news. Thanks. I think it should be mentioned in
README.md