From 900f04353224b5059adcc3953cc8acc42b12e6fc Mon Sep 17 00:00:00 2001 From: Maksim Sukharev Date: Mon, 4 Mar 2024 14:14:27 +0100 Subject: [PATCH 1/2] fix(MediaSettings): reset virtualBackground at preview properly Signed-off-by: Maksim Sukharev --- src/components/MediaSettings/MediaSettings.vue | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/components/MediaSettings/MediaSettings.vue b/src/components/MediaSettings/MediaSettings.vue index 4b2034169e7..1faec84649b 100644 --- a/src/components/MediaSettings/MediaSettings.vue +++ b/src/components/MediaSettings/MediaSettings.vue @@ -455,6 +455,8 @@ export default { } else if (BrowserStorage.getItem('virtualBackgroundType_' + this.token) === VIRTUAL_BACKGROUND.BACKGROUND_TYPE.IMAGE) { this.setVirtualBackgroundImage(BrowserStorage.getItem('virtualBackgroundUrl_' + this.token)) } + } else { + this.clearVirtualBackground() } this.initializeDevices() From e775fb1ccf4b201f5a6bc3fbe6698b6141ef7484 Mon Sep 17 00:00:00 2001 From: Maksim Sukharev Date: Mon, 4 Mar 2024 21:37:48 +0100 Subject: [PATCH 2/2] fix(BrowserStorage): don't create empty entries - set token at localMediaModel on call start - add check for current token in settings store Signed-off-by: Maksim Sukharev --- src/stores/settings.js | 4 ++++ src/utils/webrtc/index.js | 2 ++ 2 files changed, 6 insertions(+) diff --git a/src/stores/settings.js b/src/stores/settings.js index 9d9b74cc59c..ac8e4ff7c42 100644 --- a/src/stores/settings.js +++ b/src/stores/settings.js @@ -55,6 +55,10 @@ export const useSettingsStore = defineStore('settings', { getters: { getShowMediaSettings: (state) => (token) => { + if (!token) { + return true + } + if (state.showMediaSettings[token] !== undefined) { return state.showMediaSettings[token] } diff --git a/src/utils/webrtc/index.js b/src/utils/webrtc/index.js index e68a0cf6a5e..815b9145bce 100644 --- a/src/utils/webrtc/index.js +++ b/src/utils/webrtc/index.js @@ -244,6 +244,8 @@ async function signalingJoinCall(token, flags, silent, recordingConsent) { const virtualBackgroundBlurStrength = BrowserStorage.getItem('virtualBackgroundBlurStrength_' + token) const virtualBackgroundUrl = BrowserStorage.getItem('virtualBackgroundUrl_' + token) + localMediaModel.set('token', token) + if (enableAudio) { localMediaModel.enableAudio() } else {