Kaynağa Gözat

Adds additional check, avoids undefined error.

Needs an additional check for available devices after merging https://github.com/jitsi/lib-jitsi-meet/pull/139.
dev1
damencho 9 yıl önce
ebeveyn
işleme
011d71ed94
1 değiştirilmiş dosya ile 2 ekleme ve 1 silme
  1. 2
    1
      JitsiMediaDevices.js

+ 2
- 1
JitsiMediaDevices.js Dosyayı Görüntüle

@@ -95,7 +95,8 @@ var JitsiMediaDevices = {
95 95
      */
96 96
     setAudioOutputDevice: function (deviceId) {
97 97
 
98
-        if (RTC.getCurrentlyAvailableMediaDevices().length > 0)
98
+        if (RTC.getCurrentlyAvailableMediaDevices()
99
+            && RTC.getCurrentlyAvailableMediaDevices().length > 0)
99 100
         {
100 101
             // if we have devices info report device to stats
101 102
             // normally this will not happen on startup as this method is called

Loading…
İptal
Kaydet