fix: ffmpeg version detection and player letterboxing

ffmpeg only accepts -version (single dash); it exits 8 on --version and
writes to stderr, so the status panel reported it missing even when
installed. Version flags are now per-tool and both streams are read.

The player used max-h-full inside a grid, which a 1080x1920 Short
overflowed. Switched to absolute fill with object-contain so portrait
and landscape both letterbox correctly.

Also sized the window to 1180x780 centered, which fits a laptop display.
This commit is contained in:
vincent
2026-08-29 02:44:39 +02:00
parent e75d896933
commit 11331671c5
5 changed files with 181 additions and 26 deletions
+4 -2
View File
@@ -29,9 +29,11 @@ export default function Player({ item, path, onClose, onDelete }: Props) {
</button>
</div>
<div className="flex-1 min-h-0 bg-black grid place-items-center">
{/* Absolute fill + object-contain, so portrait Shorts and landscape
videos are both letterboxed to the pane instead of overflowing it. */}
<div className="flex-1 min-h-0 bg-black relative">
<video key={path} src={fileUrl(path)} controls autoPlay
className="max-h-full max-w-full" />
className="absolute inset-0 h-full w-full object-contain" />
</div>
<div className="px-5 py-4 max-h-56 overflow-y-auto border-t border-edge">