From 68b20a8b4fb34bbc923ecd7616465779db97468c Mon Sep 17 00:00:00 2001 From: EpicKiwi Date: Thu, 21 Sep 2023 12:04:11 +0200 Subject: [PATCH] Added log --- static/js/grab-canvas.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/static/js/grab-canvas.js b/static/js/grab-canvas.js index 002a8fb..3827ccf 100644 --- a/static/js/grab-canvas.js +++ b/static/js/grab-canvas.js @@ -3,6 +3,7 @@ const currentScriptSrc = document.currentScript.src; const sourceElt = document.querySelector("canvas,video"); + console.log("Grabbing", sourceElt) if(!sourceElt){ console.error("No canvas found on this page") @@ -41,6 +42,8 @@ const canvasStreamTracks = canvasStream.getVideoTracks() if(canvasStreamTracks.length > 0){ conn.addTrack(canvasStreamTracks[0], canvasStream) + } else { + throw new Error("Element don't habe video track") } const offer = await conn.createOffer();