Re: [mediacapture-image] Deny mandatory PTZ contraints in basic getUserMedia contraints (#261)

I updated the commit and the intro.

> > * What should `getUserMedia({video: {advanced: [{pan: {exact: 1234}, width: 10}]}` or  `getUserMedia({video: {advanced: [{pan: 1234, width: 10}]}` do? Should the advanced constraint set be ignored? Note that @youennf's PR [w3c/mediacapture-main#707](https://github.com/w3c/mediacapture-main/pull/707) does not do that. If the advanced constraint set is ignored, should it be ignored silently, should it produce a console warning or equivalent or should it throw an `OverconstrainedError` (which advanced constraints do not normally throw)?
> 
> The whole advanced set should be ignored because it contains a required constraint for pan (naked values in advanced are exact). Thus, the examples given should be equivalent to getUserMedia({video:true}).

Done.

> > * What should `getUserMedia({video: {advanced: [{pan: {ideal: 1234}, width: 10}]}` do? Is that ideal request for pan capability and for the pan setting of 1234?
> >   Ideal values are ignored for advanced sets. I believe this is equivalent to
> >   getUserMedia({video: {advanced: [{pan: {}, width: 10}]}), which should be equivalent to getUserMedia({video: {advanced: [{width: 10}]})
> > * What should `getUserMedia({video: {advanced: [{pan: true, width: 10}]}` or  `getUserMedia({video: {advanced: [{pan: {}, width: 10}]}` do? Is that ideal request for pan capability (like `getUserMedia({video: {pan: true}})`)? Makes kind of sense. Or is that no constraint and no capability request? That would be easy but in that case is  `getUserMedia({video: {advanced: [{pan: {ideal: 1234}, width: 10}]}` an ideal request for the pan setting of 1234 but not an ideal request for pan capability which does not make much sense.
> 
> This should result in no constraints and no (ideal) capability request. There are no ideal values in advanced sets.

These result in ideal constraints and ideal capability constraints in advanced sets which do not effect the result of the SelectSettings algorithm thus basically the same thing.

> Based on the conclusion in the virtual interim, PTZ constraints in the advanced sets can only have two meanings.
>
> 1. They cause the set to be ignored if they include any required constraint (e.g., pan: 4, pan: {min: 4}, pan: {exact: 4}) since we required constraints for PTZ are not allowed.
> 2. They are ignored because they specify no constraints, so they don't affect anything in the SelectSettings algorithm (e.g., pan: {} or pan: true).
> 
> 
> Thus, in practice PTZ constraints in the advanced set are not useful in practice. The reason is that we don't want required constraints for PTZ and the only thing advanced sets can do is specify required constraints.

Done.

-- 
GitHub Notification of comment by eehakkin
Please view or discuss this issue at https://github.com/w3c/mediacapture-image/pull/261#issuecomment-698225432 using your GitHub account


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

Received on Thursday, 24 September 2020 09:19:57 UTC