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

Why prompt for a subset of stored speakers or speakers setSinkId already accepts? #142

Closed
jan-ivar opened this issue Jul 13, 2024 · 2 comments · Fixed by #143
Closed

Why prompt for a subset of stored speakers or speakers setSinkId already accepts? #142

jan-ivar opened this issue Jul 13, 2024 · 2 comments · Fixed by #143

Comments

@jan-ivar
Copy link
Member

jan-ivar commented Jul 13, 2024

In #116 (comment) @youennf explains the model well:

The model is as follow:
a. If enumerateDevices is exposing audiooutput devices, deviceId can be used by setSinkId.

...so why should selectAudioOutput({deviceId}) prompt? "If deviceId is not "" and matches an id previously exposed by selectAudioOutput in an earlier browsing session, the user agent MAY [skip the prompt]"

This forces apps who already have transient activation to vet their stored ids through enumerateDevices to conditionally skip selectAudioOutput to avoid a needless prompt.

b. If the application knows of a deviceId used in the past but enumerateDevices is not exposing it, the application is expected to call selectAudioOutput with the corresponding deviceId.
...
Case b. can happen for deviceId previously revealed by selectAudioOutput or getUserMedia.

Except case b will prompt for deviceIds revealed by getUserMedia. This seems surprising.

This seems like it could be streamlined. User agents should be allowed to bypass the prompt for deviceIds that are good to go, and whether they came from selectAudioOutput or getUserMedia.

@youennf
Copy link
Contributor

youennf commented Aug 22, 2024

I agree the intent is to allow the flexibility for skipping prompts for devices that have been exposed in the past, and this sentence is forgetting about getUserMedia here.

@jan-ivar, is there anything more to this issue?

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

Successfully merging a pull request may close this issue.

3 participants