Interface ReconnectController

[[ReconnectController]] describes the status about the meeting session connection and makes decisions based on the controller implementation.

interface ReconnectController {
    cancel(): void;
    clone(): ReconnectController;
    disableReconnect(): void;
    enableRestartPeerConnection(): void;
    hasStartedConnectionAttempt(): boolean;
    isFirstConnection(): boolean;
    reset(): void;
    retryWithBackoff(retryFunc: () => void, cancelFunc: () => void): boolean;
    setLastActiveTimestampMs(timestampMs: number): void;
    shouldOnlyRestartPeerConnection(): boolean;
    startedConnectionAttempt(isFirstConnection: boolean): void;
}

Implemented by

Methods

  • Switches the reconnect controller into a mode where it will only restart the peer connection instead of restarting the session starting with the signaling connection.

    Returns void

  • Decides whether to retry the retryFunc after some amount of backoff depending on the controller.

    Parameters

    • retryFunc: () => void
    • cancelFunc: () => void

    Returns boolean

    Whether the retry will be attempted

  • Returns whether only the peer connection should be restarted at this time.

    Returns boolean

    Whether only the peer connection should be restarted

  • Indicates that a connection attempt has started so that the reconnect deadline can be set.

    Parameters

    • isFirstConnection: boolean

      whether this is the first attempt to connect for this session

    Returns void