D23090: Handle media session callbacks even when the requested one isn't supported by the browser

Fabian Vogt noreply at phabricator.kde.org
Mon Aug 12 18:16:27 BST 2019


fvogt added inline comments.

INLINE COMMENTS

> content-script.js:687
> +                    // still be able to handle it
> +                    if (!["play", "pause", "seekbackward", "seekforward", "previoustrack", "nexttrack", "skipad", "stop"].includes(name)) {
> +                        throw new TypeError("Failed to execute 'setActionHandler' on 'MediaSession': The provided value '" + name + "' is not a valid enum value of type MediaSessionAction.");

Why add this check and not just save the exception thrown from `oldSetActionHandler` for throwing later?

Otherwise the addon controls which browser functionality is accessible.

REPOSITORY
  R856 Plasma Browser Integration

REVISION DETAIL
  https://phabricator.kde.org/D23090

To: broulik, #plasma, fvogt
Cc: plasma-devel, LeGast00n, jraleigh, fbampaloukas, GB_2, ragreen, Pitel, ZrenBot, himcesjf, lesliezhai, ali-mohamed, jensreuterberg, abetts, sebas, apol, mart
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/plasma-devel/attachments/20190812/d7dcf328/attachment.html>


More information about the Plasma-devel mailing list