Re: [mediacapture-image] Clarify meaning of PTZ constraints presence (#256)

> > To me, ... {pan: true} means that PTZ is required and, when not available, gUM() fails with OverconstrainedError if used in the basic set (the set is ignored if used in an advanced set)
> 
> I find no support in the spec for that interpretation.
>
The spec says: " An empty ConstrainDoubleRange value implies no constraints but only a permission and capability request."
That's where my interpretation comes from. pan: {} means request PTZ capability. Interpreting not having the capability as failing to satisfy the request looks like a valid interpretation to me.
 
> The spec [says](https://w3c.github.io/mediacapture-image/#dom-mediatrackconstraintset-pan): _"A value of `true` is normalized to a value of empty ConstrainDouble"_, which I don't see being able to cause `OverconstrainedError`.
>

See above.
 
> > This would mean that there is no way to require the PTZ capability, which is the intended result of the proposal.
> 
> I see no way in the current spec to require PTZ capability without setting a value, e.g. `pan: {exact: 3600}` (it's not clear if `pan: {exact: 0}` does).
> 

IIRC, the result of a previous discussion was that the presence of the constraint (with any value, including empty/true) indicated the capability/permission request. As indicated above, the spec explicitly says: "An empty ConstrainDoubleRange value implies no constraints but only a permission and capability request."

> Option 3 would add that with e.g. `{pan: {exact: true}}`, modulo whatever we come up with in #246.
> 
> > Not sure if the extra complexity of allowing pan to be used this way or in the usual DoubleConstraint way is worth it over using a separate constraint for the PTZ capability.
> 
> You're listing the natural outcomes of the existing constraints algorithm.
>

Indeed.
 
> I think the complexity is exactly the same as having a separate boolean constraint, except we avoid some nonsense combos:
> 
> ```js
> {video: {ptz: {exact: false}, pan: {min: 3600}}}
> ```
> 
> ```js
> {video: {ptz: false, pan: 3600}} 
> ```

Having to deal with the weird combos, is part of the extra complexity. Having to deal with a range that is the union of all floating point numbers, true and false, where true and false have specific meanings that are not translations to a floating-point range  is probably going to be harder in terms of implementation than dealing with just the set of floating numbers or just {true,false}. 

-- 
GitHub Notification of comment by guidou
Please view or discuss this issue at https://github.com/w3c/mediacapture-image/issues/256#issuecomment-689404394 using your GitHub account


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

Received on Wednesday, 9 September 2020 08:13:04 UTC