From 2e486b9b7cbfbda4431d734e8dd99aafbd22cab8 Mon Sep 17 00:00:00 2001 From: Pierre HUBERT Date: Sat, 30 Jan 2021 19:24:08 +0100 Subject: [PATCH] Update --- assets/js/components/calls/window.js | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/assets/js/components/calls/window.js b/assets/js/components/calls/window.js index 4b01ed80..be2ffe28 100644 --- a/assets/js/components/calls/window.js +++ b/assets/js/components/calls/window.js @@ -934,8 +934,7 @@ class CallWindow extends CustomEvents { videoTarget.play() const canvasTarget = document.createElement("canvas"); - const canvas = canvasTarget.getContext("2d"); - + bodyPix.load({ multiplier: 0.75, stride: 32, @@ -949,7 +948,7 @@ class CallWindow extends CustomEvents { const videoTrack = this.mainStream.getVideoTracks()[0]; - // Fix size + // Fix video & canvas size videoTarget.width = videoTrack.getSettings().width videoTarget.height = videoTrack.getSettings().height canvasTarget.width = videoTarget.width; @@ -966,7 +965,6 @@ class CallWindow extends CustomEvents { bodyPix.drawBokehEffect( canvasTarget, videoTarget, segmentation, backgroundBlurAmount, edgeBlurAmount, flipHorizontal); - console.log("track update"); } } catch(e)