Since Chrome 73 it also supports Media Session also on the desktop.
The calls are re-arranged since 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.
Details
Details
- Reviewers
fvogt - Group Reviewers
Plasma - Commits
- R856:4c5ee86a48cb: Call into native Media Session browser API if available
Tried this example [1] in Chrome, now get a "Skip ad" button in the PIP overlay.
Firefox still works as before
Verified that setting null as metadata still works (not regress Bug 401636)
[1] https://googlechrome.github.io/samples/picture-in-picture/skip-ad.html
Diff Detail
Diff Detail
- Repository
- R856 Plasma Browser Integration
- Lint
Automatic diff as part of commit; lint not applicable. - Unit
Automatic diff as part of commit; unit tests not applicable.