YouTube uses ExoPlayer in Android to play their Videos/Audios but you may have noticed , once you played a video , the next time it plays from the Cache, not from the server stream. I need to add this functionality on my Player, where should I do the customization to get that? OR anyone else (Except YouTube) did that? Proper link or suggestion would be helpful. Thanks
Asked
Active
Viewed 834 times
3
-
Have you got any help on this? – Pranesh Sahu Mar 14 '17 at 09:45
-
Still can't figure it out ! :( – Pralgomathic Mar 15 '17 at 06:30
-
https://stackoverflow.com/a/41001057/2077869 This answer may help you if you havent already stumbled upon it! – android.rookie Apr 04 '18 at 18:09
1 Answers
0
I believe the ExoPlayer does not support caching or saving the video. At least thats what this issue in Sept 2015 says.
You might be able to grab the output buffer and write that as a file.
Safest method probably is to persist the video on your own in the background (means double bandwidth usage) and then do a check whether it was downloaded yet before starting streaming.

Oliver Metz
- 2,712
- 2
- 20
- 32