3

Suddenly there is a PermissionDeniedError and getUserMedia error on RTCMultiConnection, while everything was working almost well. And not only in Chrome.

Taking in consideration that the API is experimental and under changing restrictions and browsers' compatibility and knowing that this question has been asked again, without viewing any usable reply, on this case, I take the risk to ask.

I don't think that errors have to do with

getUserMedia() no longer works on insecure origins. 

The above problem appeared in Opera 34.0 and Chrome 47, while Firefox 40 is working fine.

It is not application's bug or camera compatibility, becaused I tested also in https://jsfiddle.net/zar6fg60/, both in desktop camera and laptop with the same errors below.

Console log errors

name PermissionDeniedErrorconnection.onMediaError @ RTCMultiConnection.js:5592mediaConfig.onerror @ RTCMultiConnection.js:594(anonymous function) @ RTCMultiConnection.js:3931getUserMedia @ RTCMultiConnection.js:3930_captureUserMedia @ RTCMultiConnection.js:678captureUserMedia @ RTCMultiConnection.js:503(anonymous function) @ RTCMultiConnection.js:118initRTCMultiSession @ RTCMultiConnection.js:228connection.open @ RTCMultiConnection.js:108_.onclick @ inter_stream.js:240
RTCMultiConnection.js:5593 constraintName {
    "audio": {
        "mandatory": {},
        "optional": [
            {
                "chromeRenderToAssociatedSink": true
            }
        ]
    },
    "video": true
}connection.onMediaError @ RTCMultiConnection.js:5593mediaConfig.onerror @ RTCMultiConnection.js:594(anonymous function) @ RTCMultiConnection.js:3931getUserMedia @ RTCMultiConnection.js:3930_captureUserMedia @ RTCMultiConnection.js:678captureUserMedia @ RTCMultiConnection.js:503(anonymous function) @ RTCMultiConnection.js:118initRTCMultiSession @ RTCMultiConnection.js:228connection.open @ RTCMultiConnection.js:108_.onclick @ inter_stream.js:240
RTCMultiConnection.js:5594 message Either: 
 Media resolutions are not permitted.
 Another application is using same media device.
 Media device is not attached or drivers not installed.
 You denied access once and it is still denied.
 Only secure origins are allowed (see: https://goo.gl/Y0ZkNV).connection.onMediaError @ RTCMultiConnection.js:5594mediaConfig.onerror @ RTCMultiConnection.js:594(anonymous function) @ RTCMultiConnection.js:3931getUserMedia @ RTCMultiConnection.js:3930_captureUserMedia @ RTCMultiConnection.js:678captureUserMedia @ RTCMultiConnection.js:503(anonymous function) @ RTCMultiConnection.js:118initRTCMultiSession @ RTCMultiConnection.js:228connection.open @ RTCMultiConnection.js:108_.onclick @ inter_stream.js:240
RTCMultiConnection.js:5595 original session Object {audio: true, video: true}

Solution Updated to secure http and everything is working well right now, thanks to Muaz Khan. Chrome has a notice about secure origins and there is a w3c new context on media access at non-secure urls.

Community
  • 1
  • 1
Nik Drosakis
  • 2,258
  • 21
  • 30

1 Answers1

2
  1. Please make sure that you're using RTCMultiConnection v2.2.2.
  2. Make sure that your domain is allowed for webcam (Video): chrome://settings/contentExceptions#media-stream-camera
  3. You seems using HTTPs. Which makes sense.
  4. You seems using {audio:true,vide:true} so no "screen:true" exceptions here!
  5. Please try AppRTC demo which is built using RTCMultiConnection v2.2.2

Can you please try this demo to see number of audio/video devices available on your system: https://www.webrtc-experiment.com/demos/MediaStreamTrack.getSources.html

If webcam is denied on Chrome, you'll see isWebcamAlreadyCaptured == false here: https://stackoverflow.com/a/30047627/552182

Additionally:

  1. Please share your browser version: https://www.webrtc-experiment.com/DetectRTC/
  2. Please make sure that another application (Firefox/etc.) is NOT using same camera.
Community
  • 1
  • 1
Muaz Khan
  • 7,138
  • 9
  • 41
  • 77