diff --git a/assets/js/common/ws.js b/assets/js/common/ws.js index d6165e3a..233afe7c 100644 --- a/assets/js/common/ws.js +++ b/assets/js/common/ws.js @@ -13,7 +13,7 @@ class WsMessage { } get hasId() { - return this.id.length > 0 + return this.id && this.id.length > 0 } } diff --git a/assets/js/components/calls/window.js b/assets/js/components/calls/window.js index 1f2f48b9..11a41061 100644 --- a/assets/js/components/calls/window.js +++ b/assets/js/components/calls/window.js @@ -1001,6 +1001,7 @@ class CallWindow extends CustomEvents { stride: 32, quantBytes: 4 }); + } const segmentation = await this.backgroundDetectionNetwork.segmentPerson(videoTarget); @@ -1012,12 +1013,16 @@ class CallWindow extends CustomEvents { bodyPix.drawBokehEffect( canvasTarget, videoTarget, segmentation, backgroundBlurAmount, edgeBlurAmount, flipHorizontal); + + await new Promise((res, rej) => setTimeout(() => res(), 1)); } else { canvas.drawImage(videoTarget, 0, 0, videoTarget.width, videoTarget.height); await new Promise((res, rej) => setTimeout(() => res(), 1000 / videoTrack.getSettings().frameRate)); } + + } } catch(e)