Support dynamic resolution with WebGL2 in Genshin

This commit is contained in:
redphx
2024-12-07 08:24:44 +07:00
parent 1ca2b771e7
commit cf4609d87b
4 changed files with 9 additions and 5 deletions

View File

@@ -180,6 +180,8 @@ export class StreamPlayer {
$webGL2Canvas.style.width = targetWidth;
$webGL2Canvas.style.height = targetHeight;
$webGL2Canvas.style.objectFit = targetObjectFit;
$video.dispatchEvent(new Event('resize'));
}
// Update video dimensions