From 69a3a88b85ed0a56bf442af4fec420c871d337fa Mon Sep 17 00:00:00 2001 From: Paul Buetow Date: Tue, 5 May 2026 23:07:35 +0300 Subject: Add fullscreen crop mode toggle (hotkey c) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - In fullscreen, press 'c' to toggle object-fit between contain (default) and fill (stretches to fill, no aspect ratio preservation). - Adds .player.crop-mode video { object-fit: fill; } in player.css. - Adds toggleCrop() in player.js that toggles a crop-mode class and a small UI indicator (✂️) in the controls, visible only in fullscreen. - Resets crop mode back to contain when exiting fullscreen (via Escape, minimize, or fullscreenchange event). - Wires the 'c' hotkey in keyboard.js and registers toggleCrop in app.js. - Adds crop-indicator to index.html and detach.html controls, and documents the shortcut in the help modal. --- web/css/player.css | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'web/css') diff --git a/web/css/player.css b/web/css/player.css index 0f468f9..7a8b561 100644 --- a/web/css/player.css +++ b/web/css/player.css @@ -128,6 +128,17 @@ max-height: 100%; } +.player.crop-mode video { + object-fit: fill; +} + +.crop-indicator { + font-size: 0.75rem; + color: var(--text-secondary); + padding: 0 0.25rem; + user-select: none; +} + /* Cover art for audio playback */ .player .cover-art { width: 100%; -- cgit v1.2.3