I am using “SendBirdCall” and below code is used to enter a room and streaming. When user tries to close a call, I tried to call all the following methods. Video streaming is stopped, But the device camera is still on. How can I stop that?
await connectedRoom.localParticipant.stopVideo();
await connectedRoom.localParticipant.muteMicrophone();
await connectedRoom.off();
await connectedRoom.exit() // Participant has exited the room successfully.
await SendBirdCall.deauthenticate();
try{
await room.enter(enterParams);
} catch(error){
showError(error);
}
const localMediaView = document.getElementById('local_video_element_id');
room.localParticipant.setMediaView(localMediaView);
window.localStream = localMediaView;
setEnterRoom(true);