3: The SDK is connected to Agora's edge server and has joined a channel. You can now publish or subscribe to a media stream in the channel.
If the connection to the channel is lost because, for example, if the network is down or switched, the SDK automatically tries to reconnect and triggers:
2: The SDK is connecting to Agora's edge server.
CONNECTION_STATE_CONNECTING
state.onConnectionStateChanged
callback and switches to the
CONNECTION_STATE_CONNECTED state.1: The SDK is disconnected from Agora's edge server.
5: The SDK fails to connect to Agora's edge server or join the channel.
You must call the leaveChannel method to leave this state, and call the joinChannel method again to rejoin the channel.
If the SDK is banned from joining the channel by Agora's edge server (through the RESTful API), the SDK triggers the onConnectionBanned (deprecated) and onConnectionStateChanged callbacks.
4: The SDK keeps rejoining the channel after being disconnected from a joined channel because of network issues.
Generated using TypeDoc
Connection states.