Call media session callback with details
ClosedPublic

Authored by broulik on Aug 11 2019, 12:43 PM.

Details

Summary

The spec says it must be called with a details dict [1]

[1] https://w3c.github.io/mediasession/#callbackdef-mediasessionactionhandler

Test Plan

Given we don't support seeking, only the bare "details" with the action is implemented.

navigator.mediaSession.setActionHandler("nexttrack", (details) => {
    console.log("next track", details);
});

prints next track {action: nexttrack} now instead of next track undefined

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.
broulik created this revision.Aug 11 2019, 12:43 PM
Restricted Application added a project: Plasma. · View Herald TranscriptAug 11 2019, 12:43 PM
Restricted Application added a subscriber: plasma-devel. · View Herald Transcript
broulik requested review of this revision.Aug 11 2019, 12:43 PM
broulik edited the summary of this revision. (Show Details)
broulik edited the test plan for this revision. (Show Details)
fvogt accepted this revision.Aug 12 2019, 5:21 PM
fvogt added inline comments.
extension/content-script.js
673

If you mention "seekforward", "seekbackward" or "seekto" here it can be found easier

This revision is now accepted and ready to land.Aug 12 2019, 5:21 PM
This revision was automatically updated to reflect the committed changes.