Skip to content

Commit

Permalink
Merge pull request #12153 from nextcloud/backport/12146/stable29
Browse files Browse the repository at this point in the history
[stable29] fix(media): improve the default selection before preferences
  • Loading branch information
nickvergessen authored Apr 18, 2024
2 parents 2053eed + 1e92ed0 commit b6c093b
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/components/MediaSettings/MediaSettings.vue
Original file line number Diff line number Diff line change
Expand Up @@ -489,6 +489,11 @@ export default {
mounted() {
subscribe('talk:media-settings:show', this.showModal)
subscribe('talk:media-settings:hide', this.closeModalAndApplySettings)

const devicesPreferred = BrowserStorage.getItem('devicesPreferred')
if (!devicesPreferred) {
this.tabContent = 'devices'
}
},

beforeDestroy() {
Expand Down
6 changes: 6 additions & 0 deletions src/utils/webrtc/MediaDevicesManager.js
Original file line number Diff line number Diff line change
Expand Up @@ -273,6 +273,12 @@ MediaDevicesManager.prototype = {
this._preferenceVideoInputList = newVideoInputList
BrowserStorage.setItem('videoInputPreferences', JSON.stringify(newVideoInputList))
}

const devicesPreferred = BrowserStorage.getItem('devicesPreferred')
if (!devicesPreferred) {
BrowserStorage.setItem('devicesPreferred', true)
}

},

/**
Expand Down

0 comments on commit b6c093b

Please sign in to comment.