WebDisplayAwake
Keeps a page's screen awake while it shows a playing picture (#238), through the W3C Screen Wake Lock API. A browser keeps the screen on by itself only for a playing video element, and the player draws onto a canvas, so without this the display dims and locks in the middle of a film.
Two things ask for it, and the screen stays awake while either does. A canvas renderer says framePresented for each picture it draws, and the screen stays awake until GRACE_MILLIS pass with none: a pause, the end, a stall or a closed renderer lets it sleep, as a player with no picture to watch should. A page whose player draws in a worker, where there is no screen to keep, says setHeld while its player plays a picture.
The browser drops the lock whenever the page is hidden, so it is asked for again when the page shows while something still wants it. A page outside a secure context, a browser without the API and a worker simply get no lock, with no error.