You've already forked matrix-react-sdk
mirror of
https://github.com/matrix-org/matrix-react-sdk.git
synced 2025-07-28 15:22:05 +03:00
Revert voodoo
This commit is contained in:
@ -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);
|
||||
},
|
||||
|
Reference in New Issue
Block a user