0

after having worked on App for chatting with SimpleWebRTC for about a month, which was functioning normally, however, 2 days ago all of the sudden when 2 or more peers connect to the same room after a couple of seconds the following is printed out on the console and there is no more connection between the peers. I just don't know what happened given the fact that the code has not changed at all.

SimpleWebRTC event: iceConnectionStateChange Event {isTrusted: true, type: 
"iceconnectionstatechange", target: RTCPeerConnection, currentTarget: 
RTCPeerConnection, eventPhase: 2, …} simplewebrtc.bundle.js:15106

SimpleWebRTC event: peerStreamRemoved Peer {id: "klFvEzxX4jTOTrTTInom", 
parent: WebRTC, type: "video", oneway: false, sharemyscreen: false, …}

SimpleWebRTC event: channelClose RTCDataChannel {label: "simplewebrtc", 
ordered: true, maxRetransmitTime: 65535, maxRetransmits: 65535, protocol: 
"", …} Event {isTrusted: true, type: "close", target: RTCDataChannel, 
currentTarget: RTCDataChannel, eventPhase: 2, …}

And this happen overnight. The code was not changed at all it just happening automatically. Any idea what has happed and how to fix this problem ?

So far I have tried to completely remove the video and audio. However, the same problem still occurs. I have also tried to access other stun server but sadly couldn't find any active besides the ones from google i.e "stun:stun.l.google.com:19302?transport=udp".

This is how the SimpleWebRTC is instansiated

const webrtc = new SimpleWebRTC({
    // the id/element dom element that will hold "our" video
    // localVideoEl: 'local-video',
    localVideoEl: 'local-video',
    // the id/element dom element that will hold remote videos
    remoteVideosEl: 'remote-videos',
    // immediately ask for camera access
    autoRequestMedia: true,
    debug: true,
    detectSpeakingEvents: false,
    autoAdjustMic: true,
  });


Richard
  • 165
  • 3
  • 12

1 Answers1

1

It looks like the sandbox server (which has not been maintained for ages) is crashing. Run your own by specifying url in the constructor.

Philipp Hancke
  • 15,855
  • 2
  • 23
  • 31
  • So you suggest to run a socket.io server and add the `url` to it to the configuration of the simpleWeRTC ? – Richard Jun 26 '19 at 11:32
  • yes. This is described in https://github.com/andyet/SimpleWebRTC/blob/not-so-simple-md/notsosimple.md (the dedicated website is gone) – Philipp Hancke Jun 26 '19 at 11:53
  • I have tried with my own socket server but it didn't work. I'm gonna also try with the **signalmaster** and see if this changes anything – Richard Jun 26 '19 at 14:46
  • you might want to try pulling signalmaster to include a [tentative fix](https://github.com/andyet/signalmaster/commit/7d468342a492f0d2af623db0a28e07a0abc84695). But please note that both the simplewebrtc as well as signalmaster have been unmaintained for years. – Philipp Hancke Jun 26 '19 at 18:31