@webex/internal-media-core 2.16.0 → 2.16.1
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 +186 -83
- package/dist/esm/index.js +186 -83
- package/dist/types/StatsAnalyzer/MqeBuilder.d.ts.map +1 -1
- package/dist/types/StatsAnalyzer/constants.d.ts +0 -1
- package/dist/types/StatsAnalyzer/constants.d.ts.map +1 -1
- package/dist/types/StatsAnalyzer/utils.d.ts +2 -1
- package/dist/types/StatsAnalyzer/utils.d.ts.map +1 -1
- package/package.json +1 -1
package/dist/cjs/index.js
CHANGED
|
@@ -17785,7 +17785,6 @@ var CapabilityState;
|
|
|
17785
17785
|
var MQE_INTERVAL = 60000;
|
|
17786
17786
|
var DEFAULT_IP = '0.0.0.0';
|
|
17787
17787
|
var UNKNOWN = 'unknown';
|
|
17788
|
-
var VIDEO_FRAME_RATE_MULTIPLIER = 100;
|
|
17789
17788
|
var NOISE_REDUCTION_MODE;
|
|
17790
17789
|
(function (NOISE_REDUCTION_MODE) {
|
|
17791
17790
|
NOISE_REDUCTION_MODE["NONE"] = "AUDIO_BACKGROUND_NOISE_REDUCTION_NONE";
|
|
@@ -17918,6 +17917,9 @@ var mean = array => {
|
|
|
17918
17917
|
return array.reduce((a, b) => a + b) / array.length;
|
|
17919
17918
|
};
|
|
17920
17919
|
var bytesToBitrate = (bytes, timeElapsed) => {
|
|
17920
|
+
if (timeElapsed === 0) {
|
|
17921
|
+
return 0;
|
|
17922
|
+
}
|
|
17921
17923
|
return bytes * 8 / (timeElapsed / 1000);
|
|
17922
17924
|
};
|
|
17923
17925
|
var samplesToMilliseconds = (samples, clockRate) => {
|
|
@@ -17929,6 +17931,12 @@ var samplesToMilliseconds = (samples, clockRate) => {
|
|
|
17929
17931
|
}
|
|
17930
17932
|
return samples / clockRate * 1000;
|
|
17931
17933
|
};
|
|
17934
|
+
var framesToFrameRate = (frames, timeElapsed) => {
|
|
17935
|
+
if (timeElapsed === 0) {
|
|
17936
|
+
return 0;
|
|
17937
|
+
}
|
|
17938
|
+
return frames * 100 / (timeElapsed / 1000);
|
|
17939
|
+
};
|
|
17932
17940
|
var convertToStatsMap = statsItems => {
|
|
17933
17941
|
var statsMap = new Map();
|
|
17934
17942
|
statsItems.forEach(statsItem => {
|
|
@@ -18009,11 +18017,11 @@ var getTransportTypeFromStats = intervalStats => {
|
|
|
18009
18017
|
}
|
|
18010
18018
|
return undefined;
|
|
18011
18019
|
};
|
|
18012
|
-
var
|
|
18020
|
+
var getAvailableOutgoingBitrateArrayFromStats = intervalStats => {
|
|
18013
18021
|
var selectedCandidatePairId = getSelectedCandidatePairIdFromStats(intervalStats);
|
|
18014
18022
|
if (selectedCandidatePairId) {
|
|
18015
|
-
var
|
|
18016
|
-
return
|
|
18023
|
+
var availableOutgoingBitrateArray = getPropertyFromStatsById(intervalStats, selectedCandidatePairId, 'availableOutgoingBitrateArray');
|
|
18024
|
+
return availableOutgoingBitrateArray;
|
|
18017
18025
|
}
|
|
18018
18026
|
return undefined;
|
|
18019
18027
|
};
|
|
@@ -18089,11 +18097,21 @@ class MqeBuilder {
|
|
|
18089
18097
|
}
|
|
18090
18098
|
newStats.forEach((stats, key) => {
|
|
18091
18099
|
var current = this.currentIntervalStats.get(key);
|
|
18100
|
+
var storeValueInArray = (arrayProperty, valueToStore) => {
|
|
18101
|
+
var _current$arrayPropert;
|
|
18102
|
+
var array = (_current$arrayPropert = current === null || current === void 0 ? void 0 : current[arrayProperty]) !== null && _current$arrayPropert !== void 0 ? _current$arrayPropert : [];
|
|
18103
|
+
if (valueToStore !== undefined) {
|
|
18104
|
+
array.push(valueToStore);
|
|
18105
|
+
}
|
|
18106
|
+
if (array.length > 0) {
|
|
18107
|
+
stats[arrayProperty] = array;
|
|
18108
|
+
}
|
|
18109
|
+
};
|
|
18092
18110
|
if (stats.type === 'inbound-rtp') {
|
|
18093
|
-
var _current$
|
|
18094
|
-
|
|
18095
|
-
|
|
18096
|
-
stats.
|
|
18111
|
+
var _current$rtpPacketSiz, _stats$bytesReceived, _stats$packetsReceive;
|
|
18112
|
+
storeValueInArray('jitterArray', stats.jitter);
|
|
18113
|
+
storeValueInArray('requestedBitrateArray', stats.requestedBitrate);
|
|
18114
|
+
storeValueInArray('csiArray', stats.csi);
|
|
18097
18115
|
var rtpPacketSizeArray = (_current$rtpPacketSiz = current === null || current === void 0 ? void 0 : current.rtpPacketSizeArray) !== null && _current$rtpPacketSiz !== void 0 ? _current$rtpPacketSiz : [];
|
|
18098
18116
|
var bytesReceived = (_stats$bytesReceived = stats.bytesReceived) !== null && _stats$bytesReceived !== void 0 ? _stats$bytesReceived : 0;
|
|
18099
18117
|
var packetsReceived = (_stats$packetsReceive = stats.packetsReceived) !== null && _stats$packetsReceive !== void 0 ? _stats$packetsReceive : 0;
|
|
@@ -18102,8 +18120,39 @@ class MqeBuilder {
|
|
|
18102
18120
|
rtpPacketSizeArray.push(rtpPacketSize);
|
|
18103
18121
|
}
|
|
18104
18122
|
stats.rtpPacketSizeArray = rtpPacketSizeArray;
|
|
18123
|
+
if (this.mediaKind === 'video') {
|
|
18124
|
+
var _stats$requestedFrame, _current$maxRequested, _stats$requestedBitra, _current$maxRequested2, _current$bytesReceive, _current$maxBitrateFo, _stats$requestedFrame2, _current$maxRequested3, _stats$framesReceived, _current$framesReceiv, _current$maxReceivedF, _stats$framesDecoded, _current$framesDecode, _current$maxDecodedFr, _stats$frameHeight, _stats$frameWidth, _current$maxFrameSize, _current$maxFrameSize2;
|
|
18125
|
+
var requestedFrameSize = (_stats$requestedFrame = stats.requestedFrameSize) !== null && _stats$requestedFrame !== void 0 ? _stats$requestedFrame : 0;
|
|
18126
|
+
var maxRequestedFrameSize = (_current$maxRequested = current === null || current === void 0 ? void 0 : current.maxRequestedFrameSize) !== null && _current$maxRequested !== void 0 ? _current$maxRequested : 0;
|
|
18127
|
+
var isRequestedFrameSizeGreaterOrEqual = requestedFrameSize >= maxRequestedFrameSize;
|
|
18128
|
+
stats.maxRequestedFrameSize = isRequestedFrameSizeGreaterOrEqual ? requestedFrameSize : maxRequestedFrameSize;
|
|
18129
|
+
stats.maxRequestedBitrateForMaxRequestedFrameSize = isRequestedFrameSizeGreaterOrEqual ? Math.max((_stats$requestedBitra = stats.requestedBitrate) !== null && _stats$requestedBitra !== void 0 ? _stats$requestedBitra : 0, (_current$maxRequested2 = current === null || current === void 0 ? void 0 : current.maxRequestedBitrateForMaxRequestedFrameSize) !== null && _current$maxRequested2 !== void 0 ? _current$maxRequested2 : 0) : current === null || current === void 0 ? void 0 : current.maxRequestedBitrateForMaxRequestedFrameSize;
|
|
18130
|
+
var lastBytesReceived = (_current$bytesReceive = current === null || current === void 0 ? void 0 : current.bytesReceived) !== null && _current$bytesReceive !== void 0 ? _current$bytesReceive : 0;
|
|
18131
|
+
stats.maxBitrateForMaxRequestedFrameSize = isRequestedFrameSizeGreaterOrEqual ? Math.max(bytesToBitrate(bytesReceived - lastBytesReceived, 5000), (_current$maxBitrateFo = current === null || current === void 0 ? void 0 : current.maxBitrateForMaxRequestedFrameSize) !== null && _current$maxBitrateFo !== void 0 ? _current$maxBitrateFo : 0) : current === null || current === void 0 ? void 0 : current.maxBitrateForMaxRequestedFrameSize;
|
|
18132
|
+
stats.maxRequestedFrameRateForMaxRequestedFrameSize = isRequestedFrameSizeGreaterOrEqual ? Math.max((_stats$requestedFrame2 = stats.requestedFrameRate) !== null && _stats$requestedFrame2 !== void 0 ? _stats$requestedFrame2 : 0, (_current$maxRequested3 = current === null || current === void 0 ? void 0 : current.maxRequestedFrameRateForMaxRequestedFrameSize) !== null && _current$maxRequested3 !== void 0 ? _current$maxRequested3 : 0) : current === null || current === void 0 ? void 0 : current.maxRequestedFrameRateForMaxRequestedFrameSize;
|
|
18133
|
+
var framesReceived = (_stats$framesReceived = stats.framesReceived) !== null && _stats$framesReceived !== void 0 ? _stats$framesReceived : 0;
|
|
18134
|
+
var lastFramesReceived = (_current$framesReceiv = current === null || current === void 0 ? void 0 : current.framesReceived) !== null && _current$framesReceiv !== void 0 ? _current$framesReceiv : 0;
|
|
18135
|
+
stats.maxReceivedFrameRateForMaxRequestedFrameSize = isRequestedFrameSizeGreaterOrEqual ? Math.max(framesToFrameRate(framesReceived - lastFramesReceived, 5000), (_current$maxReceivedF = current === null || current === void 0 ? void 0 : current.maxReceivedFrameRateForMaxRequestedFrameSize) !== null && _current$maxReceivedF !== void 0 ? _current$maxReceivedF : 0) : current === null || current === void 0 ? void 0 : current.maxReceivedFrameRateForMaxRequestedFrameSize;
|
|
18136
|
+
var framesDecoded = (_stats$framesDecoded = stats.framesDecoded) !== null && _stats$framesDecoded !== void 0 ? _stats$framesDecoded : 0;
|
|
18137
|
+
var lastFramesDecoded = (_current$framesDecode = current === null || current === void 0 ? void 0 : current.framesDecoded) !== null && _current$framesDecode !== void 0 ? _current$framesDecode : 0;
|
|
18138
|
+
stats.maxDecodedFrameRateForMaxRequestedFrameSize = isRequestedFrameSizeGreaterOrEqual ? Math.max(framesToFrameRate(framesDecoded - lastFramesDecoded, 5000), (_current$maxDecodedFr = current === null || current === void 0 ? void 0 : current.maxDecodedFrameRateForMaxRequestedFrameSize) !== null && _current$maxDecodedFr !== void 0 ? _current$maxDecodedFr : 0) : current === null || current === void 0 ? void 0 : current.maxDecodedFrameRateForMaxRequestedFrameSize;
|
|
18139
|
+
var frameHeight = (_stats$frameHeight = stats.frameHeight) !== null && _stats$frameHeight !== void 0 ? _stats$frameHeight : 0;
|
|
18140
|
+
var frameWidth = (_stats$frameWidth = stats.frameWidth) !== null && _stats$frameWidth !== void 0 ? _stats$frameWidth : 0;
|
|
18141
|
+
var frameSize = pixelsToFrameSize(frameWidth, frameHeight);
|
|
18142
|
+
var maxFrameHeight = (_current$maxFrameSize = current === null || current === void 0 ? void 0 : current.maxFrameSizeHeightForMaxRequestedFrameSize) !== null && _current$maxFrameSize !== void 0 ? _current$maxFrameSize : 0;
|
|
18143
|
+
var maxFrameWidth = (_current$maxFrameSize2 = current === null || current === void 0 ? void 0 : current.maxFrameSizeWidthForMaxRequestedFrameSize) !== null && _current$maxFrameSize2 !== void 0 ? _current$maxFrameSize2 : 0;
|
|
18144
|
+
var maxFrameSize = pixelsToFrameSize(maxFrameWidth, maxFrameHeight);
|
|
18145
|
+
if (isRequestedFrameSizeGreaterOrEqual && frameSize >= maxFrameSize) {
|
|
18146
|
+
stats.maxFrameSizeHeightForMaxRequestedFrameSize = frameHeight;
|
|
18147
|
+
stats.maxFrameSizeWidthForMaxRequestedFrameSize = frameWidth;
|
|
18148
|
+
} else {
|
|
18149
|
+
stats.maxFrameSizeHeightForMaxRequestedFrameSize = current === null || current === void 0 ? void 0 : current.maxFrameSizeHeightForMaxRequestedFrameSize;
|
|
18150
|
+
stats.maxFrameSizeWidthForMaxRequestedFrameSize = current === null || current === void 0 ? void 0 : current.maxFrameSizeWidthForMaxRequestedFrameSize;
|
|
18151
|
+
}
|
|
18152
|
+
}
|
|
18105
18153
|
} else if (stats.type === 'outbound-rtp') {
|
|
18106
18154
|
var _current$rtpPacketSiz2, _stats$bytesSent, _stats$packetsSent;
|
|
18155
|
+
storeValueInArray('requestedBitrateArray', stats.requestedBitrate);
|
|
18107
18156
|
var lastUsedEffect = current === null || current === void 0 ? void 0 : current.lastUsedEffect;
|
|
18108
18157
|
var effect = stats === null || stats === void 0 ? void 0 : stats.effect;
|
|
18109
18158
|
stats.lastUsedEffect = effect !== null && effect !== void 0 ? effect : lastUsedEffect;
|
|
@@ -18115,17 +18164,39 @@ class MqeBuilder {
|
|
|
18115
18164
|
_rtpPacketSizeArray.push(_rtpPacketSize);
|
|
18116
18165
|
}
|
|
18117
18166
|
stats.rtpPacketSizeArray = _rtpPacketSizeArray;
|
|
18167
|
+
if (this.mediaKind === 'video') {
|
|
18168
|
+
var _stats$requestedFrame3, _current$maxRequested4, _stats$requestedBitra2, _current$maxRequested5, _current$bytesSent, _current$maxBitrateFo2, _stats$requestedFrame4, _current$maxRequested6, _stats$framesSent, _current$framesSent, _current$maxTransmitt, _stats$frameHeight2, _stats$frameWidth2, _current$maxFrameSize3, _current$maxFrameSize4;
|
|
18169
|
+
var _requestedFrameSize = (_stats$requestedFrame3 = stats.requestedFrameSize) !== null && _stats$requestedFrame3 !== void 0 ? _stats$requestedFrame3 : 0;
|
|
18170
|
+
var _maxRequestedFrameSize = (_current$maxRequested4 = current === null || current === void 0 ? void 0 : current.maxRequestedFrameSize) !== null && _current$maxRequested4 !== void 0 ? _current$maxRequested4 : 0;
|
|
18171
|
+
var _isRequestedFrameSizeGreaterOrEqual = _requestedFrameSize >= _maxRequestedFrameSize;
|
|
18172
|
+
stats.maxRequestedFrameSize = _isRequestedFrameSizeGreaterOrEqual ? _requestedFrameSize : _maxRequestedFrameSize;
|
|
18173
|
+
stats.maxRequestedBitrateForMaxRequestedFrameSize = _isRequestedFrameSizeGreaterOrEqual ? Math.max((_stats$requestedBitra2 = stats.requestedBitrate) !== null && _stats$requestedBitra2 !== void 0 ? _stats$requestedBitra2 : 0, (_current$maxRequested5 = current === null || current === void 0 ? void 0 : current.maxRequestedBitrateForMaxRequestedFrameSize) !== null && _current$maxRequested5 !== void 0 ? _current$maxRequested5 : 0) : current === null || current === void 0 ? void 0 : current.maxRequestedBitrateForMaxRequestedFrameSize;
|
|
18174
|
+
var lastBytesSent = (_current$bytesSent = current === null || current === void 0 ? void 0 : current.bytesSent) !== null && _current$bytesSent !== void 0 ? _current$bytesSent : 0;
|
|
18175
|
+
stats.maxBitrateForMaxRequestedFrameSize = _isRequestedFrameSizeGreaterOrEqual ? Math.max(bytesToBitrate(bytesSent - lastBytesSent, 5000), (_current$maxBitrateFo2 = current === null || current === void 0 ? void 0 : current.maxBitrateForMaxRequestedFrameSize) !== null && _current$maxBitrateFo2 !== void 0 ? _current$maxBitrateFo2 : 0) : current === null || current === void 0 ? void 0 : current.maxBitrateForMaxRequestedFrameSize;
|
|
18176
|
+
stats.maxRequestedFrameRateForMaxRequestedFrameSize = _isRequestedFrameSizeGreaterOrEqual ? Math.max((_stats$requestedFrame4 = stats.requestedFrameRate) !== null && _stats$requestedFrame4 !== void 0 ? _stats$requestedFrame4 : 0, (_current$maxRequested6 = current === null || current === void 0 ? void 0 : current.maxRequestedFrameRateForMaxRequestedFrameSize) !== null && _current$maxRequested6 !== void 0 ? _current$maxRequested6 : 0) : current === null || current === void 0 ? void 0 : current.maxRequestedFrameRateForMaxRequestedFrameSize;
|
|
18177
|
+
var framesSent = (_stats$framesSent = stats.framesSent) !== null && _stats$framesSent !== void 0 ? _stats$framesSent : 0;
|
|
18178
|
+
var lastFramesSent = (_current$framesSent = current === null || current === void 0 ? void 0 : current.framesSent) !== null && _current$framesSent !== void 0 ? _current$framesSent : 0;
|
|
18179
|
+
stats.maxTransmittedFrameRateForMaxRequestedFrameSize = _isRequestedFrameSizeGreaterOrEqual ? Math.max(framesToFrameRate(framesSent - lastFramesSent, 5000), (_current$maxTransmitt = current === null || current === void 0 ? void 0 : current.maxTransmittedFrameRateForMaxRequestedFrameSize) !== null && _current$maxTransmitt !== void 0 ? _current$maxTransmitt : 0) : current === null || current === void 0 ? void 0 : current.maxTransmittedFrameRateForMaxRequestedFrameSize;
|
|
18180
|
+
var _frameHeight = (_stats$frameHeight2 = stats.frameHeight) !== null && _stats$frameHeight2 !== void 0 ? _stats$frameHeight2 : 0;
|
|
18181
|
+
var _frameWidth = (_stats$frameWidth2 = stats.frameWidth) !== null && _stats$frameWidth2 !== void 0 ? _stats$frameWidth2 : 0;
|
|
18182
|
+
var _frameSize = pixelsToFrameSize(_frameWidth, _frameHeight);
|
|
18183
|
+
var _maxFrameHeight = (_current$maxFrameSize3 = current === null || current === void 0 ? void 0 : current.maxFrameSizeHeightForMaxRequestedFrameSize) !== null && _current$maxFrameSize3 !== void 0 ? _current$maxFrameSize3 : 0;
|
|
18184
|
+
var _maxFrameWidth = (_current$maxFrameSize4 = current === null || current === void 0 ? void 0 : current.maxFrameSizeWidthForMaxRequestedFrameSize) !== null && _current$maxFrameSize4 !== void 0 ? _current$maxFrameSize4 : 0;
|
|
18185
|
+
var _maxFrameSize = pixelsToFrameSize(_maxFrameWidth, _maxFrameHeight);
|
|
18186
|
+
if (_isRequestedFrameSizeGreaterOrEqual && _frameSize >= _maxFrameSize) {
|
|
18187
|
+
stats.maxFrameSizeHeightForMaxRequestedFrameSize = _frameHeight;
|
|
18188
|
+
stats.maxFrameSizeWidthForMaxRequestedFrameSize = _frameWidth;
|
|
18189
|
+
} else {
|
|
18190
|
+
stats.maxFrameSizeHeightForMaxRequestedFrameSize = current === null || current === void 0 ? void 0 : current.maxFrameSizeHeightForMaxRequestedFrameSize;
|
|
18191
|
+
stats.maxFrameSizeWidthForMaxRequestedFrameSize = current === null || current === void 0 ? void 0 : current.maxFrameSizeWidthForMaxRequestedFrameSize;
|
|
18192
|
+
}
|
|
18193
|
+
}
|
|
18118
18194
|
} else if (stats.type === 'remote-inbound-rtp') {
|
|
18119
|
-
|
|
18120
|
-
|
|
18121
|
-
|
|
18122
|
-
|
|
18123
|
-
|
|
18124
|
-
fractionLostArray.push((_stats$fractionLost = stats.fractionLost) !== null && _stats$fractionLost !== void 0 ? _stats$fractionLost : 0);
|
|
18125
|
-
stats.fractionLostArray = fractionLostArray;
|
|
18126
|
-
var _jitterArray = (_current$jitterArray2 = current === null || current === void 0 ? void 0 : current.jitterArray) !== null && _current$jitterArray2 !== void 0 ? _current$jitterArray2 : [];
|
|
18127
|
-
_jitterArray.push((_stats$jitter2 = stats.jitter) !== null && _stats$jitter2 !== void 0 ? _stats$jitter2 : 0);
|
|
18128
|
-
stats.jitterArray = _jitterArray;
|
|
18195
|
+
storeValueInArray('roundTripTimeArray', stats.roundTripTime);
|
|
18196
|
+
storeValueInArray('fractionLostArray', stats.fractionLost);
|
|
18197
|
+
storeValueInArray('jitterArray', stats.jitter);
|
|
18198
|
+
} else if (stats.type === 'candidate-pair') {
|
|
18199
|
+
storeValueInArray('availableOutgoingBitrateArray', stats.availableOutgoingBitrate);
|
|
18129
18200
|
}
|
|
18130
18201
|
});
|
|
18131
18202
|
this.currentIntervalStats = newStats;
|
|
@@ -18139,16 +18210,36 @@ class MqeBuilder {
|
|
|
18139
18210
|
this.currentIntervalStats.forEach(stats => {
|
|
18140
18211
|
if (stats.type === 'inbound-rtp') {
|
|
18141
18212
|
delete stats.jitterArray;
|
|
18213
|
+
delete stats.requestedBitrateArray;
|
|
18214
|
+
delete stats.csiArray;
|
|
18215
|
+
delete stats.maxRequestedFrameSize;
|
|
18216
|
+
delete stats.maxRequestedBitrateForMaxRequestedFrameSize;
|
|
18217
|
+
delete stats.maxBitrateForMaxRequestedFrameSize;
|
|
18218
|
+
delete stats.maxRequestedFrameRateForMaxRequestedFrameSize;
|
|
18219
|
+
delete stats.maxReceivedFrameRateForMaxRequestedFrameSize;
|
|
18220
|
+
delete stats.maxDecodedFrameRateForMaxRequestedFrameSize;
|
|
18221
|
+
delete stats.maxFrameSizeHeightForMaxRequestedFrameSize;
|
|
18222
|
+
delete stats.maxFrameSizeWidthForMaxRequestedFrameSize;
|
|
18142
18223
|
delete stats.isRequested;
|
|
18143
18224
|
delete stats.rtpPacketSizeArray;
|
|
18144
18225
|
} else if (stats.type === 'outbound-rtp') {
|
|
18226
|
+
delete stats.requestedBitrateArray;
|
|
18145
18227
|
delete stats.lastUsedEffect;
|
|
18228
|
+
delete stats.maxRequestedFrameSize;
|
|
18229
|
+
delete stats.maxRequestedBitrateForMaxRequestedFrameSize;
|
|
18230
|
+
delete stats.maxBitrateForMaxRequestedFrameSize;
|
|
18231
|
+
delete stats.maxRequestedFrameRateForMaxRequestedFrameSize;
|
|
18232
|
+
delete stats.maxTransmittedFrameRateForMaxRequestedFrameSize;
|
|
18233
|
+
delete stats.maxFrameSizeHeightForMaxRequestedFrameSize;
|
|
18234
|
+
delete stats.maxFrameSizeWidthForMaxRequestedFrameSize;
|
|
18146
18235
|
delete stats.isRequested;
|
|
18147
18236
|
delete stats.rtpPacketSizeArray;
|
|
18148
18237
|
} else if (stats.type === 'remote-inbound-rtp') {
|
|
18149
18238
|
delete stats.roundTripTimeArray;
|
|
18150
18239
|
delete stats.fractionLostArray;
|
|
18151
18240
|
delete stats.jitterArray;
|
|
18241
|
+
} else if (stats.type === 'candidate-pair') {
|
|
18242
|
+
delete stats.availableOutgoingBitrateArray;
|
|
18152
18243
|
}
|
|
18153
18244
|
});
|
|
18154
18245
|
}
|
|
@@ -18212,14 +18303,14 @@ class MqeBuilder {
|
|
|
18212
18303
|
result.common = this.buildMqeIntervalStreamReceiveCommon(id);
|
|
18213
18304
|
var current = this.currentIntervalStats;
|
|
18214
18305
|
var previous = this.previousIntervalStats;
|
|
18215
|
-
var
|
|
18216
|
-
var
|
|
18217
|
-
result.receivedFrameSize = pixelsToFrameSize(
|
|
18218
|
-
var
|
|
18219
|
-
result.requestedFrameSize =
|
|
18220
|
-
result.optimalFrameSize =
|
|
18221
|
-
result.receivedHeight =
|
|
18222
|
-
result.receivedWidth =
|
|
18306
|
+
var currentMaxFrameSizeHeightForMaxRequestedFrameSize = (_getPropertyFromStats = getPropertyFromStatsById(current, id, 'maxFrameSizeHeightForMaxRequestedFrameSize')) !== null && _getPropertyFromStats !== void 0 ? _getPropertyFromStats : 0;
|
|
18307
|
+
var currentMaxFrameSizeWidthForMaxRequestedFrameSize = (_getPropertyFromStats2 = getPropertyFromStatsById(current, id, 'maxFrameSizeWidthForMaxRequestedFrameSize')) !== null && _getPropertyFromStats2 !== void 0 ? _getPropertyFromStats2 : 0;
|
|
18308
|
+
result.receivedFrameSize = pixelsToFrameSize(currentMaxFrameSizeWidthForMaxRequestedFrameSize, currentMaxFrameSizeHeightForMaxRequestedFrameSize);
|
|
18309
|
+
var currentMaxRequestedFrameSize = (_getPropertyFromStats3 = getPropertyFromStatsById(current, id, 'maxRequestedFrameSize')) !== null && _getPropertyFromStats3 !== void 0 ? _getPropertyFromStats3 : 0;
|
|
18310
|
+
result.requestedFrameSize = currentMaxRequestedFrameSize;
|
|
18311
|
+
result.optimalFrameSize = currentMaxRequestedFrameSize;
|
|
18312
|
+
result.receivedHeight = currentMaxFrameSizeHeightForMaxRequestedFrameSize;
|
|
18313
|
+
result.receivedWidth = currentMaxFrameSizeWidthForMaxRequestedFrameSize;
|
|
18223
18314
|
var currentKeyFramesDecoded = (_getPropertyFromStats4 = getPropertyFromStatsById(current, id, 'keyFramesDecoded')) !== null && _getPropertyFromStats4 !== void 0 ? _getPropertyFromStats4 : 0;
|
|
18224
18315
|
var previousKeyFramesDecoded = (_getPropertyFromStats5 = getPropertyFromStatsById(previous, id, 'keyFramesDecoded')) !== null && _getPropertyFromStats5 !== void 0 ? _getPropertyFromStats5 : 0;
|
|
18225
18316
|
result.receivedKeyFrames = currentKeyFramesDecoded - previousKeyFramesDecoded;
|
|
@@ -18239,7 +18330,7 @@ class MqeBuilder {
|
|
|
18239
18330
|
return result;
|
|
18240
18331
|
}
|
|
18241
18332
|
buildMqeIntervalStreamReceiveCommon(id) {
|
|
18242
|
-
var _getPropertyFromStats12, _getPropertyFromStats13, _getPropertyFromStats14, _getPropertyFromStats15, _getPropertyFromStats16, _getPropertyFromStats17,
|
|
18333
|
+
var _getPropertyFromStats12, _getPropertyFromStats13, _getPropertyFromStats14, _getPropertyFromStats15, _getPropertyFromStats16, _getPropertyFromStats17, _getPropertyFromStats28, _getPropertyFromStats29, _getPropertyFromStats30, _getPropertyFromStats31, _getPropertyFromStats32, _getCodecFromStatsByS;
|
|
18243
18334
|
var result = structuredClone(initialMqeIntervalStreamReceiveCommon);
|
|
18244
18335
|
var current = this.currentIntervalStats;
|
|
18245
18336
|
var previous = this.previousIntervalStats;
|
|
@@ -18261,34 +18352,40 @@ class MqeBuilder {
|
|
|
18261
18352
|
result.concealedFrames = samplesToMilliseconds(currentConcealedSamples - previousConcealedSamples - (currentSilentConcealedSamples - previousSilentConcealedSamples), currentClockRate);
|
|
18262
18353
|
}
|
|
18263
18354
|
if (this.mediaKind === 'video') {
|
|
18264
|
-
var _getPropertyFromStats23, _getPropertyFromStats24, _getPropertyFromStats25, _getPropertyFromStats26, _getPropertyFromStats27
|
|
18355
|
+
var _getPropertyFromStats23, _getPropertyFromStats24, _getPropertyFromStats25, _getPropertyFromStats26, _getPropertyFromStats27;
|
|
18265
18356
|
var currentTotalFreezesDuration = (_getPropertyFromStats23 = getPropertyFromStatsById(current, id, 'totalFreezesDuration')) !== null && _getPropertyFromStats23 !== void 0 ? _getPropertyFromStats23 : 0;
|
|
18266
18357
|
var previousTotalFreezesDuration = (_getPropertyFromStats24 = getPropertyFromStatsById(previous, id, 'totalFreezesDuration')) !== null && _getPropertyFromStats24 !== void 0 ? _getPropertyFromStats24 : 0;
|
|
18267
18358
|
result.concealedFrames = (currentTotalFreezesDuration - previousTotalFreezesDuration) * 1000;
|
|
18268
|
-
var
|
|
18269
|
-
|
|
18270
|
-
|
|
18271
|
-
|
|
18272
|
-
var
|
|
18273
|
-
result.
|
|
18274
|
-
|
|
18275
|
-
|
|
18276
|
-
|
|
18277
|
-
}
|
|
18278
|
-
var currentJitterArray = (_getPropertyFromStats30 = getPropertyFromStatsById(current, id, 'jitterArray')) !== null && _getPropertyFromStats30 !== void 0 ? _getPropertyFromStats30 : [];
|
|
18359
|
+
var currentMaxReceivedFrameRateForMaxRequestedFrameSize = (_getPropertyFromStats25 = getPropertyFromStatsById(current, id, 'maxReceivedFrameRateForMaxRequestedFrameSize')) !== null && _getPropertyFromStats25 !== void 0 ? _getPropertyFromStats25 : 0;
|
|
18360
|
+
result.receivedFrameRate = currentMaxReceivedFrameRateForMaxRequestedFrameSize;
|
|
18361
|
+
var currentMaxDecodedFrameRateForMaxRequestedFrameSize = (_getPropertyFromStats26 = getPropertyFromStatsById(current, id, 'maxDecodedFrameRateForMaxRequestedFrameSize')) !== null && _getPropertyFromStats26 !== void 0 ? _getPropertyFromStats26 : 0;
|
|
18362
|
+
result.renderedFrameRate = currentMaxDecodedFrameRateForMaxRequestedFrameSize;
|
|
18363
|
+
var currentMaxRequestedFrameRateForMaxRequestedFrameSize = (_getPropertyFromStats27 = getPropertyFromStatsById(current, id, 'maxRequestedFrameRateForMaxRequestedFrameSize')) !== null && _getPropertyFromStats27 !== void 0 ? _getPropertyFromStats27 : 0;
|
|
18364
|
+
result.requestedFrameRate = currentMaxRequestedFrameRateForMaxRequestedFrameSize;
|
|
18365
|
+
result.optimalFrameRate = currentMaxRequestedFrameRateForMaxRequestedFrameSize;
|
|
18366
|
+
}
|
|
18367
|
+
var currentJitterArray = (_getPropertyFromStats28 = getPropertyFromStatsById(current, id, 'jitterArray')) !== null && _getPropertyFromStats28 !== void 0 ? _getPropertyFromStats28 : [];
|
|
18279
18368
|
result.meanRtpJitter = mean(currentJitterArray) * 1000;
|
|
18280
18369
|
result.maxRtpJitter = max(currentJitterArray) * 1000;
|
|
18281
|
-
var currentBytesReceived = (
|
|
18282
|
-
var previousBytesReceived = (
|
|
18283
|
-
var currentRetransmittedBytesReceived = (
|
|
18284
|
-
var previousRetransmittedBytesReceived = (
|
|
18370
|
+
var currentBytesReceived = (_getPropertyFromStats29 = getPropertyFromStatsById(current, id, 'bytesReceived')) !== null && _getPropertyFromStats29 !== void 0 ? _getPropertyFromStats29 : 0;
|
|
18371
|
+
var previousBytesReceived = (_getPropertyFromStats30 = getPropertyFromStatsById(previous, id, 'bytesReceived')) !== null && _getPropertyFromStats30 !== void 0 ? _getPropertyFromStats30 : 0;
|
|
18372
|
+
var currentRetransmittedBytesReceived = (_getPropertyFromStats31 = getPropertyFromStatsById(current, id, 'retransmittedBytesReceived')) !== null && _getPropertyFromStats31 !== void 0 ? _getPropertyFromStats31 : 0;
|
|
18373
|
+
var previousRetransmittedBytesReceived = (_getPropertyFromStats32 = getPropertyFromStatsById(previous, id, 'retransmittedBytesReceived')) !== null && _getPropertyFromStats32 !== void 0 ? _getPropertyFromStats32 : 0;
|
|
18285
18374
|
result.receivedBitrate = bytesToBitrate(currentBytesReceived - previousBytesReceived - (currentRetransmittedBytesReceived - previousRetransmittedBytesReceived), MQE_INTERVAL);
|
|
18286
|
-
|
|
18287
|
-
|
|
18288
|
-
|
|
18289
|
-
|
|
18290
|
-
|
|
18291
|
-
|
|
18375
|
+
if (this.mediaKind === 'audio') {
|
|
18376
|
+
var _getPropertyFromStats33;
|
|
18377
|
+
var currentRequestedBitrateArray = (_getPropertyFromStats33 = getPropertyFromStatsById(current, id, 'requestedBitrateArray')) !== null && _getPropertyFromStats33 !== void 0 ? _getPropertyFromStats33 : [];
|
|
18378
|
+
result.requestedBitrate = max(currentRequestedBitrateArray);
|
|
18379
|
+
result.optimalBitrate = max(currentRequestedBitrateArray);
|
|
18380
|
+
} else {
|
|
18381
|
+
var _getPropertyFromStats34;
|
|
18382
|
+
var currentMaxRequestedBitrateForMaxRequestedFrameSize = (_getPropertyFromStats34 = getPropertyFromStatsById(current, id, 'maxRequestedBitrateForMaxRequestedFrameSize')) !== null && _getPropertyFromStats34 !== void 0 ? _getPropertyFromStats34 : 0;
|
|
18383
|
+
result.requestedBitrate = currentMaxRequestedBitrateForMaxRequestedFrameSize;
|
|
18384
|
+
result.optimalBitrate = currentMaxRequestedBitrateForMaxRequestedFrameSize;
|
|
18385
|
+
}
|
|
18386
|
+
var currentCsiArray = getPropertyFromStatsById(current, id, 'csiArray');
|
|
18387
|
+
if (currentCsiArray && currentCsiArray.length > 0) {
|
|
18388
|
+
result.csi = currentCsiArray.filter((csi, index) => currentCsiArray.indexOf(csi) === index);
|
|
18292
18389
|
}
|
|
18293
18390
|
var currentCodec = (_getCodecFromStatsByS = getCodecFromStatsByStreamStatsId(current, id)) !== null && _getCodecFromStatsByS !== void 0 ? _getCodecFromStatsByS : this.mediaKind === 'audio' ? 'opus' : 'H264';
|
|
18294
18391
|
result.codec = currentCodec;
|
|
@@ -18314,8 +18411,8 @@ class MqeBuilder {
|
|
|
18314
18411
|
result.rtpBitrate = bytesToBitrate(currentBytesSent - previousBytesSent, MQE_INTERVAL) - result.rtxBitrate;
|
|
18315
18412
|
var currentTransportType = (_getTransportTypeFrom2 = getTransportTypeFromStats(current)) !== null && _getTransportTypeFrom2 !== void 0 ? _getTransportTypeFrom2 : 'UDP';
|
|
18316
18413
|
result.transportType = currentTransportType;
|
|
18317
|
-
var currentAvailableOutgoingBitrate = (_getAvailableOutgoing =
|
|
18318
|
-
result.availableBitrate = currentAvailableOutgoingBitrate;
|
|
18414
|
+
var currentAvailableOutgoingBitrate = (_getAvailableOutgoing = getAvailableOutgoingBitrateArrayFromStats(current)) !== null && _getAvailableOutgoing !== void 0 ? _getAvailableOutgoing : [];
|
|
18415
|
+
result.availableBitrate = min(currentAvailableOutgoingBitrate);
|
|
18319
18416
|
result.queueDelay = 0;
|
|
18320
18417
|
var currentRoundTripTimeArray = getPropertyFromStatsByTypeInArray(current, 'remote-inbound-rtp', 'roundTripTimeArray').flat();
|
|
18321
18418
|
result.meanRoundTripTime = mean(currentRoundTripTimeArray) * 1000;
|
|
@@ -18347,25 +18444,25 @@ class MqeBuilder {
|
|
|
18347
18444
|
return result;
|
|
18348
18445
|
}
|
|
18349
18446
|
buildMqeIntervalStreamTransmitVideo(id) {
|
|
18350
|
-
var _getPropertyFromStats36, _getPropertyFromStats37, _getPropertyFromStats38, _getPropertyFromStats39, _getPropertyFromStats40, _getPropertyFromStats41, _getPropertyFromStats42, _getPropertyFromStats43,
|
|
18447
|
+
var _getPropertyFromStats35, _getPropertyFromStats36, _getPropertyFromStats37, _getPropertyFromStats38, _getPropertyFromStats39, _getPropertyFromStats40, _getPropertyFromStats41, _getPropertyFromStats42, _getPropertyFromStats43, _getH264ProfileFromSt2;
|
|
18351
18448
|
var result = structuredClone(initialMqeIntervalStreamTransmitVideo);
|
|
18352
18449
|
result.common = this.buildMqeIntervalStreamTransmitCommon(id);
|
|
18353
18450
|
var current = this.currentIntervalStats;
|
|
18354
18451
|
var previous = this.previousIntervalStats;
|
|
18355
|
-
var
|
|
18356
|
-
var
|
|
18357
|
-
result.transmittedFrameSize = pixelsToFrameSize(
|
|
18358
|
-
var
|
|
18359
|
-
result.requestedFrameSize =
|
|
18360
|
-
result.transmittedHeight =
|
|
18361
|
-
result.transmittedWidth =
|
|
18362
|
-
var currentKeyFramesEncoded = (
|
|
18363
|
-
var previousKeyFramesEncoded = (
|
|
18452
|
+
var currentMaxFrameSizeHeightForMaxRequestedFrameSize = (_getPropertyFromStats35 = getPropertyFromStatsById(current, id, 'maxFrameSizeHeightForMaxRequestedFrameSize')) !== null && _getPropertyFromStats35 !== void 0 ? _getPropertyFromStats35 : 0;
|
|
18453
|
+
var currentMaxFrameSizeWidthForMaxRequestedFrameSize = (_getPropertyFromStats36 = getPropertyFromStatsById(current, id, 'maxFrameSizeWidthForMaxRequestedFrameSize')) !== null && _getPropertyFromStats36 !== void 0 ? _getPropertyFromStats36 : 0;
|
|
18454
|
+
result.transmittedFrameSize = pixelsToFrameSize(currentMaxFrameSizeWidthForMaxRequestedFrameSize, currentMaxFrameSizeHeightForMaxRequestedFrameSize);
|
|
18455
|
+
var currentMaxRequestedFrameSize = (_getPropertyFromStats37 = getPropertyFromStatsById(current, id, 'maxRequestedFrameSize')) !== null && _getPropertyFromStats37 !== void 0 ? _getPropertyFromStats37 : 0;
|
|
18456
|
+
result.requestedFrameSize = currentMaxRequestedFrameSize;
|
|
18457
|
+
result.transmittedHeight = currentMaxFrameSizeHeightForMaxRequestedFrameSize;
|
|
18458
|
+
result.transmittedWidth = currentMaxFrameSizeWidthForMaxRequestedFrameSize;
|
|
18459
|
+
var currentKeyFramesEncoded = (_getPropertyFromStats38 = getPropertyFromStatsById(current, id, 'keyFramesEncoded')) !== null && _getPropertyFromStats38 !== void 0 ? _getPropertyFromStats38 : 0;
|
|
18460
|
+
var previousKeyFramesEncoded = (_getPropertyFromStats39 = getPropertyFromStatsById(previous, id, 'keyFramesEncoded')) !== null && _getPropertyFromStats39 !== void 0 ? _getPropertyFromStats39 : 0;
|
|
18364
18461
|
result.transmittedKeyFrames = currentKeyFramesEncoded - previousKeyFramesEncoded;
|
|
18365
|
-
var currentFirCount = (
|
|
18366
|
-
var previousFirCount = (
|
|
18367
|
-
var currentPliCount = (
|
|
18368
|
-
var previousPliCount = (
|
|
18462
|
+
var currentFirCount = (_getPropertyFromStats40 = getPropertyFromStatsById(current, id, 'firCount')) !== null && _getPropertyFromStats40 !== void 0 ? _getPropertyFromStats40 : 0;
|
|
18463
|
+
var previousFirCount = (_getPropertyFromStats41 = getPropertyFromStatsById(previous, id, 'firCount')) !== null && _getPropertyFromStats41 !== void 0 ? _getPropertyFromStats41 : 0;
|
|
18464
|
+
var currentPliCount = (_getPropertyFromStats42 = getPropertyFromStatsById(current, id, 'pliCount')) !== null && _getPropertyFromStats42 !== void 0 ? _getPropertyFromStats42 : 0;
|
|
18465
|
+
var previousPliCount = (_getPropertyFromStats43 = getPropertyFromStatsById(previous, id, 'pliCount')) !== null && _getPropertyFromStats43 !== void 0 ? _getPropertyFromStats43 : 0;
|
|
18369
18466
|
result.requestedKeyFrames = currentFirCount - previousFirCount + (currentPliCount - previousPliCount);
|
|
18370
18467
|
result.localConfigurationChanges = 0;
|
|
18371
18468
|
var currentH264CodecProfile = (_getH264ProfileFromSt2 = getH264ProfileFromStatsByStreamStatsId(current, id)) !== null && _getH264ProfileFromSt2 !== void 0 ? _getH264ProfileFromSt2 : 'BP';
|
|
@@ -18387,30 +18484,36 @@ class MqeBuilder {
|
|
|
18387
18484
|
return result;
|
|
18388
18485
|
}
|
|
18389
18486
|
buildMqeIntervalStreamTransmitCommon(id) {
|
|
18390
|
-
var _getPropertyFromStats45, _getPropertyFromStats46, _getPropertyFromStats47,
|
|
18487
|
+
var _getPropertyFromStats44, _getPropertyFromStats45, _getPropertyFromStats46, _getPropertyFromStats47, _getPropertyFromStats50, _getPropertyFromStats51, _getPropertyFromStats52, _getPropertyFromStats53, _getCodecFromStatsByS2;
|
|
18391
18488
|
var result = structuredClone(initialMqeIntervalStreamTransmitCommon);
|
|
18392
18489
|
var current = this.currentIntervalStats;
|
|
18393
18490
|
var previous = this.previousIntervalStats;
|
|
18394
|
-
var currentPacketsSent = (
|
|
18395
|
-
var previousPacketsSent = (
|
|
18396
|
-
var currentRetransmittedPacketsSent = (
|
|
18397
|
-
var previousRetransmittedPacketsSent = (
|
|
18491
|
+
var currentPacketsSent = (_getPropertyFromStats44 = getPropertyFromStatsById(current, id, 'packetsSent')) !== null && _getPropertyFromStats44 !== void 0 ? _getPropertyFromStats44 : 0;
|
|
18492
|
+
var previousPacketsSent = (_getPropertyFromStats45 = getPropertyFromStatsById(previous, id, 'packetsSent')) !== null && _getPropertyFromStats45 !== void 0 ? _getPropertyFromStats45 : 0;
|
|
18493
|
+
var currentRetransmittedPacketsSent = (_getPropertyFromStats46 = getPropertyFromStatsById(current, id, 'retransmittedPacketsSent')) !== null && _getPropertyFromStats46 !== void 0 ? _getPropertyFromStats46 : 0;
|
|
18494
|
+
var previousRetransmittedPacketsSent = (_getPropertyFromStats47 = getPropertyFromStatsById(previous, id, 'retransmittedPacketsSent')) !== null && _getPropertyFromStats47 !== void 0 ? _getPropertyFromStats47 : 0;
|
|
18398
18495
|
result.rtpPackets = currentPacketsSent - previousPacketsSent - (currentRetransmittedPacketsSent - previousRetransmittedPacketsSent);
|
|
18399
18496
|
if (this.mediaKind === 'video') {
|
|
18400
|
-
var
|
|
18401
|
-
var
|
|
18402
|
-
|
|
18403
|
-
|
|
18404
|
-
|
|
18405
|
-
|
|
18406
|
-
|
|
18407
|
-
var
|
|
18408
|
-
var
|
|
18409
|
-
var
|
|
18410
|
-
var previousRetransmittedBytesSent = (_getPropertyFromStats55 = getPropertyFromStatsById(previous, id, 'retransmittedBytesSent')) !== null && _getPropertyFromStats55 !== void 0 ? _getPropertyFromStats55 : 0;
|
|
18497
|
+
var _getPropertyFromStats48, _getPropertyFromStats49;
|
|
18498
|
+
var currentMaxTransmittedFrameRateForMaxRequestedFrameSize = (_getPropertyFromStats48 = getPropertyFromStatsById(current, id, 'maxTransmittedFrameRateForMaxRequestedFrameSize')) !== null && _getPropertyFromStats48 !== void 0 ? _getPropertyFromStats48 : 0;
|
|
18499
|
+
result.transmittedFrameRate = currentMaxTransmittedFrameRateForMaxRequestedFrameSize;
|
|
18500
|
+
var currentMaxRequestedFrameRateForMaxRequestedFrameSize = (_getPropertyFromStats49 = getPropertyFromStatsById(current, id, 'maxRequestedFrameRateForMaxRequestedFrameSize')) !== null && _getPropertyFromStats49 !== void 0 ? _getPropertyFromStats49 : 0;
|
|
18501
|
+
result.requestedFrames = currentMaxRequestedFrameRateForMaxRequestedFrameSize;
|
|
18502
|
+
}
|
|
18503
|
+
var currentBytesSent = (_getPropertyFromStats50 = getPropertyFromStatsById(current, id, 'bytesSent')) !== null && _getPropertyFromStats50 !== void 0 ? _getPropertyFromStats50 : 0;
|
|
18504
|
+
var previousBytesSent = (_getPropertyFromStats51 = getPropertyFromStatsById(previous, id, 'bytesSent')) !== null && _getPropertyFromStats51 !== void 0 ? _getPropertyFromStats51 : 0;
|
|
18505
|
+
var currentRetransmittedBytesSent = (_getPropertyFromStats52 = getPropertyFromStatsById(current, id, 'retransmittedBytesSent')) !== null && _getPropertyFromStats52 !== void 0 ? _getPropertyFromStats52 : 0;
|
|
18506
|
+
var previousRetransmittedBytesSent = (_getPropertyFromStats53 = getPropertyFromStatsById(previous, id, 'retransmittedBytesSent')) !== null && _getPropertyFromStats53 !== void 0 ? _getPropertyFromStats53 : 0;
|
|
18411
18507
|
result.transmittedBitrate = bytesToBitrate(currentBytesSent - previousBytesSent - (currentRetransmittedBytesSent - previousRetransmittedBytesSent), MQE_INTERVAL);
|
|
18412
|
-
|
|
18413
|
-
|
|
18508
|
+
if (this.mediaKind === 'audio') {
|
|
18509
|
+
var _getPropertyFromStats54;
|
|
18510
|
+
var currentRequestedBitrateArray = (_getPropertyFromStats54 = getPropertyFromStatsById(current, id, 'requestedBitrateArray')) !== null && _getPropertyFromStats54 !== void 0 ? _getPropertyFromStats54 : [];
|
|
18511
|
+
result.requestedBitrate = max(currentRequestedBitrateArray);
|
|
18512
|
+
} else {
|
|
18513
|
+
var _getPropertyFromStats55;
|
|
18514
|
+
var currentMaxRequestedBitrateForMaxRequestedFrameSize = (_getPropertyFromStats55 = getPropertyFromStatsById(current, id, 'maxRequestedBitrateForMaxRequestedFrameSize')) !== null && _getPropertyFromStats55 !== void 0 ? _getPropertyFromStats55 : 0;
|
|
18515
|
+
result.requestedBitrate = currentMaxRequestedBitrateForMaxRequestedFrameSize;
|
|
18516
|
+
}
|
|
18414
18517
|
var currentCodec = (_getCodecFromStatsByS2 = getCodecFromStatsByStreamStatsId(current, id)) !== null && _getCodecFromStatsByS2 !== void 0 ? _getCodecFromStatsByS2 : this.mediaKind === 'audio' ? 'opus' : 'H264';
|
|
18415
18518
|
result.codec = currentCodec;
|
|
18416
18519
|
var currentCsi = getPropertyFromStatsById(current, id, 'csi');
|
package/dist/esm/index.js
CHANGED
|
@@ -17781,7 +17781,6 @@ var CapabilityState;
|
|
|
17781
17781
|
var MQE_INTERVAL = 60000;
|
|
17782
17782
|
var DEFAULT_IP = '0.0.0.0';
|
|
17783
17783
|
var UNKNOWN = 'unknown';
|
|
17784
|
-
var VIDEO_FRAME_RATE_MULTIPLIER = 100;
|
|
17785
17784
|
var NOISE_REDUCTION_MODE;
|
|
17786
17785
|
(function (NOISE_REDUCTION_MODE) {
|
|
17787
17786
|
NOISE_REDUCTION_MODE["NONE"] = "AUDIO_BACKGROUND_NOISE_REDUCTION_NONE";
|
|
@@ -17914,6 +17913,9 @@ var mean = array => {
|
|
|
17914
17913
|
return array.reduce((a, b) => a + b) / array.length;
|
|
17915
17914
|
};
|
|
17916
17915
|
var bytesToBitrate = (bytes, timeElapsed) => {
|
|
17916
|
+
if (timeElapsed === 0) {
|
|
17917
|
+
return 0;
|
|
17918
|
+
}
|
|
17917
17919
|
return bytes * 8 / (timeElapsed / 1000);
|
|
17918
17920
|
};
|
|
17919
17921
|
var samplesToMilliseconds = (samples, clockRate) => {
|
|
@@ -17925,6 +17927,12 @@ var samplesToMilliseconds = (samples, clockRate) => {
|
|
|
17925
17927
|
}
|
|
17926
17928
|
return samples / clockRate * 1000;
|
|
17927
17929
|
};
|
|
17930
|
+
var framesToFrameRate = (frames, timeElapsed) => {
|
|
17931
|
+
if (timeElapsed === 0) {
|
|
17932
|
+
return 0;
|
|
17933
|
+
}
|
|
17934
|
+
return frames * 100 / (timeElapsed / 1000);
|
|
17935
|
+
};
|
|
17928
17936
|
var convertToStatsMap = statsItems => {
|
|
17929
17937
|
var statsMap = new Map();
|
|
17930
17938
|
statsItems.forEach(statsItem => {
|
|
@@ -18005,11 +18013,11 @@ var getTransportTypeFromStats = intervalStats => {
|
|
|
18005
18013
|
}
|
|
18006
18014
|
return undefined;
|
|
18007
18015
|
};
|
|
18008
|
-
var
|
|
18016
|
+
var getAvailableOutgoingBitrateArrayFromStats = intervalStats => {
|
|
18009
18017
|
var selectedCandidatePairId = getSelectedCandidatePairIdFromStats(intervalStats);
|
|
18010
18018
|
if (selectedCandidatePairId) {
|
|
18011
|
-
var
|
|
18012
|
-
return
|
|
18019
|
+
var availableOutgoingBitrateArray = getPropertyFromStatsById(intervalStats, selectedCandidatePairId, 'availableOutgoingBitrateArray');
|
|
18020
|
+
return availableOutgoingBitrateArray;
|
|
18013
18021
|
}
|
|
18014
18022
|
return undefined;
|
|
18015
18023
|
};
|
|
@@ -18085,11 +18093,21 @@ class MqeBuilder {
|
|
|
18085
18093
|
}
|
|
18086
18094
|
newStats.forEach((stats, key) => {
|
|
18087
18095
|
var current = this.currentIntervalStats.get(key);
|
|
18096
|
+
var storeValueInArray = (arrayProperty, valueToStore) => {
|
|
18097
|
+
var _current$arrayPropert;
|
|
18098
|
+
var array = (_current$arrayPropert = current === null || current === void 0 ? void 0 : current[arrayProperty]) !== null && _current$arrayPropert !== void 0 ? _current$arrayPropert : [];
|
|
18099
|
+
if (valueToStore !== undefined) {
|
|
18100
|
+
array.push(valueToStore);
|
|
18101
|
+
}
|
|
18102
|
+
if (array.length > 0) {
|
|
18103
|
+
stats[arrayProperty] = array;
|
|
18104
|
+
}
|
|
18105
|
+
};
|
|
18088
18106
|
if (stats.type === 'inbound-rtp') {
|
|
18089
|
-
var _current$
|
|
18090
|
-
|
|
18091
|
-
|
|
18092
|
-
stats.
|
|
18107
|
+
var _current$rtpPacketSiz, _stats$bytesReceived, _stats$packetsReceive;
|
|
18108
|
+
storeValueInArray('jitterArray', stats.jitter);
|
|
18109
|
+
storeValueInArray('requestedBitrateArray', stats.requestedBitrate);
|
|
18110
|
+
storeValueInArray('csiArray', stats.csi);
|
|
18093
18111
|
var rtpPacketSizeArray = (_current$rtpPacketSiz = current === null || current === void 0 ? void 0 : current.rtpPacketSizeArray) !== null && _current$rtpPacketSiz !== void 0 ? _current$rtpPacketSiz : [];
|
|
18094
18112
|
var bytesReceived = (_stats$bytesReceived = stats.bytesReceived) !== null && _stats$bytesReceived !== void 0 ? _stats$bytesReceived : 0;
|
|
18095
18113
|
var packetsReceived = (_stats$packetsReceive = stats.packetsReceived) !== null && _stats$packetsReceive !== void 0 ? _stats$packetsReceive : 0;
|
|
@@ -18098,8 +18116,39 @@ class MqeBuilder {
|
|
|
18098
18116
|
rtpPacketSizeArray.push(rtpPacketSize);
|
|
18099
18117
|
}
|
|
18100
18118
|
stats.rtpPacketSizeArray = rtpPacketSizeArray;
|
|
18119
|
+
if (this.mediaKind === 'video') {
|
|
18120
|
+
var _stats$requestedFrame, _current$maxRequested, _stats$requestedBitra, _current$maxRequested2, _current$bytesReceive, _current$maxBitrateFo, _stats$requestedFrame2, _current$maxRequested3, _stats$framesReceived, _current$framesReceiv, _current$maxReceivedF, _stats$framesDecoded, _current$framesDecode, _current$maxDecodedFr, _stats$frameHeight, _stats$frameWidth, _current$maxFrameSize, _current$maxFrameSize2;
|
|
18121
|
+
var requestedFrameSize = (_stats$requestedFrame = stats.requestedFrameSize) !== null && _stats$requestedFrame !== void 0 ? _stats$requestedFrame : 0;
|
|
18122
|
+
var maxRequestedFrameSize = (_current$maxRequested = current === null || current === void 0 ? void 0 : current.maxRequestedFrameSize) !== null && _current$maxRequested !== void 0 ? _current$maxRequested : 0;
|
|
18123
|
+
var isRequestedFrameSizeGreaterOrEqual = requestedFrameSize >= maxRequestedFrameSize;
|
|
18124
|
+
stats.maxRequestedFrameSize = isRequestedFrameSizeGreaterOrEqual ? requestedFrameSize : maxRequestedFrameSize;
|
|
18125
|
+
stats.maxRequestedBitrateForMaxRequestedFrameSize = isRequestedFrameSizeGreaterOrEqual ? Math.max((_stats$requestedBitra = stats.requestedBitrate) !== null && _stats$requestedBitra !== void 0 ? _stats$requestedBitra : 0, (_current$maxRequested2 = current === null || current === void 0 ? void 0 : current.maxRequestedBitrateForMaxRequestedFrameSize) !== null && _current$maxRequested2 !== void 0 ? _current$maxRequested2 : 0) : current === null || current === void 0 ? void 0 : current.maxRequestedBitrateForMaxRequestedFrameSize;
|
|
18126
|
+
var lastBytesReceived = (_current$bytesReceive = current === null || current === void 0 ? void 0 : current.bytesReceived) !== null && _current$bytesReceive !== void 0 ? _current$bytesReceive : 0;
|
|
18127
|
+
stats.maxBitrateForMaxRequestedFrameSize = isRequestedFrameSizeGreaterOrEqual ? Math.max(bytesToBitrate(bytesReceived - lastBytesReceived, 5000), (_current$maxBitrateFo = current === null || current === void 0 ? void 0 : current.maxBitrateForMaxRequestedFrameSize) !== null && _current$maxBitrateFo !== void 0 ? _current$maxBitrateFo : 0) : current === null || current === void 0 ? void 0 : current.maxBitrateForMaxRequestedFrameSize;
|
|
18128
|
+
stats.maxRequestedFrameRateForMaxRequestedFrameSize = isRequestedFrameSizeGreaterOrEqual ? Math.max((_stats$requestedFrame2 = stats.requestedFrameRate) !== null && _stats$requestedFrame2 !== void 0 ? _stats$requestedFrame2 : 0, (_current$maxRequested3 = current === null || current === void 0 ? void 0 : current.maxRequestedFrameRateForMaxRequestedFrameSize) !== null && _current$maxRequested3 !== void 0 ? _current$maxRequested3 : 0) : current === null || current === void 0 ? void 0 : current.maxRequestedFrameRateForMaxRequestedFrameSize;
|
|
18129
|
+
var framesReceived = (_stats$framesReceived = stats.framesReceived) !== null && _stats$framesReceived !== void 0 ? _stats$framesReceived : 0;
|
|
18130
|
+
var lastFramesReceived = (_current$framesReceiv = current === null || current === void 0 ? void 0 : current.framesReceived) !== null && _current$framesReceiv !== void 0 ? _current$framesReceiv : 0;
|
|
18131
|
+
stats.maxReceivedFrameRateForMaxRequestedFrameSize = isRequestedFrameSizeGreaterOrEqual ? Math.max(framesToFrameRate(framesReceived - lastFramesReceived, 5000), (_current$maxReceivedF = current === null || current === void 0 ? void 0 : current.maxReceivedFrameRateForMaxRequestedFrameSize) !== null && _current$maxReceivedF !== void 0 ? _current$maxReceivedF : 0) : current === null || current === void 0 ? void 0 : current.maxReceivedFrameRateForMaxRequestedFrameSize;
|
|
18132
|
+
var framesDecoded = (_stats$framesDecoded = stats.framesDecoded) !== null && _stats$framesDecoded !== void 0 ? _stats$framesDecoded : 0;
|
|
18133
|
+
var lastFramesDecoded = (_current$framesDecode = current === null || current === void 0 ? void 0 : current.framesDecoded) !== null && _current$framesDecode !== void 0 ? _current$framesDecode : 0;
|
|
18134
|
+
stats.maxDecodedFrameRateForMaxRequestedFrameSize = isRequestedFrameSizeGreaterOrEqual ? Math.max(framesToFrameRate(framesDecoded - lastFramesDecoded, 5000), (_current$maxDecodedFr = current === null || current === void 0 ? void 0 : current.maxDecodedFrameRateForMaxRequestedFrameSize) !== null && _current$maxDecodedFr !== void 0 ? _current$maxDecodedFr : 0) : current === null || current === void 0 ? void 0 : current.maxDecodedFrameRateForMaxRequestedFrameSize;
|
|
18135
|
+
var frameHeight = (_stats$frameHeight = stats.frameHeight) !== null && _stats$frameHeight !== void 0 ? _stats$frameHeight : 0;
|
|
18136
|
+
var frameWidth = (_stats$frameWidth = stats.frameWidth) !== null && _stats$frameWidth !== void 0 ? _stats$frameWidth : 0;
|
|
18137
|
+
var frameSize = pixelsToFrameSize(frameWidth, frameHeight);
|
|
18138
|
+
var maxFrameHeight = (_current$maxFrameSize = current === null || current === void 0 ? void 0 : current.maxFrameSizeHeightForMaxRequestedFrameSize) !== null && _current$maxFrameSize !== void 0 ? _current$maxFrameSize : 0;
|
|
18139
|
+
var maxFrameWidth = (_current$maxFrameSize2 = current === null || current === void 0 ? void 0 : current.maxFrameSizeWidthForMaxRequestedFrameSize) !== null && _current$maxFrameSize2 !== void 0 ? _current$maxFrameSize2 : 0;
|
|
18140
|
+
var maxFrameSize = pixelsToFrameSize(maxFrameWidth, maxFrameHeight);
|
|
18141
|
+
if (isRequestedFrameSizeGreaterOrEqual && frameSize >= maxFrameSize) {
|
|
18142
|
+
stats.maxFrameSizeHeightForMaxRequestedFrameSize = frameHeight;
|
|
18143
|
+
stats.maxFrameSizeWidthForMaxRequestedFrameSize = frameWidth;
|
|
18144
|
+
} else {
|
|
18145
|
+
stats.maxFrameSizeHeightForMaxRequestedFrameSize = current === null || current === void 0 ? void 0 : current.maxFrameSizeHeightForMaxRequestedFrameSize;
|
|
18146
|
+
stats.maxFrameSizeWidthForMaxRequestedFrameSize = current === null || current === void 0 ? void 0 : current.maxFrameSizeWidthForMaxRequestedFrameSize;
|
|
18147
|
+
}
|
|
18148
|
+
}
|
|
18101
18149
|
} else if (stats.type === 'outbound-rtp') {
|
|
18102
18150
|
var _current$rtpPacketSiz2, _stats$bytesSent, _stats$packetsSent;
|
|
18151
|
+
storeValueInArray('requestedBitrateArray', stats.requestedBitrate);
|
|
18103
18152
|
var lastUsedEffect = current === null || current === void 0 ? void 0 : current.lastUsedEffect;
|
|
18104
18153
|
var effect = stats === null || stats === void 0 ? void 0 : stats.effect;
|
|
18105
18154
|
stats.lastUsedEffect = effect !== null && effect !== void 0 ? effect : lastUsedEffect;
|
|
@@ -18111,17 +18160,39 @@ class MqeBuilder {
|
|
|
18111
18160
|
_rtpPacketSizeArray.push(_rtpPacketSize);
|
|
18112
18161
|
}
|
|
18113
18162
|
stats.rtpPacketSizeArray = _rtpPacketSizeArray;
|
|
18163
|
+
if (this.mediaKind === 'video') {
|
|
18164
|
+
var _stats$requestedFrame3, _current$maxRequested4, _stats$requestedBitra2, _current$maxRequested5, _current$bytesSent, _current$maxBitrateFo2, _stats$requestedFrame4, _current$maxRequested6, _stats$framesSent, _current$framesSent, _current$maxTransmitt, _stats$frameHeight2, _stats$frameWidth2, _current$maxFrameSize3, _current$maxFrameSize4;
|
|
18165
|
+
var _requestedFrameSize = (_stats$requestedFrame3 = stats.requestedFrameSize) !== null && _stats$requestedFrame3 !== void 0 ? _stats$requestedFrame3 : 0;
|
|
18166
|
+
var _maxRequestedFrameSize = (_current$maxRequested4 = current === null || current === void 0 ? void 0 : current.maxRequestedFrameSize) !== null && _current$maxRequested4 !== void 0 ? _current$maxRequested4 : 0;
|
|
18167
|
+
var _isRequestedFrameSizeGreaterOrEqual = _requestedFrameSize >= _maxRequestedFrameSize;
|
|
18168
|
+
stats.maxRequestedFrameSize = _isRequestedFrameSizeGreaterOrEqual ? _requestedFrameSize : _maxRequestedFrameSize;
|
|
18169
|
+
stats.maxRequestedBitrateForMaxRequestedFrameSize = _isRequestedFrameSizeGreaterOrEqual ? Math.max((_stats$requestedBitra2 = stats.requestedBitrate) !== null && _stats$requestedBitra2 !== void 0 ? _stats$requestedBitra2 : 0, (_current$maxRequested5 = current === null || current === void 0 ? void 0 : current.maxRequestedBitrateForMaxRequestedFrameSize) !== null && _current$maxRequested5 !== void 0 ? _current$maxRequested5 : 0) : current === null || current === void 0 ? void 0 : current.maxRequestedBitrateForMaxRequestedFrameSize;
|
|
18170
|
+
var lastBytesSent = (_current$bytesSent = current === null || current === void 0 ? void 0 : current.bytesSent) !== null && _current$bytesSent !== void 0 ? _current$bytesSent : 0;
|
|
18171
|
+
stats.maxBitrateForMaxRequestedFrameSize = _isRequestedFrameSizeGreaterOrEqual ? Math.max(bytesToBitrate(bytesSent - lastBytesSent, 5000), (_current$maxBitrateFo2 = current === null || current === void 0 ? void 0 : current.maxBitrateForMaxRequestedFrameSize) !== null && _current$maxBitrateFo2 !== void 0 ? _current$maxBitrateFo2 : 0) : current === null || current === void 0 ? void 0 : current.maxBitrateForMaxRequestedFrameSize;
|
|
18172
|
+
stats.maxRequestedFrameRateForMaxRequestedFrameSize = _isRequestedFrameSizeGreaterOrEqual ? Math.max((_stats$requestedFrame4 = stats.requestedFrameRate) !== null && _stats$requestedFrame4 !== void 0 ? _stats$requestedFrame4 : 0, (_current$maxRequested6 = current === null || current === void 0 ? void 0 : current.maxRequestedFrameRateForMaxRequestedFrameSize) !== null && _current$maxRequested6 !== void 0 ? _current$maxRequested6 : 0) : current === null || current === void 0 ? void 0 : current.maxRequestedFrameRateForMaxRequestedFrameSize;
|
|
18173
|
+
var framesSent = (_stats$framesSent = stats.framesSent) !== null && _stats$framesSent !== void 0 ? _stats$framesSent : 0;
|
|
18174
|
+
var lastFramesSent = (_current$framesSent = current === null || current === void 0 ? void 0 : current.framesSent) !== null && _current$framesSent !== void 0 ? _current$framesSent : 0;
|
|
18175
|
+
stats.maxTransmittedFrameRateForMaxRequestedFrameSize = _isRequestedFrameSizeGreaterOrEqual ? Math.max(framesToFrameRate(framesSent - lastFramesSent, 5000), (_current$maxTransmitt = current === null || current === void 0 ? void 0 : current.maxTransmittedFrameRateForMaxRequestedFrameSize) !== null && _current$maxTransmitt !== void 0 ? _current$maxTransmitt : 0) : current === null || current === void 0 ? void 0 : current.maxTransmittedFrameRateForMaxRequestedFrameSize;
|
|
18176
|
+
var _frameHeight = (_stats$frameHeight2 = stats.frameHeight) !== null && _stats$frameHeight2 !== void 0 ? _stats$frameHeight2 : 0;
|
|
18177
|
+
var _frameWidth = (_stats$frameWidth2 = stats.frameWidth) !== null && _stats$frameWidth2 !== void 0 ? _stats$frameWidth2 : 0;
|
|
18178
|
+
var _frameSize = pixelsToFrameSize(_frameWidth, _frameHeight);
|
|
18179
|
+
var _maxFrameHeight = (_current$maxFrameSize3 = current === null || current === void 0 ? void 0 : current.maxFrameSizeHeightForMaxRequestedFrameSize) !== null && _current$maxFrameSize3 !== void 0 ? _current$maxFrameSize3 : 0;
|
|
18180
|
+
var _maxFrameWidth = (_current$maxFrameSize4 = current === null || current === void 0 ? void 0 : current.maxFrameSizeWidthForMaxRequestedFrameSize) !== null && _current$maxFrameSize4 !== void 0 ? _current$maxFrameSize4 : 0;
|
|
18181
|
+
var _maxFrameSize = pixelsToFrameSize(_maxFrameWidth, _maxFrameHeight);
|
|
18182
|
+
if (_isRequestedFrameSizeGreaterOrEqual && _frameSize >= _maxFrameSize) {
|
|
18183
|
+
stats.maxFrameSizeHeightForMaxRequestedFrameSize = _frameHeight;
|
|
18184
|
+
stats.maxFrameSizeWidthForMaxRequestedFrameSize = _frameWidth;
|
|
18185
|
+
} else {
|
|
18186
|
+
stats.maxFrameSizeHeightForMaxRequestedFrameSize = current === null || current === void 0 ? void 0 : current.maxFrameSizeHeightForMaxRequestedFrameSize;
|
|
18187
|
+
stats.maxFrameSizeWidthForMaxRequestedFrameSize = current === null || current === void 0 ? void 0 : current.maxFrameSizeWidthForMaxRequestedFrameSize;
|
|
18188
|
+
}
|
|
18189
|
+
}
|
|
18114
18190
|
} else if (stats.type === 'remote-inbound-rtp') {
|
|
18115
|
-
|
|
18116
|
-
|
|
18117
|
-
|
|
18118
|
-
|
|
18119
|
-
|
|
18120
|
-
fractionLostArray.push((_stats$fractionLost = stats.fractionLost) !== null && _stats$fractionLost !== void 0 ? _stats$fractionLost : 0);
|
|
18121
|
-
stats.fractionLostArray = fractionLostArray;
|
|
18122
|
-
var _jitterArray = (_current$jitterArray2 = current === null || current === void 0 ? void 0 : current.jitterArray) !== null && _current$jitterArray2 !== void 0 ? _current$jitterArray2 : [];
|
|
18123
|
-
_jitterArray.push((_stats$jitter2 = stats.jitter) !== null && _stats$jitter2 !== void 0 ? _stats$jitter2 : 0);
|
|
18124
|
-
stats.jitterArray = _jitterArray;
|
|
18191
|
+
storeValueInArray('roundTripTimeArray', stats.roundTripTime);
|
|
18192
|
+
storeValueInArray('fractionLostArray', stats.fractionLost);
|
|
18193
|
+
storeValueInArray('jitterArray', stats.jitter);
|
|
18194
|
+
} else if (stats.type === 'candidate-pair') {
|
|
18195
|
+
storeValueInArray('availableOutgoingBitrateArray', stats.availableOutgoingBitrate);
|
|
18125
18196
|
}
|
|
18126
18197
|
});
|
|
18127
18198
|
this.currentIntervalStats = newStats;
|
|
@@ -18135,16 +18206,36 @@ class MqeBuilder {
|
|
|
18135
18206
|
this.currentIntervalStats.forEach(stats => {
|
|
18136
18207
|
if (stats.type === 'inbound-rtp') {
|
|
18137
18208
|
delete stats.jitterArray;
|
|
18209
|
+
delete stats.requestedBitrateArray;
|
|
18210
|
+
delete stats.csiArray;
|
|
18211
|
+
delete stats.maxRequestedFrameSize;
|
|
18212
|
+
delete stats.maxRequestedBitrateForMaxRequestedFrameSize;
|
|
18213
|
+
delete stats.maxBitrateForMaxRequestedFrameSize;
|
|
18214
|
+
delete stats.maxRequestedFrameRateForMaxRequestedFrameSize;
|
|
18215
|
+
delete stats.maxReceivedFrameRateForMaxRequestedFrameSize;
|
|
18216
|
+
delete stats.maxDecodedFrameRateForMaxRequestedFrameSize;
|
|
18217
|
+
delete stats.maxFrameSizeHeightForMaxRequestedFrameSize;
|
|
18218
|
+
delete stats.maxFrameSizeWidthForMaxRequestedFrameSize;
|
|
18138
18219
|
delete stats.isRequested;
|
|
18139
18220
|
delete stats.rtpPacketSizeArray;
|
|
18140
18221
|
} else if (stats.type === 'outbound-rtp') {
|
|
18222
|
+
delete stats.requestedBitrateArray;
|
|
18141
18223
|
delete stats.lastUsedEffect;
|
|
18224
|
+
delete stats.maxRequestedFrameSize;
|
|
18225
|
+
delete stats.maxRequestedBitrateForMaxRequestedFrameSize;
|
|
18226
|
+
delete stats.maxBitrateForMaxRequestedFrameSize;
|
|
18227
|
+
delete stats.maxRequestedFrameRateForMaxRequestedFrameSize;
|
|
18228
|
+
delete stats.maxTransmittedFrameRateForMaxRequestedFrameSize;
|
|
18229
|
+
delete stats.maxFrameSizeHeightForMaxRequestedFrameSize;
|
|
18230
|
+
delete stats.maxFrameSizeWidthForMaxRequestedFrameSize;
|
|
18142
18231
|
delete stats.isRequested;
|
|
18143
18232
|
delete stats.rtpPacketSizeArray;
|
|
18144
18233
|
} else if (stats.type === 'remote-inbound-rtp') {
|
|
18145
18234
|
delete stats.roundTripTimeArray;
|
|
18146
18235
|
delete stats.fractionLostArray;
|
|
18147
18236
|
delete stats.jitterArray;
|
|
18237
|
+
} else if (stats.type === 'candidate-pair') {
|
|
18238
|
+
delete stats.availableOutgoingBitrateArray;
|
|
18148
18239
|
}
|
|
18149
18240
|
});
|
|
18150
18241
|
}
|
|
@@ -18208,14 +18299,14 @@ class MqeBuilder {
|
|
|
18208
18299
|
result.common = this.buildMqeIntervalStreamReceiveCommon(id);
|
|
18209
18300
|
var current = this.currentIntervalStats;
|
|
18210
18301
|
var previous = this.previousIntervalStats;
|
|
18211
|
-
var
|
|
18212
|
-
var
|
|
18213
|
-
result.receivedFrameSize = pixelsToFrameSize(
|
|
18214
|
-
var
|
|
18215
|
-
result.requestedFrameSize =
|
|
18216
|
-
result.optimalFrameSize =
|
|
18217
|
-
result.receivedHeight =
|
|
18218
|
-
result.receivedWidth =
|
|
18302
|
+
var currentMaxFrameSizeHeightForMaxRequestedFrameSize = (_getPropertyFromStats = getPropertyFromStatsById(current, id, 'maxFrameSizeHeightForMaxRequestedFrameSize')) !== null && _getPropertyFromStats !== void 0 ? _getPropertyFromStats : 0;
|
|
18303
|
+
var currentMaxFrameSizeWidthForMaxRequestedFrameSize = (_getPropertyFromStats2 = getPropertyFromStatsById(current, id, 'maxFrameSizeWidthForMaxRequestedFrameSize')) !== null && _getPropertyFromStats2 !== void 0 ? _getPropertyFromStats2 : 0;
|
|
18304
|
+
result.receivedFrameSize = pixelsToFrameSize(currentMaxFrameSizeWidthForMaxRequestedFrameSize, currentMaxFrameSizeHeightForMaxRequestedFrameSize);
|
|
18305
|
+
var currentMaxRequestedFrameSize = (_getPropertyFromStats3 = getPropertyFromStatsById(current, id, 'maxRequestedFrameSize')) !== null && _getPropertyFromStats3 !== void 0 ? _getPropertyFromStats3 : 0;
|
|
18306
|
+
result.requestedFrameSize = currentMaxRequestedFrameSize;
|
|
18307
|
+
result.optimalFrameSize = currentMaxRequestedFrameSize;
|
|
18308
|
+
result.receivedHeight = currentMaxFrameSizeHeightForMaxRequestedFrameSize;
|
|
18309
|
+
result.receivedWidth = currentMaxFrameSizeWidthForMaxRequestedFrameSize;
|
|
18219
18310
|
var currentKeyFramesDecoded = (_getPropertyFromStats4 = getPropertyFromStatsById(current, id, 'keyFramesDecoded')) !== null && _getPropertyFromStats4 !== void 0 ? _getPropertyFromStats4 : 0;
|
|
18220
18311
|
var previousKeyFramesDecoded = (_getPropertyFromStats5 = getPropertyFromStatsById(previous, id, 'keyFramesDecoded')) !== null && _getPropertyFromStats5 !== void 0 ? _getPropertyFromStats5 : 0;
|
|
18221
18312
|
result.receivedKeyFrames = currentKeyFramesDecoded - previousKeyFramesDecoded;
|
|
@@ -18235,7 +18326,7 @@ class MqeBuilder {
|
|
|
18235
18326
|
return result;
|
|
18236
18327
|
}
|
|
18237
18328
|
buildMqeIntervalStreamReceiveCommon(id) {
|
|
18238
|
-
var _getPropertyFromStats12, _getPropertyFromStats13, _getPropertyFromStats14, _getPropertyFromStats15, _getPropertyFromStats16, _getPropertyFromStats17,
|
|
18329
|
+
var _getPropertyFromStats12, _getPropertyFromStats13, _getPropertyFromStats14, _getPropertyFromStats15, _getPropertyFromStats16, _getPropertyFromStats17, _getPropertyFromStats28, _getPropertyFromStats29, _getPropertyFromStats30, _getPropertyFromStats31, _getPropertyFromStats32, _getCodecFromStatsByS;
|
|
18239
18330
|
var result = structuredClone(initialMqeIntervalStreamReceiveCommon);
|
|
18240
18331
|
var current = this.currentIntervalStats;
|
|
18241
18332
|
var previous = this.previousIntervalStats;
|
|
@@ -18257,34 +18348,40 @@ class MqeBuilder {
|
|
|
18257
18348
|
result.concealedFrames = samplesToMilliseconds(currentConcealedSamples - previousConcealedSamples - (currentSilentConcealedSamples - previousSilentConcealedSamples), currentClockRate);
|
|
18258
18349
|
}
|
|
18259
18350
|
if (this.mediaKind === 'video') {
|
|
18260
|
-
var _getPropertyFromStats23, _getPropertyFromStats24, _getPropertyFromStats25, _getPropertyFromStats26, _getPropertyFromStats27
|
|
18351
|
+
var _getPropertyFromStats23, _getPropertyFromStats24, _getPropertyFromStats25, _getPropertyFromStats26, _getPropertyFromStats27;
|
|
18261
18352
|
var currentTotalFreezesDuration = (_getPropertyFromStats23 = getPropertyFromStatsById(current, id, 'totalFreezesDuration')) !== null && _getPropertyFromStats23 !== void 0 ? _getPropertyFromStats23 : 0;
|
|
18262
18353
|
var previousTotalFreezesDuration = (_getPropertyFromStats24 = getPropertyFromStatsById(previous, id, 'totalFreezesDuration')) !== null && _getPropertyFromStats24 !== void 0 ? _getPropertyFromStats24 : 0;
|
|
18263
18354
|
result.concealedFrames = (currentTotalFreezesDuration - previousTotalFreezesDuration) * 1000;
|
|
18264
|
-
var
|
|
18265
|
-
|
|
18266
|
-
|
|
18267
|
-
|
|
18268
|
-
var
|
|
18269
|
-
result.
|
|
18270
|
-
|
|
18271
|
-
|
|
18272
|
-
|
|
18273
|
-
}
|
|
18274
|
-
var currentJitterArray = (_getPropertyFromStats30 = getPropertyFromStatsById(current, id, 'jitterArray')) !== null && _getPropertyFromStats30 !== void 0 ? _getPropertyFromStats30 : [];
|
|
18355
|
+
var currentMaxReceivedFrameRateForMaxRequestedFrameSize = (_getPropertyFromStats25 = getPropertyFromStatsById(current, id, 'maxReceivedFrameRateForMaxRequestedFrameSize')) !== null && _getPropertyFromStats25 !== void 0 ? _getPropertyFromStats25 : 0;
|
|
18356
|
+
result.receivedFrameRate = currentMaxReceivedFrameRateForMaxRequestedFrameSize;
|
|
18357
|
+
var currentMaxDecodedFrameRateForMaxRequestedFrameSize = (_getPropertyFromStats26 = getPropertyFromStatsById(current, id, 'maxDecodedFrameRateForMaxRequestedFrameSize')) !== null && _getPropertyFromStats26 !== void 0 ? _getPropertyFromStats26 : 0;
|
|
18358
|
+
result.renderedFrameRate = currentMaxDecodedFrameRateForMaxRequestedFrameSize;
|
|
18359
|
+
var currentMaxRequestedFrameRateForMaxRequestedFrameSize = (_getPropertyFromStats27 = getPropertyFromStatsById(current, id, 'maxRequestedFrameRateForMaxRequestedFrameSize')) !== null && _getPropertyFromStats27 !== void 0 ? _getPropertyFromStats27 : 0;
|
|
18360
|
+
result.requestedFrameRate = currentMaxRequestedFrameRateForMaxRequestedFrameSize;
|
|
18361
|
+
result.optimalFrameRate = currentMaxRequestedFrameRateForMaxRequestedFrameSize;
|
|
18362
|
+
}
|
|
18363
|
+
var currentJitterArray = (_getPropertyFromStats28 = getPropertyFromStatsById(current, id, 'jitterArray')) !== null && _getPropertyFromStats28 !== void 0 ? _getPropertyFromStats28 : [];
|
|
18275
18364
|
result.meanRtpJitter = mean(currentJitterArray) * 1000;
|
|
18276
18365
|
result.maxRtpJitter = max(currentJitterArray) * 1000;
|
|
18277
|
-
var currentBytesReceived = (
|
|
18278
|
-
var previousBytesReceived = (
|
|
18279
|
-
var currentRetransmittedBytesReceived = (
|
|
18280
|
-
var previousRetransmittedBytesReceived = (
|
|
18366
|
+
var currentBytesReceived = (_getPropertyFromStats29 = getPropertyFromStatsById(current, id, 'bytesReceived')) !== null && _getPropertyFromStats29 !== void 0 ? _getPropertyFromStats29 : 0;
|
|
18367
|
+
var previousBytesReceived = (_getPropertyFromStats30 = getPropertyFromStatsById(previous, id, 'bytesReceived')) !== null && _getPropertyFromStats30 !== void 0 ? _getPropertyFromStats30 : 0;
|
|
18368
|
+
var currentRetransmittedBytesReceived = (_getPropertyFromStats31 = getPropertyFromStatsById(current, id, 'retransmittedBytesReceived')) !== null && _getPropertyFromStats31 !== void 0 ? _getPropertyFromStats31 : 0;
|
|
18369
|
+
var previousRetransmittedBytesReceived = (_getPropertyFromStats32 = getPropertyFromStatsById(previous, id, 'retransmittedBytesReceived')) !== null && _getPropertyFromStats32 !== void 0 ? _getPropertyFromStats32 : 0;
|
|
18281
18370
|
result.receivedBitrate = bytesToBitrate(currentBytesReceived - previousBytesReceived - (currentRetransmittedBytesReceived - previousRetransmittedBytesReceived), MQE_INTERVAL);
|
|
18282
|
-
|
|
18283
|
-
|
|
18284
|
-
|
|
18285
|
-
|
|
18286
|
-
|
|
18287
|
-
|
|
18371
|
+
if (this.mediaKind === 'audio') {
|
|
18372
|
+
var _getPropertyFromStats33;
|
|
18373
|
+
var currentRequestedBitrateArray = (_getPropertyFromStats33 = getPropertyFromStatsById(current, id, 'requestedBitrateArray')) !== null && _getPropertyFromStats33 !== void 0 ? _getPropertyFromStats33 : [];
|
|
18374
|
+
result.requestedBitrate = max(currentRequestedBitrateArray);
|
|
18375
|
+
result.optimalBitrate = max(currentRequestedBitrateArray);
|
|
18376
|
+
} else {
|
|
18377
|
+
var _getPropertyFromStats34;
|
|
18378
|
+
var currentMaxRequestedBitrateForMaxRequestedFrameSize = (_getPropertyFromStats34 = getPropertyFromStatsById(current, id, 'maxRequestedBitrateForMaxRequestedFrameSize')) !== null && _getPropertyFromStats34 !== void 0 ? _getPropertyFromStats34 : 0;
|
|
18379
|
+
result.requestedBitrate = currentMaxRequestedBitrateForMaxRequestedFrameSize;
|
|
18380
|
+
result.optimalBitrate = currentMaxRequestedBitrateForMaxRequestedFrameSize;
|
|
18381
|
+
}
|
|
18382
|
+
var currentCsiArray = getPropertyFromStatsById(current, id, 'csiArray');
|
|
18383
|
+
if (currentCsiArray && currentCsiArray.length > 0) {
|
|
18384
|
+
result.csi = currentCsiArray.filter((csi, index) => currentCsiArray.indexOf(csi) === index);
|
|
18288
18385
|
}
|
|
18289
18386
|
var currentCodec = (_getCodecFromStatsByS = getCodecFromStatsByStreamStatsId(current, id)) !== null && _getCodecFromStatsByS !== void 0 ? _getCodecFromStatsByS : this.mediaKind === 'audio' ? 'opus' : 'H264';
|
|
18290
18387
|
result.codec = currentCodec;
|
|
@@ -18310,8 +18407,8 @@ class MqeBuilder {
|
|
|
18310
18407
|
result.rtpBitrate = bytesToBitrate(currentBytesSent - previousBytesSent, MQE_INTERVAL) - result.rtxBitrate;
|
|
18311
18408
|
var currentTransportType = (_getTransportTypeFrom2 = getTransportTypeFromStats(current)) !== null && _getTransportTypeFrom2 !== void 0 ? _getTransportTypeFrom2 : 'UDP';
|
|
18312
18409
|
result.transportType = currentTransportType;
|
|
18313
|
-
var currentAvailableOutgoingBitrate = (_getAvailableOutgoing =
|
|
18314
|
-
result.availableBitrate = currentAvailableOutgoingBitrate;
|
|
18410
|
+
var currentAvailableOutgoingBitrate = (_getAvailableOutgoing = getAvailableOutgoingBitrateArrayFromStats(current)) !== null && _getAvailableOutgoing !== void 0 ? _getAvailableOutgoing : [];
|
|
18411
|
+
result.availableBitrate = min(currentAvailableOutgoingBitrate);
|
|
18315
18412
|
result.queueDelay = 0;
|
|
18316
18413
|
var currentRoundTripTimeArray = getPropertyFromStatsByTypeInArray(current, 'remote-inbound-rtp', 'roundTripTimeArray').flat();
|
|
18317
18414
|
result.meanRoundTripTime = mean(currentRoundTripTimeArray) * 1000;
|
|
@@ -18343,25 +18440,25 @@ class MqeBuilder {
|
|
|
18343
18440
|
return result;
|
|
18344
18441
|
}
|
|
18345
18442
|
buildMqeIntervalStreamTransmitVideo(id) {
|
|
18346
|
-
var _getPropertyFromStats36, _getPropertyFromStats37, _getPropertyFromStats38, _getPropertyFromStats39, _getPropertyFromStats40, _getPropertyFromStats41, _getPropertyFromStats42, _getPropertyFromStats43,
|
|
18443
|
+
var _getPropertyFromStats35, _getPropertyFromStats36, _getPropertyFromStats37, _getPropertyFromStats38, _getPropertyFromStats39, _getPropertyFromStats40, _getPropertyFromStats41, _getPropertyFromStats42, _getPropertyFromStats43, _getH264ProfileFromSt2;
|
|
18347
18444
|
var result = structuredClone(initialMqeIntervalStreamTransmitVideo);
|
|
18348
18445
|
result.common = this.buildMqeIntervalStreamTransmitCommon(id);
|
|
18349
18446
|
var current = this.currentIntervalStats;
|
|
18350
18447
|
var previous = this.previousIntervalStats;
|
|
18351
|
-
var
|
|
18352
|
-
var
|
|
18353
|
-
result.transmittedFrameSize = pixelsToFrameSize(
|
|
18354
|
-
var
|
|
18355
|
-
result.requestedFrameSize =
|
|
18356
|
-
result.transmittedHeight =
|
|
18357
|
-
result.transmittedWidth =
|
|
18358
|
-
var currentKeyFramesEncoded = (
|
|
18359
|
-
var previousKeyFramesEncoded = (
|
|
18448
|
+
var currentMaxFrameSizeHeightForMaxRequestedFrameSize = (_getPropertyFromStats35 = getPropertyFromStatsById(current, id, 'maxFrameSizeHeightForMaxRequestedFrameSize')) !== null && _getPropertyFromStats35 !== void 0 ? _getPropertyFromStats35 : 0;
|
|
18449
|
+
var currentMaxFrameSizeWidthForMaxRequestedFrameSize = (_getPropertyFromStats36 = getPropertyFromStatsById(current, id, 'maxFrameSizeWidthForMaxRequestedFrameSize')) !== null && _getPropertyFromStats36 !== void 0 ? _getPropertyFromStats36 : 0;
|
|
18450
|
+
result.transmittedFrameSize = pixelsToFrameSize(currentMaxFrameSizeWidthForMaxRequestedFrameSize, currentMaxFrameSizeHeightForMaxRequestedFrameSize);
|
|
18451
|
+
var currentMaxRequestedFrameSize = (_getPropertyFromStats37 = getPropertyFromStatsById(current, id, 'maxRequestedFrameSize')) !== null && _getPropertyFromStats37 !== void 0 ? _getPropertyFromStats37 : 0;
|
|
18452
|
+
result.requestedFrameSize = currentMaxRequestedFrameSize;
|
|
18453
|
+
result.transmittedHeight = currentMaxFrameSizeHeightForMaxRequestedFrameSize;
|
|
18454
|
+
result.transmittedWidth = currentMaxFrameSizeWidthForMaxRequestedFrameSize;
|
|
18455
|
+
var currentKeyFramesEncoded = (_getPropertyFromStats38 = getPropertyFromStatsById(current, id, 'keyFramesEncoded')) !== null && _getPropertyFromStats38 !== void 0 ? _getPropertyFromStats38 : 0;
|
|
18456
|
+
var previousKeyFramesEncoded = (_getPropertyFromStats39 = getPropertyFromStatsById(previous, id, 'keyFramesEncoded')) !== null && _getPropertyFromStats39 !== void 0 ? _getPropertyFromStats39 : 0;
|
|
18360
18457
|
result.transmittedKeyFrames = currentKeyFramesEncoded - previousKeyFramesEncoded;
|
|
18361
|
-
var currentFirCount = (
|
|
18362
|
-
var previousFirCount = (
|
|
18363
|
-
var currentPliCount = (
|
|
18364
|
-
var previousPliCount = (
|
|
18458
|
+
var currentFirCount = (_getPropertyFromStats40 = getPropertyFromStatsById(current, id, 'firCount')) !== null && _getPropertyFromStats40 !== void 0 ? _getPropertyFromStats40 : 0;
|
|
18459
|
+
var previousFirCount = (_getPropertyFromStats41 = getPropertyFromStatsById(previous, id, 'firCount')) !== null && _getPropertyFromStats41 !== void 0 ? _getPropertyFromStats41 : 0;
|
|
18460
|
+
var currentPliCount = (_getPropertyFromStats42 = getPropertyFromStatsById(current, id, 'pliCount')) !== null && _getPropertyFromStats42 !== void 0 ? _getPropertyFromStats42 : 0;
|
|
18461
|
+
var previousPliCount = (_getPropertyFromStats43 = getPropertyFromStatsById(previous, id, 'pliCount')) !== null && _getPropertyFromStats43 !== void 0 ? _getPropertyFromStats43 : 0;
|
|
18365
18462
|
result.requestedKeyFrames = currentFirCount - previousFirCount + (currentPliCount - previousPliCount);
|
|
18366
18463
|
result.localConfigurationChanges = 0;
|
|
18367
18464
|
var currentH264CodecProfile = (_getH264ProfileFromSt2 = getH264ProfileFromStatsByStreamStatsId(current, id)) !== null && _getH264ProfileFromSt2 !== void 0 ? _getH264ProfileFromSt2 : 'BP';
|
|
@@ -18383,30 +18480,36 @@ class MqeBuilder {
|
|
|
18383
18480
|
return result;
|
|
18384
18481
|
}
|
|
18385
18482
|
buildMqeIntervalStreamTransmitCommon(id) {
|
|
18386
|
-
var _getPropertyFromStats45, _getPropertyFromStats46, _getPropertyFromStats47,
|
|
18483
|
+
var _getPropertyFromStats44, _getPropertyFromStats45, _getPropertyFromStats46, _getPropertyFromStats47, _getPropertyFromStats50, _getPropertyFromStats51, _getPropertyFromStats52, _getPropertyFromStats53, _getCodecFromStatsByS2;
|
|
18387
18484
|
var result = structuredClone(initialMqeIntervalStreamTransmitCommon);
|
|
18388
18485
|
var current = this.currentIntervalStats;
|
|
18389
18486
|
var previous = this.previousIntervalStats;
|
|
18390
|
-
var currentPacketsSent = (
|
|
18391
|
-
var previousPacketsSent = (
|
|
18392
|
-
var currentRetransmittedPacketsSent = (
|
|
18393
|
-
var previousRetransmittedPacketsSent = (
|
|
18487
|
+
var currentPacketsSent = (_getPropertyFromStats44 = getPropertyFromStatsById(current, id, 'packetsSent')) !== null && _getPropertyFromStats44 !== void 0 ? _getPropertyFromStats44 : 0;
|
|
18488
|
+
var previousPacketsSent = (_getPropertyFromStats45 = getPropertyFromStatsById(previous, id, 'packetsSent')) !== null && _getPropertyFromStats45 !== void 0 ? _getPropertyFromStats45 : 0;
|
|
18489
|
+
var currentRetransmittedPacketsSent = (_getPropertyFromStats46 = getPropertyFromStatsById(current, id, 'retransmittedPacketsSent')) !== null && _getPropertyFromStats46 !== void 0 ? _getPropertyFromStats46 : 0;
|
|
18490
|
+
var previousRetransmittedPacketsSent = (_getPropertyFromStats47 = getPropertyFromStatsById(previous, id, 'retransmittedPacketsSent')) !== null && _getPropertyFromStats47 !== void 0 ? _getPropertyFromStats47 : 0;
|
|
18394
18491
|
result.rtpPackets = currentPacketsSent - previousPacketsSent - (currentRetransmittedPacketsSent - previousRetransmittedPacketsSent);
|
|
18395
18492
|
if (this.mediaKind === 'video') {
|
|
18396
|
-
var
|
|
18397
|
-
var
|
|
18398
|
-
|
|
18399
|
-
|
|
18400
|
-
|
|
18401
|
-
|
|
18402
|
-
|
|
18403
|
-
var
|
|
18404
|
-
var
|
|
18405
|
-
var
|
|
18406
|
-
var previousRetransmittedBytesSent = (_getPropertyFromStats55 = getPropertyFromStatsById(previous, id, 'retransmittedBytesSent')) !== null && _getPropertyFromStats55 !== void 0 ? _getPropertyFromStats55 : 0;
|
|
18493
|
+
var _getPropertyFromStats48, _getPropertyFromStats49;
|
|
18494
|
+
var currentMaxTransmittedFrameRateForMaxRequestedFrameSize = (_getPropertyFromStats48 = getPropertyFromStatsById(current, id, 'maxTransmittedFrameRateForMaxRequestedFrameSize')) !== null && _getPropertyFromStats48 !== void 0 ? _getPropertyFromStats48 : 0;
|
|
18495
|
+
result.transmittedFrameRate = currentMaxTransmittedFrameRateForMaxRequestedFrameSize;
|
|
18496
|
+
var currentMaxRequestedFrameRateForMaxRequestedFrameSize = (_getPropertyFromStats49 = getPropertyFromStatsById(current, id, 'maxRequestedFrameRateForMaxRequestedFrameSize')) !== null && _getPropertyFromStats49 !== void 0 ? _getPropertyFromStats49 : 0;
|
|
18497
|
+
result.requestedFrames = currentMaxRequestedFrameRateForMaxRequestedFrameSize;
|
|
18498
|
+
}
|
|
18499
|
+
var currentBytesSent = (_getPropertyFromStats50 = getPropertyFromStatsById(current, id, 'bytesSent')) !== null && _getPropertyFromStats50 !== void 0 ? _getPropertyFromStats50 : 0;
|
|
18500
|
+
var previousBytesSent = (_getPropertyFromStats51 = getPropertyFromStatsById(previous, id, 'bytesSent')) !== null && _getPropertyFromStats51 !== void 0 ? _getPropertyFromStats51 : 0;
|
|
18501
|
+
var currentRetransmittedBytesSent = (_getPropertyFromStats52 = getPropertyFromStatsById(current, id, 'retransmittedBytesSent')) !== null && _getPropertyFromStats52 !== void 0 ? _getPropertyFromStats52 : 0;
|
|
18502
|
+
var previousRetransmittedBytesSent = (_getPropertyFromStats53 = getPropertyFromStatsById(previous, id, 'retransmittedBytesSent')) !== null && _getPropertyFromStats53 !== void 0 ? _getPropertyFromStats53 : 0;
|
|
18407
18503
|
result.transmittedBitrate = bytesToBitrate(currentBytesSent - previousBytesSent - (currentRetransmittedBytesSent - previousRetransmittedBytesSent), MQE_INTERVAL);
|
|
18408
|
-
|
|
18409
|
-
|
|
18504
|
+
if (this.mediaKind === 'audio') {
|
|
18505
|
+
var _getPropertyFromStats54;
|
|
18506
|
+
var currentRequestedBitrateArray = (_getPropertyFromStats54 = getPropertyFromStatsById(current, id, 'requestedBitrateArray')) !== null && _getPropertyFromStats54 !== void 0 ? _getPropertyFromStats54 : [];
|
|
18507
|
+
result.requestedBitrate = max(currentRequestedBitrateArray);
|
|
18508
|
+
} else {
|
|
18509
|
+
var _getPropertyFromStats55;
|
|
18510
|
+
var currentMaxRequestedBitrateForMaxRequestedFrameSize = (_getPropertyFromStats55 = getPropertyFromStatsById(current, id, 'maxRequestedBitrateForMaxRequestedFrameSize')) !== null && _getPropertyFromStats55 !== void 0 ? _getPropertyFromStats55 : 0;
|
|
18511
|
+
result.requestedBitrate = currentMaxRequestedBitrateForMaxRequestedFrameSize;
|
|
18512
|
+
}
|
|
18410
18513
|
var currentCodec = (_getCodecFromStatsByS2 = getCodecFromStatsByStreamStatsId(current, id)) !== null && _getCodecFromStatsByS2 !== void 0 ? _getCodecFromStatsByS2 : this.mediaKind === 'audio' ? 'opus' : 'H264';
|
|
18411
18514
|
result.codec = currentCodec;
|
|
18412
18515
|
var currentCsi = getPropertyFromStatsById(current, id, 'csi');
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MqeBuilder.d.ts","sourceRoot":"","sources":["../../../src/StatsAnalyzer/MqeBuilder.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"MqeBuilder.d.ts","sourceRoot":"","sources":["../../../src/StatsAnalyzer/MqeBuilder.ts"],"names":[],"mappings":"AAGA,OAAO,EAUL,wBAAwB,EACxB,yBAAyB,EACzB,0BAA0B,EAC1B,6BAA6B,EAC7B,8BAA8B,EAC9B,6BAA6B,EAC7B,8BAA8B,EAC9B,+BAA+B,EAC/B,8BAA8B,EAC/B,MAAM,YAAY,CAAC;AACpB,OAAO,EAAe,QAAQ,EAAE,MAAM,SAAS,CAAC;AAmBhD,8BAAsB,UAAU;IAE9B,oBAAoB,EAAE,QAAQ,CAAa;IAG3C,qBAAqB,EAAE,QAAQ,CAAa;IAE5C,SAAS,CAAC,MAAM,EAAE,OAAO,CAAC;IAE1B,SAAS,CAAC,kBAAkB,EAAE,OAAO,CAAC;IAEtC,SAAS,CAAC,SAAS,EAAE,wBAAwB,CAAC,WAAW,CAAC,CAAC;IAE3D,SAAS,CAAC,SAAS,EAAE,OAAO,GAAG,OAAO,CAAC;gBAO3B,MAAM,EAAE;QAClB,MAAM,EAAE,OAAO,CAAC;QAChB,kBAAkB,EAAE,OAAO,CAAC;QAC5B,SAAS,EAAE,wBAAwB,CAAC,WAAW,CAAC,CAAC;QACjD,SAAS,EAAE,OAAO,GAAG,OAAO,CAAC;KAC9B;IAYD,QAAQ,CAAC,QAAQ,IAAI,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC;IAQ5C,0BAA0B,CAAC,QAAQ,EAAE,QAAQ,GAAG,IAAI;IAwPpD,KAAK,IAAI,IAAI;IAQb,oBAAoB,IAAI,IAAI;IAoD5B,SAAS,CAAC,6BAA6B,IAAI,wBAAwB;IAmBnE,SAAS,CAAC,8BAA8B,IAAI,yBAAyB;IAgHrE,SAAS,CAAC,kCAAkC,CAAC,EAAE,EAAE,MAAM,GAAG,6BAA6B;IAiBvF,SAAS,CAAC,kCAAkC,CAAC,EAAE,EAAE,MAAM,GAAG,6BAA6B;IAkFvF,SAAS,CAAC,mCAAmC,CAAC,EAAE,EAAE,MAAM,GAAG,8BAA8B;IA0JzF,SAAS,CAAC,+BAA+B,IAAI,0BAA0B;IA8GvE,SAAS,CAAC,mCAAmC,CAAC,EAAE,EAAE,MAAM,GAAG,8BAA8B;IA6BzF,SAAS,CAAC,mCAAmC,CAAC,EAAE,EAAE,MAAM,GAAG,8BAA8B;IAwFzF,SAAS,CAAC,oCAAoC,CAAC,EAAE,EAAE,MAAM,GAAG,+BAA+B;CAyF5F"}
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
export declare const MQE_INTERVAL = 60000;
|
|
2
2
|
export declare const DEFAULT_IP = "0.0.0.0";
|
|
3
3
|
export declare const UNKNOWN = "unknown";
|
|
4
|
-
export declare const VIDEO_FRAME_RATE_MULTIPLIER = 100;
|
|
5
4
|
export declare enum NOISE_REDUCTION_MODE {
|
|
6
5
|
NONE = "AUDIO_BACKGROUND_NOISE_REDUCTION_NONE",
|
|
7
6
|
LOW_POWER = "AUDIO_BACKGROUND_NOISE_REDUCTION_LOW_POWER"
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../../src/StatsAnalyzer/constants.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,YAAY,QAAQ,CAAC;AAElC,eAAO,MAAM,UAAU,YAAY,CAAC;AAEpC,eAAO,MAAM,OAAO,YAAY,CAAC;
|
|
1
|
+
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../../src/StatsAnalyzer/constants.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,YAAY,QAAQ,CAAC;AAElC,eAAO,MAAM,UAAU,YAAY,CAAC;AAEpC,eAAO,MAAM,OAAO,YAAY,CAAC;AAEjC,oBAAY,oBAAoB;IAC9B,IAAI,0CAA0C;IAC9C,SAAS,+CAA+C;CACzD;AAED,oBAAY,uBAAuB;IACjC,IAAI,kCAAkC;IACtC,IAAI,kCAAkC;IACtC,aAAa,2CAA2C;IACxD,aAAa,2CAA2C;CACzD"}
|
|
@@ -5,6 +5,7 @@ export declare const min: (array: number[]) => number;
|
|
|
5
5
|
export declare const mean: (array: number[]) => number;
|
|
6
6
|
export declare const bytesToBitrate: (bytes: number, timeElapsed: number) => number;
|
|
7
7
|
export declare const samplesToMilliseconds: (samples: number, clockRate: number) => number;
|
|
8
|
+
export declare const framesToFrameRate: (frames: number, timeElapsed: number) => number;
|
|
8
9
|
export declare const convertToStatsMap: (statsItems: TransceiverStatItem[]) => StatsMap;
|
|
9
10
|
export declare const getPropertyFromStatsById: (intervalStats: StatsMap, statsId: string, property: string) => unknown | undefined;
|
|
10
11
|
export declare const getPropertyFromStatsByType: (intervalStats: StatsMap, statsType: RTCStatsType, property: string) => unknown | undefined;
|
|
@@ -12,7 +13,7 @@ export declare const getPropertyFromStatsByTypeInArray: (intervalStats: StatsMap
|
|
|
12
13
|
export declare const getSumFromStatsByType: (intervalStats: StatsMap, statsType: RTCStatsType, property: string) => number;
|
|
13
14
|
export declare const getSelectedCandidateIdFromStats: (intervalStats: StatsMap, candidateOrigin: 'local' | 'remote') => string | undefined;
|
|
14
15
|
export declare const getTransportTypeFromStats: (intervalStats: StatsMap) => 'UDP' | 'TCP' | 'TLS' | undefined;
|
|
15
|
-
export declare const
|
|
16
|
+
export declare const getAvailableOutgoingBitrateArrayFromStats: (intervalStats: StatsMap) => number[] | undefined;
|
|
16
17
|
export declare const getMediaSourceTrackLabelFromStats: (intervalStats: StatsMap) => string | undefined;
|
|
17
18
|
export declare const getCodecFromStatsByStreamStatsId: (intervalStats: StatsMap, streamStatsId: string) => string | undefined;
|
|
18
19
|
export declare const getH264ProfileFromStatsByStreamStatsId: (intervalStats: StatsMap, streamStatsId: string) => 'BP' | 'CHP' | undefined;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../src/StatsAnalyzer/utils.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,mBAAmB,EAAE,MAAM,gCAAgC,CAAC;AAErE,OAAO,EAAE,KAAK,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AAQ1C,eAAO,MAAM,GAAG,UAAW,MAAM,EAAE,KAAG,MAMrC,CAAC;AAQF,eAAO,MAAM,GAAG,UAAW,MAAM,EAAE,KAAG,MAMrC,CAAC;AAQF,eAAO,MAAM,IAAI,UAAW,MAAM,EAAE,KAAG,MAMtC,CAAC;AASF,eAAO,MAAM,cAAc,UAAW,MAAM,eAAe,MAAM,KAAG,
|
|
1
|
+
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../src/StatsAnalyzer/utils.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,mBAAmB,EAAE,MAAM,gCAAgC,CAAC;AAErE,OAAO,EAAE,KAAK,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AAQ1C,eAAO,MAAM,GAAG,UAAW,MAAM,EAAE,KAAG,MAMrC,CAAC;AAQF,eAAO,MAAM,GAAG,UAAW,MAAM,EAAE,KAAG,MAMrC,CAAC;AAQF,eAAO,MAAM,IAAI,UAAW,MAAM,EAAE,KAAG,MAMtC,CAAC;AASF,eAAO,MAAM,cAAc,UAAW,MAAM,eAAe,MAAM,KAAG,MAMnE,CAAC;AASF,eAAO,MAAM,qBAAqB,YAAa,MAAM,aAAa,MAAM,KAAG,MAU1E,CAAC;AASF,eAAO,MAAM,iBAAiB,WAAY,MAAM,eAAe,MAAM,KAAG,MAMvE,CAAC;AAQF,eAAO,MAAM,iBAAiB,eAAgB,mBAAmB,EAAE,aAQlE,CAAC;AAWF,eAAO,MAAM,wBAAwB,qCAE1B,MAAM,YACL,MAAM,KACf,OAAO,GAAG,SAEZ,CAAC;AAYF,eAAO,MAAM,0BAA0B,uCAE1B,YAAY,YACb,MAAM,KACf,OAAO,GAAG,SAUZ,CAAC;AAYF,eAAO,MAAM,iCAAiC,uCAEjC,YAAY,YACb,MAAM,KACf,OAAO,EAUT,CAAC;AAWF,eAAO,MAAM,qBAAqB,uCAErB,YAAY,YACb,MAAM,KACf,MAeF,CAAC;AAyDF,eAAO,MAAM,+BAA+B,6CAEzB,OAAO,GAAG,QAAQ,KAClC,MAAM,GAAG,SAcX,CAAC;AAYF,eAAO,MAAM,yBAAyB,+BAEnC,KAAK,GAAG,KAAK,GAAG,KAAK,GAAG,SA4B1B,CAAC;AAYF,eAAO,MAAM,yCAAyC,+BAEnD,MAAM,EAAE,GAAG,SAgBb,CAAC;AAUF,eAAO,MAAM,iCAAiC,+BAA8B,MAAM,GAAG,SAgBpF,CAAC;AAUF,eAAO,MAAM,gCAAgC,2CAE5B,MAAM,KACpB,MAAM,GAAG,SAgBX,CAAC;AAUF,eAAO,MAAM,sCAAsC,2CAElC,MAAM,KACpB,IAAI,GAAG,KAAK,GAAG,SA2BjB,CAAC;AASF,eAAO,MAAM,iBAAiB,UAAW,KAAK,KAAG,OAUhD,CAAC;AAUF,eAAO,MAAM,iBAAiB,UAAW,MAAM,UAAU,MAAM,KAAG,MAIjE,CAAC"}
|