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 The Media Session API standard evolves quite fast, so there's new actions that we might be able to support that the browser itself doesn't know yet, for instance the "stop" action. By checking the values ourselves and catching an exception by the browser, we're still able to handle them in the extension. TEST PLAN The following now works: navigator.mediaSession.setActionHandler("stop", () => { console.log("stop player"); }); Clicked Stop in context menu of media controller applet, got the callback executed. Previously an exception would be thrown when calling `setActionHandler` REPOSITORY R856 Plasma Browser Integration REVISION DETAIL https://phabricator.kde.org/D23090 AFFECTED FILES extension/content-script.js To: broulik, #plasma, fvogt Cc: plasma-devel, LeGast00n, jraleigh, fbampaloukas, GB_2, ragreen, Pitel, ZrenBot, himcesjf, lesliezhai, ali-mohamed, jensreuterberg, abetts, sebas, apol, mart