From 386a6f92160b1cbc06dfdf978a35822cd12ef466 Mon Sep 17 00:00:00 2001 From: dirwin31 <83434411+dirwin31@users.noreply.github.com> Date: Thu, 27 Aug 2026 18:12:25 -0700 Subject: [PATCH] Matching the field of view - pretty please --- .../assets/components/recordings/dashcam_routes.css | 5 +++++ .../assets/components/recordings/dashcam_routes.js | 4 ++++ .../system/the_galaxy/tests/test_dashcam_routes_helpers.py | 3 +++ 3 files changed, 12 insertions(+) diff --git a/starpilot/system/the_galaxy/assets/components/recordings/dashcam_routes.css b/starpilot/system/the_galaxy/assets/components/recordings/dashcam_routes.css index b36d0ef6a..e5656fd84 100644 --- a/starpilot/system/the_galaxy/assets/components/recordings/dashcam_routes.css +++ b/starpilot/system/the_galaxy/assets/components/recordings/dashcam_routes.css @@ -1277,6 +1277,11 @@ width: 100% !important; } +.dashcam-player-overlay .dashcam-player .dashcam-video-shell.qcamera-framing video { + /* qcamera.ts is a full-frame, non-uniform scale; mirror it to prevent a crop/FOV jump. */ + object-fit: fill; +} + .dashcam-player-overlay .dashcam-player .dashcam-video-shell video.active { opacity: 1; pointer-events: auto; diff --git a/starpilot/system/the_galaxy/assets/components/recordings/dashcam_routes.js b/starpilot/system/the_galaxy/assets/components/recordings/dashcam_routes.js index ceab760af..4dad08354 100644 --- a/starpilot/system/the_galaxy/assets/components/recordings/dashcam_routes.js +++ b/starpilot/system/the_galaxy/assets/components/recordings/dashcam_routes.js @@ -340,6 +340,7 @@ async function openOverlay(route) { const [videoA, videoB] = overlay.querySelectorAll(".dashcam-video") let activeVideo = videoA let stagingVideo = videoB + const videoShell = overlay.querySelector(".dashcam-video-shell") const playerState = overlay.querySelector(".dashcam-player-state") const segmentBar = overlay.querySelector(".dashcam-segment-bar") const segmentSelect = overlay.querySelector(".segment-select") @@ -579,6 +580,9 @@ async function openOverlay(route) { cancelUpgrade() wantsPlayback = autoplay showingPreview = preview === undefined ? supportsLowQuality(camera) : preview + // qcamera.ts scales the complete road frame to 526x330. Keep that same mapping + // after the full stream arrives so its slightly wider aspect ratio is not cropped. + videoShell.classList.toggle("qcamera-framing", showingPreview) if (message) setPlayerMessage(message) stagingVideo.pause() diff --git a/starpilot/system/the_galaxy/tests/test_dashcam_routes_helpers.py b/starpilot/system/the_galaxy/tests/test_dashcam_routes_helpers.py index b9ea6f616..af26f4569 100644 --- a/starpilot/system/the_galaxy/tests/test_dashcam_routes_helpers.py +++ b/starpilot/system/the_galaxy/tests/test_dashcam_routes_helpers.py @@ -97,6 +97,9 @@ def test_player_shell_keeps_both_quality_levels_at_one_fixed_size(): assert "height: 100% !important;" in source assert "width: 100% !important;" in source assert "object-fit: cover;" in source + assert ".dashcam-video-shell.qcamera-framing video" in source + assert "object-fit: fill;" in source + assert 'videoShell.classList.toggle("qcamera-framing", showingPreview)' in component assert "deferNativeControlsUntilInteraction(stagingVideo)" in component assert "stagingVideo.controls = true" not in component