Share via


addIceCandidate method

[Some information relates to pre-released product which may be substantially modified before it's commercially released. Microsoft makes no warranties, express or implied, with respect to the information provided here.]

The addIceCandidate method adds an ice candidate to an ICE agent.

Syntax

var retval = RTCPeerConnection.addIceCandidate(candidate, successCallback, failureCallback);

Parameters

  • candidate
    Type: RTCIceCandidate

    An RTCIceCandidate object that has been received and is ready to be delivered to an ICE agent.

  • successCallback
    Type: VoidFunction

    A function to call once the candidate has been successfully added.

  • failureCallback
    Type: RTCPeerConnectionErrorCallback

    A function to call if adding a candidate fails.

Return value

Type: promise<void>

A promise that is fulfilled after a candidate has been added to a remote description (or not).

See also

RTCPeerConnection