Switches the user's video device based on the provided video preference.
switchVideo({ videoPreference: "newVideoDeviceID", parameters: { recordStarted: true, recordResumed: false, recordStopped: false, recordPaused: false, recordingMediaOptions: "video", videoAlreadyOn: true, userDefaultVideoInputDevice: "currentVideoDeviceID", defVideoID: "defaultVideoDeviceID", allowed: true, updateDefVideoID: (deviceId) => setDefVideoID(deviceId), updatePrevVideoInputDevice: (deviceId) => setPrevVideoDevice(deviceId), updateUserDefaultVideoInputDevice: (deviceId) => setUserDefaultVideo(deviceId), updateIsMediaSettingsModalVisible: (isVisible) => setMediaSettingsModal(isVisible), showAlert: (alertOptions) => showAlert(alertOptions), switchUserVideo: switchUserVideoFunction, }}); Copy
switchVideo({ videoPreference: "newVideoDeviceID", parameters: { recordStarted: true, recordResumed: false, recordStopped: false, recordPaused: false, recordingMediaOptions: "video", videoAlreadyOn: true, userDefaultVideoInputDevice: "currentVideoDeviceID", defVideoID: "defaultVideoDeviceID", allowed: true, updateDefVideoID: (deviceId) => setDefVideoID(deviceId), updatePrevVideoInputDevice: (deviceId) => setPrevVideoDevice(deviceId), updateUserDefaultVideoInputDevice: (deviceId) => setUserDefaultVideo(deviceId), updateIsMediaSettingsModalVisible: (isVisible) => setMediaSettingsModal(isVisible), showAlert: (alertOptions) => showAlert(alertOptions), switchUserVideo: switchUserVideoFunction, }});
The function parameters.
Switches the user's video device based on the provided video preference.
Example