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

The screen dims when user is training and in resting mode #17

Closed
z-x opened this issue May 15, 2020 · 2 comments
Closed

The screen dims when user is training and in resting mode #17

z-x opened this issue May 15, 2020 · 2 comments
Labels
bug Something isn't working

Comments

@z-x
Copy link
Owner

z-x commented May 15, 2020

The screen should be active when user is training, but instead it dims and turns of if user doesn't wake it manually by tapping the screen. This can actually freeze the timer and force the user to reload the page.

The solution before was to play a silent hidden video in the background in a loop, but since some iOS update it seem that this solution no longer prevents the screen from dimming.

Current best hope is to wait for Screen Wake Lock API to be implemented in mobile browsers, but this is not going to be anytime soon, especially on iOS. I don't know of any solution that can be implemented right now unfortunately.

@z-x z-x added the bug Something isn't working label May 15, 2020
@z-x
Copy link
Owner Author

z-x commented May 22, 2020

There might be a solution: richtr/NoSleep.js#85 (comment)

It seems removing the muted attribute can fix the issue.

@z-x
Copy link
Owner Author

z-x commented Jun 1, 2020

Fixed but as a side effects the background music on mobile devices is stopped. The only way to fix this would be to wait for Wake Lock API. It does detect if the API is available on the device so if it will work anywhere then the background music won't be stopped.

@z-x z-x closed this as completed Jun 1, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant