4.3 State Definitions
4.3.1 RTCSignalingState
Enum
- WebIDLenum
RTCSignalingState
{- "
stable
",- "
have-local-offer
",- "
have-remote-offer
",- "
have-local-pranswer
",- "
have-remote-pranswer
",- "
closed
"- };
Enumeration description | |
---|---|
stable | There is no offer/answer exchange in progress. This is also the initial state, in which case the local and remote descriptions are empty. |
have-local-offer | A local description, of type “ “, has been successfully applied. |
have-remote-offer | A remote description, of type “ “, has been successfully applied. |
have-local-pranswer | A remote description of type “ “ has been successfully applied and a local description of type “ “ has been successfully applied. |
have-remote-pranswer | A local description of type “ “ has been successfully applied and a remote description of type “ “ has been successfully applied. |
closed | The has been closed; its [[IsClosed]] slot is true . |
Figure 1 Non-normative signaling state transitions diagram. Method calls abbreviated.
An example set of transitions might be:
Caller transition:
- new RTCPeerConnection(): “
stable
“ - setLocalDescription(offer): “
have-local-offer
“ - setRemoteDescription(pranswer): “
have-remote-pranswer
“ - setRemoteDescription(answer): “
stable
“
Callee transition:
- new RTCPeerConnection(): “
stable
“ - setRemoteDescription(offer): “
have-remote-offer
“ - setLocalDescription(pranswer): “
have-local-pranswer
“ - setLocalDescription(answer): “
stable
“
4.3.2 RTCIceGatheringState
Enum
- WebIDLenum
RTCIceGatheringState
{- "
new
",- "
gathering
",- "
complete
"- };
Enumeration description | |
---|---|
new | Any of the s are in the “ “ gathering state and none of the transports are in the “ “ state, or there are no transports. |
gathering | Any of the s are in the “ “ state. |
complete | At least one exists, and all s are in the “ “ gathering state. |
The set of transports considered is the set of transports presently referenced by the PeerConnection’s set of transceivers.
4.3.3 RTCPeerConnectionState
Enum
- WebIDLenum
RTCPeerConnectionState
{- "
closed
",- "
failed
",- "
disconnected
",- "
new
",- "
connecting
",- "
connected
"- };
Enumeration description | |
---|---|
closed | The object’s [[IsClosed]] slot is true . |
failed | The previous state doesn’t apply and any s are in the “ “ state or any s are in the “ “ state. |
disconnected | None of the previous states apply and any s are in the “ “ state. |
new | None of the previous states apply and all s are in the “ “ or “ “ state, and all s are in the “ “ or “ “ state, or there are no transports. |
connecting | None of the previous states apply and any is in the “ “ state or any is in the “ “ state. |
connected | None of the previous states apply and all s are in the “ “, “ “ or “ “ state, and all s are in the “ “ or “ “ state. |
The set of transports considered is the set of transports presently referenced by the PeerConnection’s set of transceivers.
4.3.4 RTCIceConnectionState
Enum
- WebIDLenum
RTCIceConnectionState
{- "
closed
",- "
failed
",- "
disconnected
",- "
new
",- "
checking
",- "
completed
",- "
connected
"- };
Enumeration description | |
---|---|
closed | The object’s [[IsClosed]] slot is true . |
failed | The previous state doesn’t apply and any s are in the “ “ state. |
disconnected | None of the previous states apply and any s are in the “ “ state. |
new | None of the previous states apply and all s are in the “ “ or “ “ state, or there are no transports. |
checking | None of the previous states apply and any s are in the “ “ or “ “ state. |
completed | None of the previous states apply and all s are in the “ “ or “ “ state. |
connected | None of the previous states apply and all s are in the “ “, “ “ or “ “ state. |
The set of transports considered is the set of transports presently referenced by the PeerConnection’s set of transceivers.
Note that if an RTCIceTransport
is discarded as a result of signaling (e.g. RTCP mux or bundling), or created as a result of signaling (e.g. adding a new media description), the state may advance directly from one state to another.