MediaSFU Angular
    Preparing search index...

    Class Disconnect

    Service to handle disconnection logic, providing options to redirect or display an alert message.

    Disconnect

    This service manages user disconnection by either redirecting the user to a specified URL (for web platforms) or showing a custom alert message.

    disconnect

    The options for handling disconnection.

    Function to display an alert message if a redirect is not needed.

    The URL to redirect to upon disconnection, if applicable.

    Flag indicating if the application is running on the web.

    Optional function to update validation state, primarily for native applications.

    A promise that resolves when the disconnection process completes.

    const disconnectOptions = {
    showAlert: (alert) => console.log(alert.message),
    redirectURL: 'https://example.com/home',
    onWeb: true,
    updateValidated: (isValid) => console.log(`Validation updated: ${isValid}`)
    };
    disconnectService.disconnect(disconnectOptions);
    Index

    Constructors

    Methods

    Constructors

    Methods

    • Handles the disconnection logic by either redirecting to a specified URL or showing an alert.

      Parameters

      • options: DisconnectOptions

        The options for handling disconnection.

        • OptionalshowAlert?: ShowAlert
        • OptionalredirectURL?: string
        • onWeb: boolean
        • OptionalupdateValidated?: (isValidated: boolean) => void

      Returns Promise<void>

      A promise that resolves when the disconnection handling is complete.