egidra
egidra

Reputation: 9087

getUserMedia() permission denied

I am trying to test out screen sharing using getUserMedia(). I have Chrome version 28 and the getUserMedia() screen capturing flag enabled, yet I still get permission denied errors.

On this screen capture demo, I get the following error:

getUserMedia error: NavigatorUserMediaError {code: 1, PERMISSION_DENIED: 1}

While, on this screen capture demo, I get the following demo:

PERMISSION_DENIED. Are you no SSL?

I never got any prompts about sharing when visiting the sites. Why does my browser deny permission to screen share?

Upvotes: 11

Views: 34152

Answers (5)

Tomás
Tomás

Reputation: 3561

I had the same permission denied problem.
I solved it simply clicking in

Chrome video icon disabled video

And enabling the "Ask me to enable video..." option

Reload page and it will ask again if you want to load the webcam.
That worked for me.

Upvotes: 13

arthur.sw
arthur.sw

Reputation: 11619

I had the same problem, just because I didn't run the webpage from a local server (I was simply opening my html page in chrome through the file system).

Using a basic server like mamp fixed it!

Upvotes: 0

ovunccetin
ovunccetin

Reputation: 8663

I faced the same situation and my reason is that the camera is already used by another page. I closed the page, retry and everything is alright.

Upvotes: 1

Sam Dutton
Sam Dutton

Reputation: 15269

For screen capture with getUserMedia, you need to use HTTPS. (Apologies if you followed a link of mine which didn't have that!)

Upvotes: 7

tomtheengineer
tomtheengineer

Reputation: 4277

The second demo you mentioned (this one) works for me on Chrome 28.

It sounds like you enabled the flag, but make sure the one called Enable screen capture support in getUserMedia() is enabled in chrome://flags (and that you have restarted Chrome since enabling that).

Upvotes: 3

Related Questions