Closed Bug 1592454 Opened 6 years ago Closed 6 years ago

Active media session selection within a tab

Categories

(Core :: Audio/Video: Playback, task, P2)

task

Tracking

()

RESOLVED DUPLICATE of bug 1611332

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

Use TabActiveMediaSessionCandidateId to store the ID of the browsing context where the candidate of active media session exists.

Attached file Bug 1592454 - part4 : add test. (obsolete) —
Summary: Active media session selection → Active media session selection within a tab
Attachment #9110999 - Attachment description: Bug 1592454 - part2 : add 'TabActiveMediaSessionCandidateId' in browsing context field. → Bug 1592454 - part2 : add 'ActiveMediaSessionContextId' in browsing context field.
Blocks: 1599591
Depends on: 1592037

Will fix this issue in bug1611332.

Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → DUPLICATE
Attachment #9111000 - Attachment is obsolete: true
Attachment #9111001 - Attachment is obsolete: true
Attachment #9110996 - Attachment is obsolete: true
Attachment #9110999 - Attachment is obsolete: true
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: