Screen Wake Lock
Keeps the screen on while a video plays in Now Playing, and only then.

How Riff uses it
One function computes a single condition: a video is playing, Now Playing is open, and the page is visible. When that becomes true it requests a screen lock. When it becomes false it releases it. It runs from the video's play, pause and ended events, the player's open and close events, and visibility changes.
Why
A phone would otherwise dim and lock partway through a video.
Without it
The call is guarded by navigator.wakeLock and a try/catch, so the screen follows the system timeout.
Where
- plugins/riff/assets/player/wake-lock.js, line 16
lock = await navigator.wakeLock.request( 'screen' );
Links open the source at the commit this page was published from.
Specification: Screen Wake Lock API. Reference: Screen Wake Lock on MDN.