Re: [mediacapture-main] get video input with torch (#886)

> `video: { torch: { exact: true } }`

This [should TypeError](https://www.w3.org/TR/mediacapture-streams/#dfn-candidate): _"If CS contains a member that is a [required constraint](https://www.w3.org/TR/mediacapture-streams/#dfn-required-constraints) and whose name is not in the list of [allowed required constraints for device selection](https://www.w3.org/TR/mediacapture-streams/#dfn-allowed-required-constraints-for-device-selection), then [reject](https://webidl.spec.whatwg.org/#reject) p with a [TypeError](https://webidl.spec.whatwg.org/#exceptiondef-typeerror), and abort these steps."_

[torch](https://w3c.github.io/mediacapture-image/#torch) is in mediacapture-image, which [says](https://w3c.github.io/mediacapture-image/#constrainable-properties): _"None of the names of these photo capabilities and constrainable properties are in the list of [allowed required constraints for device selection](https://www.w3.org/TR/mediacapture-streams/#dfn-allowed-required-constraints-for-device-selection). Therefore, in [getUserMedia()](https://www.w3.org/TR/mediacapture-streams/#dom-mediadevices-getusermedia), these photo capabilities and constrainable properties can be constrained only with [optional basic constraints](https://www.w3.org/TR/mediacapture-streams/#dfn-optional-basic-constraints) and [advanced constraints](https://www.w3.org/TR/mediacapture-streams/#dfn-advanced-constraints), but not with [required constraints](https://www.w3.org/TR/mediacapture-streams/#dfn-required-constraints)."_

That said, `video: { torch: true }` should work.

> ... it doesn't seem to support constraining ... I'm able to apply the torch constraint to a video track ... once I have one

Is "it" Chrome? If so, please file a crbug to see if it's intentional, [as](https://www.w3.org/TR/mediacapture-streams/#dfn-same-permission) _"The [User Agent](https://www.w3.org/TR/mediacapture-streams/#dfn-user-agent) SHOULD use the value of the computed [fitness distance](https://www.w3.org/TR/mediacapture-streams/#dfn-fitness-distance) from the [SelectSettings](https://www.w3.org/TR/mediacapture-streams/#dfn-selectsettings) algorithm as an input to the selection algorithm"_.

-- 
GitHub Notification of comment by jan-ivar
Please view or discuss this issue at https://github.com/w3c/mediacapture-main/issues/886#issuecomment-1295387198 using your GitHub account


-- 
Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config

Received on Friday, 28 October 2022 19:39:11 UTC