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

    Variable switchUserVideoConst

    switchUserVideo: SwitchUserVideoType = ...

    Switches the user's video input device based on the provided options.

    The options for switching the user's video.

    The preferred video input device ID.

    Flag indicating whether to turn off the video.

    Additional parameters required for switching the video.

    Indicates if the room is audio-only.

    The desired frame rate for the video.

    Video constraints such as width and height.

    The previous video input device ID.

    Function to show alerts to the user.

    Media devices object to access user media.

    Indicates if the user has camera permission.

    Function to update video switching state.

    Function to update the default video input device.

    Function to request camera permission.

    Function to handle successful video stream.

    Function to pause execution for a specified duration.

    Function to check media permissions.

    A promise that resolves when the video 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 switchUserVideo({
    videoPreference: 'video-device-id',
    checkoff: false,
    parameters: {
    audioOnlyRoom: false,
    frameRate: 30,
    vidCons: { width: 640, height: 480 },
    prevVideoInputDevice: 'prev-video-device-id',
    showAlert: showAlertFunction,
    mediaDevices: navigator.mediaDevices,
    hasCameraPermission: true,
    updateVideoSwitching: updateVideoSwitchingFunction,
    updateUserDefaultVideoInputDevice: updateUserDefaultVideoInputDeviceFunction,
    requestPermissionCamera: requestPermissionCameraFunction,
    streamSuccessVideo: streamSuccessVideoFunction,
    sleep: sleepFunction,
    checkMediaPermission: true,
    getUpdatedAllParams: getUpdatedAllParamsFunction,
    },
    });