Revert voodoo
This commit is contained in:
parent
4976cbb424
commit
0bafd6458a
3 changed files with 11 additions and 31 deletions
|
@ -53,36 +53,12 @@ export default {
|
|||
// });
|
||||
},
|
||||
|
||||
_findDefault: function(devices) {
|
||||
return devices.some((device) => device.deviceId === 'default') ? 'default' : undefined;
|
||||
},
|
||||
|
||||
setAudioInputDefault: async function() {
|
||||
const devices = await this.getDevices();
|
||||
const audioDefault = this._findDefault(devices.audioinput);
|
||||
this._setAudioInput(audioDefault);
|
||||
},
|
||||
|
||||
setAudioInput: function(deviceId) {
|
||||
this[deviceId === 'default' ? 'setAudioInputDefault' : '_setAudioInput'](deviceId);
|
||||
},
|
||||
|
||||
_setAudioInput: function(deviceId) {
|
||||
UserSettingsStore.setLocalSetting('webrtc_audioinput', deviceId);
|
||||
Matrix.setMatrixCallAudioInput(deviceId);
|
||||
},
|
||||
|
||||
setVideoInputDefault: async function() {
|
||||
const devices = await this.getDevices();
|
||||
const videoDefault = this._findDefault(devices.videoinput);
|
||||
this._setVideoInput(videoDefault);
|
||||
},
|
||||
|
||||
setVideoInput: function(deviceId) {
|
||||
this[deviceId === 'default' ? 'setVideoInputDefault' : '_setVideoInput'](deviceId);
|
||||
},
|
||||
|
||||
_setVideoInput: function(deviceId) {
|
||||
UserSettingsStore.setLocalSetting('webrtc_videoinput', deviceId);
|
||||
Matrix.setMatrixCallVideoInput(deviceId);
|
||||
},
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue