Re: [mediacapture-image] The (bool or ConstrainDouble) case for pan/tilt/zoom is unclear (#225)

> > For info, here's the explanation when we introduced this pattern: [#218 (comment)](https://github.com/w3c/mediacapture-image/pull/218#discussion_r396258340)
> 
> The rationale seems wrong to me.
> First, audio/video are media types, while PTZ are constrainable properties for the video type.

It's true that those cases are conceptually different. I aimed at syntactic similarity, if that has any merit.

> Second, it is suggested that pan: true is a faster way to say pan:{}. Well, not saying anything is an even faster way, so adding a new way to say unconstrained is inconsistent.

Not saying anything might be faster way but that results in a different state i.e. not requesting PTZ ( `{name: "camera", panTiltZoom: true}`) permission.

So, there there are three cases:
1. `getUserMedia({video: true})` or `getUserMedia({video: {}})`: PTZ permission is not requested and pan is unconstrained
2. `getUserMedia({video: {pan: true}})` or `getUserMedia({video: {pan: {}}})`: PTZ permission is requested and pan is unconstrained
3. `getUserMedia({video: {pan: 0}})` or `getUserMedia({video: {pan: {ideal: 0}}})` or similar: PTZ permission is requested and pan is constrained

The API seems quite clear to me but please object if you like.

The other option which we considered was something like:
1. `getUserMedia({video: true})` or `getUserMedia({video: {}})`: PTZ permission is not requested and pan is unconstrained
2. `getUserMedia({video: {pan: 0}})` or `getUserMedia({video: {pan: {ideal: 0}}})` or similar: PTZ permission is not requested, pan constraint is ignored and pan is thus unconstrained
2. `getUserMedia({video: {ptzPermission: true}})`: PTZ permission is requested and pan is unconstrained
3. `getUserMedia({video: {pan: 0, ptzPermission: true}})` or `getUserMedia({video: {pan: {ideal: 0}, ptzPermission: true}})` or similar: PTZ permission is requested and pan is constrained

Seems quite confusing to me, especially the second case.

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

Received on Tuesday, 28 April 2020 17:06:02 UTC