WebRTC - Reusing connections

Viewed 1370

Say we have the following:

  1. Peer1 joins, creates RTCPeerConnectionA
  2. Peer2 joins, creates RTCPeerConnectionB
  3. SDP/ICE handshakes occur, connection is established, streaming is happening

    4A. Peer2 loses connectivity and rejoins

    4B. Peer2 refreshes the browser

What should Peer1 do in 4A and 4B?

With 4A the same RTCPeerConnection object is available for the peer to use - is there any work that needs to be done to completely repair the connection?

In 4B, Peer1 has maintained one end of the connection but Peer2 is starting out from scratch. Can Peer1 re-use the ICE candidates and localDescription to repair the connection with the new RTCPeerConnection on the other end, or does it also need to create a brand new instance of RTCPeerConnection and reinitiate handshakes, onicecandidate, etc?

1 Answers
Related