How does Exoplayer identify cached Item?
See original GitHub issueWhen filing a question:
Fill out the sections below, leaving the headers but replacing the content. If you’re unable to provide certain information, please explain why in the relevant section. We may close issues if they do not include sufficient information.
[REQUIRED] Searched documentation and issues
Not Sure if one exists.
[REQUIRED] Question
How do i make exoplayer play already cached content if the URI has changed.
The URI of the content in our app changes everytime
the tracks are fetched and this causes the cached content to recached
since i believe the uri is the identifier as i noticed that while implementing download feature.
Is there a way out of this or a solution.
links to the Different Uri which points to the same file has been emailed with issue #6046
Issue Analytics
- State:
- Created 4 years ago
- Comments:12 (5 by maintainers)
Top Results From Across the Web
Using cache in ExoPlayer - android - Stack Overflow
Here is the solution for ExoPlayer 2.+. Create a custom cache data source factory public class CacheDataSourceFactory implements DataSource.
Read more >Video preloading/ precaching using Exoplayer 2 in Android
ProgressListener : This is used for listening to updated about the current state of caching. It will give us the cached data length,...
Read more >Cache (ExoPlayer library)
A resource is a complete piece of logical data, for example a complete media file. A cache key uniquely identifies a resource. URIs...
Read more >Preloading and Buffering Videos in Android with ExoPlayer
The first function preCacheVideo takes in a video URL and passes it into a DataSpec which defines a region of data in a...
Read more >Media streaming with ExoPlayer - Android Developers
ExoPlayer is an app-level media player built on top of low-level media APIs in Android. It is an open source project used by...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
After several iterations and thoughts i noticed since it was an HLS file every segment requires it own key. Passing the same key used for downloading the file for the segments (which was what was happening earlier when i tried to set my custom cacheKey) made it loop on buffering.
I was able to solve this by making different keys for all the Segments as they had their own URI’s
My issue is that the player doesnt play the item, its stuck in Buffering mode, thats the last state thats Logged.
I expect when i used a custom cachekey, the player plays the song