Open Merynek opened 3 years ago
A workaround for this is to delete the wakeLock
property from navigator
, before you load the NoSleep.min.js
script:
if ("wakeLock" in navigator) {
delete Object.getPrototypeOf(window.navigator).wakeLock;
}
But I'd love a way to do this that isn't a hack.
In my case i would like to prevent (system) sleep, not only screen. Is it possible to add parameter for ignore native wakelock (prevents only screen) and use only video element (prevents even system sleep) ?
Thank you.