Public Attributes

 CONNECTION_STATE_DISCONNECTED =(1)
 
 CONNECTION_STATE_CONNECTING =(2)
 
 CONNECTION_STATE_CONNECTED =(3)
 
 CONNECTION_STATE_RECONNECTING =(4)
 
 CONNECTION_STATE_FAILED =(5)
 

Detailed Description

Connection states.

Member Data Documentation

◆ CONNECTION_STATE_DISCONNECTED

io.agora.recording.common.Common.CONNECTION_STATE_TYPE.CONNECTION_STATE_DISCONNECTED =(1)

1: The SDK is disconnected from Agora's edge server.

  • This is the initial state before calling the createChannel method.
  • The SDK also enters this state when the app calls the leaveChannel method.

◆ CONNECTION_STATE_CONNECTING

io.agora.recording.common.Common.CONNECTION_STATE_TYPE.CONNECTION_STATE_CONNECTING =(2)

2: The SDK is connecting to Agora's edge server.

◆ CONNECTION_STATE_CONNECTED

io.agora.recording.common.Common.CONNECTION_STATE_TYPE.CONNECTION_STATE_CONNECTED =(3)

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, the network is down or switched, the SDK triggers:

◆ CONNECTION_STATE_RECONNECTING

io.agora.recording.common.Common.CONNECTION_STATE_TYPE.CONNECTION_STATE_RECONNECTING =(4)

4: The SDK keeps rejoining the channel after being disconnected from a joined channel because of network issues.

  • If the SDK cannot join the channel within 10 seconds after being disconnected from Agora's edge server, the SDK triggers the onConnectionLost callback, stays in the CONNECTION_STATE_RECONNECTING state, and keeps rejoining the channel.
  • If the SDK fails to rejoin the channel 20 minutes after being disconnected from Agora's edge server, the SDK triggers the onConnectionStateChanged callback, switches to the CONNECTION_STATE_FAILED state, and keeps rejoining the channel.

◆ CONNECTION_STATE_FAILED

io.agora.recording.common.Common.CONNECTION_STATE_TYPE.CONNECTION_STATE_FAILED =(5)

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 createChannel method again to rejoin the channel.

If the SDK is banned from joining the channel by the Agora server (through the RESTful API), the SDK triggers the onConnectionStateChanged callback and switch to the CONNECTION_STATE_FAILED state.