Media Session API on Linux
Reported by
mich...@lawton.nz,
Jul 26 2017
|
|||
Issue descriptionUserAgent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/60.0.3112.78 Safari/537.36 Steps to reproduce the problem: 1. evaluate JavaScript: `'mediaSession' in navigator` What is the expected behavior? What went wrong? `'mediaSession' in navigator` returns false. The MediaSession and MediaMetadata interfaces are not implemented in Chrome for Linux. Did this work before? No Chrome version: 60.0.3112.78 Channel: stable OS Version: Flash Version: As far as I can tell the [Media Session API](https://developer.mozilla.org/en-US/docs/Web/API/Media_Session_API) is only supported on Chrome for Android. This should be supported in Chrome for Linux. The Media Session API can be integrated with the Linux desktop via DBUS by using the MPRIS specification. The MPRIS spec allows for a player to be registered (could be one for Chrome, or one for each tab/origin) and supports metadata (for integration with JS MediaMetadata interface), and player actions (for integration with JS MediaSession interface). Several Linux distributions integrate MPRIS with the desktop (e.g. by using a panel applet) and there are some other MPRIS clients available such as [mpris-remote](http://incise.org/mpris-remote.html). A note on playback controls and media keys: It is possible to implement the playback controls in the Media Session API by listening for the media keys (or other assigned keys) directly within Chrome. This is how some sites currently work when using Chrome extensions. However some Linux distributions (including Ubuntu, Mint) capture the media keys for use with MPRIS and do not pass the key events to Chrome. This causes a lot of confusion among users. The media keys can be un-assigned and will then work with Chrome (only when focused), but not with any other media players apart from some when they are focused. By listening to playback control events via MPRIS, Chrome will work with media keys with the Linux distribution's default key mapping and the media keys will also operate other players. https://www.freedesktop.org/wiki/Specifications/mpris-spec/ https://specifications.freedesktop.org/mpris-spec/latest/ https://xmms2.org/wiki/Media_Player_Interfaces
,
Jul 27 2017
This seems to be a feature request. Hence, marking it as untriaged for further investigation. Thanks...!!
,
Jul 27 2017
,
Feb 12 2018
Do we still want to do this? |
|||
►
Sign in to add a comment |
|||
Comment 1 by ranjitkan@chromium.org
, Jul 27 2017