Closed Kf637 closed 1 year ago
As far as I know, Safari does not permit the manipulation of the device's sleep functionality.
Although there may have been workarounds in the past (though I cannot confirm whether those still work or not), such as continuously playing videos, I do not believe it would be advisable to rely on them, even if they still function.
The only feasible approach (without resorting to a dedicated mobile app rather than a PWA) would be to manually adjust the auto lock screen settings within system preferences.
NoSleep.js can be used but I'm not sure if it still works as it hasn't been updated since 2020
https://github.com/richtr/NoSleep.js/issues/135#issuecomment-929079462
It appears that both NoSleep.js and the looped video workaround are no longer working on iOS.
I think one could probably use Capacitor, and from there, I'm pretty sure that stopping the auto lock is just a matter of a handful of Objective-C method calls.
Okay.
I've always had the issue that my iOS device the screen will always turn off and it's a bit anoying, would be good with an option for "Always on screen"