Skip to content

Commit

Permalink
fix non ice trickle not include candidate
Browse files Browse the repository at this point in the history
  • Loading branch information
tyohan committed Oct 30, 2024
1 parent 6c614d4 commit 3a52945
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion client.go
Original file line number Diff line number Diff line change
Expand Up @@ -727,6 +727,12 @@ func (c *Client) Negotiate(offer webrtc.SessionDescription) (*webrtc.SessionDesc
return nil, err
}

var gatherComplete <-chan struct{}

if !c.options.IceTrickle {
gatherComplete = webrtc.GatheringCompletePromise(c.peerConnection.PC())
}

// Sets the LocalDescription, and starts our UDP listeners
err = c.peerConnection.PC().SetLocalDescription(answer)
if err != nil {
Expand All @@ -735,7 +741,6 @@ func (c *Client) Negotiate(offer webrtc.SessionDescription) (*webrtc.SessionDesc
}

if !c.options.IceTrickle {
gatherComplete := webrtc.GatheringCompletePromise(c.peerConnection.PC())
<-gatherComplete
}

Expand Down

0 comments on commit 3a52945

Please sign in to comment.