Bug 208373

Summary: addTrack doesn't fire onnegotiationneeded event
Product: WebKit Reporter: Bogdan <bogdanostojic1993>
Component: WebRTCAssignee: Nobody <webkit-unassigned>
Status: NEW ---    
Severity: Normal CC: bogdanostojic1993, eric.carlson, webkit-bug-importer, youennf
Priority: P2 Keywords: InRadar
Version: Safari 13   
Hardware: Mac   
OS: macOS 10.15   

Description Bogdan 2020-02-28 06:42:21 PST
Both Participants are on Desktop.

Participant A: 
- OS: MacOS version 10.15.3
- Browser: Safari version 13.0.5

Participant B: 
- OS: Windows 10 Pro N version 1903
- Browser: Chrome version 80.0.3987.122

Participant A has onnegotationneeded event defined as: 

async function negotiate(e) {
  let offer;
  offer = await pc.createOffer();
  await pc.setLocalDescription(offer);
  //send offer to remote with websocket
}

If participant A creates a offer with audio only stream, and remote participant B creates an answer with audio only stream also, the connection is established.
After Participant A adds a video stream with RTCPeerConnection.addTrack(), participant B's RTCPeerConnection.ontrack event doesn't fire.
Also Participant A doesn't fire onnegotationneeded event, if I manually call RTCPeerConnection.createOffer() after calling addTrack, remote participant B's ontrack event fires.
Comment 1 Radar WebKit Bug Importer 2020-02-29 13:08:16 PST
<rdar://problem/59921979>