Skip to content

Commit

Permalink
fix(BrowserStorage): don't create empty entries
Browse files Browse the repository at this point in the history
- set token at localMediaModel on call start
- add check for current token in settings store

Signed-off-by: Maksim Sukharev <antreesy.web@gmail.com>
  • Loading branch information
Antreesy committed Mar 7, 2024
1 parent 900f043 commit e775fb1
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/stores/settings.js
Original file line number Diff line number Diff line change
Expand Up @@ -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]
}
Expand Down
2 changes: 2 additions & 0 deletions src/utils/webrtc/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit e775fb1

Please sign in to comment.