Ver código fonte

Fixes local stats calculations for Firefox.

We ignore stats that were remotely calculated and take into account only local one.
dev1
damencho 8 anos atrás
pai
commit
4db182d22e
1 arquivos alterados com 11 adições e 0 exclusões
  1. 11
    0
      modules/statistics/RTPStatsCollector.js

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

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

Carregando…
Cancelar
Salvar