[mediacapture-image] Pull Request: Deny mandatory PTZ contraints in basic getUserMedia contraints

eehakkin has just submitted a new pull request for https://github.com/w3c/mediacapture-image:

== Deny mandatory PTZ contraints in basic getUserMedia contraints ==
This is to address https://www.w3.org/2020/09/15-webrtc-minutes.html#r05

Some details related to the resolution are not entirely clear to me, so please correct me if I misunderstood something or if you prefer something else.

## getUserMedia()

Required PTZ constraints in the basic constraint set are denied (and throw an `OverconstraintedError`) and PTZ capability constraints (`{zoom: true}` etc.) are ideal in the basic constraint set. Therefore, a PTZ constraint in the basic set cannot cause getUserMedia() to fail conditionally. This should be a clear case, I hope.

In this PR, required PTZ constraints are still allowed in the advanced constraint sets, for three reasons:

1. The advanced constraint sets cannot  throw an `OverconstraintedError` but the UA may instead ignore them.
2. More importantly, a PTZ capability requests (`{advanced: [{tilt: true}]}` etc.) look like bare value constraints (while being syntactic sugar for empty constraints i.e. `{advanced: [{tilt: {}}]}` etc.) and bare value constraints are normally treated as exact required constraints in the advanced sets.
3. I do not see justification for added complexity required for changing PTZ constraint types to `ConstraintDoubleOrBoolean` which would allow `{advanced: [{pan: {ideal: true}}]}` etc. to be used.

What do you think?

## applyConstraints()

Required PTZ constraints are still allowed. Web apps can check capabilities with getCapabilities() before applying constraints. While only ideal and exact required (but not min and max required) constraints probably make sense, I do not see a point for special-casing PTZ constraints here.

I also clarified that PTZ capabilities cannot be obtained with applyConstraints().

@beaufortfrancois @guidou @jan-ivar @riju @youennf: PTAL

See https://github.com/w3c/mediacapture-image/pull/261


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

Received on Thursday, 17 September 2020 21:11:57 UTC