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

feat(wakeLockApi): button to prevent the screen lock #1036

Merged
merged 5 commits into from
May 24, 2022

Conversation

pelord
Copy link
Member

@pelord pelord commented Apr 6, 2022

Please check if the PR fulfills these requirements

What is the current behavior? (You can also link to an open issue here)
There is no method available to keep the browser open.

What is the new behavior?

Prevent display sleep and enable wake lock in all Android and iOS web browsers.
On iOS, the Wake Lock API is not supported.
https://developer.mozilla.org/en-US/docs/Web/API/Screen_Wake_Lock_API
On not supported browser, a fake video is used to keep the screen open.

TODO: When the API will be supported by every browser, We should remove the NoSleep.js dependency
and replace it by a WakeLock API implementation.

Does this PR introduce a breaking change? (check one with "x")

  • Yes
  • No

If this PR contains a breaking change, please describe the impact and migration path for existing applications:

Other information:

Copy link
Contributor

@PhilippeLafreniere18 PhilippeLafreniere18 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems to be working fine with me ! Maybe need a PR in igo2 assemblage to update the package for nosleep.js ?

packages/geo/src/locale/fr.geo.json Outdated Show resolved Hide resolved
packages/geo/src/locale/fr.geo.json Outdated Show resolved Hide resolved
@pelord
Copy link
Member Author

pelord commented May 24, 2022

Seems to be working fine with me ! Maybe need a PR in igo2 assemblage to update the package for nosleep.js ?

will be fixed by the update of the lib inside the "assemblage"

@PhilippeLafreniere18 PhilippeLafreniere18 merged commit ec0cae3 into next May 24, 2022
@pelord pelord deleted the noSleep branch May 25, 2022 00:57
cbourget pushed a commit that referenced this pull request Mar 21, 2023
* feat(wakeLockApi): button to prevent the screen lock

* refactor(wakeLock): disable wakelock on blur for non supported browser

* i18n(geo): typo

* wip
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants