- From: Jan-Ivar Bruaroey via GitHub <sysbot+gh@w3.org>
- Date: Mon, 24 Aug 2020 20:43:56 +0000
- To: public-webrtc-logs@w3.org
Here's a good example of why `advanced` constraints suck: a likely bug in [ptz-explainer.md](https://github.com/w3c/mediacapture-image/blob/master/ptz-explainer.md#control-camera-pantilt): ```js const videoStream = await navigator.mediaDevices.getUserMedia({ video: { advanced: [{ // [NEW] Website asks to control camera PTZ as well. pan: true, tilt: true, zoom: true, }], }, }); ``` The above will, if the [constraints algorithm](https://w3c.github.io/mediacapture-main/getusermedia.html#dfn-selectsettings) is implemented correctly, only discover cameras that have _**all three capabilities**_. If none exists, it'll return any regular camera (possibly forgoing cameras that have _some_ of these abilities but not all). To get cameras with one or more of the `pan`, `tilt` and `zoom` abilities would instead have to be written like this: ```js video: { advanced: [ {pan: true}, {tilt: true}, {zoom: true} ], } ``` ...or simply: ```js video: {pan: true, tilt: true, zoom: true} ``` -- GitHub Notification of comment by jan-ivar Please view or discuss this issue at https://github.com/w3c/mediacapture-image/issues/252#issuecomment-679355802 using your GitHub account -- Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config
Received on Monday, 24 August 2020 20:43:57 UTC