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

Status of AudioFocus API #277

Open
chrisn opened this issue May 23, 2022 · 4 comments
Open

Status of AudioFocus API #277

chrisn opened this issue May 23, 2022 · 4 comments

Comments

@chrisn
Copy link
Member

chrisn commented May 23, 2022

In section 5.2 Routing, the Media Session spec says:

It is RECOMMENDED that the user agent selects the active media session by managing audio focus. A tab or browsing context is said to have audio focus if it is currently playing audio or the user expects to control the media in it. The AudioFocus API targets this area and could be used once it’s finished.

What's the current status of the AudioFocus API. Should we still mention this in the Media Session spec?

@chrisn
Copy link
Member Author

chrisn commented Jun 27, 2022

See WICG/audio-focus#28

@steimelchrome
Copy link
Contributor

I don't think we've touched this in a while and don't currently have plans to. That said, I recall @jernoble giving some historical context at the last meeting but I don't recall exactly what it was

@chrisn
Copy link
Member Author

chrisn commented Jul 12, 2022

Thanks - the notes from the last meeting are here.

@rektide
Copy link

rektide commented Jul 30, 2022

From those notes,

Jer: I believe Becca was working on [Audio Focus], but don't know if someone else picked it up

paulijar added a commit to paulijar/music that referenced this issue Dec 31, 2022
In all browsers today, the mediaSession API has been limited to work
only when there is an Audio element (with a valid src) in the scope.
Because of this, the media controls were not available while playing
with the Aurora.js backend.

This is now worked around by initializing a dummy Audio element when
playback with Aurora.js starts. On Firefox, there was such an extra
requirement that the Audio element must not be completely silent (i.e.
just silent audio src didn't work, nor setting the volume to exactly
0). Hence, our dummy audio content actually has some sound but it's
played in extremely quiet volume, making it impossible to hear.

The proper solution for the issue would be for the browsers to
implement the audio focus API (see
w3c/mediasession#277). This has been first
suggested years ago but so far there's no known progress.
@youennf youennf added this to the V1 milestone Mar 14, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants