Call into native Media Session browser API if available

Authored by broulik on Apr 22 2019, 8:38 PM.

Description

Call into native Media Session browser API if available

Since Chrome 73 it also supports Media Session API on the desktop.
The calls are re-arranged since the native setActionHandler throws if passed an
invalid action and in this case we don't want to register the callback either.

Also, there's a new "skipad" action for a "Skip Ad" overlay in picture-in-picture
mode [1] for which to work we need to call the native browser APIs.
Also, since MediaMetadata is a proper class and not an Object, iterate its prototype
rather than just stringifying it and adjust our shim to do the same.

[1] https://www.chromestatus.com/feature/4749278882824192

Differential Revision: https://phabricator.kde.org/D20726