|
1 | 1 | use std::fmt;
|
2 | 2 |
|
3 |
| -/// RTCIceConnectionState indicates signaling state of the ICE Connection. |
| 3 | +/// Indicates the signaling state of the ICE Connection. |
4 | 4 | #[derive(Default, Debug, Copy, Clone, PartialEq, Eq)]
|
5 | 5 | pub enum RTCIceConnectionState {
|
6 | 6 | #[default]
|
7 | 7 | Unspecified,
|
8 | 8 |
|
9 |
| - /// ICEConnectionStateNew indicates that any of the ICETransports are |
10 |
| - /// in the "new" state and none of them are in the "checking", "disconnected" |
11 |
| - /// or "failed" state, or all ICETransports are in the "closed" state, or |
12 |
| - /// there are no transports. |
13 |
| - New, |
| 9 | + /// Indicates that the [`RTCPeerConnection`] is closed |
| 10 | + /// |
| 11 | + /// [`RTCPeerConnection`]: crate::peer_connection::RTCPeerConnection |
| 12 | + Closed, |
14 | 13 |
|
15 |
| - /// ICEConnectionStateChecking indicates that any of the ICETransports |
16 |
| - /// are in the "checking" state and none of them are in the "disconnected" |
17 |
| - /// or "failed" state. |
18 |
| - Checking, |
| 14 | + /// Indicates all of the following: |
| 15 | + /// - the previous state does not apply |
| 16 | + /// - any of the [`RTCIceTransport`]s are in the `failed` state |
| 17 | + /// |
| 18 | + /// [`RTCIceTransport`]: crate::ice_transport::RTCIceTransport |
| 19 | + Failed, |
19 | 20 |
|
20 |
| - /// ICEConnectionStateConnected indicates that all ICETransports are |
21 |
| - /// in the "connected", "completed" or "closed" state and at least one of |
22 |
| - /// them is in the "connected" state. |
23 |
| - Connected, |
| 21 | + /// Indicates all of the following: |
| 22 | + /// - none of the previous states apply |
| 23 | + /// - any of the [`RTCIceTransport`]s are in the `disconnected` state |
| 24 | + /// |
| 25 | + /// [`RTCIceTransport`]: crate::ice_transport::RTCIceTransport |
| 26 | + Disconnected, |
24 | 27 |
|
25 |
| - /// ICEConnectionStateCompleted indicates that all ICETransports are |
26 |
| - /// in the "completed" or "closed" state and at least one of them is in the |
27 |
| - /// "completed" state. |
28 |
| - Completed, |
| 28 | + /// Indicates all of the following: |
| 29 | + /// - none of the previous states apply |
| 30 | + /// - all of the [`RTCIceTransport`]s are in the `new` or |
| 31 | + /// `closed` state, or |
| 32 | + /// - there are no transports |
| 33 | + /// |
| 34 | + /// [`RTCIceTransport`]: crate::ice_transport::RTCIceTransport |
| 35 | + New, |
29 | 36 |
|
30 |
| - /// ICEConnectionStateDisconnected indicates that any of the |
31 |
| - /// ICETransports are in the "disconnected" state and none of them are |
32 |
| - /// in the "failed" state. |
33 |
| - Disconnected, |
| 37 | + /// Indicates all of the following: |
| 38 | + /// - none of the previous states apply |
| 39 | + /// - any of the [`RTCIceTransport`]s are in the `new` or `checking` state |
| 40 | + /// |
| 41 | + /// [`RTCIceTransport`]: crate::ice_transport::RTCIceTransport |
| 42 | + Checking, |
34 | 43 |
|
35 |
| - /// ICEConnectionStateFailed indicates that any of the ICETransports |
36 |
| - /// are in the "failed" state. |
37 |
| - Failed, |
| 44 | + /// Indicates all of the following: |
| 45 | + /// - none of the previous states apply |
| 46 | + /// - all of the [`RTCIceTransport`]s are in the `completed` or |
| 47 | + /// `closed` state |
| 48 | + /// |
| 49 | + /// [`RTCIceTransport`]: crate::ice_transport::RTCIceTransport |
| 50 | + Completed, |
38 | 51 |
|
39 |
| - /// ICEConnectionStateClosed indicates that the PeerConnection's |
40 |
| - /// isClosed is true. |
41 |
| - Closed, |
| 52 | + /// Indicates all of the following: |
| 53 | + /// - none of the previous states apply |
| 54 | + /// - all of the [`RTCIceTransport`]s are in the `connected`, `completed`, or |
| 55 | + /// `closed` state |
| 56 | + /// |
| 57 | + /// [`RTCIceTransport`]: crate::ice_transport::RTCIceTransport |
| 58 | + Connected, |
42 | 59 | }
|
43 | 60 |
|
44 | 61 | const ICE_CONNECTION_STATE_NEW_STR: &str = "new";
|
|
0 commit comments