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 selectedAudioInputDeviceId = getUserSelectedMicDeviceId(APP.store.getState());
|
||||||
const selectedAudioInputDevice = availableAudioInputDevices.find(
|
const selectedAudioInputDevice = availableAudioInputDevices.find(
|
||||||
d => d.deviceId === selectedAudioInputDeviceId);
|
d => d.deviceId === selectedAudioInputDeviceId);
|
||||||
const localAudioDeviceId = localAudio.getDeviceId();
|
const localAudioDeviceId = localAudio?.getDeviceId();
|
||||||
const localAudioDevice = availableAudioInputDevices.find(
|
const localAudioDevice = availableAudioInputDevices.find(
|
||||||
d => d.deviceId === localAudioDeviceId);
|
d => d.deviceId === localAudioDeviceId);
|
||||||
|
|
||||||
|
@ -114,7 +114,7 @@ function getNewVideoInputDevice(newDevices, localVideo, newLabel) {
|
||||||
const selectedVideoInputDeviceId = getUserSelectedCameraDeviceId(APP.store.getState());
|
const selectedVideoInputDeviceId = getUserSelectedCameraDeviceId(APP.store.getState());
|
||||||
const selectedVideoInputDevice = availableVideoInputDevices.find(
|
const selectedVideoInputDevice = availableVideoInputDevices.find(
|
||||||
d => d.deviceId === selectedVideoInputDeviceId);
|
d => d.deviceId === selectedVideoInputDeviceId);
|
||||||
const localVideoDeviceId = localVideo.getDeviceId();
|
const localVideoDeviceId = localVideo?.getDeviceId();
|
||||||
const localVideoDevice = availableVideoInputDevices.find(
|
const localVideoDevice = availableVideoInputDevices.find(
|
||||||
d => d.deviceId === localVideoDeviceId);
|
d => d.deviceId === localVideoDeviceId);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue