Просмотр исходного кода

cleanup: Renames a confuingly named function, and fixes its documentation.

dev1
Boris Grozev 9 лет назад
Родитель
Сommit
d37a86e97d
1 измененных файлов: 5 добавлений и 5 удалений
  1. 5
    5
      modules/statistics/RTPStatsCollector.js

+ 5
- 5
modules/statistics/RTPStatsCollector.js Просмотреть файл

@@ -130,11 +130,11 @@ PeerStats.prototype.setResolution = function (resolution) {
130 130
 };
131 131
 
132 132
 /**
133
- * Sets the bit rate for given <tt>ssrc</tt> that belong to the peer
134
- * represented by this instance.
135
- * @param bitrate new bitrate value to be set.
133
+ * Adds the "download" and "upload" fields from the "bitrate" parameter to
134
+ * the respective fields of the "bitrate" field of this object.
135
+ * @param bitrate an object holding the values to add.
136 136
  */
137
-PeerStats.prototype.setSsrcBitrate = function (bitrate) {
137
+PeerStats.prototype.addBitrate = function (bitrate) {
138 138
     this.bitrate.download += bitrate.download;
139 139
     this.bitrate.upload += bitrate.upload;
140 140
 };
@@ -625,7 +625,7 @@ StatsCollector.prototype.processStatsReport = function () {
625 625
             bitrateSentKbps = Math.round((bytesSent * 8) / timeMs);
626 626
         }
627 627
 
628
-        ssrcStats.setSsrcBitrate({
628
+        ssrcStats.addBitrate({
629 629
             "download": bitrateReceivedKbps,
630 630
             "upload": bitrateSentKbps
631 631
         });

Загрузка…
Отмена
Сохранить