-
Notifications
You must be signed in to change notification settings - Fork 385
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How to dynamically change the audio url using media3 exoplayer? #1430
Comments
I use CacheDataSource because I need to implement download functionality. |
Hi @allenxu-passion, Thanks for reporting! Just want to get problem clarified - does the player stop when playing the downloaded media or when playing from the upstream? |
@tianyif Thanks for attention.
When debugging, I sometimes get the following log, I'm not sure if it's related.
Thanks and expect a reply. |
I use media3 exoplayer to develop a music playback APP. Since the audio URL will become invalid, I need to request a new URL and replace it after it expires.
As follows
When the url is invalid, replace it with a new url through ResolvingDataSource.
But there is a problem. When the URL is replaced, the player will stop playing after a while.
There's no obvious error logs. In DefaultHttpDataSource, the open(DataSpec dataSpec) method is executed and the connection is established.
I guess CacheDataSource did a check and found that the two URLs were different or the container meta information was different, so it stopped. I'm not sure.
Is there a solution?
The text was updated successfully, but these errors were encountered: