Skip to content

Jitsi Meet - Secure, Simple and Scalable Video Conferences that you use as a standalone app or embed in your web application.

Removes unused code.

damencho09d08b034c2a
diff --git a/modules/statistics/RTPStatsCollector.js b/modules/statistics/RTPStatsCollector.js
index 9bbcad6f39..8630e04e9b 100644
--- a/modules/statistics/RTPStatsCollector.js
+++ b/modules/statistics/RTPStatsCollector.js
@@ -146,7 +146,6 @@ function StatsCollector(peerconnection, audioLevelsInterval, statsInterval, even
{
this.peerconnection = peerconnection;
this.baselineAudioLevelsReport = null;
- this.currentAudioLevelsReport = null;
this.currentStatsReport = null;
this.baselineStatsReport = null;
this.audioLevelsIntervalId = null;
@@ -252,10 +251,7 @@ StatsCollector.prototype.start = function ()
results = report.result();
}
//console.error("Got interval report", results);
- self.currentAudioLevelsReport = results;
- self.processAudioLevelReport();
- self.baselineAudioLevelsReport =
- self.currentAudioLevelsReport;
+ self.baselineAudioLevelsReport = results;
},
self.errorCallback
);
@@ -666,65 +662,3 @@ StatsCollector.prototype.processStatsReport = function () {
PeerStats.transport = [];
};
-
-/**
- * Stats processing logic.
- */
-StatsCollector.prototype.processAudioLevelReport = function () {
- if (!this.baselineAudioLevelsReport) {
- return;
- }
-
- for (var idx in this.currentAudioLevelsReport) {
- var now = this.currentAudioLevelsReport[idx];
-
- if (now.type != 'ssrc') {
- continue;
- }
-
- var before = this.baselineAudioLevelsReport[idx];
- if (!before) {
- console.warn(getStatValue(now, 'ssrc') + ' not enough data');
- continue;
- }
-
- var ssrc = getStatValue(now, 'ssrc');
- var jid = APP.conference._room.room.getJidBySSRC(ssrc);
- if (!jid) {
- if((Date.now() - now.timestamp) < 3000)
- console.warn("No jid for ssrc: " + ssrc);
- continue;
- }
-
- var jidStats = this.jid2stats[jid];
- if (!jidStats) {
- jidStats = new PeerStats();
- this.jid2stats[jid] = jidStats;
- }
-
- // Audio level
- var audioLevel = null;
-
- try {
- audioLevel = getStatValue(now, 'audioInputLevel');
- if (!audioLevel)
- audioLevel = getStatValue(now, 'audioOutputLevel');
- }
- catch(e) {/*not supported*/
- console.warn("Audio Levels are not available in the statistics.");
- clearInterval(this.audioLevelsIntervalId);
- return;
- }
-
- if (audioLevel) {
- // TODO: can't find specs about what this value really is,
- // but it seems to vary between 0 and around 32k.
- audioLevel = audioLevel / 32767;
- jidStats.setSsrcAudioLevel(ssrc, audioLevel);
- if (jid != APP.conference._room.room.myroomjid) {
- this.eventEmitter.emit(
- StatisticsEvents.AUDIO_LEVEL, jid, audioLevel);
- }
- }
- }
-};
diff --git a/modules/statistics/statistics.js b/modules/statistics/statistics.js
index adbf840f71..b84fd0d305 100644
--- a/modules/statistics/statistics.js
+++ b/modules/statistics/statistics.js
@@ -113,25 +113,5 @@ export default {
CallStats.sendAddIceCandidateFailed(e, pc);
}
);
- },
- /**
- * FIXME:
- * Currently used by torture. If we are removing this, torture needs to
- * be fixed also.
- *
- * Obtains audio level reported in the stats for specified peer.
- * @param peerJid full MUC jid of the user for whom we want to obtain last
- * audio level.
- * @param ssrc the SSRC of audio stream for which we want to obtain audio
- * level.
- * @returns {*} a float form 0 to 1 that represents current audio level or
- * <tt>null</tt> if for any reason the value is not available
- * at this time.
- */
- getPeerSSRCAudioLevel: function (peerJid, ssrc) {
-
- var peerStats = rtpStats.jid2stats[peerJid];
-
- return peerStats ? peerStats.ssrc2AudioLevel[ssrc] : null;
}
};