Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

get video input with torch #886

Closed
mfulton26 opened this issue Jun 1, 2022 · 2 comments
Closed

get video input with torch #886

mfulton26 opened this issue Jun 1, 2022 · 2 comments
Assignees

Comments

@mfulton26
Copy link

mfulton26 commented Jun 1, 2022

I see that getUserMedia can specify constraints but it doesn't seem to support constraining based on torch (even if I send in video: { torch: { exact: true } }; does it only support constraining on "image track" constraints and not "video track" constraints? I'm able to apply the torch constraint to a video track on a videoinput stream once I have one. I'm currently enumerating all devices and trying each one to find out which ones support torch which is a little slow and tedious. I'd much rather specify it as a constraint when calling getUserMedia or something. Please advise. Thank you.

@jan-ivar
Copy link
Member

video: { torch: { exact: true } }

This should TypeError: "If CS contains a member that is a required constraint and whose name is not in the list of allowed required constraints for device selection, then reject p with a TypeError, and abort these steps."

torch is in mediacapture-image, which says: "None of the names of these photo capabilities and constrainable properties are in the list of allowed required constraints for device selection. Therefore, in getUserMedia(), these photo capabilities and constrainable properties can be constrained only with optional basic constraints and advanced constraints, but not with 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 "The User Agent SHOULD use the value of the computed fitness distance from the SelectSettings algorithm as an input to the selection algorithm".

@jan-ivar
Copy link
Member

Closing as there does not appear to be a spec issue here. torch is in mediacapture-image.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants