w3c/mediasession

Should we add a common repository for MediaSession actions and WebRTC capture handle actions?

Opened this issue · 2 comments

MediaSession actions like play, pause, nexttrack/previoustrack might be useful to WebRTC capture handle actions.
As such, it might be useful to build a common terminology and spec language that could be used on both specs.

Given MediaSession is already defining some useful terms, it seems that https://w3c.github.io/mediacapture-handle/actions/index.html could probably refer to the MediaSession specification for specific actions.
Maybe some algorithms could be shared as well, depending on how capture handle actions evolve.

That might require some editorial work on MediaSession specification to export these concepts/definitions.

We can have various levels of sharing between the two specs.
A base level would be to share the concepts, and definitions of the actions.
Another level would be to share some of the API, for instance the enums or the way the actions trigger JS (capture handle action is event based, MediaSession is callback based),

This could be a good way to share some of the spec load without forcing Media Sessoin to add capture actions. We could have a shared way of specifying generic action handlers (with Media Session supporting a specific subset of those actions). The fact that one is event-based and one is callback-based could make the overlap smaller than ideal though