Constructor
new exports(options)
Parameters:
| Name | Type | Description | ||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
options |
Object | Configuration options for NoSleepApp.
Properties
|
Members
_wakeLock :WakeLockSentinel|null
The active Wake Lock instance.
Type:
- WakeLockSentinel | null
callback :function
The callback function to execute when the state changes.
Type:
- function
- Source:
enabled :boolean
Indicates whether NoSleepApp is currently enabled.
Type:
- boolean
noSleepElement :NoSleepElement
Video element for non-iOS and non-Wake Lock devices.
Type:
- NoSleepElement
noSleepTimer :number|null
Timer ID for the iOS hack to prevent sleep.
Type:
- number | null
noSleepVideo :HTMLVideoElement
The hidden video element used to prevent sleep.
Type:
- HTMLVideoElement
- Source:
visibilityListener :VisibilityListener|null
Listener for visibility changes to re-enable Wake Lock.
Type:
- VisibilityListener | null