pusher_webrtc
pusher_webrtc copied to clipboard
How to add Stun/Turn server
How to add the Stun/Turn server to this program?
I still have problem in showing the videos of both sides and I get these two errors:
-
InvalidStateError: Cannot add ICE candidate in state stable
-
ICE failed, add a STUN server and see about:webrtc for more details
Hi, function prepareCaller() { const configuration = { 'iceServers': [{ 'urls': 'stun:stun.l.google.com:19302' }] }; //Initializing a peer connection caller = new window.RTCPeerConnection(configuration); //Listen for ICE Candidates and send them to remote peers caller.onicecandidate = function(evt) { if (!evt.candidate) return; console.log("onicecandidate called"); onIceCandidate(caller, evt); }; Good Luck:)