|
|
@@ -749,9 +749,12 @@ StatsCollector.prototype.processAudioLevelReport = function () {
|
|
749
|
749
|
for (var idx in this.currentAudioLevelsReport) {
|
|
750
|
750
|
var now = this.currentAudioLevelsReport[idx];
|
|
751
|
751
|
|
|
752
|
|
- //if we don't have "packetsReceived" this is local stream
|
|
753
|
|
- if (now.type != 'ssrc' || !getStatValue(now, 'packetsReceived')) {
|
|
|
752
|
+ if (now.type != 'ssrc')
|
|
754
|
753
|
continue;
|
|
|
754
|
+
|
|
|
755
|
+ var isLocal = false;
|
|
|
756
|
+ if (!getStatValue(now, 'packetsReceived')) {
|
|
|
757
|
+ isLocal = true;
|
|
755
|
758
|
}
|
|
756
|
759
|
|
|
757
|
760
|
var before = this.baselineAudioLevelsReport[idx];
|
|
|
@@ -789,7 +792,7 @@ StatsCollector.prototype.processAudioLevelReport = function () {
|
|
789
|
792
|
audioLevel = audioLevel / 32767;
|
|
790
|
793
|
ssrcStats.setSsrcAudioLevel(audioLevel);
|
|
791
|
794
|
this.eventEmitter.emit(
|
|
792
|
|
- StatisticsEvents.AUDIO_LEVEL, ssrc, audioLevel);
|
|
|
795
|
+ StatisticsEvents.AUDIO_LEVEL, ssrc, audioLevel, isLocal);
|
|
793
|
796
|
}
|
|
794
|
797
|
}
|
|
795
|
798
|
};
|