VidyoPlatform
  • Getting Started
  • Building custom client web application using Connector SDK
  • Android Integration
  • Resources
  • Use-Cases
    • Closed Captioning
    • Virtual Background - Banuba SDK
    • Calls Recording
    • Automatic Reconnection
    • Call Moderation
      • UnlockRoom API
      • Lock Room API
      • SetRoomPIN API
      • Remove RoomPIN API
      • Request Moderator Role API
      • Remove Moderator Role
      • Soft Mute
        • Soft Mute Audio
        • Soft Mute Video
      • Hard Mute
        • Hard Mute Audio
        • Hard Mute Video
      • Recording
      • Drop Participant
    • Custom noise suppression in web applications
    • Android: Picture-in-picture Mode
    • New Generation Renderer
    • Integrating with Epic
  • Twilio to Vidyo Migration
    • Twilio JavaScript SDK to VidyoClient JavaScript SDK
    • Twilio Android SDK to VidyoClient Android SDK
Powered by GitBook
On this page
  1. Use-Cases

Automatic Reconnection

The objective is to implement Auto reconnect API in application.

Auto-reconnect refers to a feature that automatically attempts to re-establish a lost connection during a video conference session, in case of connection issues like poor network or exchanging between Wi-Fi and cellular network. Auto-reconnect in video conferencing swiftly restores connections, eliminating the need for manual reconnection.

Auto-reconnect functionality serves several use cases across different domains. Here are some common use cases for auto-reconnect:

Video Conferencing:

  • Scenario: A user experiences a brief network disruption during a video conference.

  • Use Case: Auto-reconnect ensures seamless participation by automatically attempting to restore the connection, minimizing disruptions in virtual meetings.

Mobile Applications:

  • Scenario: A mobile user moves between different network environments (Wi-Fi to cellular, for example).

  • Use Case: Auto-reconnect adapts to changing network conditions, allowing users to stay connected during transitions and providing a smoother mobile experience.

Cloud Services:

  • Scenario: Cloud-based applications face occasional server unavailability.

  • Use Case: Auto-reconnect enables applications to automatically retry connections to cloud servers, improving the reliability of cloud-based services.

Auto-Reconnect isn't enabled by default in the SDK and by following the below steps clients can implement it in their application.

Steps to Use the API:

To use the API for reconnecting the call user needs to register Reconnect Event listener as follows.

Register Listeners:

1) Register for reconnecting events.

public class MyClass : Connector.IRegisterReconnectEventListener

{

public void OnConferenceLost(Connector.ConnectorFailReason reason)

{/*You can Change the Connection state to disconnected*/}

public void OnReconnected()

{/* You can Change the Connection state to connected*/}

public void OnReconnecting(uint attempt, uint attemptTimeout, Connector.ConnectorFailReason reason)

{ /* */}

}

There are three cases that can occur during reconnecting: conference lost, reconnected and reconnecting.

OnConferenceLost - This callback will be triggered when the reconnecting attempt started.

Reconnected: This callback will be triggered when the connection was established, and the user joined to the call/conference.

Reconnecting: This callback will be triggered when the reconnecting attempt started.

2) Call the _connector.RegisterReconnectEventListener() method.

To Enable AutoReconnect:

- Enable the Auto Reconnect as follows:

VidyoConnectorSetAdvancedOptions(vc, “{“enableAutoReconnect“ : true}“);

For example using windows SDK (C#) you can use the API as: _connector.SetAdvancedOptions("{\"enableAutoReconnect\" : true}");

- You can also set the number of attempts and backoff time to be taken before reconnecting/disconnecting as follows:

To Set reconnect Attempts and reconnectBackoff time:

VidyoConnectorSetAdvancedOptions(vc, “{“enableAutoReconnect“ : true, “maxReconnectAttempts“ : 4, “reconnectBackoff“ : 5}“);

· maxReconnectAttempts: Number of attempts to tried before disconnecting the call.

· reconnectBackoff : waiting period before next attempt and this will be doubled on every next attempt.

In C#: _connector.SetAdvancedOptions("{\"enableAutoReconnect\" : true, \"maxReconnectAttempts\" : 4, \"reconnectBackoff\" : 5}");

To Disable Reconnect:

VidyoConnectorSetAdvancedOptions(vc, “{“enableAutoReconnect“ : false}“);

In C#: _connector.SetAdvancedOptions("{\"enableAutoReconnect\" : false}");

Auto-reconnect feature in video conferencing plays a crucial role in maintaining a reliable and user-friendly communication environment. It helps reduce downtime, ensures seamless connectivity, and contributes to a positive user experience, ultimately supporting effective collaboration in both professional and personal settings.

PreviousCalls RecordingNextCall Moderation

Last updated 1 year ago