Clarification on connection-change behavior with fail state and failover reason

I would like to request clarification regarding the behavior of the connection-change event emitted by the Zoom Web Video SDK.

  1. Under what circumstances does the SDK emit a connection-change event with ConnectionState.Fail or ReconnectReason.Failover?
  • Does this indicate a network disruption, session termination, or internal reconnection attempt?
  1. After receiving this event, will the SDK emit any subsequent connection-change events, such as one with ConnectionState.Closed?
  • If so, what is the expected delay or timeout before that final closed event is emitted?
  1. In the case of ConnectionState.Fail, is it recommended for the application to explicitly call leave() or wait for a potential recovery or final closed state?
  2. Does the SDK internally attempt to reconnect after emitting a fail or failover state?

Thank you very much in advance for your support.

1 Like

Hi @anhtv I can help assist with these questions. I will respond shortly with the answers to your questions

1 Like

Hi @anhtv

Thanks for your feedback.

Under what circumstances does the SDK emit a connection-change event with ConnectionState.Fail or ReconnectReason.Failover

  • ConnectionState.Fail : Join session failed, which could occur during the initial join or while reconnecting. Possible reasons include network disconnection, an invalid JWT token, or the session having already ended.

  • ConnectionState.Reconnecting with reason: ReconnectReason.Failover: A brief network interruption or an unexpected disconnection from the server triggered the reconnection. Video SDK will automatically reconnect and restore the state before the disconnection, so there’s no need to manually call the join method.

After receiving this event, will the SDK emit any subsequent connection-change events , such as one with ConnectionState.Closed

Depends on the case.

  • ConnectionState.Fail: This is a terminal state—reconnection failed.
  • ConnectionState.Reconnecting: If reconnection succeeds, a subsequent ConnectionState.Connected event will be emitted.

In the case of ConnectionState.Fail, is it recommended for the application to explicitly call leave() or wait for a potential recovery or final closed state?

No.

Does the SDK internally attempt to reconnect after emitting a fail or failover state?

  • ConnectionState.Fail: This is a terminal state, there will be no retry for joining the session.
  • ConnectionState.Reconnecting: Video SDK will attempt to reconnect to the session automatically.

Thanks
Vic

1 Like

Thank you so much for your help!