Re: [mediacapture-image] [PTZ] Should pan, tilt, and zoom double constraints apply to getUserMedia? (#224)

> When would web developers set pan, tilt, and zoom double values as part of a `getUserMedia` call?
[...]
> As we're not sure which camera would be plugged in and cameras have different ranges for pan, tilt, and zoom, I'm not sure those values should be "set" or "applied" to the video stream.

Web developers could have a priori knowledge of ranges (for instance if a user wants to resume a previously stopped video stream) in which case the site could issue

> ```js
> await navigator.mediaDevices.getUserMedia({
>   video: {
>     deviceId: "...",
>     pan: 1,
>     tilt: 2,
>     zoom: 3,
>   }
> });
> ```

Even without a priori knowledge, it might make sense to use `{video: {pan: 0, tilt: 0, zoom: 1}}`, for instance. If the user does not have a PTZ camera, pan/tilt/zoom constraints make no harm and if the user does have a PTZ camera, the constraints most probably reset the PTZ camera to a sensible state. For pan and tilt, the ranges is probably symmetric so 0 is in the middle. For zoom, the value 1 probably means no digital zoom or is less than or equal to the minimum of an optical zoom range resulting in widest possible optical zoom to be selected by media stream selection algorithms.

Resetting a PTZ camera to a sensible state might be quite important because the image quality of a PTZ camera may degrade drastically if a digital zoom  level is high.

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

Received on Monday, 27 April 2020 12:47:29 UTC