Active media session selection within a tab
Categories
(Core :: Audio/Video: Playback, task, P2)
Tracking
()
People
(Reporter: alwu, Assigned: alwu)
References
Details
Attachments
(4 obsolete files)
In order to route media control key (play, pause...) to the media session, and set the metadata from media session, we have to implement active media session selection
.
The spec doesn't specifiy how user agent should do that, it only recommends that we can select media session by managing audio focus [1].
As we have implemented the audio focus mangement amongs tabs, so it's easy for us to select correct media session among different tabs.
However, the spec doesn't mention how we should handle the case of using multiple media sessions within one tab. Should the latest started media one be an active session? or the top-level window's media session should always be our choice?
I think we can think about what the best situation is for having best user experience as our long term goal, but for the first step to hook up the control keys and media session action handler, I would like to implement a really BASIC version, which would always pick top-level media session as an active session. And I guess it would probably fit the way how most websites use media session?
FYI, I tested this behavior on Chrome, if we started two media session at the same time, one is in the top-level window, another is in the child iframe, the active media session would always be the top-level one.
[1] https://w3c.github.io/mediasession/#media-session-routing
Assignee | ||
Comment 1•6 years ago
|
||
Assignee | ||
Comment 2•6 years ago
|
||
Use TabActiveMediaSessionCandidateId
to store the ID of the browsing context where the candidate of active media session exists.
Assignee | ||
Comment 3•6 years ago
|
||
Assignee | ||
Comment 4•6 years ago
|
||
Assignee | ||
Updated•6 years ago
|
Updated•6 years ago
|
Assignee | ||
Comment 5•6 years ago
|
||
Will fix this issue in bug1611332.
Updated•5 years ago
|
Updated•5 years ago
|
Updated•5 years ago
|
Updated•5 years ago
|
Description
•