# Prevent system to open screen saver when video call is ongoing

**URL:** <https://devforum.zoom.us/t/prevent-system-to-open-screen-saver-when-video-call-is-ongoing/78665>\
**Category:** Web\
**Created:** [November 11, 2022, 11:47am UTC](https://devforum.zoom.us/t/prevent-system-to-open-screen-saver-when-video-call-is-ongoing/78665 "2022-11-11T11:47:05Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![shoaib](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/shoaib/32/28580_2.png) [@shoaib](https://devforum.zoom.us/u/shoaib)\
**Post date:** [November 11, 2022, 11:47am UTC](https://devforum.zoom.us/t/prevent-system-to-open-screen-saver-when-video-call-is-ongoing/78665/1 "2022-11-11T11:47:05Z")

</div>

Is there a way to prevent system to open screen saver when video call is ongoing?

---

<div class="post-metadata">

**Author:** ![j.schoenemeyer](https://avatars.discourse-cdn.com/v4/letter/j/f9ae1b/32.png) [@j.schoenemeyer](https://devforum.zoom.us/u/j.schoenemeyer)\
**Post date:** [November 13, 2022, 8:19am UTC](https://devforum.zoom.us/t/prevent-system-to-open-screen-saver-when-video-call-is-ongoing/78665/2 "2022-11-13T08:19:07Z")

</div>

> [@Is it possible to prevent activating screensaver during webinar on Zoom SDK?](https://devforum.zoom.us/t/is-it-possible-to-prevent-activating-screensaver-during-webinar-on-zoom-sdk/75123):
>
> Hello, thanks for confirming my question. Does the zoom sdk have a features or settings that prevents the screen saver when attending a webinar? We are using the zoom sdk embedded on our website, mainly on the chrome browser on windows 10. If a webinar participant is just watching a webinar on our website and not using a mouse or keyboard for a while, a screen saver will be activated based on the settings in windows. We would like to prevent the screen saver from running during the webinar i…

---

<div class="post-metadata">

**Author:** ![shoaib](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/shoaib/32/28580_2.png) [@shoaib](https://devforum.zoom.us/u/shoaib)\
**Post date:** [November 13, 2022, 6:38pm UTC](https://devforum.zoom.us/t/prevent-system-to-open-screen-saver-when-video-call-is-ongoing/78665/3 "2022-11-13T18:38:19Z")

</div>

okay Thanks @j.schoenemeyer!

hey @vic.yang , Is there any better way to handle this?  
as far as I know some other video call providers have this functionality inbuilt only.

---

<div class="post-metadata">

**Author:** ![j.schoenemeyer](https://avatars.discourse-cdn.com/v4/letter/j/f9ae1b/32.png) [@j.schoenemeyer](https://devforum.zoom.us/u/j.schoenemeyer)\
**Post date:** [November 13, 2022, 6:57pm UTC](https://devforum.zoom.us/t/prevent-system-to-open-screen-saver-when-video-call-is-ongoing/78665/4 "2022-11-13T18:57:31Z")

</div>

in a **browser** the trick with the **html5 video** is - as far as i know - the only way to block the screensaver

in an app of course it looks completely different, e.g. Windows C++:

> **[SetThreadExecutionState function (winbase.h) - Win32 apps](https://learn.microsoft.com/en-us/windows/win32/api/winbase/nf-winbase-setthreadexecutionstate)**
>
> Enables an application to inform the system that it is in use, thereby preventing the system from entering sleep or turning off the display while the application is running.

---

<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:** [November 14, 2022, 2:08am UTC](https://devforum.zoom.us/t/prevent-system-to-open-screen-saver-when-video-call-is-ongoing/78665/5 "2022-11-14T02:08:18Z")

</div>

Hey @shoaib

We do have an option named `stayAwake` in the `init` method, but it’s only available in Chrome or Chromium-like browser.

> **[WakeLock - Web APIs | MDN](https://developer.mozilla.org/en-US/docs/Web/API/WakeLock)**
>
> The WakeLock interface of the Screen Wake Lock API prevents device screens from dimming or locking when an application needs to keep running.

Thanks  
Vic

---

<div class="post-metadata">

**Author:** ![kvr](https://avatars.discourse-cdn.com/v4/letter/k/e79b87/32.png) [@kvr](https://devforum.zoom.us/u/kvr)\
**Post date:** [November 15, 2022, 12:49pm UTC](https://devforum.zoom.us/t/prevent-system-to-open-screen-saver-when-video-call-is-ongoing/78665/6 "2022-11-15T12:49:09Z")

</div>

Hi Vic,

```
     I tried this code to prevent the screen saver to kick in when the video call is going on. I couldn't see any error in the console. But, the screen saver kicks in.

```

client.init(‘en-US’, ‘Global’,{stayAwake: true})

Zoom video SDK version: 1.5.1  
Browser: Google Chrome  
Version 107.0.5304.107 (Official Build) (64-bit)  
OS: Windows 10 Pro  
System Type x64-based PC

Please help me to resolve this issue.

Thanks  
Krishnan

---

<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:** [November 16, 2022, 6:50am UTC](https://devforum.zoom.us/t/prevent-system-to-open-screen-saver-when-video-call-is-ongoing/78665/7 "2022-11-16T06:50:29Z")

</div>

Hey @kvr

We found an issue with `stayAwake` in Video SDK Web and it will be fixed in the next release. For now, WakeLock is still a good solution. Here is the official guide about it.

> **[Stay awake with the Screen Wake Lock API](https://web.dev/wake-lock/)**
>
> To avoid draining the battery, most devices will quickly fall asleep when left idle. While this is fine most of the time, there are some applications that need to keep the screen awake in order to complete some work. The Screen Wake Lock API provides...

Thanks  
Vic

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex016/uploads/zoomdeveloper/original/3X/6/1/614bdd549b610bbaa46ff934617683a02bdaa03c.png) [@system](https://devforum.zoom.us/u/system)\
**Post date:** [December 16, 2022, 4:50pm UTC](https://devforum.zoom.us/t/prevent-system-to-open-screen-saver-when-video-call-is-ongoing/78665/8 "2022-12-16T16:50:48Z")

</div>

Closed on December 16, 2022, 4:50pm UTC

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
