Open Bug 1904774 Opened 1 year ago Updated 1 year ago

MediaSession.Delegate.onMetadata is triggered multiple times

Categories

(GeckoView :: Media, defect, P2)

All
Android
defect

Tracking

(Not tracked)

People

(Reporter: johnbritian, Unassigned)

References

Details

Steps to reproduce:

While on Youtube, When the video is played for first time onMetadata is triggered only one time when we click on next video to play onMetadata is triggered three times. i have tested it on youtube. it might be occuring on other sites too.

Actual results:

onMetadata is triggered three times for next video playing

Expected results:

onMetadata should be triggered only once for each video

The severity field is not set for this bug.
:calu, could you have a look please?

For more information, please visit BugBot documentation.

Flags: needinfo?(calu)
Severity: -- → S3
Flags: needinfo?(calu)
Status: UNCONFIRMED → NEW
Ever confirmed: true
Priority: -- → P2
See Also: → 1904772

Any update on this?

Any progress on fixing this issue?

Flags: needinfo?(calu)

Hey John, Thanks for filing this bug. I took a look and seems like onMetadata (code link) (caused by "GeckoView:MediaSession:Metadata" event) is being triggered multiple times because the artwork field in the metadata passed in is changing. This seems like the expected behavior to call onMetadata whenever the media file metadata changes. Are you observing these fields change as well?

Flags: needinfo?(calu)

Hello Cathy Lu,
i have attached the debug log from android studio, where artwork field remains constant but onMetadata method is triggered three time

Log:

handleEvent: metadatachange
handleMetadataChanged {"album":"","artist":"SabrinaCarpenterVEVO","artwork":[{"sizes":"320x180","src":"https://i.ytimg.com/vi/KEG7b851Ric/mqdefault.jpg?v=66c7ba44","type":"image/jpeg"}],"title":"Sabrina Carpenter - Taste (Official Video)"}
handleEvent: metadatachange
handleMetadataChanged {"album":"","artist":"SabrinaCarpenterVEVO","artwork":[{"sizes":"320x180","src":"https://i.ytimg.com/vi/KEG7b851Ric/mqdefault.jpg?v=66c7ba44","type":"image/jpeg"}],"title":"Sabrina Carpenter - Taste (Official Video)"}
handleEvent: metadatachange
handleMetadataChanged {"album":"","artist":"SabrinaCarpenterVEVO","artwork":[{"sizes":"320x180","src":"https://i.ytimg.com/vi/KEG7b851Ric/mqdefault.jpg?v=66c7ba44","type":"image/jpeg"}],"title":"Sabrina Carpenter - Taste (Official Video)"}

From the above log, you can see onMetadata method is triggered multiple times for same youtube video playing.
i have also messaged you on matrix to help you on fixing this.

Flags: needinfo?(calu)
Flags: needinfo?(calu)
You need to log in before you can comment on or make changes to this bug.