/ SDKs / Unity
SDKs
Calls SDKs Unity v1
Calls SDKs Unity
Calls SDKs
Unity
Version 1

Reconnect to media stream

Copy link

When a participant experiences connectivity issues and loses the media stream in a room, the Sendbird Calls SDK automatically tries to reconnect the participant to the room. If the Calls SDK fails to reconnect for about 40 seconds, an error is returned.

class MyRoomListener : SbRoomEventListener
{
   // Called when an error has occurred.
   public void OnError(SbError error, SbParticipantAbstract participant)
   {
       if (error.ErrorCode == SbErrorCode.LocalParticipantLostConnection)
       {
           // Handle reconnection failure here.
           // Clear resources for group calls.
       }
   }
}

Note: See the SDK API reference for more information.