Explorar el Código

Merge pull request #468 from jitsi/ff-local-stats-fix

Fixes local stats calculations for Firefox.
tags/v0.0.2
George Politis hace 8 años
padre
commit
298faa8151
Se han modificado 1 ficheros con 11 adiciones y 0 borrados
  1. 11
    0
      modules/statistics/RTPStatsCollector.js

+ 11
- 0
modules/statistics/RTPStatsCollector.js Ver fichero

@@ -516,6 +516,17 @@ StatsCollector.prototype.processStatsReport = function() {
516 516
             continue;
517 517
         }
518 518
 
519
+        // isRemote is available only in FF and is ignored in case of chrome
520
+        // according to the spec
521
+        // https://www.w3.org/TR/webrtc-stats/#dom-rtcrtpstreamstats-isremote
522
+        // when isRemote is true indicates that the measurements were done at
523
+        // the remote endpoint and reported in an RTCP RR/XR
524
+        // Fixes a problem where we are calculating local stats wrong adding
525
+        // the sent bytes to the local download bitrate
526
+        if (now.isRemote === true) {
527
+            continue;
528
+        }
529
+
519 530
         const ssrcStats
520 531
           = this.ssrc2stats[ssrc] || (this.ssrc2stats[ssrc] = new SsrcStats());
521 532
 

Loading…
Cancelar
Guardar