Skip to content

MediaMetaData returns null values if player is set to Player.REPEAT_MODE_ONE #9458

Closed
@marcqtan

Description

@marcqtan
  • ExoPlayer version number: 2.15.0
  • Android version: OS 10
  • Android device: Samsung a35

I am playing a local mp3 and to get its information,I've override onMediaMetadataChanged to get the title information like below:

    override fun onMediaMetadataChanged(mediaMetadata: MediaMetadata) {
        title = mediaMetadata.albumTitle.toString()
    }

At first run, It's successfully showing the title of the currently playing item, but when I set the player.repeatmode to REPEAT_MODE_ONE and right after player goes back to 00:01 position, the onMediaMetadataChanged gets called again but right now all datas are null including the title. See image below:

Screen Shot 2021-09-21 at 4 01 08 PM

It should retain all the datas from before. Any idea why this is happening?

Thanks!

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions