-
Notifications
You must be signed in to change notification settings - Fork 379
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
nosleep.enable() not working on bookmark saved as an application in iphone #161
Comments
This is a known bug on iOS: https://bugs.webkit.org/show_bug.cgi?id=254545 |
The video method works both in PWA and Safari on iOS 17. But the library doesn't use it because navigator.wakeLock is available. So the library maintainer should either use both As user, you can copy the library code to your website and modify it so both methods are used. |
@Finesse thank you for response, I tried that by break if else if else and it will enter into both condition but still has same problem on PWA any more ideas to fix or did you manage you to fix that |
@tazo-taz No, I failed to make it work reliably. I chose to use my app in Safari, because wake lock works more reliably there. Though it requires user action to activate, so I made an infinite loop waiting for any user action, then waiting for a lock release, then waiting for user action and so on. |
Expected Behavior
The noSleep.enable() function should prevent the screen from sleeping when the web application is launched from a bookmark saved as an application on an iPhone.
Actual Behavior
The noSleep.enable() function does not prevent the screen from sleeping when the web application is launched from a bookmark.
Code
The text was updated successfully, but these errors were encountered: