Reputation: 874
We are using the Javascript MediaSession API to set the Media Data:
navigator.mediaSession.metadata = new MediaMetadata(opts);
This works after playing a video. The cover art and title appear on the device's media UI.
Now we have other content running in an iframe.
Whenever the iframe plays a video (not even setting the mediaSession data) the Media Data is overwritten.
Which means, playing a video in an iframe, overwrites the MediaData of the parent frame.
The title and cover art of the Media UI changes.
Is there any way to prevent the iframe from overwriting the MediaSession data?
Is that even intended, since any iframe you include could do that.
Upvotes: 4
Views: 180