Permalink
Browse files

ref(stats): add peer connection arg to BYTE_SENT_STATS

Required to store local SSRCs in TraceablePeerConnection.
  • Loading branch information...
paweldomas committed Jan 30, 2017
1 parent 7e2b986 commit cdfdef73da639fdc3c7f5e4aa23211613c93a71a
Showing with 5 additions and 3 deletions.
  1. +1 −1 JitsiConferenceEventManager.js
  2. +2 −1 modules/statistics/RTPStatsCollector.js
  3. +2 −1 modules/statistics/statistics.js
@@ -560,7 +560,7 @@ JitsiConferenceEventManager.prototype.setupStatisticsListeners = function () {
JitsiConferenceEvents.CONNECTION_STATS, stats);
});
conference.statistics.addByteSentStatsListener(function (stats) {
conference.statistics.addByteSentStatsListener((tPeerConn, stats) => {
conference.getLocalTracks(MediaType.AUDIO).forEach(function (track) {
const ssrc = track.getSSRC();
if(!ssrc || !stats.hasOwnProperty(ssrc))
@@ -574,7 +574,8 @@ StatsCollector.prototype.processStatsReport = function () {
this
);
this.eventEmitter.emit(StatisticsEvents.BYTE_SENT_STATS, byteSentStats);
this.eventEmitter.emit(
StatisticsEvents.BYTE_SENT_STATS, this.peerconnection, byteSentStats);
this.conferenceStats.bitrate
= {"upload": bitrateUpload, "download": bitrateDownload};
@@ -162,7 +162,8 @@ Statistics.prototype.removeConnectionStatsListener = function (listener) {
};
Statistics.prototype.addByteSentStatsListener = function (listener) {
this.eventEmitter.on(StatisticsEvents.BYTE_SENT_STATS, listener);
this.eventEmitter.on(
StatisticsEvents.BYTE_SENT_STATS, listener);
};
Statistics.prototype.removeByteSentStatsListener = function (listener) {

0 comments on commit cdfdef7

Please sign in to comment.