Share via


start 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.]

Starts ICE candidate connectivity checks and transitions to "connected" state once complete.

The first time start() is called, candidate connectivity checks are started and the ICE transport attempts to connect to the remote RTCIceTransport. If start() is called with invalid parameters, throw an InvalidParameters exception.

Note  For example, if gatherer.component has a value different from iceTransport.component, throw an InvalidParameters exception.

 

If state or gatherer.state is "closed", throw an InvalidStateError exception. When start() is called again, RTCIceTransportState transitions to the "connected" state, all remote candidates are flushed, and addRemoteCandidate() or setRemoteCandidates() must be called to add the remote candidates back or replace them.

If a newly constructed RTCIceGatherer object is passed as an argument when start() is called again, an ICE restart as defined in [RFC5245] Section 9.2.1.1 occurs. Since start() does not change the username fragment and password of gatherer, if start() is called again with the same value of gatherer, the existing local candidates are reused and the ICE username fragment and password remains unchanged. However, other aspects of the behavior are not currently defined.

As noted in [RFC5245] Section 7.1.2.3, an incoming connectivity check utilizes the local/remote username fragment and the local password, whereas an outgoing connectivity check utilizes the local/remote username fragment and the remote password. Since start() provides role information, as well as the remote username fragment and password, once start() is called an RTCIceTransport object can respond to incoming connectivity checks based on its configured role, as well as initiating connectivity checks.

Syntax

var retval = RTCIceTransport.start(gatherer, remoteParameters, role);

Parameters

  • gatherer
    Type: RTCIceGatherer

    Nullable

  • remoteParameters
    Type: RTCIceParameters

    Nullable

  • role [optional]
    Type: RTCIceRole

    Nullable

Return value

This method does not return a value.

Standards information

See also

RTCIceTransport