onConnectionStateChanged
Occurs when the network connection state changes.
onConnectionStateChanged?( connection: RtcConnection, state: ConnectionStateType, reason: ConnectionChangedReasonType ): void;
When the network connection state changes, the SDK triggers this callback and reports the current connection state and the reason for the change.
Parameters
- connection
- The connection information. See RtcConnection.
- state
-
The current connection state. See ConnectionStateType.
- reason
-
The reason for a connection state change. See ConnectionChangedReasonType.