Преглед изворни кода

fix(RTCUtils): Cannot read property 'find' of undefined

This error happens in getCurrentlyAvailableMediaDevices
master
Paul Tiedtke пре 4 година
родитељ
комит
fe7d5a7ebf
2 измењених фајлова са 2 додато и 2 уклоњено
  1. 1
    1
      JitsiMediaDevices.js
  2. 1
    1
      modules/RTC/RTCUtils.js

+ 1
- 1
JitsiMediaDevices.js Прегледај датотеку

220
     setAudioOutputDevice(deviceId) {
220
     setAudioOutputDevice(deviceId) {
221
         const availableDevices = RTC.getCurrentlyAvailableMediaDevices();
221
         const availableDevices = RTC.getCurrentlyAvailableMediaDevices();
222
 
222
 
223
-        if (availableDevices && availableDevices.length > 0) {
223
+        if (availableDevices.length > 0) {
224
             // if we have devices info report device to stats
224
             // if we have devices info report device to stats
225
             // normally this will not happen on startup as this method is called
225
             // normally this will not happen on startup as this method is called
226
             // too early. This will happen only on user selection of new device
226
             // too early. This will happen only on user selection of new device

+ 1
- 1
modules/RTC/RTCUtils.js Прегледај датотеку

815
             logger.info(`Disable HPF: ${disableHPF}`);
815
             logger.info(`Disable HPF: ${disableHPF}`);
816
         }
816
         }
817
 
817
 
818
-        availableDevices = undefined;
818
+        availableDevices = [];
819
         window.clearInterval(availableDevicesPollTimer);
819
         window.clearInterval(availableDevicesPollTimer);
820
         availableDevicesPollTimer = undefined;
820
         availableDevicesPollTimer = undefined;
821
 
821
 

Loading…
Откажи
Сачувај