瀏覽代碼

Fixes cannot read property of undefined if there is no local video.

j8
damencho 8 年之前
父節點
當前提交
e5f38e34e9
共有 1 個檔案被更改,包括 5 行新增3 行删除
  1. 5
    3
      conference.js

+ 5
- 3
conference.js 查看文件

@@ -1302,12 +1302,14 @@ export default {
1302 1302
         }
1303 1303
 
1304 1304
         room.on(ConferenceEvents.CONNECTION_STATS, function (stats) {
1305
+            // if we say video muted we will use old method of calculating
1306
+            // quality and will not depend on localVideo if it is missing
1305 1307
             ConnectionQuality.updateLocalStats(
1306 1308
                 stats,
1307 1309
                 connectionIsInterrupted,
1308
-                localVideo.videoType,
1309
-                localVideo.isMuted(),
1310
-                localVideo.resolution);
1310
+                localVideo ? localVideo.videoType : undefined,
1311
+                localVideo ? localVideo.isMuted() : true,
1312
+                localVideo ? localVideo.resolution : null);
1311 1313
         });
1312 1314
 
1313 1315
         ConnectionQuality.addListener(CQEvents.LOCALSTATS_UPDATED,

Loading…
取消
儲存