MediaSFU React Native (Expo)
    Preparing search index...

    Variable switchUserAudioConst

    switchUserAudio: SwitchUserAudioType = ...

    Switches the user's audio input device based on the provided audio preference.

    The options for switching the user's audio input device.

    The preferred audio input device ID.

    Additional parameters required for switching the audio input device.

    The media devices interface for accessing user media.

    The previous audio input device ID.

    Function to show alert messages.

    Flag indicating if the user has granted audio permission.

    Function to update the user's default audio input device.

    Function to handle successful audio stream switch.

    Function to request audio permission from the user.

    Function to check if media permission is granted.

    A promise that resolves when the audio input device has been successfully switched.

    Will throw an error if the audio input device cannot be accessed or if there is an unexpected error.

    await switchUserAudio({
    audioPreference: 'audio-device-id',
    parameters: {
    mediaDevices,
    prevAudioInputDevice: 'prev-audio-device-id',
    showAlert,
    hasAudioPermission,
    updateUserDefaultAudioInputDevice,
    streamSuccessAudioSwitch,
    requestPermissionAudio,
    checkMediaPermission,
    },
    });