/ SDKs / React Native
Calls SDKs React Native v1
Calls SDKs React Native
Calls SDKs
React Native
Version 1

Reconnect to the media stream

Copy link

When a participant loses media stream in a room due to connection issues, the Calls SDK automatically tries to reconnect the participant’s media streaming in the room. If the Calls SDK fails to reconnect for about 40 seconds, an error will be returned.

import { SendbirdError } from '@sendbird/calls-react-native';

  // Called when an error has occurred.
  onError(error: SendbirdError, participant: Participant | null) {
    if (error.code === SendbirdError.ErrorCode.ERR_LOCAL_PARTICIPANT_LOST_CONNECTION) {
      // Handle reconnection failure here.
      // Clear resources for group calls.