Group call Device video is not turn off

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);
1 Like

I have tried to useMedia also, but still device camera is on only.

this.mediaAccess = SendBirdCall.useMedia({ audio: true, video: true });
this.mediaAccess.dispose();

I am also having the same issue! Has anyone been able to resolve this issue

A little late and probably old but what I did is to get the newest room instance before updating the localParticipant video status.

const showHideVideo = async (show: boolean) => {
    if (!sendbird || !sendbird?.room) return

    let room: Room
    room = SendbirdCall.getCachedRoomById(sendbird.room.roomId)

    if (!room) {
      room = await SendbirdCall.fetchRoomById(sendbird.room.roomId)
    }

    const localParticipant = room.localParticipant
    show ? localParticipant.startVideo() : localParticipant.stopVideo()
}

Hope this help someone in the future!