Skip to content

Commit

Permalink
Fix: reset and respect flag used for skipping the global config
Browse files Browse the repository at this point in the history
Signed-off-by: DorraJaouad <dorra.jaoued7@gmail.com>
  • Loading branch information
DorraJaouad committed Nov 14, 2024
1 parent 1c7bf00 commit e47f4ae
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 2 deletions.
16 changes: 15 additions & 1 deletion src/components/MediaSettings/MediaSettings.vue
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,7 @@
<template #tab-panel:backgrounds>
<VideoBackgroundEditor class="media-settings__tab"
:token="token"
:skip-blur-virtual-background-enabled="skipBlurVirtualBackgroundEnabled"
@update-background="handleUpdateVirtualBackground" />
</template>
</MediaSettingsTabs>
Expand Down Expand Up @@ -428,6 +429,10 @@ export default {
return this.updatedBackground || this.audioDeviceStateChanged
|| this.videoDeviceStateChanged
},

connectionFailed() {
return this.$store.getters.connectionFailed(this.token)
},
},

watch: {
Expand All @@ -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 {
Expand Down Expand Up @@ -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
}
},
},
Expand Down
7 changes: 6 additions & 1 deletion src/components/MediaSettings/VideoBackgroundEditor.vue
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,11 @@ export default {
type: String,
required: true,
},

skipBlurVirtualBackgroundEnabled: {
type: Boolean,
default: false,
},
},

emits: ['update-background'],
Expand Down Expand Up @@ -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'
Expand Down

0 comments on commit e47f4ae

Please sign in to comment.