瀏覽代碼

fix: Fixes bugs introduces while refactoring.

master
Boris Grozev 9 年之前
父節點
當前提交
65c24b1e16
共有 1 個文件被更改,包括 3 次插入2 次删除
  1. 3
    2
      modules/connectivity/ConnectionQuality.js

+ 3
- 2
modules/connectivity/ConnectionQuality.js 查看文件

@@ -114,7 +114,7 @@ export default class ConnectionQuality {
114 114
                 // quality and will not depend on localVideo if it is missing
115 115
                 this.updateLocalStats(
116 116
                     stats,
117
-                    conference.isConnectionInterrupted(),
117
+                    !conference.isConnectionInterrupted(),
118 118
                     localVideoTrack ? localVideoTrack.videoType : undefined,
119 119
                     localVideoTrack ? localVideoTrack.isMuted() : true,
120 120
                     localVideoTrack ? localVideoTrack.resolution : null);
@@ -202,11 +202,12 @@ export default class ConnectionQuality {
202 202
      */
203 203
     updateLocalStats(data, updateLocalConnectionQuality,
204 204
                   videoType, isMuted, resolution) {
205
+            let prevConnectionQuality = this.localStats.connectionQuality || 0;
205 206
             this.localStats = data;
206 207
             if(updateLocalConnectionQuality) {
207 208
                 let val = this._getNewQualityValue(
208 209
                     this.localStats,
209
-                    this.localStats.connectionQuality,
210
+                    prevConnectionQuality,
210 211
                     videoType,
211 212
                     isMuted,
212 213
                     resolution);

Loading…
取消
儲存