state property
[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 current state of the ICE transport.
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. For example, if gatherer.component
has a value different from iceTransport.component
, throw an InvalidParameters
exception. If 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.
Parameter | Type | Nullable | Optional |
---|---|---|---|
gatherer | RTCIceGatherer | X | X |
remoteParameters | RTCIceParameters | X | X |
role | RTCIceRole | X | ✔ |
This property is read-only.
Syntax
JavaScript |
state = object.state |
Property values
Type: RTCIceTransportState
Represents the current state of the ICE transport.
Value | Condition |
---|---|
new | The |
checking | The |
connected | The |
completed | A local and remote |
disconnected | The |
closed | The |
Standards information
Note Edge Interop Note: The Microsoft Edge ORTC API implementation does not support the "failed" state, which is included in both the WebRTC 1.0 API as well as recent drafts of the ORTC API. One implication of this is that RTCIceTransport
objects transition to the "closed" state under the conditions that would normally result in a transition to "failed".
Remarks
The non-normative ICE state transitions are: