Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TAG Review: Thoughts on global MediaSession #193

Closed
travisleithead opened this issue Mar 20, 2017 · 2 comments
Closed

TAG Review: Thoughts on global MediaSession #193

travisleithead opened this issue Mar 20, 2017 · 2 comments

Comments

@travisleithead
Copy link
Member

[Filed in response to the request for TAG feedback]

@xxyzzzq @mounirlamouri

MediaSession as global instance... various platforms will certainly have their conventions. The management of mediaSession between a single apps iframes and between multiple tabs in a browser environment seem like essentially the same problem. If there is a security concern then consider [SecureContext], but otherwise, I wonder if adding author-management for this complexity is worth the effort. I have a hunch UA's will do the right thing, and even if they don't, the OS will need to do the right thing when brokering access between Apps and sites (even in different browsers) all competing for the mediasession instance. I'm not sure to what extent it makes sense to try to solve this problem in the spec...

@xxyzzzq
Copy link
Contributor

xxyzzzq commented Mar 24, 2017

This is what we called "audio focus", which is for deciding which media should play and which should not, and which is the currently media most meaningful to the user. This was part of the API in the very beginning, but it was took away and moved to the Audio Focus PI which is still work in progress. The reason for this move is that there are still many unclear topics and platform integration issues that slows down the Media Session API progress.

For the case of mobile devices, it is common to allow at maximum of one tab plays sound (as implemented on Chrome and Safari), so the UA should have audio focus managing audio focus already. For desktop, hopefully this could be solved either by the UAs themselves or by the Audio Focus API, but it is still unclear.

@beccahughes
Copy link
Contributor

On desktop we have shipped a variant of audio focus that does not actually restrict playback but uses the logic to determine what was playing last.

Since there hasn't been any discussion on this issue for a couple of years I am going to close it, but feel free to re-open if necessary.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants
@travisleithead @xxyzzzq @beccahughes and others