Type alias ConnectionState

ConnectionState: "DISCONNECTED" | "CONNECTING" | "RECONNECTING" | "CONNECTED" | "DISCONNECTING"

Connection state between the SDK and Agora's edge server.

You can get the connection state through [connectionState]connectionState.

The connection between the SDK and the edge server has the following states:

  • "DISCONNECTED": The SDK is disconnected from the server.
  • This is the initial state until you call [join]join.
  • The SDK also enters this state after you call [leave]leave, when the user is banned, or when the connection fails.
  • "CONNECTING": The SDK is connecting to the server. The SDK enters this state when you call [join]join.
  • "CONNECTED": The SDK is connected to the server and joins a channel. The user can now publish streams or subscribe to streams in the channel.
  • "RECONNECTING": The SDK is reconnecting to the server. If the connection is lost because the network is down or switched, the SDK enters this state.
  • "DISCONNECTING": The SDK is disconnecting from the server. The SDK enters this state when you call [leave]leave.

Generated using TypeDoc