Picker: lock video box to fixed aspect ratio so the layout doesn't jump

The <video> element was auto-sizing to its content, which means while a
new video is loading it shrinks to spinner size and pushes everything
below it (annotation bar, buttons) up by ~700 px. Switching to
aspect-ratio: 1920/1088 (the source resolution) keeps the box at full
size throughout, so the buttons stay where the analyst's mouse expects
them between videos.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
Giorgio Gilestro 2026-05-01 14:48:15 +01:00
parent 16035bce36
commit 2607fa4a85

View file

@ -22,8 +22,12 @@
#meta .role-training { color: #cd6 !important; }
#meta .role-testing { color: #6cd !important; }
main { display: flex; flex-direction: column; align-items: center; padding: 1rem; }
video { width: 100%; max-width: 1400px; height: auto; background: #000;
border-radius: 4px; }
/* Reason: lock the video box to the source aspect ratio (1920x1088 is
what the ethoscope cameras emit). Without this, the box collapses
to spinner size while a new video is loading and every other
component on the page jumps around. */
video { width: 100%; max-width: 1400px; aspect-ratio: 1920 / 1088;
background: #000; border-radius: 4px; }
#controls { margin-top: 1rem; display: flex; gap: 1rem; flex-wrap: wrap;
justify-content: center; }
button { padding: 0.7rem 1.4rem; font-size: 0.95rem; border: 1px solid #444;