Bläddra i källkod

Revert "add debug logging for connection quality calculation" (#714)

This reverts commit 1c2c63e656.
The logging was initially added to help debug an issue with
connection quality showing lower than expected. The usefulness
of the logging has diminished and is noisy for browsers that
do not automatically filter console.debug, like Edge.
dev1
virtuacoplenny 7 år sedan
förälder
incheckning
37b7fc13f1
1 ändrade filer med 4 tillägg och 23 borttagningar
  1. 4
    23
      modules/connectivity/ConnectionQuality.js

+ 4
- 23
modules/connectivity/ConnectionQuality.js Visa fil

292
         const resolution = Resolutions[resolutionName];
292
         const resolution = Resolutions[resolutionName];
293
 
293
 
294
         let quality = 100;
294
         let quality = 100;
295
-        let isSimulcastOn;
296
-        let millisSinceStart;
297
         let packetLoss;
295
         let packetLoss;
298
-        let target;
299
 
296
 
300
         // TODO: take into account packet loss for received streams
297
         // TODO: take into account packet loss for received streams
301
 
298
 
347
             // Calculate a value based on the sending bitrate.
344
             // Calculate a value based on the sending bitrate.
348
 
345
 
349
             // time since sending of video was enabled.
346
             // time since sending of video was enabled.
350
-            millisSinceStart = window.performance.now()
347
+            const millisSinceStart = window.performance.now()
351
                     - Math.max(this._timeVideoUnmuted, this._timeIceConnected);
348
                     - Math.max(this._timeVideoUnmuted, this._timeIceConnected);
352
 
349
 
353
             // Figure out if simulcast is in use
350
             // Figure out if simulcast is in use
354
             const activeTPC = this._conference.getActivePeerConnection();
351
             const activeTPC = this._conference.getActivePeerConnection();
355
-
356
-            isSimulcastOn
352
+            const isSimulcastOn
357
                 = Boolean(activeTPC && activeTPC.isSimulcastOn());
353
                 = Boolean(activeTPC && activeTPC.isSimulcastOn());
358
 
354
 
359
             // expected sending bitrate in perfect conditions
355
             // expected sending bitrate in perfect conditions
360
-            target
356
+            let target
361
                 = getTarget(isSimulcastOn, resolution, millisSinceStart);
357
                 = getTarget(isSimulcastOn, resolution, millisSinceStart);
362
 
358
 
363
             target = Math.min(0.9 * target, MAX_TARGET_BITRATE);
359
             target = Math.min(0.9 * target, MAX_TARGET_BITRATE);
385
                         + (diffSeconds * maxIncreasePerSecond));
381
                         + (diffSeconds * maxIncreasePerSecond));
386
         }
382
         }
387
 
383
 
388
-        const connectionQuality = Math.min(100, quality);
389
-
390
-        console.debug('calculated connection quality', JSON.stringify({
391
-            connectionQuality,
392
-            isMuted,
393
-            isSimulcastOn,
394
-            lastUpdate: this._lastConnectionQualityUpdate,
395
-            millisSinceStart,
396
-            packetLoss,
397
-            resolution,
398
-            target,
399
-            upload: this._localStats.bitrate
400
-                && this._localStats.bitrate.upload
401
-        }));
402
-
403
-        return connectionQuality;
384
+        return Math.min(100, quality);
404
     }
385
     }
405
 
386
 
406
     /**
387
     /**

Laddar…
Avbryt
Spara