Skip to content
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

Web support #17

Closed
creativecreatorormaybenot opened this issue Mar 18, 2020 · 4 comments · Fixed by #42
Closed

Web support #17

creativecreatorormaybenot opened this issue Mar 18, 2020 · 4 comments · Fixed by #42
Assignees
Labels
enhancement New feature or request p0 Highest priority

Comments

@creativecreatorormaybenot
Copy link
Owner

Web support should be added as soon as wakelock functionality is available for the web.

It is currently only an experimental feature, see https://web.dev/wakelock/.

The w3c specification can be found here.

@aafanasev
Copy link

If someone impatient like me, there is a workaround. I forked this repo and added web support which calling JS code in your index.html. On HTML side I used a tricky NoSleep library which adds video tag and plays or pauses the empty video, this is how it prevents sleep 😄

Fork: https://github.com/aafanasev/wakelock
NoSleep: https://github.com/richtr/NoSleep.js
Sample index.html: https://github.com/aafanasev/scrum-poker/blob/3cf9e093598a9a6b88f7fd77a0dbdda43784dd6a/web/index.html

@creativecreatorormaybenot
Copy link
Owner Author

@aafanasev Looks interesting. If you want to open a pull request, go ahead and do so. I would look a bit more into NoSleep then.

Not sure if it is the best idea to add this workaround to the plugin, but we could deal with that then. It would require adding to the README etc.

@aafanasev
Copy link

I don't think it's the best idea either. The number of "Not working" issues of NoSleep scaring me. I just wanted to show there is a possibility for whoever comes to this issue.

Carefully look into the solution and if you're strongly sure I don't mind creating PR.

@IchordeDionysos
Copy link

Chrome recently released the Wake Lock API to stable:

https://caniuse.com/#feat=wake-lock

It's in there since Chrome 85 (released on August 25th, 2020)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request p0 Highest priority
Projects
None yet
3 participants