globe.imagery.video: paint the test video red before recording starts

The check recorded a canvas that stayed blank until its first 20 ms paint
tick, so on a loaded runner the video's opening frames were dark and the
pixel early in the segment read (28, 54) instead of red: main failed once
after #1872 and passed on the runs around it.
This commit is contained in:
Sameh Khamis committed 2026-11-19 19:21:10 -08:00
1 parent 7f2dc81cf6
commit c9a78153ac
1 file changed
+6 -2
+6 -2
View File
@@ -5356,10 +5356,14 @@ export function portChecks() {
const chunks = [];
recorder.ondataavailable = (e) => chunks.push(e.data);
let colour = '#ff0000';
const paint = setInterval(() => {
const fill = () => {
g.fillStyle = colour;
g.fillRect(0, 0, 32, 32);
}, 20);
};
// Red from the first recorded frame: a blank canvas until the first
// tick read dark early in the segment on a loaded runner.
fill();
const paint = setInterval(fill, 20);
const wait = (ms) => new Promise((done) => setTimeout(done, ms));
recorder.start();
await wait(1000);