diff --git a/src/components/DeviceChecker/DeviceChecker.vue b/src/components/DeviceChecker/DeviceChecker.vue index f63b1873e87..241fe05b9b1 100644 --- a/src/components/DeviceChecker/DeviceChecker.vue +++ b/src/components/DeviceChecker/DeviceChecker.vue @@ -282,7 +282,7 @@ export default { if (newValue) { this.audioOn = !localStorage.getItem('audioDisabled_' + this.token) this.videoOn = !localStorage.getItem('videoDisabled_' + this.token) - this.blurOn = !localStorage.getItem('virtualBackgroundDisabled_' + this.token) + this.blurOn = !!localStorage.getItem('virtualBackgroundEnabled_' + this.token) this.initializeDevicesMixin() } else { @@ -357,10 +357,10 @@ export default { toggleBlur() { if (!this.blurOn) { - localStorage.removeItem('virtualBackgroundDisabled_' + this.token) + localStorage.setItem('virtualBackgroundEnabled_' + this.token, 'true') this.blurOn = true } else { - localStorage.setItem('virtualBackgroundDisabled_' + this.token, 'true') + localStorage.removeItem('virtualBackgroundEnabled_' + this.token) this.blurOn = false } }, diff --git a/src/utils/media/pipeline/VirtualBackground.js b/src/utils/media/pipeline/VirtualBackground.js index de5258ade29..dfb68ea011a 100644 --- a/src/utils/media/pipeline/VirtualBackground.js +++ b/src/utils/media/pipeline/VirtualBackground.js @@ -155,7 +155,7 @@ export default class VirtualBackground extends TrackSinkSource { const virtualBackground = { type: VIRTUAL_BACKGROUND_TYPE.NONE, - blurValue: 32, + blurValue: 10, } const options = { ...isSimd ? segmentationDimensions.model144 : segmentationDimensions.model96, diff --git a/src/utils/webrtc/index.js b/src/utils/webrtc/index.js index 91a44b9c50d..7963edc50c0 100644 --- a/src/utils/webrtc/index.js +++ b/src/utils/webrtc/index.js @@ -191,7 +191,7 @@ async function signalingJoinCall(token, flags) { // it should be saved now. const enableAudio = !localStorage.getItem('audioDisabled_' + token) const enableVideo = !localStorage.getItem('videoDisabled_' + token) - const enableVirtualBackground = !localStorage.getItem('virtualBackgroundDisabled_' + token) + const enableVirtualBackground = !!localStorage.getItem('virtualBackgroundEnabled_' + token) const startCallOnceLocalMediaStarted = (configuration) => { webRtc.off('localMediaStarted', startCallOnceLocalMediaStarted) diff --git a/src/utils/webrtc/models/LocalMediaModel.js b/src/utils/webrtc/models/LocalMediaModel.js index 41dad137500..ed62bfdf1a7 100644 --- a/src/utils/webrtc/models/LocalMediaModel.js +++ b/src/utils/webrtc/models/LocalMediaModel.js @@ -405,7 +405,7 @@ LocalMediaModel.prototype = { throw new Error('WebRtc not initialized yet') } - localStorage.removeItem('virtualBackgroundDisabled_' + this.get('token')) + localStorage.setItem('virtualBackgroundEnabled_' + this.get('token'), 'true') this._webRtc.enableVirtualBackground() }, @@ -415,7 +415,7 @@ LocalMediaModel.prototype = { throw new Error('WebRtc not initialized yet') } - localStorage.setItem('virtualBackgroundDisabled_' + this.get('token'), 'true') + localStorage.removeItem('virtualBackgroundEnabled_' + this.get('token')) this._webRtc.disableVirtualBackground() },