# How can I switch the camera off and on during a session?

**URL:** <https://devforum.zoom.us/t/how-can-i-switch-the-camera-off-and-on-during-a-session/81711>\
**Category:** Video SDK\
**Created:** [January 19, 2023, 11:35am UTC](https://devforum.zoom.us/t/how-can-i-switch-the-camera-off-and-on-during-a-session/81711 "2023-01-19T11:35:33Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![memx86](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/memx86/32/44493_2.png) [@memx86](https://devforum.zoom.us/u/memx86)\
**Post date:** [January 19, 2023, 11:35am UTC](https://devforum.zoom.us/t/how-can-i-switch-the-camera-off-and-on-during-a-session/81711/1 "2023-01-19T11:35:34Z")

</div>

Video SDK Type and Version  
For Web (React): “@zoom1234/videosdk”: “^1.5.5”

Description

I need to give the user the opportunity to switch the camera on and off during the session. In the documentation I found such methods: startVideo(), stopVideo(). Perhaps there are more suitable methods for the implementation of such a functionality to make process faster/smoother?

How To Reproduce

During the session, the user presses the appropriate button and the camera is switched off. When he press the button again, the camera turns on.

React

- Device: MacBook Pro
- OS: macOS Monterey 12.0.1 (21A559)
- Browser: Chrome 108.0.5359.124
- SharedArrayBuffer is enabled

---

<div class="post-metadata">

**Author:** ![rehema.zoom](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/rehema.zoom/32/40323_2.png) [@rehema.zoom](https://devforum.zoom.us/u/rehema.zoom)\
**Post date:** [January 19, 2023, 1:53pm UTC](https://devforum.zoom.us/t/how-can-i-switch-the-camera-off-and-on-during-a-session/81711/2 "2023-01-19T13:53:18Z")

</div>

Hi @memx86 ,

Thanks for your question! To make sure I understand clearly, you’re looking for a different way to start/stop video, other than the mentioned methods? If so, is the reason that the starting/stopping is delayed for you?

Thanks,  
Rehema

---

<div class="post-metadata">

**Author:** ![memx86](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/memx86/32/44493_2.png) [@memx86](https://devforum.zoom.us/u/memx86)\
**Post date:** [January 20, 2023, 6:42pm UTC](https://devforum.zoom.us/t/how-can-i-switch-the-camera-off-and-on-during-a-session/81711/3 "2023-01-20T18:42:45Z")

</div>

Yeah there is some delay but not critical. I was just wondering if there are some other methods that will fit my logic better. Maybe there is something that can turn camera on/off without creating a video stream instance

---

<div class="post-metadata">

**Author:** ![rehema.zoom](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/rehema.zoom/32/40323_2.png) [@rehema.zoom](https://devforum.zoom.us/u/rehema.zoom)\
**Post date:** [January 26, 2023, 6:07pm UTC](https://devforum.zoom.us/t/how-can-i-switch-the-camera-off-and-on-during-a-session/81711/4 "2023-01-26T18:07:20Z")

</div>

Hi @memx86 ,

Got it, thanks for clarifying. At this time, these are the only methods available for that functionality. The only other option I can think of is using some CSS to hide the video, instead of turning it off, based on a button click. While I can’t guarantee it, that might achieve your goal in a way that better suits your needs.

Thanks,  
Rehema
