Skip to content
This repository has been archived by the owner on Aug 30, 2020. It is now read-only.

Commit

Permalink
Merge pull request #164 from alexkn/fix-device-preselection
Browse files Browse the repository at this point in the history
fix microphone/sound device preselection
  • Loading branch information
synesthesiam authored Jan 20, 2020
2 parents a12e537 + f5e6666 commit 9d1303e
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 22 deletions.
22 changes: 11 additions & 11 deletions src/components/profile/AudioPlaying.vue
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,6 @@
},
data: function () {
return {
device: '',
speakers: {}
}
},
Expand All @@ -124,20 +123,21 @@
},
computed: {
devicePath: function() {
return 'sounds.' + this.profile.sounds.system + '.device'
device: {
get: function() {
if(this.profile.sounds[this.profile.sounds.system]) {
return this.profile.sounds[this.profile.sounds.system].device;
}
return "";
},
set: function(newValue) {
this.profile.sounds[this.profile.sounds.system].device = newValue;
}
}
},
mounted: function() {
this.getSpeakers()
this.device = this._.get(this.profile, this.devicePath, '')
},
watch: {
device: function() {
this._.set(this.profile, this.devicePath, this.device)
}
this.getSpeakers();
}
}
</script>
Expand Down
22 changes: 11 additions & 11 deletions src/components/profile/AudioRecording.vue
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,6 @@
},
data: function () {
return {
device: '',
microphones: {},
testing: false
}
Expand Down Expand Up @@ -217,20 +216,21 @@
},
computed: {
devicePath: function() {
return 'microphone.' + this.profile.microphone.system + '.device'
device: {
get: function() {
if(this.profile.microphone[this.profile.microphone.system]) {
return this.profile.microphone[this.profile.microphone.system].device;
}
return "";
},
set: function(newValue) {
this.profile.microphone[this.profile.microphone.system].device = newValue;
}
}
},
mounted: function() {
this.getMicrophones()
this.device = this._.get(this.profile, this.devicePath, '')
},
watch: {
device: function() {
this._.set(this.profile, this.devicePath, this.device)
}
this.getMicrophones();
}
}
</script>
Expand Down

0 comments on commit 9d1303e

Please sign in to comment.