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

Do we need an infrared constraint? #14

Open
jan-ivar opened this issue Nov 3, 2020 · 3 comments
Open

Do we need an infrared constraint? #14

jan-ivar opened this issue Nov 3, 2020 · 3 comments
Assignees

Comments

@jan-ivar
Copy link
Member

jan-ivar commented Nov 3, 2020

Infrared cameras are common on phones, and are typically included in enumerateDevices() w3c/mediacapture-main#553.

They're rarely desirable except for special purposes, and browser vendors occasionally get bugreports where an infrared camera is chosen by default on some phones. The fix for dealing with them is usually to put them after the first non-infrared front camera and first non-infrared back camera in the list, and label them as " (infrared)".

But since they're special-purpose, should we let apps constrain them out, using e.g. {infrared: {exact: false}} (or in)?

@jan-ivar jan-ivar transferred this issue from w3c/mediacapture-main Nov 19, 2020
@rahulsingh-msft
Copy link

We've had bug reports in Microsoft Edge(Chromium based) where the root cause was the websites picking the IR camera due to its facingMode: user. Given that IR cameras are only utilized for a few specific purposes, we would support an opt-in constraint to gate their inclusion in getUserMedia().

@jan-ivar
Copy link
Member Author

jan-ivar commented Dec 4, 2020

websites picking the IR camera due to its facingMode: user

Were there no other front-facing cameras available?

An "opt-in constraint" would be a new concept that would challenge the model somewhat. Constraints constrain, they don't expand choices. E.g. would the device be listed in enumerateDevices?

@rahulsingh-msft
Copy link

I see your point! So, an opt-out constraint that allows websites to specify that they DON'T want IR cameras included in EnumerateDevices() would also work. Such a constraint would be useful in cases where the device label for IR cameras doesn't contain the substring 'IR'. Eg. the IR camera on a Surface Laptop 3 is labeled "AvStream Media Device". In such cases, websites can incorrectly pick the IR camera instead of the front facing RGB camera.

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