WebRTC-Example icon indicating copy to clipboard operation
WebRTC-Example copied to clipboard

RTCPeerconnection connectionstate "failed"

Open userv562 opened this issue 6 years ago • 0 comments

So I have the same exact code as you with the following exception:

peerConnection.createOffer(offerOptions).then(createdDescription).catch(errorHandler); where

const offerOptions = {
  offerToReceiveAudio: 1,
  offerToReceiveVideo: 1
};

Furthermore, I am also using a TURN server: {'urls': 'turn:numb.viagenie.ca','credential': '**mypass','username': '**myusername'}

But when I check the peerConnection.connectionState in the console, it says "failed".

What I do is I open 2 incognito windows in Chrome and go to

https://localhost:8443

in each window.

Then I click the "Start Video" on one of the pages and then the remoteVideo shows up with an image (i.e. a snapshot) of the frame (on both the windows). Then the localVideo changes as I move the camera, but the remoteVideo stays as a snapshot of when the connection happened (on both the windows). Then I check to see the connectionState of the peerConnection and it says it failed.

I have tried looking for solutions, but I cannot find any. Is there something I am doing wrong please let me know.

userv562 avatar May 17 '19 18:05 userv562