From 45ebe5c0aed83e95d9259e636c183af6641981bb Mon Sep 17 00:00:00 2001 From: "russell@unturf.com" Date: Wed, 21 Jan 2026 10:35:53 -0500 Subject: [PATCH] Fix fullscreen to maintain aspect ratio Request fullscreen on player container instead of document root to ensure media maintains aspect ratio with object-fit: contain --- make_post_sell/static/js/player.js | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/make_post_sell/static/js/player.js b/make_post_sell/static/js/player.js index fb40c02..ac6cf0e 100644 --- a/make_post_sell/static/js/player.js +++ b/make_post_sell/static/js/player.js @@ -32,9 +32,13 @@ */ window.toggleFullscreen = function() { if (!document.fullscreenElement) { - document.documentElement.requestFullscreen().catch(err => { - console.error('Error attempting to enable fullscreen:', err); - }); + // Request fullscreen on the player container, not the whole document + const container = document.getElementById('playerContainer'); + if (container) { + container.requestFullscreen().catch(err => { + console.error('Error attempting to enable fullscreen:', err); + }); + } } else { document.exitFullscreen(); }