@@ -8,34 +8,56 @@ pub enum RTCPeerConnectionState {
8
8
#[ default]
9
9
Unspecified ,
10
10
11
- /// PeerConnectionStateNew indicates that any of the ICETransports or
12
- /// DTLSTransports are in the "new" state and none of the transports are
13
- /// in the "connecting", "checking", "failed" or "disconnected" state, or
14
- /// all transports are in the "closed" state, or there are no transports.
15
- New ,
16
-
17
- /// PeerConnectionStateConnecting indicates that any of the
18
- /// ICETransports or DTLSTransports are in the "connecting" or
19
- /// "checking" state and none of them is in the "failed" state.
20
- Connecting ,
11
+ /// Indicates that the [`RTCPeerConnection`] is closed
12
+ ///
13
+ /// [`RTCPeerConnection`]: crate::peer_connection::RTCPeerConnection
14
+ Closed ,
21
15
22
- /// PeerConnectionStateConnected indicates that all ICETransports and
23
- /// DTLSTransports are in the "connected", "completed" or "closed" state
24
- /// and at least one of them is in the "connected" or "completed" state.
25
- Connected ,
16
+ /// Indicates all of the following:
17
+ /// - the previous state does not apply
18
+ /// - any of the [`RTCIceTransport`]s or [`RTCDtlsTransport`]s
19
+ /// are in a `failed` state
20
+ ///
21
+ /// [`RTCDtlsTransport`]: crate::dtls_transport::RTCDtlsTransport
22
+ /// [`RTCIceTransport`]: crate::ice_transport::RTCIceTransport
23
+ Failed ,
26
24
27
- /// PeerConnectionStateDisconnected indicates that any of the
28
- /// ICETransports or DTLSTransports are in the "disconnected" state
29
- /// and none of them are in the "failed" or "connecting" or "checking" state.
25
+ /// Indicates all of the following:
26
+ /// - none of the previous states apply
27
+ /// - any of the [`RTCIceTransport`]s are in the `disconnected` state
28
+ ///
29
+ /// [`RTCIceTransport`]: crate::ice_transport::RTCIceTransport
30
30
Disconnected ,
31
31
32
- /// PeerConnectionStateFailed indicates that any of the ICETransports
33
- /// or DTLSTransports are in a "failed" state.
34
- Failed ,
32
+ /// Indicates all of the following:
33
+ /// - none of the previous states apply
34
+ /// - all of the [`RTCIceTransport`]s are in the `new` or `closed` state
35
+ /// - all of the [`RTCDtlsTransport`]s (if any) are in the `new` or
36
+ /// `closed` state
37
+ ///
38
+ /// [`RTCDtlsTransport`]: crate::dtls_transport::RTCDtlsTransport
39
+ /// [`RTCIceTransport`]: crate::ice_transport::RTCIceTransport
40
+ New ,
35
41
36
- /// PeerConnectionStateClosed indicates the peer connection is closed
37
- /// and the isClosed member variable of PeerConnection is true.
38
- Closed ,
42
+ /// Indicates all of the following:
43
+ /// - none of the previous states apply
44
+ /// - any of the [`RTCIceTransport`]s are in the `new` or `checking` state, or
45
+ /// - any of the [`RTCDtlsTransport`]s are in the `new` or `connecting` state
46
+ ///
47
+ /// [`RTCDtlsTransport`]: crate::dtls_transport::RTCDtlsTransport
48
+ /// [`RTCIceTransport`]: crate::ice_transport::RTCIceTransport
49
+ Connecting ,
50
+
51
+ /// Indicates all of the following:
52
+ /// - none of the previous states apply
53
+ /// - all of the [`RTCIceTransport`]s are in the `connected`, `completed`, or
54
+ /// `closed` state
55
+ /// - all of the [`RTCDtlsTransport`]s (if any) are in the `connected` or
56
+ /// `closed` state
57
+ ///
58
+ /// [`RTCDtlsTransport`]: crate::dtls_transport::RTCDtlsTransport
59
+ /// [`RTCIceTransport`]: crate::ice_transport::RTCIceTransport
60
+ Connected ,
39
61
}
40
62
41
63
const PEER_CONNECTION_STATE_NEW_STR : & str = "new" ;
0 commit comments