From e47f4aec2c3fb865ae198102520464ea3946e409 Mon Sep 17 00:00:00 2001 From: DorraJaouad Date: Thu, 14 Nov 2024 18:45:14 +0100 Subject: [PATCH] Fix: reset and respect flag used for skipping the global config Signed-off-by: DorraJaouad --- src/components/MediaSettings/MediaSettings.vue | 16 +++++++++++++++- .../MediaSettings/VideoBackgroundEditor.vue | 7 ++++++- 2 files changed, 21 insertions(+), 2 deletions(-) diff --git a/src/components/MediaSettings/MediaSettings.vue b/src/components/MediaSettings/MediaSettings.vue index 716e2073321b..e7c143b4752a 100644 --- a/src/components/MediaSettings/MediaSettings.vue +++ b/src/components/MediaSettings/MediaSettings.vue @@ -93,6 +93,7 @@ @@ -428,6 +429,10 @@ export default { return this.updatedBackground || this.audioDeviceStateChanged || this.videoDeviceStateChanged }, + + connectionFailed() { + return this.$store.getters.connectionFailed(this.token) + }, }, watch: { @@ -444,7 +449,7 @@ export default { } else if (BrowserStorage.getItem('virtualBackgroundType_' + this.token) === VIRTUAL_BACKGROUND.BACKGROUND_TYPE.IMAGE) { this.setVirtualBackgroundImage(BrowserStorage.getItem('virtualBackgroundUrl_' + this.token)) } - } else if (this.blurVirtualBackgroundEnabled) { + } else if (this.blurVirtualBackgroundEnabled && !this.skipBlurVirtualBackgroundEnabled) { // Fall back to global blur background setting this.blurVirtualBackground() } else { @@ -480,6 +485,15 @@ export default { if (this.blurVirtualBackgroundEnabled && !this.skipBlurVirtualBackgroundEnabled && !virtualBackgroundEnabled) { this.blurBackground(true) } + } else { + // Reset the flag for the next call + this.skipBlurVirtualBackgroundEnabled = false + } + }, + + connectionFailed(value) { + if (value) { + this.skipBlurVirtualBackgroundEnabled = false } }, }, diff --git a/src/components/MediaSettings/VideoBackgroundEditor.vue b/src/components/MediaSettings/VideoBackgroundEditor.vue index 0a31f47b9546..11acda32ff9c 100644 --- a/src/components/MediaSettings/VideoBackgroundEditor.vue +++ b/src/components/MediaSettings/VideoBackgroundEditor.vue @@ -118,6 +118,11 @@ export default { type: String, required: true, }, + + skipBlurVirtualBackgroundEnabled: { + type: Boolean, + default: false, + }, }, emits: ['update-background'], @@ -265,7 +270,7 @@ export default { } else { this.selectedBackground = 'none' } - } else if (this.settingsStore.blurVirtualBackgroundEnabled) { + } else if (this.settingsStore.blurVirtualBackgroundEnabled && !this.skipBlurVirtualBackgroundEnabled) { this.selectedBackground = 'blur' } else { this.selectedBackground = 'none'