Calls / React Native
Calls React Native v1
Calls React Native
Calls
React Native
Home
/
Calls
/
React Native
/
Direct call

Select video output

During a video call, users can select a device for video output. The list of available video devices can be accessed by the directCall.availableVideoDevices() method. In order to change the current video output device to one of the other available video devices or switch cameras, the directCall.selectVideoDevice() or directCall.switchCamera() methods should be called respectively.

const videoDevice = directCall.availableVideoDevices.find(({ position }) => {
 return position !== directCall.currentVideoDevice?.position;
});
if (videoDevice) directCall.selectVideoDevice(videoDevice);