onNegotiationNeeded

https://developer.mozilla.org/en-US/docs/Web/API/RTCPeerConnection/negotiationneeded_event

Is called whenever a negotiation is needed. Common examples include

  • Adding a new media stream

  • Adding an audio Stream

  • A screenshare track is started

Creates a new SDP

  • And sets it on the localDescription

  • Enables video simulcast

  • calls setPublisher

  • sets setRemoteDescription

Retry behaviour is to retry 3 times quickly as long as

  • the sfu didn't change

  • the sdp didn't change If that fails ask the call monitor to do an ice restart