D28936: Use a Proxy object to detect changes within the MediaMetadata
Kai Uwe Broulik
noreply at phabricator.kde.org
Sat Apr 18 09:29:36 BST 2020
broulik created this revision.
broulik added reviewers: Plasma, fvogt.
Herald added a project: Plasma.
Herald added a subscriber: plasma-devel.
broulik requested review of this revision.
REVISION SUMMARY
According to spec [1] it is allowed to change properties within the `MediaMetadata` rather than assigning a new instance.
Using a `Proxy` object lets us detect property assignments within the object. Conveniently, it still reports `instanceof` as being the original object.
[1] https://www.w3.org/TR/mediasession/#the-mediametadata-interface (last sentence)
TEST PLAN
This fixes VKontakte player not updating metadata when changing tracks. Thanks @IlyaBizyaev for investigating.
YouTube, vimeo, media session example (who all set new metadata instance when they change) still get their metadata propagated correctly
REPOSITORY
R856 Plasma Browser Integration
REVISION DETAIL
https://phabricator.kde.org/D28936
AFFECTED FILES
extension/content-script.js
To: broulik, #plasma, fvogt
Cc: IlyaBizyaev, plasma-devel, Orage, LeGast00n, The-Feren-OS-Dev, cblack, jraleigh, zachus, fbampaloukas, ragreen, ZrenBot, ngraham, himcesjf, lesliezhai, ali-mohamed, jensreuterberg, abetts, sebas, apol, ahiemstra, mart
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/plasma-devel/attachments/20200418/b5d8705c/attachment.html>
More information about the Plasma-devel
mailing list