MediaSFU Angular
    Preparing search index...

    Class LaunchMediaSettings

    Launches the media settings modal and updates the available audio and video input devices.

    This method checks the current visibility of the media settings modal and, if it is not visible, retrieves the list of available audio and video input devices. It then updates the state with these devices and opens the modal. If the modal is already visible, it closes the modal.

    The options for launching media settings.

    Function to update the visibility state of the media settings modal.

    Current visibility state of the media settings modal.

    Array to store available audio input devices.

    Array to store available video input devices.

    Function to update the available audio input devices.

    Function to update the available video input devices.

    A promise that resolves when the media settings have been updated.

    const launchMediaSettingsService = new LaunchMediaSettings();
    launchMediaSettingsService.launchMediaSettings({
    updateIsMediaSettingsModalVisible: (isVisible) => {
    console.log('Media settings modal is now:', isVisible ? 'Visible' : 'Hidden');
    },
    isMediaSettingsModalVisible: false, // Initially not visible
    audioInputs: [],
    videoInputs: [],
    updateAudioInputs: (inputs) => {
    console.log('Available audio inputs:', inputs);
    },
    updateVideoInputs: (inputs) => {
    console.log('Available video inputs:', inputs);
    },
    });
    Index

    Constructors

    Methods

    Constructors

    Methods

    • Launches the media settings modal and updates the available audio and video input devices.

      Parameters

      • options: LaunchMediaSettingsOptions

        The options for launching media settings.

        • updateIsMediaSettingsModalVisible: (isVisible: boolean) => void
        • isMediaSettingsModalVisible: boolean
        • audioInputs: MediaDeviceInfo[]
        • videoInputs: MediaDeviceInfo[]
        • updateAudioInputs: (inputs: MediaDeviceInfo[]) => void
        • updateVideoInputs: (inputs: MediaDeviceInfo[]) => void

      Returns Promise<void>

      A promise that resolves when the media settings have been updated.