diff --git a/src/server/interface/elements.WebRtcEndpoint.kmd.json b/src/server/interface/elements.WebRtcEndpoint.kmd.json index c84ddc2d..287a8d80 100644 --- a/src/server/interface/elements.WebRtcEndpoint.kmd.json +++ b/src/server/interface/elements.WebRtcEndpoint.kmd.json @@ -126,7 +126,7 @@ unusable.
  • - IceGatheringDone: Raised when the ICE harvesting process is + IceGatheringDone: Raised when the ICE gathering process is completed. This means that all candidates have already been discovered.
  • @@ -511,12 +511,29 @@ "methods": [ { "name": "gatherCandidates", - "doc": "Start the gathering of ICE candidates. + "doc": "Start the ICE candidate gathering.

    - It must be called after SdpEndpoint::generateOffer or - SdpEndpoint::processOffer for Trickle ICE. If - invoked before generating or processing an SDP offer, the candidates gathered - will be added to the SDP processed. + This method triggers the asynchronous discovery of ICE candidates (as per the + Trickle ICE mechanism), and returns immediately. Every newly trickled + candidate is reported to the application by means of an + IceCandidateFound event. Finally, when all candidates have been + gathered, the IceGatheringDone event is emitted. +

    +

    + Normally, you would call this method as soon as possible after calling + SdpEndpoint::generateOffer or + SdpEndpoint::processOffer, to quickly start discovering + candidates and sending them to the remote peer. +

    +

    + You can also call this method before calling + generateOffer or processOffer. Doing so will include + any already gathered candidates into the resulting SDP. You can leverage this + behavior to implement fully traditional ICE (without Trickle): first call + gatherCandidates, then only handle the SDP messages after the + IceGatheringDone event has been received. This way, you're making + sure that all candidates have indeed been gathered, so the resulting SDP will + include all of them.

    ", "params": []