浏览代码

Fixes local stats calculations for Firefox.

We ignore stats that were remotely calculated and take into account only local one.
tags/v0.0.2
damencho 8 年前
父节点
当前提交
4db182d22e
共有 1 个文件被更改,包括 11 次插入0 次删除
  1. 11
    0
      modules/statistics/RTPStatsCollector.js

+ 11
- 0
modules/statistics/RTPStatsCollector.js 查看文件

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
 

正在加载...
取消
保存