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
I want to use the CacheUtil.cache() to cache the next video, but worry that it may slow down the current playing video's download. Went through a couple docs, but still wasn't sure how CacheUtil.cache() would affect it. Is ExoPlayer smart enough to pre-cache during an optimized time? or is that something we have to implement?
I saw in another issue that PriorityTaskManager might be a clue to prioritize playback over caching is that correct? If so, are there any tutorials or docs about PriorityTaskManager. Is there a standard for how/when we should use CacheUtil.cache() so it won't slow down the current playing video's download?
Thanks.
The text was updated successfully, but these errors were encountered:
marcochin
changed the title
When Pre-caching next video using CacheUtil.cache, will it slow down current video's playback?
When Pre-caching next video using CacheUtil.cache, will it slow down current video's download?
Apr 11, 2019
That's correct, you need to use the same PriorityTaskManager instance for your playback and caching. When the priorities set right, it should make the download paused during buffering and continue afterwards. You can check ProgressiveDownloader code to see how it is done or ideally you can just use DownloadManager so it will handle the priorities for you.
Thanks, I'll look into it. Do you also know if CacheUtil.cache() checks storage space before caching? or what happens if there isn't enough storage space?
Edit: Nvm found my answer. If I use NoOpCacheEvictor I guess I'll have to manage the size myself as opposed to using a LeastRecentlyUsedCacheEvictor when creating my SimpleCache instance,
[REQUIRED] Searched documentation and issues
https://medium.com/google-exoplayer/pre-caching-downloading-progressive-streams-in-exoplayer-3a816c75e8f6
https://exoplayer.dev/doc/reference/com/google/android/exoplayer2/upstream/cache/CacheUtil.html
CacheUtils: Cache a task with priority #5573
[REQUIRED] Question
I want to use the CacheUtil.cache() to cache the next video, but worry that it may slow down the current playing video's download. Went through a couple docs, but still wasn't sure how CacheUtil.cache() would affect it. Is ExoPlayer smart enough to pre-cache during an optimized time? or is that something we have to implement?
I saw in another issue that PriorityTaskManager might be a clue to prioritize playback over caching is that correct? If so, are there any tutorials or docs about PriorityTaskManager. Is there a standard for how/when we should use CacheUtil.cache() so it won't slow down the current playing video's download?
Thanks.
The text was updated successfully, but these errors were encountered: