4.3 State Definitions

4.3.1 RTCSignalingState Enum

  1. WebIDLenum RTCSignalingState {
  2. "stable",
  3. "have-local-offer",
  4. "have-remote-offer",
  5. "have-local-pranswer",
  6. "have-remote-pranswer",
  7. "closed"
  8. };
Enumeration description
stableThere 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-offerA local description, of type “offer“, has been successfully applied.
have-remote-offerA remote description, of type “offer“, has been successfully applied.
have-local-pranswerA remote description of type “offer“ has been successfully applied and a local description of type “pranswer“ has been successfully applied.
have-remote-pranswerA local description of type “offer“ has been successfully applied and a remote description of type “pranswer“ has been successfully applied.
closedThe RTCPeerConnection has been closed; its [[IsClosed]] slot is true.

signaling state transition diagram

Figure 1 Non-normative signaling state transitions diagram. Method calls abbreviated.

An example set of transitions might be:

Caller transition:

Callee transition:

4.3.2 RTCIceGatheringState Enum

  1. WebIDLenum RTCIceGatheringState {
  2. "new",
  3. "gathering",
  4. "complete"
  5. };
Enumeration description
newAny of the RTCIceTransports are in the “new“ gathering state and none of the transports are in the “gathering“ state, or there are no transports.
gatheringAny of the RTCIceTransports are in the “gathering“ state.
completeAt least one RTCIceTransport exists, and all RTCIceTransports are in the “complete“ 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

  1. WebIDLenum RTCPeerConnectionState {
  2. "closed",
  3. "failed",
  4. "disconnected",
  5. "new",
  6. "connecting",
  7. "connected"
  8. };
Enumeration description
closedThe RTCPeerConnection object’s [[IsClosed]] slot is true.
failedThe previous state doesn’t apply and any RTCIceTransports are in the “failed“ state or any RTCDtlsTransports are in the “failed“ state.
disconnectedNone of the previous states apply and any RTCIceTransports are in the “disconnected“ state.
newNone of the previous states apply and all RTCIceTransports are in the “new“ or “closed“ state, and all RTCDtlsTransports are in the “new“ or “closed“ state, or there are no transports.
connectingNone of the previous states apply and any RTCIceTransport is in the “checking“ state or any RTCDtlsTransport is in the “connecting“ state.
connectedNone of the previous states apply and all RTCIceTransports are in the “connected“, “completed“ or “closed“ state, and all RTCDtlsTransports are in the “connected“ or “closed“ 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

  1. WebIDLenum RTCIceConnectionState {
  2. "closed",
  3. "failed",
  4. "disconnected",
  5. "new",
  6. "checking",
  7. "completed",
  8. "connected"
  9. };
Enumeration description
closedThe RTCPeerConnection object’s [[IsClosed]] slot is true.
failedThe previous state doesn’t apply and any RTCIceTransports are in the “failed“ state.
disconnectedNone of the previous states apply and any RTCIceTransports are in the “disconnected“ state.
newNone of the previous states apply and all RTCIceTransports are in the “new“ or “closed“ state, or there are no transports.
checkingNone of the previous states apply and any RTCIceTransports are in the “new“ or “checking“ state.
completedNone of the previous states apply and all RTCIceTransports are in the “completed“ or “closed“ state.
connectedNone of the previous states apply and all RTCIceTransports are in the “connected“, “completed“ or “closed“ 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.