Videos: a recording goes on behind another browser tab

- Videos: a paragraph on the beat from a worker while a recording
  goes and the tab is hidden, and that a plain run still stands.
- Development: 2086 checks.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
adminandClaude Opus 5.5 committed 2026-10-14 13:56:56 +02:00
1 parent cbc0a0fd2f
commit ce085f5366
2 files changed
+10 -1

No files matched your search

+1 -1
@@ -21,7 +21,7 @@ php tests/php/releases.test.php # the release stor
php tests/php/files.test.php # uploaded files in a folder per account (#344), the same way
php tests/php/videos.test.php # the video store, its queue and the worker (#402), with the
# real ffmpeg: the CI image and feuerwerk-video have it
node tools/seed-e2e.mjs && node tools/e2e.mjs # 2083 editor checks, screenshots in /tmp/gm-e2e-*.png
node tools/seed-e2e.mjs && node tools/e2e.mjs # 2086 editor checks, screenshots in /tmp/gm-e2e-*.png
GM_STEPS=20 node tools/e2e.mjs # or 1-12, or 6,20 — a subset while working on one step
./e2e.sh start [GM_STEPS] # the same run detached, see below
./e2e.sh status # live progress, or the last run's result
+9
@@ -199,6 +199,15 @@ Two action nodes record what the game view shows, with what the master plays (#4
- **It goes on** through `Load scene` and `Restart game`. The editor's pause holds it and leaves the
paused time out; a game that pauses itself is still seen, so that is recorded. Another tab in
front of the Game tab does not stop it. Ending the run (Esc, `Stop game`) saves it.
- **Behind another browser tab it goes on.** Chrome draws no frames for a tab that is not in
front, nor for a minimized window, and the run stood still with them. While a recording runs,
a beat in a worker moves the editor on instead, at the recording's fps, and stands aside once
the page draws again. A game not being recorded still stands behind another tab. In a test a
recording in real time had as many frames behind another tab as in front, and one with
**Real time** off had every frame. Chrome may still put a tab to sleep that stays behind others
for long, with its energy saver for one. The beat is `src/viewport/backgroundBeat.ts`; the waits
of a recording use a worker's timers too (`backgroundTimers.ts`), since Chrome holds a hidden
page's own to once a second.
- **It leaves out the wait for a video.** While the game view leaves a video sprite out because its
picture is not there yet, no frame is taken, the recorded time stands and the sound of that
time is left out too, for at most 3 s at a time. A `Start recording` right after