ConstFunction to update the default video input device.
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,
},
});
Switches the user's video input device based on the provided options.