@observertc/observer-js 0.9.27-beta → 0.30.0-beta
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/lib/ObservedCall.d.ts +54 -0
- package/lib/ObservedCall.d.ts.map +1 -0
- package/lib/ObservedCall.js +166 -0
- package/lib/ObservedClient.d.ts +73 -0
- package/lib/ObservedClient.d.ts.map +1 -0
- package/lib/ObservedClient.js +487 -0
- package/lib/ObservedInboundTrack.d.ts +65 -0
- package/lib/ObservedInboundTrack.d.ts.map +1 -0
- package/lib/ObservedInboundTrack.js +192 -0
- package/lib/ObservedOutboundTrack.d.ts +55 -0
- package/lib/ObservedOutboundTrack.d.ts.map +1 -0
- package/lib/ObservedOutboundTrack.js +166 -0
- package/lib/ObservedPeerConnection.d.ts +57 -0
- package/lib/ObservedPeerConnection.d.ts.map +1 -0
- package/lib/ObservedPeerConnection.js +217 -0
- package/lib/Observer.d.ts +26 -1465
- package/lib/Observer.d.ts.map +1 -1
- package/lib/Observer.js +53 -605
- package/lib/{sinks/ObserverSink.d.ts → ReportsCollector.d.ts} +7 -23
- package/lib/ReportsCollector.d.ts.map +1 -0
- package/lib/{sinks/ObserverSink.js → ReportsCollector.js} +27 -85
- package/lib/common/ReportsCollector.d.ts +21 -24
- package/lib/common/ReportsCollector.d.ts.map +1 -1
- package/lib/common/ReportsCollector.js +24 -0
- package/lib/common/SingleExecutor.d.ts +3 -0
- package/lib/common/SingleExecutor.d.ts.map +1 -0
- package/lib/common/SingleExecutor.js +31 -0
- package/lib/common/TypedEventEmitter.d.ts +22 -0
- package/lib/common/TypedEventEmitter.d.ts.map +1 -0
- package/lib/common/TypedEventEmitter.js +11 -0
- package/lib/common/callEventReports.d.ts.map +1 -0
- package/lib/common/logger.d.ts +3 -9
- package/lib/common/logger.d.ts.map +1 -1
- package/lib/common/logger.js +58 -141
- package/lib/common/types.d.ts +2 -14
- package/lib/common/types.d.ts.map +1 -1
- package/lib/common/utils.d.ts +1 -0
- package/lib/common/utils.d.ts.map +1 -1
- package/lib/common/utils.js +6 -1
- package/lib/index.d.ts +8 -19
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +7 -2
- package/package.json +1 -1
- package/src/ObservedCall.ts +201 -0
- package/src/ObservedClient.ts +681 -0
- package/src/ObservedInboundTrack.ts +238 -0
- package/src/ObservedOutboundTrack.ts +205 -0
- package/src/ObservedPeerConnection.ts +249 -0
- package/src/Observer.ts +86 -442
- package/src/{sinks/ObserverSink.ts → ReportsCollector.ts} +29 -94
- package/src/common/ReportsCollector.ts +48 -23
- package/src/common/SingleExecutor.ts +36 -0
- package/src/common/TypedEventEmitter.ts +32 -0
- package/src/common/logger.ts +58 -161
- package/src/common/types.ts +4 -24
- package/src/common/utils.ts +6 -0
- package/src/index.ts +12 -23
- package/lib/Evaluator.d.ts +0 -43
- package/lib/Evaluator.d.ts.map +0 -1
- package/lib/Evaluator.js +0 -171
- package/lib/common/Semaphore.d.ts +0 -31
- package/lib/common/Semaphore.d.ts.map +0 -1
- package/lib/common/Semaphore.js +0 -16
- package/lib/entries/CallEntry.d.ts +0 -619
- package/lib/entries/CallEntry.d.ts.map +0 -1
- package/lib/entries/CallEntry.js +0 -75
- package/lib/entries/ClientEntry.d.ts +0 -478
- package/lib/entries/ClientEntry.d.ts.map +0 -1
- package/lib/entries/ClientEntry.js +0 -114
- package/lib/entries/InboundTrackEntry.d.ts +0 -682
- package/lib/entries/InboundTrackEntry.d.ts.map +0 -1
- package/lib/entries/InboundTrackEntry.js +0 -76
- package/lib/entries/OutboundTrackEntry.d.ts +0 -682
- package/lib/entries/OutboundTrackEntry.d.ts.map +0 -1
- package/lib/entries/OutboundTrackEntry.js +0 -73
- package/lib/entries/PeerConnectionEntry.d.ts +0 -505
- package/lib/entries/PeerConnectionEntry.d.ts.map +0 -1
- package/lib/entries/PeerConnectionEntry.js +0 -144
- package/lib/entries/SfuEntry.d.ts +0 -150
- package/lib/entries/SfuEntry.d.ts.map +0 -1
- package/lib/entries/SfuEntry.js +0 -77
- package/lib/entries/SfuInboundRtpPadEntry.d.ts +0 -14
- package/lib/entries/SfuInboundRtpPadEntry.d.ts.map +0 -1
- package/lib/entries/SfuInboundRtpPadEntry.js +0 -49
- package/lib/entries/SfuOutboundRtpPadEntry.d.ts +0 -14
- package/lib/entries/SfuOutboundRtpPadEntry.d.ts.map +0 -1
- package/lib/entries/SfuOutboundRtpPadEntry.js +0 -47
- package/lib/entries/SfuSctpChannelEntry.d.ts +0 -12
- package/lib/entries/SfuSctpChannelEntry.d.ts.map +0 -1
- package/lib/entries/SfuSctpChannelEntry.js +0 -43
- package/lib/entries/SfuTransportEntry.d.ts +0 -82
- package/lib/entries/SfuTransportEntry.d.ts.map +0 -1
- package/lib/entries/SfuTransportEntry.js +0 -122
- package/lib/evaluators/SetClientsCoordinateEvaluator.d.ts +0 -9
- package/lib/evaluators/SetClientsCoordinateEvaluator.d.ts.map +0 -1
- package/lib/evaluators/SetClientsCoordinateEvaluator.js +0 -95
- package/lib/middlewares/CallOperationsContext.d.ts +0 -18
- package/lib/middlewares/CallOperationsContext.d.ts.map +0 -1
- package/lib/middlewares/CallOperationsContext.js +0 -27
- package/lib/middlewares/CallProcessor.d.ts +0 -6
- package/lib/middlewares/CallProcessor.d.ts.map +0 -1
- package/lib/middlewares/CallProcessor.js +0 -36
- package/lib/middlewares/CommitTransactionMiddleware.d.ts +0 -6
- package/lib/middlewares/CommitTransactionMiddleware.d.ts.map +0 -1
- package/lib/middlewares/CommitTransactionMiddleware.js +0 -179
- package/lib/middlewares/DeleteOutdatedCallEntries.d.ts +0 -6
- package/lib/middlewares/DeleteOutdatedCallEntries.d.ts.map +0 -1
- package/lib/middlewares/DeleteOutdatedCallEntries.js +0 -121
- package/lib/middlewares/DeleteOutdatedSfuEntries.d.ts +0 -6
- package/lib/middlewares/DeleteOutdatedSfuEntries.d.ts.map +0 -1
- package/lib/middlewares/DeleteOutdatedSfuEntries.js +0 -127
- package/lib/middlewares/Middleware.d.ts +0 -3
- package/lib/middlewares/Middleware.d.ts.map +0 -1
- package/lib/middlewares/Middleware.js +0 -21
- package/lib/middlewares/Processor.d.ts +0 -9
- package/lib/middlewares/Processor.d.ts.map +0 -1
- package/lib/middlewares/Processor.js +0 -54
- package/lib/middlewares/TransactionContext.d.ts +0 -35
- package/lib/middlewares/TransactionContext.d.ts.map +0 -1
- package/lib/middlewares/TransactionContext.js +0 -90
- package/lib/middlewares/TransactoinProcessor.d.ts +0 -6
- package/lib/middlewares/TransactoinProcessor.d.ts.map +0 -1
- package/lib/middlewares/TransactoinProcessor.js +0 -17
- package/lib/middlewares/VisitObservedCallsMiddleware.d.ts +0 -7
- package/lib/middlewares/VisitObservedCallsMiddleware.d.ts.map +0 -1
- package/lib/middlewares/VisitObservedCallsMiddleware.js +0 -96
- package/lib/middlewares/VisitObservedSfusMiddleware.d.ts +0 -6
- package/lib/middlewares/VisitObservedSfusMiddleware.d.ts.map +0 -1
- package/lib/middlewares/VisitObservedSfusMiddleware.js +0 -151
- package/lib/middlewares/visitors/visitClient.d.ts +0 -5
- package/lib/middlewares/visitors/visitClient.d.ts.map +0 -1
- package/lib/middlewares/visitors/visitClient.js +0 -174
- package/lib/middlewares/visitors/visitInboundAudioTrack.d.ts +0 -5
- package/lib/middlewares/visitors/visitInboundAudioTrack.d.ts.map +0 -1
- package/lib/middlewares/visitors/visitInboundAudioTrack.js +0 -93
- package/lib/middlewares/visitors/visitInboundVideoTrack.d.ts +0 -5
- package/lib/middlewares/visitors/visitInboundVideoTrack.d.ts.map +0 -1
- package/lib/middlewares/visitors/visitInboundVideoTrack.js +0 -94
- package/lib/middlewares/visitors/visitOutboundAudioTrack.d.ts +0 -5
- package/lib/middlewares/visitors/visitOutboundAudioTrack.d.ts.map +0 -1
- package/lib/middlewares/visitors/visitOutboundAudioTrack.js +0 -90
- package/lib/middlewares/visitors/visitOutboundVideoTarck.d.ts +0 -5
- package/lib/middlewares/visitors/visitOutboundVideoTarck.d.ts.map +0 -1
- package/lib/middlewares/visitors/visitOutboundVideoTarck.js +0 -90
- package/lib/middlewares/visitors/visitPeerConnection.d.ts +0 -5
- package/lib/middlewares/visitors/visitPeerConnection.d.ts.map +0 -1
- package/lib/middlewares/visitors/visitPeerConnection.js +0 -111
- package/lib/middlewares/visitors/visitSfu.d.ts +0 -5
- package/lib/middlewares/visitors/visitSfu.d.ts.map +0 -1
- package/lib/middlewares/visitors/visitSfu.js +0 -78
- package/lib/middlewares/visitors/visitSfuInboundRtpPad.d.ts +0 -5
- package/lib/middlewares/visitors/visitSfuInboundRtpPad.d.ts.map +0 -1
- package/lib/middlewares/visitors/visitSfuInboundRtpPad.js +0 -56
- package/lib/middlewares/visitors/visitSfuOutboundRtpPad.d.ts +0 -5
- package/lib/middlewares/visitors/visitSfuOutboundRtpPad.d.ts.map +0 -1
- package/lib/middlewares/visitors/visitSfuOutboundRtpPad.js +0 -56
- package/lib/middlewares/visitors/visitSfuSctpChannel.d.ts +0 -5
- package/lib/middlewares/visitors/visitSfuSctpChannel.d.ts.map +0 -1
- package/lib/middlewares/visitors/visitSfuSctpChannel.js +0 -55
- package/lib/middlewares/visitors/visitSfuTransport.d.ts +0 -5
- package/lib/middlewares/visitors/visitSfuTransport.d.ts.map +0 -1
- package/lib/middlewares/visitors/visitSfuTransport.js +0 -56
- package/lib/processes/closePeerConnectionProcess.d.ts +0 -10
- package/lib/processes/closePeerConnectionProcess.d.ts.map +0 -1
- package/lib/processes/closePeerConnectionProcess.js +0 -51
- package/lib/processes/detachClientProcess.d.ts +0 -14
- package/lib/processes/detachClientProcess.d.ts.map +0 -1
- package/lib/processes/detachClientProcess.js +0 -106
- package/lib/processes/findRemoteMatches.d.ts +0 -9
- package/lib/processes/findRemoteMatches.d.ts.map +0 -1
- package/lib/processes/findRemoteMatches.js +0 -96
- package/lib/processes/inboundTrackRemoved.d.ts +0 -9
- package/lib/processes/inboundTrackRemoved.d.ts.map +0 -1
- package/lib/processes/inboundTrackRemoved.js +0 -22
- package/lib/processes/joinClientProcess.d.ts +0 -11
- package/lib/processes/joinClientProcess.d.ts.map +0 -1
- package/lib/processes/joinClientProcess.js +0 -120
- package/lib/processes/outboundTrackRemoved.d.ts +0 -9
- package/lib/processes/outboundTrackRemoved.d.ts.map +0 -1
- package/lib/processes/outboundTrackRemoved.js +0 -22
- package/lib/samples/ObservedCall.d.ts +0 -17
- package/lib/samples/ObservedCall.d.ts.map +0 -1
- package/lib/samples/ObservedCall.js +0 -29
- package/lib/samples/ObservedCalls.d.ts +0 -19
- package/lib/samples/ObservedCalls.d.ts.map +0 -1
- package/lib/samples/ObservedCalls.js +0 -113
- package/lib/samples/ObservedClient.d.ts +0 -28
- package/lib/samples/ObservedClient.d.ts.map +0 -1
- package/lib/samples/ObservedClient.js +0 -110
- package/lib/samples/ObservedInboundAudioTrack.d.ts +0 -17
- package/lib/samples/ObservedInboundAudioTrack.d.ts.map +0 -1
- package/lib/samples/ObservedInboundAudioTrack.js +0 -17
- package/lib/samples/ObservedInboundVideoTrack.d.ts +0 -17
- package/lib/samples/ObservedInboundVideoTrack.d.ts.map +0 -1
- package/lib/samples/ObservedInboundVideoTrack.js +0 -17
- package/lib/samples/ObservedOutboundAudioTrack.d.ts +0 -16
- package/lib/samples/ObservedOutboundAudioTrack.d.ts.map +0 -1
- package/lib/samples/ObservedOutboundAudioTrack.js +0 -17
- package/lib/samples/ObservedOutboundVideoTrack.d.ts +0 -16
- package/lib/samples/ObservedOutboundVideoTrack.d.ts.map +0 -1
- package/lib/samples/ObservedOutboundVideoTrack.js +0 -17
- package/lib/samples/ObservedPeerConnection.d.ts +0 -47
- package/lib/samples/ObservedPeerConnection.d.ts.map +0 -1
- package/lib/samples/ObservedPeerConnection.js +0 -130
- package/lib/samples/ObservedSfu.d.ts +0 -27
- package/lib/samples/ObservedSfu.d.ts.map +0 -1
- package/lib/samples/ObservedSfu.js +0 -65
- package/lib/samples/ObservedSfuInboundRtpPad.d.ts +0 -15
- package/lib/samples/ObservedSfuInboundRtpPad.d.ts.map +0 -1
- package/lib/samples/ObservedSfuInboundRtpPad.js +0 -17
- package/lib/samples/ObservedSfuOutboundRtpPad.d.ts +0 -15
- package/lib/samples/ObservedSfuOutboundRtpPad.d.ts.map +0 -1
- package/lib/samples/ObservedSfuOutboundRtpPad.js +0 -17
- package/lib/samples/ObservedSfuSctpChannel.d.ts +0 -15
- package/lib/samples/ObservedSfuSctpChannel.d.ts.map +0 -1
- package/lib/samples/ObservedSfuSctpChannel.js +0 -17
- package/lib/samples/ObservedSfuTransport.d.ts +0 -30
- package/lib/samples/ObservedSfuTransport.d.ts.map +0 -1
- package/lib/samples/ObservedSfuTransport.js +0 -86
- package/lib/samples/ObservedSfus.d.ts +0 -16
- package/lib/samples/ObservedSfus.d.ts.map +0 -1
- package/lib/samples/ObservedSfus.js +0 -72
- package/lib/sinks/ObserverSink.d.ts.map +0 -1
- package/lib/sinks/callEventReports.d.ts.map +0 -1
- package/lib/sources/ObservedCallSource.d.ts +0 -18
- package/lib/sources/ObservedCallSource.d.ts.map +0 -1
- package/lib/sources/ObservedCallSource.js +0 -2
- package/lib/sources/ObservedClientSource.d.ts +0 -19
- package/lib/sources/ObservedClientSource.d.ts.map +0 -1
- package/lib/sources/ObservedClientSource.js +0 -2
- package/lib/sources/ObservedSfuSource.d.ts +0 -15
- package/lib/sources/ObservedSfuSource.d.ts.map +0 -1
- package/lib/sources/ObservedSfuSource.js +0 -2
- package/lib/sources/Sources.d.ts +0 -49
- package/lib/sources/Sources.d.ts.map +0 -1
- package/lib/sources/Sources.js +0 -213
- package/src/Evaluator.ts +0 -229
- package/src/common/Semaphore.ts +0 -45
- package/src/entries/CallEntry.ts +0 -62
- package/src/entries/ClientEntry.ts +0 -106
- package/src/entries/InboundTrackEntry.ts +0 -74
- package/src/entries/OutboundTrackEntry.ts +0 -72
- package/src/entries/PeerConnectionEntry.ts +0 -133
- package/src/entries/SfuEntry.ts +0 -62
- package/src/entries/SfuInboundRtpPadEntry.ts +0 -46
- package/src/entries/SfuOutboundRtpPadEntry.ts +0 -44
- package/src/entries/SfuSctpChannelEntry.ts +0 -39
- package/src/entries/SfuTransportEntry.ts +0 -109
- package/src/evaluators/SetClientsCoordinateEvaluator.ts +0 -78
- package/src/middlewares/CallOperationsContext.ts +0 -56
- package/src/middlewares/CallProcessor.ts +0 -38
- package/src/middlewares/CommitTransactionMiddleware.ts +0 -328
- package/src/middlewares/DeleteOutdatedCallEntries.ts +0 -159
- package/src/middlewares/DeleteOutdatedSfuEntries.ts +0 -168
- package/src/middlewares/Middleware.ts +0 -10
- package/src/middlewares/Processor.ts +0 -59
- package/src/middlewares/TransactionContext.ts +0 -176
- package/src/middlewares/TransactoinProcessor.ts +0 -28
- package/src/middlewares/VisitObservedCallsMiddleware.ts +0 -172
- package/src/middlewares/VisitObservedSfusMiddleware.ts +0 -203
- package/src/middlewares/visitors/visitClient.ts +0 -239
- package/src/middlewares/visitors/visitInboundAudioTrack.ts +0 -113
- package/src/middlewares/visitors/visitInboundVideoTrack.ts +0 -117
- package/src/middlewares/visitors/visitOutboundAudioTrack.ts +0 -100
- package/src/middlewares/visitors/visitOutboundVideoTarck.ts +0 -102
- package/src/middlewares/visitors/visitPeerConnection.ts +0 -151
- package/src/middlewares/visitors/visitSfu.ts +0 -70
- package/src/middlewares/visitors/visitSfuInboundRtpPad.ts +0 -52
- package/src/middlewares/visitors/visitSfuOutboundRtpPad.ts +0 -53
- package/src/middlewares/visitors/visitSfuSctpChannel.ts +0 -50
- package/src/middlewares/visitors/visitSfuTransport.ts +0 -50
- package/src/processes/closePeerConnectionProcess.ts +0 -54
- package/src/processes/detachClientProcess.ts +0 -136
- package/src/processes/findRemoteMatches.ts +0 -104
- package/src/processes/inboundTrackRemoved.ts +0 -22
- package/src/processes/joinClientProcess.ts +0 -138
- package/src/processes/outboundTrackRemoved.ts +0 -22
- package/src/samples/ObservedCall.ts +0 -49
- package/src/samples/ObservedCalls.ts +0 -143
- package/src/samples/ObservedClient.ts +0 -172
- package/src/samples/ObservedInboundAudioTrack.ts +0 -35
- package/src/samples/ObservedInboundVideoTrack.ts +0 -36
- package/src/samples/ObservedOutboundAudioTrack.ts +0 -35
- package/src/samples/ObservedOutboundVideoTrack.ts +0 -35
- package/src/samples/ObservedPeerConnection.ts +0 -227
- package/src/samples/ObservedSfu.ts +0 -115
- package/src/samples/ObservedSfuInboundRtpPad.ts +0 -35
- package/src/samples/ObservedSfuOutboundRtpPad.ts +0 -35
- package/src/samples/ObservedSfuSctpChannel.ts +0 -35
- package/src/samples/ObservedSfuTransport.ts +0 -142
- package/src/samples/ObservedSfus.ts +0 -95
- package/src/sources/ObservedCallSource.ts +0 -26
- package/src/sources/ObservedClientSource.ts +0 -28
- package/src/sources/ObservedSfuSource.ts +0 -19
- package/src/sources/Sources.ts +0 -301
- /package/lib/{sinks → common}/callEventReports.d.ts +0 -0
- /package/lib/{sinks → common}/callEventReports.js +0 -0
- /package/src/{sinks → common}/callEventReports.ts +0 -0
|
@@ -1,90 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
-
}) : function(o, v) {
|
|
16
|
-
o["default"] = v;
|
|
17
|
-
});
|
|
18
|
-
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
-
if (mod && mod.__esModule) return mod;
|
|
20
|
-
var result = {};
|
|
21
|
-
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
-
__setModuleDefault(result, mod);
|
|
23
|
-
return result;
|
|
24
|
-
};
|
|
25
|
-
var __rest = (this && this.__rest) || function (s, e) {
|
|
26
|
-
var t = {};
|
|
27
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
28
|
-
t[p] = s[p];
|
|
29
|
-
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
30
|
-
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
31
|
-
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
32
|
-
t[p[i]] = s[p[i]];
|
|
33
|
-
}
|
|
34
|
-
return t;
|
|
35
|
-
};
|
|
36
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
37
|
-
exports.visitOutboundAudioTrack = void 0;
|
|
38
|
-
/* eslint-disable camelcase */
|
|
39
|
-
const Models = __importStar(require("../../models/Models"));
|
|
40
|
-
const VisitObservedCallsMiddleware_1 = require("../VisitObservedCallsMiddleware");
|
|
41
|
-
const samples_pb_1 = require("../../models/samples_pb");
|
|
42
|
-
function visitOutboundAudioTrack(observedOutboundAudioTrack, storedPeerConnection, storedOutboundTracks, reports, fetchSamples) {
|
|
43
|
-
const { trackId, sfuStreamId } = observedOutboundAudioTrack;
|
|
44
|
-
const { peerConnectionId } = observedOutboundAudioTrack.peerConnection;
|
|
45
|
-
const { mediaUnitId, clientId, userId, marker, minTimestamp: timestamp, } = observedOutboundAudioTrack.peerConnection.client;
|
|
46
|
-
const { serviceId, roomId, callId } = observedOutboundAudioTrack.peerConnection.client.call;
|
|
47
|
-
let storedOutboundAudioTrack = storedOutboundTracks.get(trackId);
|
|
48
|
-
if (!storedOutboundAudioTrack) {
|
|
49
|
-
storedOutboundAudioTrack = new Models.OutboundTrack({
|
|
50
|
-
serviceId,
|
|
51
|
-
roomId,
|
|
52
|
-
callId,
|
|
53
|
-
clientId,
|
|
54
|
-
kind: 'audio',
|
|
55
|
-
peerConnectionId,
|
|
56
|
-
mediaUnitId,
|
|
57
|
-
trackId,
|
|
58
|
-
sfuStreamId,
|
|
59
|
-
userId,
|
|
60
|
-
marker,
|
|
61
|
-
});
|
|
62
|
-
storedOutboundTracks.set(trackId, storedOutboundAudioTrack);
|
|
63
|
-
if (!storedPeerConnection.outboundTrackIds.find((tId) => tId === trackId)) {
|
|
64
|
-
storedPeerConnection.outboundTrackIds.push(trackId);
|
|
65
|
-
}
|
|
66
|
-
else {
|
|
67
|
-
VisitObservedCallsMiddleware_1.logger.warn(`Attempted to add trackId to storedPeerConnection twice. serviceId: ${serviceId}, callId: ${callId}, clientId: ${clientId}, pcId: ${peerConnectionId}`);
|
|
68
|
-
}
|
|
69
|
-
}
|
|
70
|
-
const statsMap = new Map();
|
|
71
|
-
for (const outboundAudioSample of observedOutboundAudioTrack.samples()) {
|
|
72
|
-
const report = Object.assign(Object.assign({ serviceId,
|
|
73
|
-
roomId,
|
|
74
|
-
callId,
|
|
75
|
-
clientId,
|
|
76
|
-
userId,
|
|
77
|
-
mediaUnitId,
|
|
78
|
-
peerConnectionId }, outboundAudioSample), { timestamp, sampleSeq: -1 });
|
|
79
|
-
reports.addOutboundAudioTrackReport(report);
|
|
80
|
-
if (fetchSamples) {
|
|
81
|
-
const { ssrc: sample_ssrc, bytesSent: sample_bytesSent, headerBytesSent: samples_headerBytesSent, retransmittedBytesSent: samples_retransmittedBytesSent, totalEncodedBytesTarget: samples_totalEncodedBytesTarget } = outboundAudioSample, sample = __rest(outboundAudioSample, ["ssrc", "bytesSent", "headerBytesSent", "retransmittedBytesSent", "totalEncodedBytesTarget"]);
|
|
82
|
-
const ssrc = BigInt(sample_ssrc);
|
|
83
|
-
const audioStats = new samples_pb_1.Samples_ClientSample_OutboundAudioTrack(Object.assign({ ssrc, bytesSent: BigInt(sample_bytesSent !== null && sample_bytesSent !== void 0 ? sample_bytesSent : -1), headerBytesSent: BigInt(samples_headerBytesSent !== null && samples_headerBytesSent !== void 0 ? samples_headerBytesSent : -1), retransmittedBytesSent: BigInt(samples_retransmittedBytesSent !== null && samples_retransmittedBytesSent !== void 0 ? samples_retransmittedBytesSent : -1), totalEncodedBytesTarget: BigInt(samples_totalEncodedBytesTarget !== null && samples_totalEncodedBytesTarget !== void 0 ? samples_totalEncodedBytesTarget : -1) }, sample));
|
|
84
|
-
statsMap.set(ssrc, audioStats);
|
|
85
|
-
}
|
|
86
|
-
}
|
|
87
|
-
storedOutboundAudioTrack.ssrc = [...statsMap.keys()];
|
|
88
|
-
storedOutboundAudioTrack.audioStats = Array.from(statsMap.values());
|
|
89
|
-
}
|
|
90
|
-
exports.visitOutboundAudioTrack = visitOutboundAudioTrack;
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import * as Models from '../../models/Models';
|
|
2
|
-
import { ReportsCollector } from '../../common/ReportsCollector';
|
|
3
|
-
import { ObservedOutboundVideoTrack } from '../../samples/ObservedOutboundVideoTrack';
|
|
4
|
-
export declare function visitOutboundVideoTrack(observedOutboundVideoTrack: ObservedOutboundVideoTrack, storedPeerConnection: Models.PeerConnection, storedOutboundTracks: Map<string, Models.OutboundTrack>, reports: ReportsCollector, fetchSamples: boolean): void;
|
|
5
|
-
//# sourceMappingURL=visitOutboundVideoTarck.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"visitOutboundVideoTarck.d.ts","sourceRoot":"","sources":["../../../src/middlewares/visitors/visitOutboundVideoTarck.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,MAAM,MAAM,qBAAqB,CAAC;AAC9C,OAAO,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AACjE,OAAO,EAAE,0BAA0B,EAAE,MAAM,0CAA0C,CAAC;AAKtF,wBAAgB,uBAAuB,CACtC,0BAA0B,EAAE,0BAA0B,EACtD,oBAAoB,EAAE,MAAM,CAAC,cAAc,EAC3C,oBAAoB,EAAE,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,aAAa,CAAC,EACvD,OAAO,EAAE,gBAAgB,EACzB,YAAY,EAAE,OAAO,QAwFrB"}
|
|
@@ -1,90 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
-
}) : function(o, v) {
|
|
16
|
-
o["default"] = v;
|
|
17
|
-
});
|
|
18
|
-
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
-
if (mod && mod.__esModule) return mod;
|
|
20
|
-
var result = {};
|
|
21
|
-
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
-
__setModuleDefault(result, mod);
|
|
23
|
-
return result;
|
|
24
|
-
};
|
|
25
|
-
var __rest = (this && this.__rest) || function (s, e) {
|
|
26
|
-
var t = {};
|
|
27
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
28
|
-
t[p] = s[p];
|
|
29
|
-
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
30
|
-
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
31
|
-
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
32
|
-
t[p[i]] = s[p[i]];
|
|
33
|
-
}
|
|
34
|
-
return t;
|
|
35
|
-
};
|
|
36
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
37
|
-
exports.visitOutboundVideoTrack = void 0;
|
|
38
|
-
/* eslint-disable camelcase */
|
|
39
|
-
const Models = __importStar(require("../../models/Models"));
|
|
40
|
-
const VisitObservedCallsMiddleware_1 = require("../VisitObservedCallsMiddleware");
|
|
41
|
-
const samples_pb_1 = require("../../models/samples_pb");
|
|
42
|
-
function visitOutboundVideoTrack(observedOutboundVideoTrack, storedPeerConnection, storedOutboundTracks, reports, fetchSamples) {
|
|
43
|
-
const { trackId, sfuStreamId } = observedOutboundVideoTrack;
|
|
44
|
-
const { peerConnectionId } = observedOutboundVideoTrack.peerConnection;
|
|
45
|
-
const { mediaUnitId, clientId, userId, marker, minTimestamp: timestamp, } = observedOutboundVideoTrack.peerConnection.client;
|
|
46
|
-
const { serviceId, roomId, callId } = observedOutboundVideoTrack.peerConnection.client.call;
|
|
47
|
-
let storedOutboundVideoTrack = storedOutboundTracks.get(trackId);
|
|
48
|
-
if (!storedOutboundVideoTrack) {
|
|
49
|
-
storedOutboundVideoTrack = new Models.OutboundTrack({
|
|
50
|
-
serviceId,
|
|
51
|
-
roomId,
|
|
52
|
-
callId,
|
|
53
|
-
clientId,
|
|
54
|
-
kind: 'video',
|
|
55
|
-
peerConnectionId,
|
|
56
|
-
mediaUnitId,
|
|
57
|
-
trackId,
|
|
58
|
-
sfuStreamId,
|
|
59
|
-
userId,
|
|
60
|
-
marker,
|
|
61
|
-
});
|
|
62
|
-
storedOutboundTracks.set(trackId, storedOutboundVideoTrack);
|
|
63
|
-
if (!storedPeerConnection.outboundTrackIds.find((tId) => tId === trackId)) {
|
|
64
|
-
storedPeerConnection.outboundTrackIds.push(trackId);
|
|
65
|
-
}
|
|
66
|
-
else {
|
|
67
|
-
VisitObservedCallsMiddleware_1.logger.warn(`Attempted to add trackId to storedPeerConnection twice. serviceId: ${serviceId}, callId: ${callId}, clientId: ${clientId}, pcId: ${peerConnectionId}`);
|
|
68
|
-
}
|
|
69
|
-
}
|
|
70
|
-
const statsMap = new Map();
|
|
71
|
-
for (const outboundVideoSample of observedOutboundVideoTrack.samples()) {
|
|
72
|
-
const report = Object.assign(Object.assign({ serviceId,
|
|
73
|
-
roomId,
|
|
74
|
-
callId,
|
|
75
|
-
clientId,
|
|
76
|
-
userId,
|
|
77
|
-
mediaUnitId,
|
|
78
|
-
peerConnectionId }, outboundVideoSample), { timestamp, sampleSeq: -1 });
|
|
79
|
-
reports.addOutboundVideoTrackReport(report);
|
|
80
|
-
if (fetchSamples) {
|
|
81
|
-
const { ssrc: sample_ssrc, bytesSent: sample_bytesSent, headerBytesSent: samples_headerBytesSent, qpSum: samples_qpSum, retransmittedBytesSent: samples_retransmittedBytesSent, totalEncodedBytesTarget: samples_totalEncodedBytesTarget } = outboundVideoSample, sample = __rest(outboundVideoSample, ["ssrc", "bytesSent", "headerBytesSent", "qpSum", "retransmittedBytesSent", "totalEncodedBytesTarget"]);
|
|
82
|
-
const ssrc = BigInt(sample_ssrc);
|
|
83
|
-
const videoStats = new samples_pb_1.Samples_ClientSample_OutboundVideoTrack(Object.assign({ ssrc, bytesSent: BigInt(sample_bytesSent !== null && sample_bytesSent !== void 0 ? sample_bytesSent : -1), headerBytesSent: BigInt(samples_headerBytesSent !== null && samples_headerBytesSent !== void 0 ? samples_headerBytesSent : -1), retransmittedBytesSent: BigInt(samples_retransmittedBytesSent !== null && samples_retransmittedBytesSent !== void 0 ? samples_retransmittedBytesSent : -1), totalEncodedBytesTarget: BigInt(samples_totalEncodedBytesTarget !== null && samples_totalEncodedBytesTarget !== void 0 ? samples_totalEncodedBytesTarget : -1), qpSum: BigInt(samples_qpSum !== null && samples_qpSum !== void 0 ? samples_qpSum : -1) }, sample));
|
|
84
|
-
statsMap.set(ssrc, videoStats);
|
|
85
|
-
}
|
|
86
|
-
}
|
|
87
|
-
storedOutboundVideoTrack.ssrc = [...statsMap.keys()];
|
|
88
|
-
storedOutboundVideoTrack.videoStats = Array.from(statsMap.values());
|
|
89
|
-
}
|
|
90
|
-
exports.visitOutboundVideoTrack = visitOutboundVideoTrack;
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import { ObservedPeerConnection } from '../../samples/ObservedPeerConnection';
|
|
2
|
-
import * as Models from '../../models/Models';
|
|
3
|
-
import { ReportsCollector } from '../../common/ReportsCollector';
|
|
4
|
-
export declare function visitPeerConnection(observedPeerConnection: ObservedPeerConnection, storedClient: Models.Client, storedPeerConnections: Map<string, Models.PeerConnection>, reports: ReportsCollector, fetchSamples: boolean): void;
|
|
5
|
-
//# sourceMappingURL=visitPeerConnection.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"visitPeerConnection.d.ts","sourceRoot":"","sources":["../../../src/middlewares/visitors/visitPeerConnection.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,sBAAsB,EAAE,MAAM,sCAAsC,CAAC;AAC9E,OAAO,KAAK,MAAM,MAAM,qBAAqB,CAAC;AAC9C,OAAO,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AAUjE,wBAAgB,mBAAmB,CAClC,sBAAsB,EAAE,sBAAsB,EAC9C,YAAY,EAAE,MAAM,CAAC,MAAM,EAC3B,qBAAqB,EAAE,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,cAAc,CAAC,EACzD,OAAO,EAAE,gBAAgB,EACzB,YAAY,EAAE,OAAO,QAoIrB"}
|
|
@@ -1,111 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
-
}) : function(o, v) {
|
|
16
|
-
o["default"] = v;
|
|
17
|
-
});
|
|
18
|
-
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
-
if (mod && mod.__esModule) return mod;
|
|
20
|
-
var result = {};
|
|
21
|
-
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
-
__setModuleDefault(result, mod);
|
|
23
|
-
return result;
|
|
24
|
-
};
|
|
25
|
-
var __rest = (this && this.__rest) || function (s, e) {
|
|
26
|
-
var t = {};
|
|
27
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
28
|
-
t[p] = s[p];
|
|
29
|
-
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
30
|
-
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
31
|
-
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
32
|
-
t[p[i]] = s[p[i]];
|
|
33
|
-
}
|
|
34
|
-
return t;
|
|
35
|
-
};
|
|
36
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
37
|
-
exports.visitPeerConnection = void 0;
|
|
38
|
-
const Models = __importStar(require("../../models/Models"));
|
|
39
|
-
const VisitObservedCallsMiddleware_1 = require("../VisitObservedCallsMiddleware");
|
|
40
|
-
const samples_pb_1 = require("../../models/samples_pb");
|
|
41
|
-
function visitPeerConnection(observedPeerConnection, storedClient, storedPeerConnections, reports, fetchSamples) {
|
|
42
|
-
const { peerConnectionLabel, peerConnectionId } = observedPeerConnection;
|
|
43
|
-
const { mediaUnitId, clientId, userId, marker, minTimestamp: timestamp } = observedPeerConnection.client;
|
|
44
|
-
const { serviceId, roomId, callId } = observedPeerConnection.client.call;
|
|
45
|
-
let storedPeerConnection = storedPeerConnections.get(peerConnectionId);
|
|
46
|
-
if (!storedPeerConnection) {
|
|
47
|
-
storedPeerConnection = new Models.PeerConnection({
|
|
48
|
-
serviceId,
|
|
49
|
-
roomId,
|
|
50
|
-
callId,
|
|
51
|
-
clientId,
|
|
52
|
-
peerConnectionId,
|
|
53
|
-
mediaUnitId,
|
|
54
|
-
// opened
|
|
55
|
-
userId,
|
|
56
|
-
marker,
|
|
57
|
-
label: peerConnectionLabel,
|
|
58
|
-
});
|
|
59
|
-
storedPeerConnections.set(peerConnectionId, storedPeerConnection);
|
|
60
|
-
if (!storedClient.peerConnectionIds.find((pcId) => pcId === peerConnectionId)) {
|
|
61
|
-
storedClient.peerConnectionIds.push(peerConnectionId);
|
|
62
|
-
}
|
|
63
|
-
else {
|
|
64
|
-
VisitObservedCallsMiddleware_1.logger.warn('');
|
|
65
|
-
}
|
|
66
|
-
}
|
|
67
|
-
for (const pcTransport of observedPeerConnection.transportSamples()) {
|
|
68
|
-
const report = Object.assign(Object.assign({ serviceId,
|
|
69
|
-
roomId,
|
|
70
|
-
callId,
|
|
71
|
-
clientId,
|
|
72
|
-
userId,
|
|
73
|
-
mediaUnitId }, pcTransport), { timestamp, sampleSeq: -1 });
|
|
74
|
-
reports.addPeerConnectionTransportReports(report);
|
|
75
|
-
}
|
|
76
|
-
for (const iceCandidatePair of observedPeerConnection.iceCandidatePairs()) {
|
|
77
|
-
const report = Object.assign(Object.assign({ serviceId,
|
|
78
|
-
roomId,
|
|
79
|
-
callId,
|
|
80
|
-
userId,
|
|
81
|
-
clientId,
|
|
82
|
-
mediaUnitId }, iceCandidatePair), { timestamp, sampleSeq: -1 });
|
|
83
|
-
reports.addIceCandidatePairReport(report);
|
|
84
|
-
}
|
|
85
|
-
if (!fetchSamples)
|
|
86
|
-
return;
|
|
87
|
-
// restricted area
|
|
88
|
-
storedPeerConnection.icelocalCandidates = [];
|
|
89
|
-
for (const iceLocalCandidate of observedPeerConnection.iceLocalCandidates()) {
|
|
90
|
-
const { priority } = iceLocalCandidate, sample = __rest(iceLocalCandidate, ["priority"]);
|
|
91
|
-
storedPeerConnection.icelocalCandidates.push(new samples_pb_1.Samples_ClientSample_IceLocalCandidate(Object.assign(Object.assign({}, sample), { priority: BigInt(priority !== null && priority !== void 0 ? priority : -1) })));
|
|
92
|
-
}
|
|
93
|
-
storedPeerConnection.iceRemoteCandidates = [];
|
|
94
|
-
for (const iceRemoteCandidate of observedPeerConnection.iceRemoteCandidates()) {
|
|
95
|
-
const { priority } = iceRemoteCandidate, sample = __rest(iceRemoteCandidate, ["priority"]);
|
|
96
|
-
storedPeerConnection.iceRemoteCandidates.push(new samples_pb_1.Samples_ClientSample_IceRemoteCandidate(Object.assign(Object.assign({}, sample), { priority: BigInt(priority !== null && priority !== void 0 ? priority : -1) })));
|
|
97
|
-
}
|
|
98
|
-
storedPeerConnection.iceCandidatePairs = [];
|
|
99
|
-
for (const iceCandidatePair of observedPeerConnection.iceCandidatePairs()) {
|
|
100
|
-
const { bytesDiscardedOnSend, bytesReceived, bytesSent, lastPacketReceivedTimestamp, lastPacketSentTimestamp } = iceCandidatePair, sample = __rest(iceCandidatePair, ["bytesDiscardedOnSend", "bytesReceived", "bytesSent", "lastPacketReceivedTimestamp", "lastPacketSentTimestamp"]);
|
|
101
|
-
storedPeerConnection.iceCandidatePairs.push(new samples_pb_1.Samples_ClientSample_IceCandidatePair(Object.assign(Object.assign({}, sample), { bytesDiscardedOnSend: BigInt(bytesDiscardedOnSend !== null && bytesDiscardedOnSend !== void 0 ? bytesDiscardedOnSend : -1), bytesReceived: BigInt(bytesReceived !== null && bytesReceived !== void 0 ? bytesReceived : -1), bytesSent: BigInt(bytesSent !== null && bytesSent !== void 0 ? bytesSent : -1), lastPacketReceivedTimestamp: BigInt(lastPacketReceivedTimestamp !== null && lastPacketReceivedTimestamp !== void 0 ? lastPacketReceivedTimestamp : -1), lastPacketSentTimestamp: BigInt(lastPacketSentTimestamp !== null && lastPacketSentTimestamp !== void 0 ? lastPacketSentTimestamp : -1) })));
|
|
102
|
-
}
|
|
103
|
-
storedPeerConnection.transports = [];
|
|
104
|
-
for (const pcTransport of observedPeerConnection.transportSamples()) {
|
|
105
|
-
const { bytesReceived, bytesSent } = pcTransport, sample = __rest(pcTransport, ["bytesReceived", "bytesSent"]);
|
|
106
|
-
storedPeerConnection.transports.push(new samples_pb_1.Samples_ClientSample_PeerConnectionTransport(Object.assign(Object.assign({}, sample), { bytesReceived: BigInt(bytesReceived !== null && bytesReceived !== void 0 ? bytesReceived : -1), bytesSent: BigInt(bytesSent !== null && bytesSent !== void 0 ? bytesSent : -1) })));
|
|
107
|
-
}
|
|
108
|
-
// storedPeerConnection.stats = new Models.PeerConnectionStats({
|
|
109
|
-
// });
|
|
110
|
-
}
|
|
111
|
-
exports.visitPeerConnection = visitPeerConnection;
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import * as Models from '../../models/Models';
|
|
2
|
-
import { ReportsCollector } from '../../common/ReportsCollector';
|
|
3
|
-
import { ObservedSfu } from '../../samples/ObservedSfu';
|
|
4
|
-
export declare function visitSfu(observedSfu: ObservedSfu, storedSfus: Map<string, Models.Sfu>, reports: ReportsCollector, fetchSamples: boolean): void;
|
|
5
|
-
//# sourceMappingURL=visitSfu.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"visitSfu.d.ts","sourceRoot":"","sources":["../../../src/middlewares/visitors/visitSfu.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,MAAM,qBAAqB,CAAC;AAC9C,OAAO,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AACjE,OAAO,EAAE,WAAW,EAAE,MAAM,2BAA2B,CAAC;AAExD,wBAAgB,QAAQ,CACvB,WAAW,EAAE,WAAW,EACxB,UAAU,EAAE,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,CAAC,EACnC,OAAO,EAAE,gBAAgB,EACzB,YAAY,EAAE,OAAO,QA6DrB"}
|
|
@@ -1,78 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
-
}) : function(o, v) {
|
|
16
|
-
o["default"] = v;
|
|
17
|
-
});
|
|
18
|
-
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
-
if (mod && mod.__esModule) return mod;
|
|
20
|
-
var result = {};
|
|
21
|
-
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
-
__setModuleDefault(result, mod);
|
|
23
|
-
return result;
|
|
24
|
-
};
|
|
25
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
|
-
exports.visitSfu = void 0;
|
|
27
|
-
const Models = __importStar(require("../../models/Models"));
|
|
28
|
-
function visitSfu(observedSfu, storedSfus, reports, fetchSamples) {
|
|
29
|
-
const { mediaUnitId, serviceId, sfuId, timeZoneId, marker } = observedSfu;
|
|
30
|
-
let storedSfu = storedSfus.get(sfuId);
|
|
31
|
-
if (!storedSfu) {
|
|
32
|
-
const timestamp = Date.now();
|
|
33
|
-
storedSfu = new Models.Sfu({
|
|
34
|
-
serviceId,
|
|
35
|
-
sfuId,
|
|
36
|
-
joined: BigInt(timestamp),
|
|
37
|
-
mediaUnitId,
|
|
38
|
-
timeZoneId,
|
|
39
|
-
marker,
|
|
40
|
-
sfuTransportIds: [],
|
|
41
|
-
});
|
|
42
|
-
storedSfus.set(sfuId, storedSfu);
|
|
43
|
-
reports.addSfuEventReport({
|
|
44
|
-
serviceId,
|
|
45
|
-
mediaUnitId,
|
|
46
|
-
name: 'SFU_JOINED',
|
|
47
|
-
sfuId,
|
|
48
|
-
timestamp,
|
|
49
|
-
marker,
|
|
50
|
-
message: 'SFU is joined',
|
|
51
|
-
});
|
|
52
|
-
}
|
|
53
|
-
for (const sfuSample of observedSfu.samples()) {
|
|
54
|
-
if (sfuSample.customSfuEvents) {
|
|
55
|
-
for (const sfuEvent of sfuSample.customSfuEvents) {
|
|
56
|
-
reports.addSfuEventReport(Object.assign({ serviceId,
|
|
57
|
-
mediaUnitId,
|
|
58
|
-
sfuId, timestamp: Date.now() }, sfuEvent));
|
|
59
|
-
}
|
|
60
|
-
}
|
|
61
|
-
if (sfuSample.extensionStats) {
|
|
62
|
-
for (const extensionStats of sfuSample.extensionStats) {
|
|
63
|
-
reports.addSfuExtensionReport({
|
|
64
|
-
serviceId,
|
|
65
|
-
mediaUnitId,
|
|
66
|
-
sfuId,
|
|
67
|
-
timestamp: Date.now(),
|
|
68
|
-
payload: extensionStats.payload,
|
|
69
|
-
extensionType: extensionStats.type,
|
|
70
|
-
});
|
|
71
|
-
}
|
|
72
|
-
}
|
|
73
|
-
if (fetchSamples) {
|
|
74
|
-
// empty
|
|
75
|
-
}
|
|
76
|
-
}
|
|
77
|
-
}
|
|
78
|
-
exports.visitSfu = visitSfu;
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import * as Models from '../../models/Models';
|
|
2
|
-
import { ReportsCollector } from '../../common/ReportsCollector';
|
|
3
|
-
import { ObservedSfuInboundRtpPad } from '../../samples/ObservedSfuInboundRtpPad';
|
|
4
|
-
export declare function visitSfuInboundRtpPad(observedSfuInboundRtpPad: ObservedSfuInboundRtpPad, storedSfuTransport: Models.SfuTransport, storedSfuInboundRtpPads: Map<string, Models.SfuInboundRtpPad>, reports: ReportsCollector, fetchSamples: boolean): void;
|
|
5
|
-
//# sourceMappingURL=visitSfuInboundRtpPad.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"visitSfuInboundRtpPad.d.ts","sourceRoot":"","sources":["../../../src/middlewares/visitors/visitSfuInboundRtpPad.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,MAAM,qBAAqB,CAAC;AAC9C,OAAO,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AAEjE,OAAO,EAAE,wBAAwB,EAAE,MAAM,wCAAwC,CAAC;AAElF,wBAAgB,qBAAqB,CACpC,wBAAwB,EAAE,wBAAwB,EAClD,kBAAkB,EAAE,MAAM,CAAC,YAAY,EACvC,uBAAuB,EAAE,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,gBAAgB,CAAC,EAC7D,OAAO,EAAE,gBAAgB,EACzB,YAAY,EAAE,OAAO,QAyCrB"}
|
|
@@ -1,56 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
-
}) : function(o, v) {
|
|
16
|
-
o["default"] = v;
|
|
17
|
-
});
|
|
18
|
-
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
-
if (mod && mod.__esModule) return mod;
|
|
20
|
-
var result = {};
|
|
21
|
-
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
-
__setModuleDefault(result, mod);
|
|
23
|
-
return result;
|
|
24
|
-
};
|
|
25
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
|
-
exports.visitSfuInboundRtpPad = void 0;
|
|
27
|
-
const Models = __importStar(require("../../models/Models"));
|
|
28
|
-
function visitSfuInboundRtpPad(observedSfuInboundRtpPad, storedSfuTransport, storedSfuInboundRtpPads, reports, fetchSamples) {
|
|
29
|
-
const { padId: rtpPadId } = observedSfuInboundRtpPad;
|
|
30
|
-
const { transportId: sfuTransportId } = observedSfuInboundRtpPad.sfuTransport;
|
|
31
|
-
const { serviceId, sfuId, mediaUnitId, marker, minTimestamp: timestamp } = observedSfuInboundRtpPad.sfuTransport.sfu;
|
|
32
|
-
let storedSfuInboundRtpPad = storedSfuInboundRtpPads.get(rtpPadId);
|
|
33
|
-
if (!storedSfuInboundRtpPad) {
|
|
34
|
-
storedSfuInboundRtpPad = new Models.SfuInboundRtpPad({
|
|
35
|
-
serviceId,
|
|
36
|
-
sfuId,
|
|
37
|
-
mediaUnitId,
|
|
38
|
-
sfuTransportId,
|
|
39
|
-
added: BigInt(Date.now()),
|
|
40
|
-
marker,
|
|
41
|
-
});
|
|
42
|
-
storedSfuInboundRtpPads.set(rtpPadId, storedSfuInboundRtpPad);
|
|
43
|
-
storedSfuTransport.inboundRtpPadIds.push(rtpPadId);
|
|
44
|
-
}
|
|
45
|
-
for (const sfuInboundRtpPad of observedSfuInboundRtpPad.samples()) {
|
|
46
|
-
const report = Object.assign(Object.assign({ serviceId,
|
|
47
|
-
sfuId,
|
|
48
|
-
mediaUnitId,
|
|
49
|
-
rtpPadId }, sfuInboundRtpPad), { sfuStreamId: sfuInboundRtpPad.streamId, timestamp });
|
|
50
|
-
reports.addSfuTransportReport(report);
|
|
51
|
-
}
|
|
52
|
-
if (fetchSamples) {
|
|
53
|
-
// empty
|
|
54
|
-
}
|
|
55
|
-
}
|
|
56
|
-
exports.visitSfuInboundRtpPad = visitSfuInboundRtpPad;
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import * as Models from '../../models/Models';
|
|
2
|
-
import { ReportsCollector } from '../../common/ReportsCollector';
|
|
3
|
-
import { ObservedSfuOutboundRtpPad } from '../../samples/ObservedSfuOutboundRtpPad';
|
|
4
|
-
export declare function visitSfuOutboundRtpPad(observedSfuOutboundRtpPad: ObservedSfuOutboundRtpPad, storedSfuTransport: Models.SfuTransport, storedSfuOutboundRtpPads: Map<string, Models.SfuOutboundRtpPad>, reports: ReportsCollector, fetchSamples: boolean): void;
|
|
5
|
-
//# sourceMappingURL=visitSfuOutboundRtpPad.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"visitSfuOutboundRtpPad.d.ts","sourceRoot":"","sources":["../../../src/middlewares/visitors/visitSfuOutboundRtpPad.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,MAAM,qBAAqB,CAAC;AAC9C,OAAO,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AAEjE,OAAO,EAAE,yBAAyB,EAAE,MAAM,yCAAyC,CAAC;AAEpF,wBAAgB,sBAAsB,CACrC,yBAAyB,EAAE,yBAAyB,EACpD,kBAAkB,EAAE,MAAM,CAAC,YAAY,EACvC,wBAAwB,EAAE,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,iBAAiB,CAAC,EAC/D,OAAO,EAAE,gBAAgB,EACzB,YAAY,EAAE,OAAO,QA0CrB"}
|
|
@@ -1,56 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
-
}) : function(o, v) {
|
|
16
|
-
o["default"] = v;
|
|
17
|
-
});
|
|
18
|
-
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
-
if (mod && mod.__esModule) return mod;
|
|
20
|
-
var result = {};
|
|
21
|
-
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
-
__setModuleDefault(result, mod);
|
|
23
|
-
return result;
|
|
24
|
-
};
|
|
25
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
|
-
exports.visitSfuOutboundRtpPad = void 0;
|
|
27
|
-
const Models = __importStar(require("../../models/Models"));
|
|
28
|
-
function visitSfuOutboundRtpPad(observedSfuOutboundRtpPad, storedSfuTransport, storedSfuOutboundRtpPads, reports, fetchSamples) {
|
|
29
|
-
const { padId: rtpPadId } = observedSfuOutboundRtpPad;
|
|
30
|
-
const { transportId: sfuTransportId } = observedSfuOutboundRtpPad.sfuTransport;
|
|
31
|
-
const { serviceId, sfuId, mediaUnitId, marker, minTimestamp: timestamp } = observedSfuOutboundRtpPad.sfuTransport.sfu;
|
|
32
|
-
let storedSfuOutboundRtpPad = storedSfuOutboundRtpPads.get(rtpPadId);
|
|
33
|
-
if (!storedSfuOutboundRtpPad) {
|
|
34
|
-
storedSfuOutboundRtpPad = new Models.SfuOutboundRtpPad({
|
|
35
|
-
serviceId,
|
|
36
|
-
sfuId,
|
|
37
|
-
mediaUnitId,
|
|
38
|
-
sfuTransportId,
|
|
39
|
-
added: BigInt(Date.now()),
|
|
40
|
-
marker,
|
|
41
|
-
});
|
|
42
|
-
storedSfuOutboundRtpPads.set(rtpPadId, storedSfuOutboundRtpPad);
|
|
43
|
-
storedSfuTransport.outboundRtpPadIds.push(rtpPadId);
|
|
44
|
-
}
|
|
45
|
-
for (const sfuOutboundRtpPad of observedSfuOutboundRtpPad.samples()) {
|
|
46
|
-
const report = Object.assign(Object.assign({ serviceId,
|
|
47
|
-
sfuId,
|
|
48
|
-
mediaUnitId,
|
|
49
|
-
rtpPadId }, sfuOutboundRtpPad), { sfuStreamId: sfuOutboundRtpPad.streamId, sfuSinkId: sfuOutboundRtpPad.sinkId, timestamp });
|
|
50
|
-
reports.addSfuTransportReport(report);
|
|
51
|
-
}
|
|
52
|
-
if (fetchSamples) {
|
|
53
|
-
// empty
|
|
54
|
-
}
|
|
55
|
-
}
|
|
56
|
-
exports.visitSfuOutboundRtpPad = visitSfuOutboundRtpPad;
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import * as Models from '../../models/Models';
|
|
2
|
-
import { ReportsCollector } from '../../common/ReportsCollector';
|
|
3
|
-
import { ObservedSfuSctpChannel } from '../../samples/ObservedSfuSctpChannel';
|
|
4
|
-
export declare function visitSfuSctpChannel(observedSfuSctpChannel: ObservedSfuSctpChannel, storedSfuTransport: Models.SfuTransport, storedSfuSctpChannels: Map<string, Models.SfuSctpChannel>, reports: ReportsCollector, fetchSamples: boolean): void;
|
|
5
|
-
//# sourceMappingURL=visitSfuSctpChannel.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"visitSfuSctpChannel.d.ts","sourceRoot":"","sources":["../../../src/middlewares/visitors/visitSfuSctpChannel.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,MAAM,qBAAqB,CAAC;AAC9C,OAAO,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AAEjE,OAAO,EAAE,sBAAsB,EAAE,MAAM,sCAAsC,CAAC;AAE9E,wBAAgB,mBAAmB,CAClC,sBAAsB,EAAE,sBAAsB,EAC9C,kBAAkB,EAAE,MAAM,CAAC,YAAY,EACvC,qBAAqB,EAAE,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,cAAc,CAAC,EACzD,OAAO,EAAE,gBAAgB,EACzB,YAAY,EAAE,OAAO,QAuCrB"}
|
|
@@ -1,55 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
-
}) : function(o, v) {
|
|
16
|
-
o["default"] = v;
|
|
17
|
-
});
|
|
18
|
-
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
-
if (mod && mod.__esModule) return mod;
|
|
20
|
-
var result = {};
|
|
21
|
-
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
-
__setModuleDefault(result, mod);
|
|
23
|
-
return result;
|
|
24
|
-
};
|
|
25
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
|
-
exports.visitSfuSctpChannel = void 0;
|
|
27
|
-
const Models = __importStar(require("../../models/Models"));
|
|
28
|
-
function visitSfuSctpChannel(observedSfuSctpChannel, storedSfuTransport, storedSfuSctpChannels, reports, fetchSamples) {
|
|
29
|
-
const { channelId } = observedSfuSctpChannel;
|
|
30
|
-
const { transportId: sfuTransportId } = observedSfuSctpChannel.sfuTransport;
|
|
31
|
-
const { serviceId, sfuId, mediaUnitId, marker, minTimestamp: timestamp } = observedSfuSctpChannel.sfuTransport.sfu;
|
|
32
|
-
let storedSfuSctpChannel = storedSfuSctpChannels.get(channelId);
|
|
33
|
-
if (!storedSfuSctpChannel) {
|
|
34
|
-
storedSfuSctpChannel = new Models.SfuSctpChannel({
|
|
35
|
-
serviceId,
|
|
36
|
-
sfuId,
|
|
37
|
-
mediaUnitId,
|
|
38
|
-
sfuTransportId,
|
|
39
|
-
opened: BigInt(Date.now()),
|
|
40
|
-
marker,
|
|
41
|
-
});
|
|
42
|
-
storedSfuSctpChannels.set(channelId, storedSfuSctpChannel);
|
|
43
|
-
storedSfuTransport.sctpChannelIds.push(channelId);
|
|
44
|
-
}
|
|
45
|
-
for (const sfuSctpChannel of observedSfuSctpChannel.samples()) {
|
|
46
|
-
const report = Object.assign(Object.assign({ serviceId,
|
|
47
|
-
sfuId,
|
|
48
|
-
mediaUnitId }, sfuSctpChannel), { timestamp });
|
|
49
|
-
reports.addSfuTransportReport(report);
|
|
50
|
-
}
|
|
51
|
-
if (fetchSamples) {
|
|
52
|
-
// empty
|
|
53
|
-
}
|
|
54
|
-
}
|
|
55
|
-
exports.visitSfuSctpChannel = visitSfuSctpChannel;
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import * as Models from '../../models/Models';
|
|
2
|
-
import { ReportsCollector } from '../../common/ReportsCollector';
|
|
3
|
-
import { ObservedSfuTransport } from '../../samples/ObservedSfuTransport';
|
|
4
|
-
export declare function visitSfuTransport(observedSfuTransport: ObservedSfuTransport, storedSfu: Models.Sfu, storedSfuTransports: Map<string, Models.SfuTransport>, reports: ReportsCollector, fetchSamples: boolean): void;
|
|
5
|
-
//# sourceMappingURL=visitSfuTransport.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"visitSfuTransport.d.ts","sourceRoot":"","sources":["../../../src/middlewares/visitors/visitSfuTransport.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,MAAM,qBAAqB,CAAC;AAC9C,OAAO,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AAEjE,OAAO,EAAE,oBAAoB,EAAE,MAAM,oCAAoC,CAAC;AAE1E,wBAAgB,iBAAiB,CAChC,oBAAoB,EAAE,oBAAoB,EAC1C,SAAS,EAAE,MAAM,CAAC,GAAG,EACrB,mBAAmB,EAAE,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,YAAY,CAAC,EACrD,OAAO,EAAE,gBAAgB,EACzB,YAAY,EAAE,OAAO,QAuCrB"}
|