Преглед на файлове

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

+ 1
- 1
modules/RTC/RTCUtils.js Целия файл

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

Loading…
Отказ
Запис