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: RTCIceCandidateAn RTCIceCandidate object that has been received and is ready to be delivered to an ICE agent.
successCallback
Type: VoidFunctionA function to call once the candidate has been successfully added.
failureCallback
Type: RTCPeerConnectionErrorCallbackA 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).