Fix video not being full screen (#415)

This commit is contained in:
redphx 2024-05-30 16:28:05 +07:00
parent b99ec65cc9
commit e9671cbe5d

View File

@ -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%';