From e9671cbe5d28cab9c1a1ea2245da299c72a3a63a Mon Sep 17 00:00:00 2001 From: redphx <96280+redphx@users.noreply.github.com> Date: Thu, 30 May 2024 16:28:05 +0700 Subject: [PATCH] Fix video not being full screen (#415) --- src/modules/ui/ui.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/modules/ui/ui.ts b/src/modules/ui/ui.ts index 4220083..bae4357 100644 --- a/src/modules/ui/ui.ts +++ b/src/modules/ui/ui.ts @@ -485,13 +485,13 @@ function resizeVideoPlayer() { } // Prevent floating points - width = Math.floor(width); - height = Math.floor(height); + width = Math.min(parentRect.width, Math.ceil(width)); + height = Math.min(parentRect.height, Math.ceil(height)); // Update size $video.style.width = `${width}px`; $video.style.height = `${height}px`; - $video.style.objectFit = 'scale-down'; + $video.style.objectFit = 'fill'; } else { $video.style.width = '100%'; $video.style.height = '100%';