- From: Jan-Ivar Bruaroey via GitHub <sysbot+gh@w3.org>
- Date: Thu, 03 Nov 2022 19:38:19 +0000
- To: public-webrtc-logs@w3.org
> You're right: [`deviceId`](https://w3c.github.io/mediacapture-main/#dfn-deviceid), [`groupId`](https://w3c.github.io/mediacapture-main/#dfn-groupid), and [`torch`](https://w3c.github.io/mediacapture-image/#dom-mediatrackcapabilities-torch) are constant constrainable properties. [`torch`](https://w3c.github.io/mediacapture-image/#dom-mediatrackconstraintset-torch) is not, but [facingMode](https://w3c.github.io/mediacapture-main/#def-constraint-facingMode) is one (even though it can have both "user" and "left" inherent values). > My naive thoughts were that `getCapabilities()` would return capabilities that allow users to make changes to the constrainable properties via `applyConstraints()`. In other words, that they would be either `max/min` ranges (e.g. `<input type="range"`) or sequences of choices (e.g. `<select>`, `<input type="checkbox">`). That's right, but consider how constraints with only one valid value would look. This comes up both for non-inherent constraints like [channelCount](https://w3c.github.io/mediacapture-main/#def-constraint-channelCount) on a mono mic (`[1]`), as well as inherent ones like `deviceId`. Having the latter be `"mydeviceIdString1234"` rather than `["mydeviceIdString1234"]` was [an editor's mistake](https://github.com/w3c/mediacapture-main/commit/059a9211d1622094dd8857db9beb477976f971dd) IMHO, but I never complained about it (I'm regretting that right now). > For me, the question is whether the current design makes sense as is, or if it should be amended. I'd support changing it (back) to a sequence of one. That "makes sense" and supports that the following should resolve: ```js await track.applyConstraints({deviceId: {exact: track.getSettings().deviceId}}); ``` ...whereas the following should reject: ```js await track.applyConstraints({deviceId: {exact: track.getSettings().deviceId + "2"}}); ``` -- GitHub Notification of comment by jan-ivar Please view or discuss this issue at https://github.com/w3c/mediacapture-screen-share/issues/250#issuecomment-1302581539 using your GitHub account -- Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config
Received on Thursday, 3 November 2022 19:38:21 UTC