mirror of
https://github.com/redphx/better-xcloud.git
synced 2025-06-07 08:07:18 +02:00
Fix video not being full screen (#415)
This commit is contained in:
parent
b99ec65cc9
commit
e9671cbe5d
@ -485,13 +485,13 @@ function resizeVideoPlayer() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Prevent floating points
|
// Prevent floating points
|
||||||
width = Math.floor(width);
|
width = Math.min(parentRect.width, Math.ceil(width));
|
||||||
height = Math.floor(height);
|
height = Math.min(parentRect.height, Math.ceil(height));
|
||||||
|
|
||||||
// Update size
|
// Update size
|
||||||
$video.style.width = `${width}px`;
|
$video.style.width = `${width}px`;
|
||||||
$video.style.height = `${height}px`;
|
$video.style.height = `${height}px`;
|
||||||
$video.style.objectFit = 'scale-down';
|
$video.style.objectFit = 'fill';
|
||||||
} else {
|
} else {
|
||||||
$video.style.width = '100%';
|
$video.style.width = '100%';
|
||||||
$video.style.height = '100%';
|
$video.style.height = '100%';
|
||||||
|
Loading…
x
Reference in New Issue
Block a user