media icon indicating copy to clipboard operation
media copied to clipboard

IcyInfo should be used in MediaMetadata

Open y20k opened this issue 2 years ago • 0 comments

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 populate MediaMetadata. 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.

y20k avatar Aug 16 '22 15:08 y20k