Re: [mediacapture-output] Web pages might want to easily set a speaker setup previously used (#99)

Here are a few scenarios/ideas to start the discussion.

The first scenario is that the speaker to be used is the one related to the microphone disclosed by getUserMedia.
In that case, the specs seem fine as is: on every visit, the web page will start with getUserMedia and will then select the speaker exposed after getUserMedia.

The second scenario is the more general case where microphone is not in use.

If the device info(s) being used were statically exposed (https://github.com/w3c/mediacapture-output/issues/93), they will most probably be exposed again so setSinkId can be used directly.

If device info(s) were exposed to the web page by selectAudioOutput and used to set the whole page audio output (https://github.com/w3c/mediacapture-output/issues/87), the user agent may decide to set it back on next visit, based on some heuristics. This is easier done on a page scope than an individual media element scope.

In the more complex case where selectAudioOutput is used on individual elements or called several times to use multiple speakers, a possibility is for selectAudioOutput to take an additional ‘deviceId’ parameter. If the ‘deviceId’ matches an existing device, the user agent may decide to not prompt the user (let’s say user granted persistent access) and resolve the promise with the corresponding MediaDeviceInfo. This deviceId can then be used by setSinkID. If the ‘deviceId’ does not match any available speaker, it should be ignored and selectAudioOutput would continue with a prompt. This hopefully should prevent pages to passively monitor speakers. The potential downside here is that selectAudioOutput might prompt in some cases but not others.

-- 
GitHub Notification of comment by youennf
Please view or discuss this issue at https://github.com/w3c/mediacapture-output/issues/99#issuecomment-667900886 using your GitHub account


-- 
Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config

Received on Monday, 3 August 2020 08:59:33 UTC