Screen Wake Lock API In JavaScript
A browser API to prevent the screen from dimming, sleeping or locking automatically,
This feature is very useful for application like timers, voice based application, live score updates, video players ... etc which don't want the screen to be auto lo...
saidmounaim.hashnode.dev1 min read
Surya Teja Karra
Please note, acc. to MDN, this is experimental technology and is majorly supported by Chrome & its forks and Samsung browser.
We, as developers, have a responsibility to ensure consistent experiences for our users across all supported platforms (in this case browsers). I feel like usage of this tech would hurt it.
I highly recommend providing a fallback like NoSleep.js at least for iOS & Android.
Reference: dev.to/mikeesto/the-screen-wake-lock-api-51hp
MDN: developer.mozilla.org/en-US/docs/Web/API/WakeLock