Created
May 31, 2021 23:06
-
-
Save jasonLaster/43e705ca8d00f76f770d8e50d196e627 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/src/protocol/graphics.ts b/src/protocol/graphics.ts | |
index 2e10d755..50de1c54 100644 | |
--- a/src/protocol/graphics.ts | |
+++ b/src/protocol/graphics.ts | |
@@ -444,7 +444,9 @@ export function refreshGraphics() { | |
} | |
} | |
- Video.init(); | |
+ if (features.videoPlayback) { | |
+ Video.init(); | |
+ } | |
canvas.style.visibility = "visible"; | |
const cx = canvas.getContext("2d")!; | |
@@ -460,12 +462,14 @@ export function refreshGraphics() { | |
canvas.width = image.width; | |
canvas.height = image.height; | |
- graphicsVideo.style.width = image.width + "px"; | |
- graphicsVideo.style.height = image.height + "px"; | |
- canvas.style.transform = graphicsVideo.style.transform = `scale(${scale})`; | |
- canvas.style.left = graphicsVideo.style.left = String(offsetLeft); | |
- canvas.style.top = graphicsVideo.style.top = String(offsetTop); | |
+ if (features.videoPlayback) { | |
+ graphicsVideo.style.width = image.width + "px"; | |
+ graphicsVideo.style.height = image.height + "px"; | |
+ canvas.style.transform = graphicsVideo.style.transform = `scale(${scale})`; | |
+ canvas.style.left = graphicsVideo.style.left = String(offsetLeft); | |
+ canvas.style.top = graphicsVideo.style.top = String(offsetTop); | |
+ } | |
cx.drawImage(image, 0, 0); | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment