[mediacapture-output] setSinkId is inconsistent in handling of default value.

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

== setSinkId is inconsistent in handling of default value. ==
[sinkId](https://w3c.github.io/mediacapture-output/#dom-htmlmediaelement-sinkid) defaults to `""`(*"...the empty string if output is delivered through the user-agent default device"*)

But [[[SinkId]]](https://w3c.github.io/mediacapture-output/#htmlmediaelement-extensions) defaults to `null` (*"Let the element have a [[SinkId]] internal slot, initialized to null."*)

This messes [setSinkId](https://w3c.github.io/mediacapture-output/#dom-htmlmediaelement-setsinkid) in observable ways:

 *"3. If sinkId is equal to element's [[SinkId]], return a promise resolved with undefined."*

```js
await element.setSinkId(element.sinkId); // NotFoundError
```

Instead, this should succeed, [like it does in Chrome](https://jsfiddle.net/jib1/Lumb0w6e/).

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

Received on Friday, 28 September 2018 19:32:33 UTC