-
Notifications
You must be signed in to change notification settings - Fork 411
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 Update Metadata of Already Added MediaItems? #337
Comments
One more note/question: ExoPlayer and most other players will parse the media metadata when trying to play a file at the latest. So unless you need to know all metadata in advance (e.g. to display it to a user), there is actually no need to do any of the background service logic you describe here. |
Yes, I do need to show the entire playlist to the user. |
Thanks for the clarification. Just for completeness: Once we get around to fix google/ExoPlayer#4727, you really don't need your workaround anymore because ExoPlayer would take care of reading all metadata initially if requested. |
After setting the playlist using controller.setMediaItems(), is there a way to directly modify the already set MediaItem?
My project plays local audio files, and I use MediaMetadataRetriever in the onAddMediaItems callback of the Service to parse the files to obtain the actual music name, duration, and other information. When there are a lot of audio files (1k+), the parsing speed is very slow.
So, is it possible to set temporary information in onAddMediaItems, then parse it in the background using MediaMetadataRetriever, and replace the parsed information in the already added MediaItem after parsing is complete? Or is there a better approach?
The text was updated successfully, but these errors were encountered: