video player: fill the frame in fullscreen
the video used max-w/max-h so a low-res source stayed at native size surrounded by black. switch to w-full h-full object-contain so it scales up to fill the player (windowed and fullscreen) while preserving aspect ratio. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -227,7 +227,7 @@ export const VideoRenderer = ({ src, fileName, filePath, root }: VideoRendererPr
|
||||
if (playing) setShowControls(false);
|
||||
}}
|
||||
>
|
||||
<video ref={videoRef} src={videoSrc} preload="metadata" playsInline className="max-w-full max-h-full" onClick={togglePlay}>
|
||||
<video ref={videoRef} src={videoSrc} preload="metadata" playsInline className="w-full h-full object-contain" onClick={togglePlay}>
|
||||
{subtitles.map((t) => (
|
||||
<track key={t.id} kind="subtitles" src={getSubtitleVttUrl(filePath, t.id, root)} srcLang={t.lang} label={t.label} />
|
||||
))}
|
||||
|
||||
Reference in New Issue
Block a user