// Sizing rules for the HTML5 element in the full-screen player. // Extracted from VideoPlayer.svelte so the fit behaviour is unit-testable. /** * Classes applied to the element so it fits the player viewport. * * TRACES: UR-005 * * `max-w-full max-h-full` only ever *shrinks* oversized media, so a source * smaller than the window (e.g. 480p on a 1080p display) rendered at its * intrinsic size - a small box in the middle of a black screen. Filling the * container and letting `object-contain` do the scaling fits the picture to * whichever axis constrains it, in both directions, preserving aspect ratio. */ export function videoFitClass(): string { return "w-full h-full object-contain"; }