summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDorraJaouad <dorra.jaoued7@gmail.com>2024-11-13 10:13:34 +0100
committerDorraJaouad <dorra.jaoued7@gmail.com>2024-11-15 10:57:39 +0100
commit0c8a6ad6b6155a9c759b4f7c6b898413961dc234 (patch)
tree0632437b390c9ff3b6ef9ed039f3a3ef05d7b35f
parentab54a9367dc57ff4f89b675931c14d24a78610bb (diff)
fix: reduce the global blur implementation against per conversation level virtual background
Signed-off-by: DorraJaouad <dorra.jaoued7@gmail.com>
-rw-r--r--src/components/MediaSettings/MediaSettings.vue26
-rw-r--r--src/components/MediaSettings/VideoBackgroundEditor.vue7
2 files changed, 15 insertions, 18 deletions
diff --git a/src/components/MediaSettings/MediaSettings.vue b/src/components/MediaSettings/MediaSettings.vue
index b2e59f64e7..1da0a9c8dd 100644
--- a/src/components/MediaSettings/MediaSettings.vue
+++ b/src/components/MediaSettings/MediaSettings.vue
@@ -436,20 +436,19 @@ export default {
this.audioOn = !BrowserStorage.getItem('audioDisabled_' + this.token)
this.videoOn = !BrowserStorage.getItem('videoDisabled_' + this.token)
this.silentCall = !!BrowserStorage.getItem('silentCall_' + this.token)
- // Check main blur background setting
- if (this.blurBackgroundEnabled) {
+
+ // Set virtual background depending on BrowserStorage's settings
+ if (BrowserStorage.getItem('virtualBackgroundEnabled_' + this.token) === 'true') {
+ if (BrowserStorage.getItem('virtualBackgroundType_' + this.token) === VIRTUAL_BACKGROUND.BACKGROUND_TYPE.BLUR) {
+ this.blurVirtualBackground()
+ } else if (BrowserStorage.getItem('virtualBackgroundType_' + this.token) === VIRTUAL_BACKGROUND.BACKGROUND_TYPE.IMAGE) {
+ this.setVirtualBackgroundImage(BrowserStorage.getItem('virtualBackgroundUrl_' + this.token))
+ }
+ } else if (this.blurBackgroundEnabled) {
+ // Fall back to global blur background setting
this.blurVirtualBackground()
} else {
- // Set virtual background depending on BrowserStorage's settings
- if (BrowserStorage.getItem('virtualBackgroundEnabled_' + this.token) === 'true') {
- if (BrowserStorage.getItem('virtualBackgroundType_' + this.token) === VIRTUAL_BACKGROUND.BACKGROUND_TYPE.BLUR) {
- this.blurVirtualBackground()
- } else if (BrowserStorage.getItem('virtualBackgroundType_' + this.token) === VIRTUAL_BACKGROUND.BACKGROUND_TYPE.IMAGE) {
- this.setVirtualBackgroundImage(BrowserStorage.getItem('virtualBackgroundUrl_' + this.token))
- }
- } else {
- this.clearVirtualBackground()
- }
+ this.clearVirtualBackground()
}
this.initializeDevices()
@@ -476,8 +475,9 @@ export default {
isInCall(value) {
if (value) {
+ const virtualBackgroundEnabled = BrowserStorage.getItem('virtualBackgroundEnabled_' + this.token) === 'true'
// Apply global blur background setting
- if (this.blurBackgroundEnabled && !this.skipBlurBackgroundEnabled) {
+ if (this.blurBackgroundEnabled && !this.skipBlurBackgroundEnabled && !virtualBackgroundEnabled) {
this.blurBackground(true)
}
}
diff --git a/src/components/MediaSettings/VideoBackgroundEditor.vue b/src/components/MediaSettings/VideoBackgroundEditor.vue
index b9842b325b..a24bc38d46 100644
--- a/src/components/MediaSettings/VideoBackgroundEditor.vue
+++ b/src/components/MediaSettings/VideoBackgroundEditor.vue
@@ -256,11 +256,6 @@ export default {
},
loadBackground() {
- // Set virtual background depending on main blur setting (in Talk settings)
- if (this.settingsStore.blurBackgroundEnabled) {
- this.selectedBackground = 'blur'
- return
- }
// Set virtual background depending on browser storage's settings
if (BrowserStorage.getItem('virtualBackgroundEnabled_' + this.token) === 'true') {
if (BrowserStorage.getItem('virtualBackgroundType_' + this.token) === VIRTUAL_BACKGROUND.BACKGROUND_TYPE.BLUR) {
@@ -270,6 +265,8 @@ export default {
} else {
this.selectedBackground = 'none'
}
+ } else if (this.settingsStore.blurBackgroundEnabled) {
+ this.selectedBackground = 'blur'
} else {
this.selectedBackground = 'none'
}