-
-
Notifications
You must be signed in to change notification settings - Fork 6
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
✨ Prevent suspend during presentation w/ Screen Wake Lock API (crosspost) #5
Comments
This is a cross post from my original post here: MSzturc/obsidian-advanced-slides#296 @ebullient thanks for keeping this software alive! |
Try a PR? Looks like you're pretty close. Feels like this should go in the reveal.html template (rather than embed?) .. I did add a function in there to detect iframe usage for other reasons.. |
I haven't been able to get this working in local dev yet 🤔 |
No hurry. It isn't something I use, so I'd rather you get it working so it works for you, and then we'll figure out how to make sure it ages well. ;) |
Just bumping this to remind you that I'm waiting for you. ;) |
Yes, sorry. I'm buried with other things at the moment, but hoping to return to this soon. |
Currently the screen can turn off and the computer suspend during a Advanced Slides presentation, which is problematic. The computer can be set to disable suspend, but that's a cumbersome solution.
It seems easy enough to utilize the Screen Wake Lock API to prevent suspend while the presentation is active:
Secure context is required, but apparently localhost qualifies:
I'm not sure of the best way to differentiate slide "preview" from "presentation mode". The easiest way would be to ensure that the Wake Lock isn't active unless the slides are viewed in an external browser. A more sophisticated approach would be request a wake lock only when the browser window enters full screen mode, and release it when exiting full screen mode.
The text was updated successfully, but these errors were encountered: