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 +++++++++++ web/detach.html | 1 + web/index.html | 2 ++ web/js/app.js | 3 ++- web/js/keyboard.js | 1 + web/js/player.js | 27 ++++++++++++++++++++++++++- 6 files changed, 43 insertions(+), 2 deletions(-) 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%; diff --git a/web/detach.html b/web/detach.html index b83ef68..8d6af63 100644 --- a/web/detach.html +++ b/web/detach.html @@ -37,6 +37,7 @@ + diff --git a/web/index.html b/web/index.html index f3e37a1..4b90f92 100644 --- a/web/index.html +++ b/web/index.html @@ -90,6 +90,7 @@ +