@webex/internal-media-core 2.20.1 → 2.20.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/cjs/index.js
CHANGED
|
@@ -21141,20 +21141,27 @@ var InboundAudioThresholds = {
|
|
|
21141
21141
|
DecodeResultsInZeroAudioLevel: {
|
|
21142
21142
|
concealedRatio: 0.7,
|
|
21143
21143
|
lossRatio: 0.2,
|
|
21144
|
-
discardedRatio: 0.5
|
|
21144
|
+
discardedRatio: 0.5,
|
|
21145
|
+
maxAudioLevelFromRtpHeader: 0.05
|
|
21145
21146
|
},
|
|
21146
21147
|
AllPacketsDiscarded: {
|
|
21147
21148
|
discardedRatio: 0.9
|
|
21148
21149
|
}
|
|
21149
21150
|
};
|
|
21150
21151
|
class StatsMonitor extends EventEmitter$5 {
|
|
21152
|
+
constructor() {
|
|
21153
|
+
super(...arguments);
|
|
21154
|
+
_defineProperty(this, "audioDecodeIssueData", {
|
|
21155
|
+
previousFaultyStreamsSsrcs: []
|
|
21156
|
+
});
|
|
21157
|
+
}
|
|
21151
21158
|
hasAudioDecodeIssue(current, packetsReceived, discardedRatio) {
|
|
21152
21159
|
if (getPropertyFromStatsByType(current, 'inbound-rtp', 'maxAudioLevelFromRtpHeader') === undefined) {
|
|
21153
21160
|
return false;
|
|
21154
21161
|
}
|
|
21155
21162
|
var faultyAudioStreams = [];
|
|
21156
21163
|
for (var stats of current.values()) {
|
|
21157
|
-
if (stats.type === 'inbound-rtp' && typeof stats.maxAudioLevelFromRtpHeader === 'number' && typeof stats.totalAudioEnergy === 'number' && stats.maxAudioLevelFromRtpHeader >
|
|
21164
|
+
if (stats.type === 'inbound-rtp' && typeof stats.maxAudioLevelFromRtpHeader === 'number' && typeof stats.totalAudioEnergy === 'number' && stats.maxAudioLevelFromRtpHeader > InboundAudioThresholds.DecodeResultsInZeroAudioLevel.maxAudioLevelFromRtpHeader && stats.totalAudioEnergy === 0) {
|
|
21158
21165
|
faultyAudioStreams.push({
|
|
21159
21166
|
maxAudioLevelFromRtpHeader: stats.maxAudioLevelFromRtpHeader,
|
|
21160
21167
|
totalAudioEnergy: stats.totalAudioEnergy,
|
|
@@ -21169,12 +21176,14 @@ class StatsMonitor extends EventEmitter$5 {
|
|
|
21169
21176
|
var concealedRatio = totalSamplesReceived > 0 ? concealedSamples / totalSamplesReceived : 0;
|
|
21170
21177
|
var packetsLost = getSumFromStatsByType(current, 'inbound-rtp', 'packetsLost');
|
|
21171
21178
|
var lossRatio = packetsReceived + packetsLost > 0 ? packetsLost / (packetsReceived + packetsLost) : 0;
|
|
21172
|
-
var issueFound = totalSamplesReceived > 0 && concealedRatio < thresholds.concealedRatio && lossRatio < thresholds.lossRatio && discardedRatio < thresholds.discardedRatio;
|
|
21179
|
+
var issueFound = totalSamplesReceived > 0 && concealedRatio < thresholds.concealedRatio && lossRatio < thresholds.lossRatio && discardedRatio < thresholds.discardedRatio && faultyAudioStreams.some(stream => this.audioDecodeIssueData.previousFaultyStreamsSsrcs.includes(stream.ssrc));
|
|
21173
21180
|
if (issueFound) {
|
|
21174
21181
|
getLogger().info("StatsMonitor#checkInboundAudio --> Incoming audio from all streams is not being decoded correctly, faultyAudioStreams: ".concat(JSON.stringify(faultyAudioStreams), ", totalSamplesReceived: ").concat(totalSamplesReceived, ", packetsReceived: ").concat(packetsReceived, ", concealedRatio: ").concat(concealedRatio, ", lossRatio: ").concat(lossRatio, ", discardedRatio: ").concat(discardedRatio, "."));
|
|
21175
21182
|
}
|
|
21183
|
+
this.audioDecodeIssueData.previousFaultyStreamsSsrcs = faultyAudioStreams.map(stream => stream.ssrc);
|
|
21176
21184
|
return issueFound;
|
|
21177
21185
|
}
|
|
21186
|
+
this.audioDecodeIssueData.previousFaultyStreamsSsrcs = [];
|
|
21178
21187
|
return false;
|
|
21179
21188
|
}
|
|
21180
21189
|
checkInboundAudio(previous, current) {
|
package/dist/esm/index.js
CHANGED
|
@@ -21137,20 +21137,27 @@ var InboundAudioThresholds = {
|
|
|
21137
21137
|
DecodeResultsInZeroAudioLevel: {
|
|
21138
21138
|
concealedRatio: 0.7,
|
|
21139
21139
|
lossRatio: 0.2,
|
|
21140
|
-
discardedRatio: 0.5
|
|
21140
|
+
discardedRatio: 0.5,
|
|
21141
|
+
maxAudioLevelFromRtpHeader: 0.05
|
|
21141
21142
|
},
|
|
21142
21143
|
AllPacketsDiscarded: {
|
|
21143
21144
|
discardedRatio: 0.9
|
|
21144
21145
|
}
|
|
21145
21146
|
};
|
|
21146
21147
|
class StatsMonitor extends EventEmitter$5 {
|
|
21148
|
+
constructor() {
|
|
21149
|
+
super(...arguments);
|
|
21150
|
+
_defineProperty(this, "audioDecodeIssueData", {
|
|
21151
|
+
previousFaultyStreamsSsrcs: []
|
|
21152
|
+
});
|
|
21153
|
+
}
|
|
21147
21154
|
hasAudioDecodeIssue(current, packetsReceived, discardedRatio) {
|
|
21148
21155
|
if (getPropertyFromStatsByType(current, 'inbound-rtp', 'maxAudioLevelFromRtpHeader') === undefined) {
|
|
21149
21156
|
return false;
|
|
21150
21157
|
}
|
|
21151
21158
|
var faultyAudioStreams = [];
|
|
21152
21159
|
for (var stats of current.values()) {
|
|
21153
|
-
if (stats.type === 'inbound-rtp' && typeof stats.maxAudioLevelFromRtpHeader === 'number' && typeof stats.totalAudioEnergy === 'number' && stats.maxAudioLevelFromRtpHeader >
|
|
21160
|
+
if (stats.type === 'inbound-rtp' && typeof stats.maxAudioLevelFromRtpHeader === 'number' && typeof stats.totalAudioEnergy === 'number' && stats.maxAudioLevelFromRtpHeader > InboundAudioThresholds.DecodeResultsInZeroAudioLevel.maxAudioLevelFromRtpHeader && stats.totalAudioEnergy === 0) {
|
|
21154
21161
|
faultyAudioStreams.push({
|
|
21155
21162
|
maxAudioLevelFromRtpHeader: stats.maxAudioLevelFromRtpHeader,
|
|
21156
21163
|
totalAudioEnergy: stats.totalAudioEnergy,
|
|
@@ -21165,12 +21172,14 @@ class StatsMonitor extends EventEmitter$5 {
|
|
|
21165
21172
|
var concealedRatio = totalSamplesReceived > 0 ? concealedSamples / totalSamplesReceived : 0;
|
|
21166
21173
|
var packetsLost = getSumFromStatsByType(current, 'inbound-rtp', 'packetsLost');
|
|
21167
21174
|
var lossRatio = packetsReceived + packetsLost > 0 ? packetsLost / (packetsReceived + packetsLost) : 0;
|
|
21168
|
-
var issueFound = totalSamplesReceived > 0 && concealedRatio < thresholds.concealedRatio && lossRatio < thresholds.lossRatio && discardedRatio < thresholds.discardedRatio;
|
|
21175
|
+
var issueFound = totalSamplesReceived > 0 && concealedRatio < thresholds.concealedRatio && lossRatio < thresholds.lossRatio && discardedRatio < thresholds.discardedRatio && faultyAudioStreams.some(stream => this.audioDecodeIssueData.previousFaultyStreamsSsrcs.includes(stream.ssrc));
|
|
21169
21176
|
if (issueFound) {
|
|
21170
21177
|
getLogger().info("StatsMonitor#checkInboundAudio --> Incoming audio from all streams is not being decoded correctly, faultyAudioStreams: ".concat(JSON.stringify(faultyAudioStreams), ", totalSamplesReceived: ").concat(totalSamplesReceived, ", packetsReceived: ").concat(packetsReceived, ", concealedRatio: ").concat(concealedRatio, ", lossRatio: ").concat(lossRatio, ", discardedRatio: ").concat(discardedRatio, "."));
|
|
21171
21178
|
}
|
|
21179
|
+
this.audioDecodeIssueData.previousFaultyStreamsSsrcs = faultyAudioStreams.map(stream => stream.ssrc);
|
|
21172
21180
|
return issueFound;
|
|
21173
21181
|
}
|
|
21182
|
+
this.audioDecodeIssueData.previousFaultyStreamsSsrcs = [];
|
|
21174
21183
|
return false;
|
|
21175
21184
|
}
|
|
21176
21185
|
checkInboundAudio(previous, current) {
|
|
@@ -2,6 +2,7 @@ import { StatsMap } from './types';
|
|
|
2
2
|
import { StatsMonitorEvents } from './eventTypes';
|
|
3
3
|
import { EventEmitter } from '../EventEmitter';
|
|
4
4
|
export declare class StatsMonitor extends EventEmitter<StatsMonitorEvents> {
|
|
5
|
+
private audioDecodeIssueData;
|
|
5
6
|
private hasAudioDecodeIssue;
|
|
6
7
|
checkInboundAudio(previous: StatsMap, current: StatsMap): void;
|
|
7
8
|
checkOutboundAudio(previous: StatsMap, current: StatsMap): void;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"StatsMonitor.d.ts","sourceRoot":"","sources":["../../../src/StatsAnalyzer/StatsMonitor.ts"],"names":[],"mappings":"AAOA,OAAO,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AACnC,OAAO,EAGL,kBAAkB,EACnB,MAAM,cAAc,CAAC;AACtB,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;
|
|
1
|
+
{"version":3,"file":"StatsMonitor.d.ts","sourceRoot":"","sources":["../../../src/StatsAnalyzer/StatsMonitor.ts"],"names":[],"mappings":"AAOA,OAAO,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AACnC,OAAO,EAGL,kBAAkB,EACnB,MAAM,cAAc,CAAC;AACtB,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAgB/C,qBAAa,YAAa,SAAQ,YAAY,CAAC,kBAAkB,CAAC;IAChE,OAAO,CAAC,oBAAoB,CAE1B;IAEF,OAAO,CAAC,mBAAmB;IAqF3B,iBAAiB,CAAC,QAAQ,EAAE,QAAQ,EAAE,OAAO,EAAE,QAAQ;IAmCvD,kBAAkB,CAAC,QAAQ,EAAE,QAAQ,EAAE,OAAO,EAAE,QAAQ;IAwDxD,iBAAiB,CAAC,QAAQ,EAAE,QAAQ,EAAE,OAAO,EAAE,QAAQ;IAoEvD,kBAAkB,CAAC,QAAQ,EAAE,QAAQ,EAAE,OAAO,EAAE,QAAQ;IAqCxD,iBAAiB,CAAC,QAAQ,EAAE,QAAQ,EAAE,OAAO,EAAE,QAAQ;IAoEvD,kBAAkB,CAAC,QAAQ,EAAE,QAAQ,EAAE,OAAO,EAAE,QAAQ;CA+BzD"}
|