Contact emails
Spec
https://mediasession.spec.whatwg.org/ (edited by ri...@opera.com)
Summary
Enable web developers to control platform-level audio focus and customize the UI in the lock screen and notification area.Motivation
Multiple mobile browsers, including iOS Safari, Opera for Android and Samsung's S browser have UI features to help the user find which tab is currently playing, showing some basic information like a title and a play/pause button. Chrome for Android also has a notification for tabs playing audio, but with no playback controls.Compatibility Risk
The biggest concern we have with media session is the ability to implement it on a wide range of platforms, summarized in "figure out the coupling between audio focus/session, audio playback and remote control events." Jer Noble from Apple clarified some things about iOS, and David built an iOS test app to reveal some interesting things.
In the current spec, a media session has one or more participating media elements, and it's the act of playing a media element that activates the session and thus requests platform audio focus and UI. We're confident that this is a model that can be supported on both Android and iOS.
We are leaving the door open to activating a media session with no media element, but it seems clear that interoperable handling of metadata needs playing media, and this is precisely our current focus.
Ongoing technical constraints
There are many issues, large and small, which are currently under discussion. Implementation will help resolve many of these issues.
Will this feature be supported on all six Blink platforms (Windows, Mac, Linux, Chrome OS, Android, and Android WebView)?
No, we are focused on Android in this first implementation round.
OWP launch tracking bug
Link to entry on the feature dashboard
https://www.chromestatus.com/features/5639924124483584
Requesting approval to ship?
No, we will implement behind a runtime flag.