Bläddra i källkod

fix: Fixes bugs introduces while refactoring.

master
Boris Grozev 9 år sedan
förälder
incheckning
65c24b1e16
1 ändrade filer med 3 tillägg och 2 borttagningar
  1. 3
    2
      modules/connectivity/ConnectionQuality.js

+ 3
- 2
modules/connectivity/ConnectionQuality.js Visa fil

@@ -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);

Laddar…
Avbryt
Spara