# Join room with disabled camera

**URL:** <https://devforum.zoom.us/t/join-room-with-disabled-camera/109584>\
**Category:** Video SDK\
**Created:** [May 9, 2024, 6:53am UTC](https://devforum.zoom.us/t/join-room-with-disabled-camera/109584 "2024-05-09T06:53:25Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Prze](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/prze/32/53130_2.png) [@Prze](https://devforum.zoom.us/u/Prze)\
**Post date:** [May 9, 2024, 6:53am UTC](https://devforum.zoom.us/t/join-room-with-disabled-camera/109584/1 "2024-05-09T06:53:25Z")

</div>

Hello,

I join room using like so

```auto
    zoomVideo = ZoomVideo.createClient()
    await zoomVideo.init('pl-PL', 'Global', { patchJsMedia: true })
    await zoomVideo.join(TOPIC, TOKEN, USER_ID, PASSCODE)

    zoomSession = zoomVideo.getMediaStream()

```

Now when user is not allow to use camera i have error and that is fine.  
`zoomHelpers.js:14 you got an error: NotAllowedError: Permission denied`

However when he allow to use camera but I do not want to at start start video i have problem.  
To start camera i have  
`await zoomSession.startVideo()`

But i want to start camera on button click of user.  
However if I do not use function  
`await zoomSession.startVideo()`

I do not see any participant, also i have no sound. But 100% I`am in the room.  
Some times when i do not startVideo i see error of blob:… not found.

So is there option for me to join room with disabled camera and enable it on click.

If i do not run startVideo also no events fire.  
Regards

---

<div class="post-metadata">

**Author:** ![vic.yang](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/vic.yang/32/24656_2.png) [@vic.yang](https://devforum.zoom.us/u/vic.yang)\
**Post date:** [May 9, 2024, 8:47am UTC](https://devforum.zoom.us/t/join-room-with-disabled-camera/109584/2 "2024-05-09T08:47:50Z")

</div>

Hey @Prze

Thanks for your feedback.

Do you want to turn on the camera only after user interaction? For example, clicking a button.

This can be easily accomplished by placing the call to `zoomSession.startVideo()` inside the callback function that handles the button click event. Here’s a straightforward example:

```javascript
buttonElement.addEventListener("click", async () => {
  await zoomSession.startVideo();
});

```

Thanks  
Vic

---

<div class="post-metadata">

**Author:** ![Prze](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/prze/32/53130_2.png) [@Prze](https://devforum.zoom.us/u/Prze)\
**Post date:** [May 9, 2024, 9:12am UTC](https://devforum.zoom.us/t/join-room-with-disabled-camera/109584/3 "2024-05-09T09:12:26Z")

</div>

@vic.yang Yes.

However if i do not use before `await zoomSession.startVideo()` I will not have events and i do not see participants.

For now i found that code works. I enable video on start, next i disable it. After that button click works as expected.

Events work fine. However it looks like ugly hack.

```auto
    await zoomSession.startVideo()
    setTimeout(async () => {
       await zoomSession.stopVideo()
    }, 1)

```
