fix(devices): Fixes a JS error when no audio/video is selected and there is a device update.
This commit is contained in:
parent
957bd8916a
commit
9ca0ee41b6
|
@ -62,7 +62,7 @@ function getNewAudioInputDevice(newDevices, localAudio, newLabel) {
|
|||
const selectedAudioInputDeviceId = getUserSelectedMicDeviceId(APP.store.getState());
|
||||
const selectedAudioInputDevice = availableAudioInputDevices.find(
|
||||
d => d.deviceId === selectedAudioInputDeviceId);
|
||||
const localAudioDeviceId = localAudio.getDeviceId();
|
||||
const localAudioDeviceId = localAudio?.getDeviceId();
|
||||
const localAudioDevice = availableAudioInputDevices.find(
|
||||
d => d.deviceId === localAudioDeviceId);
|
||||
|
||||
|
@ -114,7 +114,7 @@ function getNewVideoInputDevice(newDevices, localVideo, newLabel) {
|
|||
const selectedVideoInputDeviceId = getUserSelectedCameraDeviceId(APP.store.getState());
|
||||
const selectedVideoInputDevice = availableVideoInputDevices.find(
|
||||
d => d.deviceId === selectedVideoInputDeviceId);
|
||||
const localVideoDeviceId = localVideo.getDeviceId();
|
||||
const localVideoDeviceId = localVideo?.getDeviceId();
|
||||
const localVideoDevice = availableVideoInputDevices.find(
|
||||
d => d.deviceId === localVideoDeviceId);
|
||||
|
||||
|
|
Loading…
Reference in New Issue