Platform docs
Auth, users, webhooks & more
Info:
This is beta documentation for Stream Video React Native SDK v2. For the latest stable version, see the latest version (v1).

Network Disruptions

Connection problems occur during calls when switching networks or experiencing poor signal. The SDK automatically attempts reconnection.

Best Practices

  • Set appropriate timeouts - Balance between user experience and resource usage
  • Notify users during reconnection - Show clear UI feedback about connection status
  • Provide manual reconnect option - Allow users to trigger reconnection manually
  • Log connection events - Track disconnection patterns for debugging

Use call.setDisconnectionTimeout to specify how long users can remain disconnected before removal. This handles short network interruptions gracefully.

Setting the disconnection timeout

After creating a call, set the disconnection timeout:

call.setDisconnectionTimeout(30); // Try to reconnect for 30 seconds
call.setDisconnectionTimeout(0); // try to reconnect indefinitely (default)

Default timeout is 0, allowing users to remain until reconnection or call end.

Notify user after disconnection

The calling state reflects reconnection status. When reconnection fails after timeout, the state becomes CallingState.RECONNECTING_FAILED. Display appropriate UI:

Example:

const { useCallCallingState } = useCallStateHooks();
const callingState = useCallCallingState();

if (callingState === CallingState.RECONNECTING_FAILED) {
  return <ConnectionError />; // display connection error UI
}
Add Chat to my app: getstream.io/SKILL.md

The fastest way to build with Stream. Start a new project or improve an existing one. Full CLI and documentation integration out of the box.


Ask your agent:

/stream Build me a Social App with Feeds and Moderation.
/stream Any livestream calls running?
/stream Video React Native v2: <Your Question>