richtr/NoSleep.js
View on GitHub ↗ ★ 2,377 JavaScript
Prevent display sleep and enable wake lock in any Android or iOS web browser.
8 mentions on Hacker News by 6 people: 2 stories, 6 comments · first 2015-04-21 · latest 2025-01-29
20082026
-
…because the audio hardware itself needs power). One of those libraries source, for illustration: https://github.com/richtr/NoSleep.js/blob/master/src/index.j...
comment by padenot · 2025-01-29 · in New speculative attacks on Apple CPUs -
…[1] https://developer.mozilla.org/en-US/docs/Web/API/WakeLock [2] https://caniuse.com/wake-lock [3] https://github.com/richtr/NoSleep.js
comment by dtran · 2024-02-07 · in Show HN: Improve cognitive focus in 1 minute -
…[3] https://developer.mozilla.org/en-US/docs/Web/API/Screen_Wake... [4] https://github.com/richtr/NoSleep.js
comment by dtran · 2023-08-16 · in Show HN: Can you go an hour without touching your phone? -
https://github.com/richtr/NoSleep.js/ I wonder if something like this will get "extended" to work for desktop browsers now if this needs to become more popular? I think something simple like looping an empty audio or video file will…
comment by MuffinFlavored · 2023-02-21 · in Chrome 110 will automatically discard background tabs -
…in the source I can't see the patch applied that makes it actually work on Safari v15 and higher https://github.com/richtr/NoSleep.js/issues/135
comment by mtmail · 2022-09-12 · in Show HN: Sleepblocker, prevent your device from falling asleep -
As Firefox (& I think Safari too) does not support the ScreenWakeLock API are you using NoSleep.js? https://github.com/richtr/NoSleep.js This library implements a hack and plays a very tiny video in a loop too. This should even work on…
comment by karussell · 2022-04-22 · in Show HN: Prevent your computer sleeping with just a webpage