[mediacapture-main] Clarify behavior of using wrong-type constraints

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

== Clarify behavior of using wrong-type constraints ==
The following programming error is not a `TypeError` in our spec:

```js
if (navigator.mediaDevices.getSupportedConstraints().width) {
  let stream = await navigator.mediaDevices.getUserMedia({audio: 
{width: 640}}); // audio
}
```

My best reading of the current spec is that it should be silently 
ignored, which seems defensible given how dictionary members tend to 
work ("ignore unrelated members"), so that's not my question.

My question is, should the following reject with 
`OverconstrainedError`?

```js
if (navigator.mediaDevices.getSupportedConstraints().width) {
  let stream = await navigator.mediaDevices.getUserMedia({audio: 
{width: {exact: 640}}});
}
```

It seems to hinge on reading this language:
 * *"If the constraint is required ('min', 'max', or 'exact'), and the
 [settings 
dictionary](https://w3c.github.io/mediacapture-main/getusermedia.html#dfn-settings-dictionary)'s
 value for the constraint does not satisfy the constraint, the fitness
 distance is positive infinity."*

"Satisfy" does not appear defined anywhere. Specifically, it doesn't 
say how to handle when a settings-dictionary does not have a value for
 the constraint, i.e. the constraint is irrelevant.

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

Received on Monday, 10 October 2016 16:35:19 UTC