javascript - Detect offline peer in WebRTC connection -


we developing video stream mobile device computer using webrtc. mobile device might lose connection , computer should able detect that. right now, video freezes. neither of eventhandlers of rtcpeerconnection called in such situation.

  • so how can such connection failure detected on other peer?
  • how can peer detect connection problems on connection establishment in first place?

the iceconnectionstatechange handler should fire after ~5-10 seconds of not receiving data peer anymore (in chrome; firefox working on currently). see https://webrtc.github.io/samples/src/content/peerconnection/states/ example.


Comments