mirror of
https://github.com/pierre42100/ComunicWeb
synced 2024-11-22 12:09:21 +00:00
Update
This commit is contained in:
parent
7df6e5b3bf
commit
2e486b9b7c
@ -934,8 +934,7 @@ class CallWindow extends CustomEvents {
|
|||||||
videoTarget.play()
|
videoTarget.play()
|
||||||
|
|
||||||
const canvasTarget = document.createElement("canvas");
|
const canvasTarget = document.createElement("canvas");
|
||||||
const canvas = canvasTarget.getContext("2d");
|
|
||||||
|
|
||||||
bodyPix.load({
|
bodyPix.load({
|
||||||
multiplier: 0.75,
|
multiplier: 0.75,
|
||||||
stride: 32,
|
stride: 32,
|
||||||
@ -949,7 +948,7 @@ class CallWindow extends CustomEvents {
|
|||||||
|
|
||||||
const videoTrack = this.mainStream.getVideoTracks()[0];
|
const videoTrack = this.mainStream.getVideoTracks()[0];
|
||||||
|
|
||||||
// Fix size
|
// Fix video & canvas size
|
||||||
videoTarget.width = videoTrack.getSettings().width
|
videoTarget.width = videoTrack.getSettings().width
|
||||||
videoTarget.height = videoTrack.getSettings().height
|
videoTarget.height = videoTrack.getSettings().height
|
||||||
canvasTarget.width = videoTarget.width;
|
canvasTarget.width = videoTarget.width;
|
||||||
@ -966,7 +965,6 @@ class CallWindow extends CustomEvents {
|
|||||||
bodyPix.drawBokehEffect(
|
bodyPix.drawBokehEffect(
|
||||||
canvasTarget, videoTarget, segmentation, backgroundBlurAmount,
|
canvasTarget, videoTarget, segmentation, backgroundBlurAmount,
|
||||||
edgeBlurAmount, flipHorizontal);
|
edgeBlurAmount, flipHorizontal);
|
||||||
console.log("track update");
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
catch(e)
|
catch(e)
|
||||||
|
Loading…
Reference in New Issue
Block a user