3: The SDK is connected to Agora's edge server and joins 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, the network is down or switched, the SDK automatically tries to reconnect and triggers:
ConnectionStateChanged
callback, and switches to the Reconnecting
state.2: The SDK is connecting to Agora's edge server.
joinChannel
, the SDK starts to establish a connection to the specified channel, triggers the ConnectionStateChanged
callback, and switches to the Connecting
state.ConnectionStateChanged
callback and switches to the Connected
state.JoinChannelSuccess
callback.1: The SDK is disconnected from Agora's edge server.
joinChannel
.leaveChannel
.5: The SDK fails to connect to Agora's edge server or join the channel.
You must call leaveChannel
to leave this state, and call joinChannel
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 ConnectionStateChanged
callbacks.
4: The SDK keeps rejoining the channel after being disconnected from a joined channel because of network issues.
ConnectionLost
callback, stays in the Reconnecting
state, and keeps rejoining the channel.ConnectionStateChanged
callback, switches to the Failed
state, and stops rejoining the channel.
ConnectionStateChanged
Generated using TypeDoc
Connection states.