mirror of
https://github.com/pierre42100/ComunicWeb
synced 2024-11-22 12:09:21 +00:00
Fix bug in Firefox
This commit is contained in:
parent
76ff8565e4
commit
d87e29d460
@ -13,7 +13,7 @@ class WsMessage {
|
|||||||
}
|
}
|
||||||
|
|
||||||
get hasId() {
|
get hasId() {
|
||||||
return this.id.length > 0
|
return this.id && this.id.length > 0
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1001,6 +1001,7 @@ class CallWindow extends CustomEvents {
|
|||||||
stride: 32,
|
stride: 32,
|
||||||
quantBytes: 4
|
quantBytes: 4
|
||||||
});
|
});
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
const segmentation = await this.backgroundDetectionNetwork.segmentPerson(videoTarget);
|
const segmentation = await this.backgroundDetectionNetwork.segmentPerson(videoTarget);
|
||||||
@ -1012,12 +1013,16 @@ class CallWindow extends CustomEvents {
|
|||||||
bodyPix.drawBokehEffect(
|
bodyPix.drawBokehEffect(
|
||||||
canvasTarget, videoTarget, segmentation, backgroundBlurAmount,
|
canvasTarget, videoTarget, segmentation, backgroundBlurAmount,
|
||||||
edgeBlurAmount, flipHorizontal);
|
edgeBlurAmount, flipHorizontal);
|
||||||
|
|
||||||
|
await new Promise((res, rej) => setTimeout(() => res(), 1));
|
||||||
}
|
}
|
||||||
|
|
||||||
else {
|
else {
|
||||||
canvas.drawImage(videoTarget, 0, 0, videoTarget.width, videoTarget.height);
|
canvas.drawImage(videoTarget, 0, 0, videoTarget.width, videoTarget.height);
|
||||||
await new Promise((res, rej) => setTimeout(() => res(), 1000 / videoTrack.getSettings().frameRate));
|
await new Promise((res, rej) => setTimeout(() => res(), 1000 / videoTrack.getSettings().frameRate));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
catch(e)
|
catch(e)
|
||||||
|
Loading…
Reference in New Issue
Block a user