Calls / Unity
Calls Unity v1
Calls Unity
Calls
Unity
Home
/
Calls
/
Unity
/
Group call

Reconnect to media stream

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.