Hacker News new | ask | show | jobs
by karussell 1522 days ago
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 mobile devices and (according to my personal&tiny tests) is not that inefficient as it sounds :)

1 comments

Are we seeing different sites when you click on the link? Because that is literally all the landing page says.

  This tiny site uses the Screen Wake Lock API to prevent your device from sleeping.
  
  Where this API isn't supported, an empty silent video is played to emulate this behaviour (using NoSleep.js).
I obviously missed the NoSleep.js at the end ... but then I wonder: what is then so special about this website?
It prevents your computer from sleeping with just a webpage. Why does it need to be more special than that?
I think karrussell is talking about the live demo linked from NoSleep.js' project page: https://richtr.github.io/NoSleep.js/example/
I meant that nosleep.page is basically the example page from NoSleep.js hosted on the internet...
The idea. A lot of company computers have autolock on, just an example.