[webrtc-pc] Rollback to address Glare (#2095)

aboba has just created a new issue for https://github.com/w3c/webrtc-pc:

== Rollback to address Glare ==
I got a question recently about what to do in the event of Glare (e.g. receiving an Offer when the local peer has already sent an Offer).  My instinct would be to just call pc1.close(), then construct pc2 and then call pc2.setRemoteDescription(remoteOffer).  But some may consider that not sufficiently elegant and have questioned whether the same goal can be accomplished by rolling back the call to setLocalDescription, then call setRemoteDescription(remoteOffer).  

It is not clear to me that this works because prior to sending the Offer, the local peer probably called addTransceiver.  Rolling back setLocalDescription does not remove those transceivers, which may have been set up with parameters that may not be compatible with the remote Offer.  For example, the remoteOffer is an Offer to receive simulcast with 3 streams.  Unfortunately, the local calls to addTransceiver included only 1 encoding. 



Please view or discuss this issue at https://github.com/w3c/webrtc-pc/issues/2095 using your GitHub account

Received on Tuesday, 5 February 2019 01:39:20 UTC