Do not proxy streaming images by default

This commit is contained in:
Pierre HUBERT 2021-01-31 05:29:49 +01:00
parent 4830a8cef9
commit 00f82fce76

View File

@ -232,7 +232,7 @@ class CallWindow extends CustomEvents {
text: "Toggle blur background",
needVideo: true,
onclick: () => {
this.blurBackground = !this.blurBackground;
this.toggleBlurBackground()
}
},
@ -657,6 +657,17 @@ class CallWindow extends CustomEvents {
};
}
/**
* Toggle blur background mode
*/
toggleBlurBackground() {
this.blurBackground = !this.blurBackground;
// Check if background blur network is loaded
if(!this.backgroundDetectionNetwork)
notify("Please stop and start streaming again to apply modification!");
}
/**
* Toggle stream state
*
@ -936,7 +947,7 @@ class CallWindow extends CustomEvents {
return
// If streaming video stream, allow to blur background
if(includeVideo)
if(includeVideo && this.blurBackground)
{
// Create capture
const videoTarget = document.createElement("video");
@ -1005,7 +1016,7 @@ class CallWindow extends CustomEvents {
})();
stream = canvasTarget.captureStream();
stream = canvasTarget.captureStream(24);
stream.addTrack(this.mainStream.getAudioTracks()[0]);
}