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
Some radio streams publish Icecast metadata. ExoPlayer extracts Icecast metadata in the form of
IcyHeaders and
IcyInfo.
IcyHeaders are used to populate the station and genre fields in MediaMetadata. You can check that for example in onMediaMetadataChanged(Player.Listener): station and genre are being updated.
IcyInfo usually contains information like the currently playing song. It is being extracted properly. You can check that for example in onMetadata(Player.Listener). There is also a function that can populateMediaMetadata. I would correctly update the title field. Problem: It seems like this function is never used, because the title field is not updated in onMediaMetadataChanged(Player.Listener).
I tested this behavior in the Media Session Demo app. If you want to reproduce the behavior you would need run the forked app and start the radio station that I added to catalog.json and filter LogCat for "ICY issue" (1) (2) (3).
I think IcyInfo should be used in MediaMetadata because it contains really interesting information about the currently playing media.
I think the IcyInfo title is already incorporated into MediaMetadata. In order to see this in the main (not session) demo app I needed to first comment out the setMediaMetadata call here, because ExoPlayer assumes that developer-provided metadata should override stream-provided metadata (so the title from the IcyInfo is never set into MediaMetadata, and so it never changes and the callback is never called):
Hey @y20k. We need more information to resolve this issue but there hasn't been an update in 14 weekdays. I'm marking the issue as stale and if there are no new updates in the next 7 days I will close it automatically.
If you have more information that will help us get to the bottom of this, just add a comment!
When I use MediaItems that do not have a title set in their metadata, the player uses stream-provided metadata. It works flawless in my own app. The notification automatically displays IcyInfo from the stream.
Thank you for the clarification and for helping me out!
The photos above are from a fork of the demo-session app (see y20k@2e722ac).
I now wonder ...
... is this something that I can fix?
... is this something that you (media3) can fix?
... or is this something that needs to be handled differently by the Android platform?
Thanks for the update - please can you file a new issue? You can link back to this issue for context, but it's helpful to keep the discussions separate.
Activity
icbaker commentedon Oct 6, 2022
I think the
IcyInfotitle is already incorporated intoMediaMetadata. In order to see this in the main (not session) demo app I needed to first comment out thesetMediaMetadatacall here, because ExoPlayer assumes that developer-provided metadata should override stream-provided metadata (so the title from theIcyInfois never set intoMediaMetadata, and so it never changes and the callback is never called):media/demos/main/src/main/java/androidx/media3/demo/main/IntentUtil.java
Line 129 in 5047581
I think the same issue (developer-provided metadata overriding media-provided) probably affects your session demo example too.
Can you take a look and see if you can also get this working in the main demo app as I've described?
google-oss-bot commentedon Oct 26, 2022
Hey @y20k. We need more information to resolve this issue but there hasn't been an update in 14 weekdays. I'm marking the issue as stale and if there are no new updates in the next 7 days I will close it automatically.
If you have more information that will help us get to the bottom of this, just add a comment!
y20k commentedon Oct 28, 2022
Hi @icbaker
When I use MediaItems that do not have a title set in their metadata, the player uses stream-provided metadata. It works flawless in my own app. The notification automatically displays IcyInfo from the stream.
Thank you for the clarification and for helping me out!
icbaker commentedon Oct 28, 2022
Glad it's working!
y20k commentedon Jan 21, 2023
Hi @icbaker
as I wrote in October my app's notification displays IcyInfo metadata, once I do not set the title. ❤️
There is an unintended consequence of not setting the title though:
The Always-On Display now reads: No Title
The photos above are from a fork of the demo-session app (see y20k@2e722ac).
I now wonder ...
... is this something that I can fix?
... is this something that you (media3) can fix?
... or is this something that needs to be handled differently by the Android platform?
icbaker commentedon Jan 23, 2023
Thanks for the update - please can you file a new issue? You can link back to this issue for context, but it's helpful to keep the discussions separate.
y20k commentedon Jan 23, 2023
Okay. I created a new issue.