LogoLogo
ALO.ai
Developer Documentation
Developer Documentation
  • Developer Documentation
  • Developer Account
    • API Key
  • SDKs
    • Authentication
    • Chat
      • Configuration
      • Send Messages
        • Upload Files
      • Message History
      • Message Actions
      • Message Counts
      • Translation
      • Typing Indicators
      • API Reference
        • Event
        • Message
    • Presence
      • Configuration
      • Basic Usage
      • Methods
    • Audio
      • Prerequisites
      • Instantiating Audio Service
      • Connect to a Channel
      • Disconnecting Audio Service
      • Push To Talk (PTT)
      • Full Duplex
      • Mute and Unmute Audio
      • Input/Output Device Selection
        • Microphone Selection
        • Speaker Selection
      • Channel Participants
      • Text To Speech Audio (TTS)
      • Automatic Reconnects
      • Handling Events
      • Classes
        • AloAudio
        • AudioUser
        • AudioChannel
        • Participant
    • Video
      • Prerequisites
      • Instantiating Video Service
      • Connect to a Channel
      • Disconnecting Video Service
      • Input Device Selection
        • Microphone Selection
        • Camera Selection
      • Publishing Streams
      • Modifying Published Streams
      • Channel Participants
      • Rendering Streams
        • Local Stream
        • Remote Streams
      • Muting/Unmuting Remote Streams
      • Recording Video (coming soon)
      • Automatic Reconnects
      • Handling Events
      • Classes
        • AloVideo
        • Participant
        • VideoChannel
        • VideoUser
  • ALO APPS
    • Overview
    • Creating Apps
    • Webhooks
      • Verifying Requests from ALO
    • Custom Action Forms
    • Using the ALO Platform API
  • ALO Platform API
    • Overview
    • Authentication
    • API
      • Actions and Periods
      • Channels
      • Channel Messages
      • Channel Users
      • Direct Message Channels
      • Direct Message Channel Chat Messages
      • Direct Message Channel Users
      • Groups
      • Periods
      • Types
      • Users
      • Video Management System
  • Misc
    • Supported Language Codes
Powered by GitBook
LogoLogo

ALO.ai

  • ALO.ai

© Copyright 2025 ALO.ai, Inc. • All Rights Reserved

On this page
  1. SDKs
  2. Video

Automatic Reconnects

PreviousRecording Video (coming soon)NextHandling Events

Last updated 4 years ago

If the user loses connection to the Video Service you can expect an onConnectionChange event with a status of AloVideo.CONNECTION_STATUS_ERROR. After that the SDK will automatically handle trying to reconnect. The first few attempts to reconnect will occur right away. If it fails to reconnect it will continually increase the amount of time between reconnect attempts.

As the SDK is in reconnect mode it will fire onConnectionChange events with the status of AloVideo.CONNECTION_STATUS_RECONNECT_PENDING. Within the payload of that event you will see information about the number of times it tried to reconnect and the amount of time before it will try again. This event will be dispatched every second until the connection has been reestablished. You can use this information to info your user about how long it will be before the next reconnect attempt.

If you would like the library to stop trying to connect you can call the method.

Example Reconnect Pending Event Payload

{
    detail : {
        state: "RECONNECT_PENDING",
        user: VideoUser {...},            
        message: "Video Server Reconnect Pending",
        pendingRestartSeconds": 10,
        retryCount: 2,
        stateMessage: "Video Server Reconnect Pending"
    }
}
disconnect()