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

    Parameters

    Returns Promise<void>

    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,
    },
    });