Closed jan-ivar closed 1 week ago
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?
In https://github.com/w3c/mediacapture-output/issues/116#issuecomment-754478397 @youennf explains the model well:
...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.
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.