slidevjs / slidev

Presentation Slides for Developers
https://sli.dev
MIT License
31.94k stars 1.26k forks source link

feat: optional wake lock #1676

Closed KermanX closed 2 weeks ago

KermanX commented 3 weeks ago

resolve #1552.

netlify[bot] commented 3 weeks ago

Deploy Preview for slidev ready!

Name Link
Latest commit 05394af73a46ad774f2ba33e022bfc91a11562f5
Latest deploy log https://app.netlify.com/sites/slidev/deploys/666e7b1e92bcff000871459b
Deploy Preview https://deploy-preview-1676--slidev.netlify.app
Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

antfu commented 3 weeks ago

Awesome idea!

antfu commented 3 weeks ago

I think we could have it enabled by default (when the app is on the front). With a client button and context menu to toggle it. And the frontmatter option can disable this feature completely.

In client, the state can be Keep awake when slides in front Always keep awake Do not keep awake

KermanX commented 2 weeks ago

I think we could have it enabled by default (when the app is on the front). With a client button and context menu to toggle it. And the frontmatter option can disable this feature completely.

In client, the state can be Keep awake when slides in front Always keep awake Do not keep awake

Added this option to the settings popover:

If the tab is not on the front, the wake lock will become effectless automatically by the browser.