I am using Video SDK Web 1.5.0 , whenever I call switchCamera() with camera deviceId, black screen appears for a second and then start showing front camera
same behavior on previous versions
here is the video recording of video sdk react demo
please fix this issue, we need this feature to use in Android and iOS browsers
Video SDK Type and Version
Web 1.5.0
Hi, @arfa.ahmed ,
Thank you for posting in the Zoom Developer Forum. Can you share if you are seeing any errors when you call switchCamera() with camera deviceId?
no any error appearing during switching camera
Thanks for the reply, @arfa.ahmed ! Can you share a snippet code of how you are calling switchCamera() with camera deviceId ?
Calling this function to switch camera
const onSwitchCamera = async (key: string) => {
if (mediaStream) {
if (activeCamera !== key) {
await mediaStream.switchCamera(key);
setActiveCamera(mediaStream.getActiveCamera());
}
}
};
and getting the list of available cameras from this:
mediaStream.getCameraList()
vic.yang
(Vic)
October 12, 2022, 5:48am
6
Hey @arfa.ahmed
Thanks for your feedback.
On mobile browsers, the specific camera ID maybe not be fit for the startVideo
or switchCamera
methods, using the FacingMode as the device ID.
We will improve the document later.
Thanks
Vic
1 Like
thanks, now it’s working.
Is there any method to detect a mobile browser?
vic.yang
(Vic)
October 14, 2022, 3:28am
8
Hey @arfa.ahmed
It depends on you. Using user-agent detection or feature detection is acceptable.
Thanks
Vic