5 ms·
Ack. Just applied a fix on the scroll. Not sure what to do with when mobile phone goes to sleep. Will look into it
by junetic 3y ago
Ack. Just applied a fix on the scroll. Not sure what to do with when mobile phone goes to sleep. Will look into it
- dtran 3y agoAwesome project! Reminds me of donothingfor2minutes.com from Calm, but with a different end goal of focus instead of calm. Regarding mobile phones going to sleep, Wake lock [1] might help, unless you can reduce to 59s since I believe 1m is the threshold (make sure to request within the context of the user hitting "start"). Unfortunately on older mobile browsers [2], the best workaround I found was using this NoSleep library[3]. Source: ran into this same issue when building https://www.phonefreehour.com https://www.phonefreehour.com [1] https://developer.mozilla.org/en-US/docs/Web/API/WakeLock https://developer.mozilla.org/en-US/docs/Web/API/WakeLock [2] https://caniuse.com/wake-lock https://caniuse.com/wake-lock [3] https://github.com/richtr/NoSleep.js https://github.com/richtr/NoSleep.js