The Screen Wake Lock API rules. If you need your app to keep the screen on, this API is comparatively simple to use and works in every browser.

👉 https://developer.mozilla.org/en-US/docs/Web/API/WakeLock