Say we have the following:
Peer1 joins, creates RTCPeerConnectionAPeer2 joins, creates RTCPeerConnectionBSDP/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?
4a: this is done with an ice restart. https://webrtc.github.io/samples/src/content/peerconnection/restart-ice/ is an example of how to do this.
4b: a new peerconnection will be needed as the refreshed tab will not have the crypto credentials to decode the old stream.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With