From e4e58be566c95d24bef93fece5d01dada4409d7b Mon Sep 17 00:00:00 2001 From: Kendell R Date: Sun, 30 Aug 2020 08:03:35 -0700 Subject: [PATCH] Update main.js --- js/main.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/js/main.js b/js/main.js index c4017a7..7f3edf7 100644 --- a/js/main.js +++ b/js/main.js @@ -368,6 +368,7 @@ class BrowserMod { this._video = document.createElement("video"); this._video.autoplay = true; this._video.playsInline = true; + this._video.style.cssText = ` visibility: hidden; width: 0; @@ -390,7 +391,7 @@ class BrowserMod { send_cam(data) { const context = this._canvas.getContext('2d'); - context.drawImage(this._video, 0, 0, this._canvas.width, this._canvas.height); + context.drawImage(this._video, 0, 0, this._video.videoWidth, this._video.videoHeight); this.conn.sendMessage({ type: 'browser_mod/update', deviceID: deviceID,