bindings/screen_wake_lock library
Screen Wake Lock API
Classes
- WakeLock
-
Secure context: This feature is available only in secure
contexts (HTTPS), in some or all supporting browsers.
The interface of the
Screen Wake Lock API
prevents device screens from dimming or locking when an application needs to keep running. The system wake lock is exposed through the globalNavigator.wakeLock
property. - WakeLockSentinel
-
Secure context: This feature is available only in secure
contexts (HTTPS), in some or all supporting browsers.
The interface of the
Screen Wake Lock API
provides a handle to the underlying platform wake lock and can be manually released and reacquired. An Object representing the wake lock is returned via thenavigator.wakelock.request()
method. An acquired can be released manually via therelease()
method, or automatically via the platform wake lock. This can happen if the document becomes inactive or looses visibility, if the device is low on power or the user turns on a power save mode. Releasing all instances of a given wake lock type will cause the underlying platform wake lock to be released.