w3c / mediasession

Media Session API
https://w3c.github.io/mediasession/
Other
129 stars 29 forks source link

Update type of MediaMetadata's artwork #343

Closed youennf closed 1 month ago

youennf commented 1 month ago

Fixes https://github.com/w3c/mediasession/issues/237

Introduce a slot where we store the FrozenArray so that the getter always returns the same object. Make sure the slot is reset when the setter is called.

Implement the conversion on setter and on getter. Based on https://github.com/w3c/mediasession/pull/243 work from @ChunMinChang


Preview | Diff

youennf commented 1 month ago

Also fixes https://github.com/w3c/mediasession/issues/241.

youennf commented 1 month ago

May also fix https://github.com/w3c/mediasession/issues/183

youennf commented 1 month ago

@foolip, @annevk, I am interested in your feedback on the PR, since it is touching WebIDL, FrozenArray and friends.

youennf commented 1 month ago

@annevk, I updated the convert links. @steimelchrome, does this look good to you? Maybe @padenot as well on Firefox side?

youennf commented 1 month ago

Testing now actually, Firefox is actually aligned with the spec (metadata.artwork === metadata.artwork) but Safari and Chrome are not. I'll file a bug on WebKit and Chrome repository.

youennf commented 1 month ago

I filed https://issues.chromium.org/issues/370844795 and https://bugs.webkit.org/show_bug.cgi?id=280764.