DUNGEONS-34: keep the host screen awake while streaming #5
Reference in New Issue
Block a user
Delete Branch "codex/dungeons-34-keep-awake"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Add Settings → Host screen → Do not turn off the host, with the same saved toggle on the host screen so it can be changed during a broadcast. When enabled, Webka requests a screen wake lock while hosting, including connection/reconnection, and releases it on stop or navigation. Preview and viewer mode never request a lock.
The host screen reports active, pending, unsupported, or unavailable status and offers retry after denial. Visibility changes release/reacquire the lock; late asynchronous acquisitions are discarded after stop/unmount. English, Russian, and Spanish labels are included. The preference defaults off and persists in this browser.
Screen Wake Lock requires a supported browser and a secure context. Webka must remain visible; manual locking, background suspension, and battery policy remain under device control. This affects the capturing device's screen, not a separate backend server. README and physical-device test steps document those limits.
Validation: eight wake-lock lifecycle tests passed, frontend typecheck passed, all 161 translation keys match, production build passed, and diff whitespace checks passed. Physical phone/computer auto-lock behavior has not been tested in this runtime.
Closes DUNGEONS-34.