Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: respect user changes of devices state when toggling it #13892

Merged
merged 1 commit into from
Nov 28, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions src/components/CallView/CallView.vue
Original file line number Diff line number Diff line change
Expand Up @@ -197,15 +197,15 @@ export default {
},
},

setup() {
setup(props) {
// For debug and screenshot purposes. Set to true to enable
const devMode = ref(false)
provide('CallView:devModeEnabled', devMode)
const screenshotMode = ref(false)
provide('CallView:screenshotModeEnabled', screenshotMode)
const settingsStore = useSettingsStore()
const startWithoutMediaEnabled = settingsStore.startWithoutMedia
if (startWithoutMediaEnabled) {
// If media settings was not used, we check the global config of default devices state here
if (!settingsStore.getShowMediaSettings(props.token) && settingsStore.startWithoutMedia) {
localMediaModel.disableAudio()
localMediaModel.disableVideo()
}
Expand Down
13 changes: 11 additions & 2 deletions src/components/MediaSettings/MediaSettings.vue
Original file line number Diff line number Diff line change
Expand Up @@ -438,8 +438,17 @@ export default {
watch: {
modal(newValue) {
if (newValue) {
this.audioOn = !BrowserStorage.getItem('audioDisabled_' + this.token)
this.videoOn = !BrowserStorage.getItem('videoDisabled_' + this.token)
if (this.settingsStore.startWithoutMedia) {
// Disable audio
this.audioOn = false
BrowserStorage.setItem('audioDisabled_' + this.token, 'true')
// Disable video
this.videoOn = false
BrowserStorage.setItem('videoDisabled_' + this.token, 'true')
} else {
this.audioOn = !BrowserStorage.getItem('audioDisabled_' + this.token)
this.videoOn = !BrowserStorage.getItem('videoDisabled_' + this.token)
}
this.silentCall = !!BrowserStorage.getItem('silentCall_' + this.token)

// Set virtual background depending on BrowserStorage's settings
Expand Down
Loading