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

> > I think evidence of poor web compat points to browsers not following the algorithm.
>
> The spec should first define a precise and unambiguous algorithm. This is not yet the case.

@youennf The [SelectSettings](https://w3c.github.io/mediacapture-main/getusermedia.html#dfn-selectsettings) _algorithm_ **is** precise if you follow it. I'm all for tightening the _SHOULD_ to a _MUST_, if you think we gave user agents too much rope to not follow it.

In any case, it would seem adhering to the algorithm is the answer to web compat, not the problem.

> in the discussions I have seen (and in the Chromium implementation) pan/tilt/zoom has been treated as a single hardware capability. If that is not the case, then this should be clarified in the spec and, if possible in practice, also in the Chromium implementation.

@guidou While implementations are free to make such assumptions, I see no need to cement them in the specĀ¹ or contort the API over them. It seems cleaner in the abstract for apps to ask for what they want based on their needs, and not make cross-feature assumptions.

> ```js
> navigator.mediaDevices.getUserMedia({video: {
>     pan: {min: -180.0 * 3600, ideal: 0.0, max: 180.0 * 3600},
>     panTiltZoom: {exact: true},
>     tilt: {min: -180.0 * 3600, ideal: 0.0, max: 180.0 * 3600}
> }});
> ```

I find the separate `panTiltZoom` boolean constraint above semantically redundant and confusing (is it needed? What happens if I omit it?) On ergonomics alone, option 3 seems a superior way to express the aboveĀ²:
```js
navigator.mediaDevices.getUserMedia({video: {pan: {exact: 0}, tilt: {exact: 0}}});
```
...or if I don't want to set values (for the same impact on fitness distance):
```js
navigator.mediaDevices.getUserMedia({video: {pan: {exact: true}, tilt: {exact: true}}});
```

---
<sub>1) We combine them only in the permissions-space, where I think it makes sense since the trio shares similar privacy concerns.</sub>
<sub>2) Note this assumes we specify that `0` values are not satisfied by non-panable, non-tiltable cameras.</sub>
  

-- 
GitHub Notification of comment by jan-ivar
Please view or discuss this issue at https://github.com/w3c/mediacapture-image/issues/256#issuecomment-689809928 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 20:40:58 UTC