Browse Source

Fixes local stats calculations for Firefox.

We ignore stats that were remotely calculated and take into account only local one.
dev1
damencho 8 years ago
parent
commit
4db182d22e
1 changed files with 11 additions and 0 deletions
  1. 11
    0
      modules/statistics/RTPStatsCollector.js

+ 11
- 0
modules/statistics/RTPStatsCollector.js View File

516
             continue;
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
         const ssrcStats
530
         const ssrcStats
520
           = this.ssrc2stats[ssrc] || (this.ssrc2stats[ssrc] = new SsrcStats());
531
           = this.ssrc2stats[ssrc] || (this.ssrc2stats[ssrc] = new SsrcStats());
521
 
532
 

Loading…
Cancel
Save