Closed Bug 806437 Opened 12 years ago Closed 12 years ago

Need a way to test if the user has a cam whitout trying to access the stream

Categories

(Core :: WebRTC, defect)

defect
Not set
normal

Tracking

()

RESOLVED DUPLICATE of bug 802656

People

(Reporter: doyer.guyllaume, Unassigned)

Details

User Agent: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.40 Safari/537.11




Expected results:

This may be a getUserMedia API's spec related issue bug i would like to be able to know if a user has a webcam without trying to access the stream.

I want to be able to adapt the UI depending whether or not a webcam is accessible.

The problem is that currently, to test this, on the initialisation of my app, I have to ask the user the right to access its webcam to test if there's one, adapt my UI and do some stuff. 
When the app has been inited, when the user click the button to use the webcam stream, he's asked a second the right to access the webcam.

This can be cumbersome.
OS: Windows 7 → All
Hardware: x86_64 → All
Component: Untriaged → WebRTC
Product: Firefox → Core
QA Contact: jsmith
If I call mozGetUserMedia with no webcam support, I should get an error callback with NO_DEVICES_FOUND. Is that not sufficient?
I just tried but on my desktop (windows) that does not have webcam but didn't get any error.

Assuming I made a mistake somewhere and assuming this works, in case a webcam is available, wouldn't that ask the user for permission to access it? 
If it's the case, this is exactly the issue I'm raising. We need a way to kwnow if a webcam is accessible, without having to request access to immediatly.
(In reply to Guyllaume Doyer from comment #2)
> I just tried but on my desktop (windows) that does not have webcam but
> didn't get any error.

Right, that's a known bug. If that bug is fixed, then you should get the error.

> 
> Assuming I made a mistake somewhere and assuming this works, in case a
> webcam is available, wouldn't that ask the user for permission to access it? 
> If it's the case, this is exactly the issue I'm raising. We need a way to
> kwnow if a webcam is accessible, without having to request access to
> immediatly.

I don't believe they should get a permission prompt if NO_DEVICES_FOUND is going to get thrown. That's a bug if the permission prompt does appear, but NO_DEVICES_FOUND gets thrown.
Ok but will the permission prompt appear if a device is found?
(In reply to Guyllaume Doyer from comment #4)
> Ok but will the permission prompt appear if a device is found?

No, it shouldn't.
Duping on the bug tracking this, as I think the concern brought up here will be resolved by bug 802656.
Status: UNCONFIRMED → RESOLVED
Closed: 12 years ago
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.