[mediacapture-output] setSinkId("") vs setSinkId(defaultDeviceId) (#94)

jan-ivar has just created a new issue for https://github.com/w3c/mediacapture-output:

== setSinkId("") vs setSinkId(defaultDeviceId) ==
This [spec](https://w3c.github.io/mediacapture-output/#dom-htmlmediaelement-sinkid) defines `""` to mean the _"user-agent default device"_, e.g. status quo without this spec.

At least on macOS this OS default is dynamic and may change live. As such, these differ:
```js
await element.setSinkId(""); // Follow the dynamic OS default 
```
```js
await element.setSinkId(defaultDeviceId); // Stop following the dynamic OS default 
```
With the second one, the element stops responding to user changes in the OS.

The problem is the [spec](https://w3c.github.io/mediacapture-output/#dom-htmlmediaelement-setsinkid) right now implies both of these may be called without consent, which seems wrong: _"If the application is not permitted to play audio through the device identified by sinkId, reject p "_, [and](https://w3c.github.io/mediacapture-output/#privacy-consent): _"The specification adds no permission requirement to the default audio output device."_.

We propose changing the spec here to require consent for anything other than `""`, since it allows JS to stop following the (potentially changing) OS default, and instead track the physical device that was default at the time of the call.

Please view or discuss this issue at https://github.com/w3c/mediacapture-output/issues/94 using your GitHub account

Received on Thursday, 11 June 2020 15:12:12 UTC