3

I'm making a node.js+express web app that needs to disable the lock screen for few pages, it is a points counter for a boardgame and would be bad design having the need to unlock the screen every time a player wants to check theirs (which happens very often). It also has a soundtrack option variable for more game immersion and sleep mode would stop the music.

I used nosleep.js (https://github.com/richtr/NoSleep.js) which fakes an mp4 video in the background and it used to work until the recent 13.4 iOS update (which has a bug about video playback https://discussions.apple.com/thread/251215369), is there's any other option available in 2020?

Jason Aller
  • 3,541
  • 28
  • 38
  • 38
Artemis
  • 589
  • 1
  • 6
  • 19
  • NoSleep.js seems to be working with iOS 14, have you tried again? – biomiker Feb 24 '21 at 01:45
  • @biomiker Given the "hacky" nature of NoSleep.js I ended up developing a "no sleep" system myself. – Artemis Feb 25 '21 at 09:21
  • Good on you! If it works well I encourage you to share, you could answer your own question here. I agree that NoSleep.js is still not 100% reliable and I'm sure I'm not alone in wanting to see other solutions. Thank you! – biomiker Feb 25 '21 at 17:06
  • My iteration of the nosleep script is a bit tied to the application I've done, but it still relying on the mp4 escamotage of nosleep.js. I'd need to retool it so everyone could implement it in their own project. Anyway I'm considering it a temporary solution, as I'm still waiting on a proper wake lock API implementation by browsers. I think I will do it and answer my own question when possible. – Artemis Feb 28 '21 at 19:45

0 Answers0