Dmitro
Dmitro

Reputation: 1549

Why does Chrome not show the prompt with Allow or Disallow permission to microphone and webcam?

I have built simple video chat with SimpleWebRTC, and when I start WebRTC on the Ubuntu Chrome 34 shows me the prompt with Allow or Disallow permission to microphone and webcam. I click allow and can start conversation if even I don't have webcam.

But when I start WebRTC on Windows 7 Chrome 33 doesn't show any prompt. But I can see cross webcam icon in address line. And when I try to allow Chrome to use microphone and webcam It's reloading. So what I need to do for showing the prompt as in Linux?

My code is:

    webrtc = new SimpleWebRTC({
        // the id/element dom element that will hold "our" video
        localVideoEl: 'publishers',
        // the id/element dom element that will hold remote videos
        remoteVideosEl: 'subscribers',
        // immediately ask for camera access
        autoRequestMedia: true
    });
    webrtc.on('readyToCall', function () {
        webrtc.joinRoom(sessionId);
    });

Also I can reproduce it with this demo. I got next error message in that demo app:

Failed to get access to local media. Error name was PermissionDeniedError. Continuing without sending a stream.

Upvotes: 21

Views: 46035

Answers (3)

user10984218
user10984218

Reputation: 83

I had the exact same SimpleWebRTC setup and it wasn't working in both Chrome and Firefox and I clearly had no approvals/dismissals made before (which could be a reason why browsers don't ask) but I was accessing my local dev environment without https and most modern browsers block HTTP-only transfer of image and audio recorded by the device. Just prepending an 'https' did the trick for me.

Upvotes: 1

brunobar79
brunobar79

Reputation: 988

There's a new security feature on Chrome 59:

Temporarily stop permission requests after 3 dismissals Security

Temporarily stop an origin from requesting a permission following the third dismissal of a permission prompt. The stop will be lifted after some amount of time has passed (initially 1 week), after which the origin may request the permission again. A further dismissal will apply the temporary stop again.

For web developers who are testing features, the block can also be removed by changing the permission's setting in the lock icon's page info dialog, or by clearing your browsing data.

Source: https://www.chromestatus.com/features/6443143280984064

Upvotes: 3

philidem
philidem

Reputation: 329

It looks like you may have blocked the domain from ever asking for media access. You can remove this exception from within Chrome Settings.

Open Chrome Settings and then navigate to:

Settings > Privacy (within advanced settings) > Click Content settings.. > Click Manage exceptions...

Make sure your domain does not have Block value for Audio/Video. You can remove the entry for the blocked domain if it exists.

Upvotes: 2

Related Questions