Switch Camera
When you have multiple camera devices, you can choose to use one of them.
//Create a list of usable camera devices on the menu
const cameraSelect = await arctosSdkInstance.$meetingRoom.getCameraDevices();
cameraSelect.forEach(element => {
var option = document.createElement("option");
option.text = element.label;
option.value = element.deviceId;
document.querySelector('#switch-camera-select').appendChild(option);
});
Click the select menu to switch devices.
//Select camera to use
SwitchCamera = async function (e) {
let num = document.querySelector('#switch-camera-select').value;
arctosSdkInstance.$meetingRoom.setCameraDevice(num);
};
Toggle the user's camera in the room on or off.
//Toggle the camera on or off
toggleCameraClick = async function () {
arctosSdkInstance.$meetingRoom.toggleCamera();
};
The following url is a sample code for switch the camera.