From c0bdbad7347533f9c99456ceb583311d25f918ef Mon Sep 17 00:00:00 2001 From: Forest Johnson Date: Fri, 13 May 2022 10:53:22 -0500 Subject: [PATCH] OnICECandidate: explain how to trigger ice gather --- peerconnection.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/peerconnection.go b/peerconnection.go index 232be96b165..a3b29f4caeb 100644 --- a/peerconnection.go +++ b/peerconnection.go @@ -428,6 +428,8 @@ func (pc *PeerConnection) checkNegotiationNeeded() bool { //nolint:gocognit // OnICECandidate sets an event handler which is invoked when a new ICE // candidate is found. +// ICE candidate gathering only starts after SetLocalDescription or +// SetRemoteDescription is called. // Take note that the handler is gonna be called with a nil pointer when // gathering is finished. func (pc *PeerConnection) OnICECandidate(f func(*ICECandidate)) {