@observertc/observer-js 0.9.10-beta → 0.9.12-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/Evaluator.d.ts +2 -0
- package/lib/Evaluator.d.ts.map +1 -1
- package/lib/Evaluator.js +2 -4
- package/lib/Observer.d.ts.map +1 -1
- package/lib/Observer.js +1 -0
- package/lib/common/callMetaReports.d.ts +1 -1
- package/lib/common/callMetaReports.d.ts.map +1 -1
- package/lib/common/callMetaReports.js +2 -1
- package/lib/common/utils.d.ts +1 -0
- package/lib/common/utils.d.ts.map +1 -1
- package/lib/common/utils.js +12 -0
- package/lib/middlewares/DeleteOutdatedCallEntries.d.ts +6 -0
- package/lib/middlewares/DeleteOutdatedCallEntries.d.ts.map +1 -0
- package/lib/middlewares/DeleteOutdatedCallEntries.js +112 -0
- package/lib/middlewares/DeleteOutdatedSfuEntries.d.ts +6 -0
- package/lib/middlewares/DeleteOutdatedSfuEntries.d.ts.map +1 -0
- package/lib/middlewares/DeleteOutdatedSfuEntries.js +118 -0
- package/lib/middlewares/TransactionContext.d.ts.map +1 -1
- package/lib/middlewares/TransactionContext.js +42 -26
- package/lib/middlewares/TransactoinProcessor.d.ts +1 -1
- package/lib/middlewares/TransactoinProcessor.d.ts.map +1 -1
- package/lib/middlewares/TransactoinProcessor.js +4 -2
- package/lib/middlewares/VisitObservedCallsMiddleware.d.ts +2 -1
- package/lib/middlewares/VisitObservedCallsMiddleware.d.ts.map +1 -1
- package/lib/middlewares/VisitObservedCallsMiddleware.js +20 -90
- package/lib/middlewares/visitors/visitClient.d.ts.map +1 -1
- package/lib/middlewares/visitors/visitClient.js +26 -17
- package/lib/middlewares/visitors/visitInboundAudioTrack.d.ts +1 -1
- package/lib/middlewares/visitors/visitInboundAudioTrack.d.ts.map +1 -1
- package/lib/middlewares/visitors/visitInboundAudioTrack.js +10 -2
- package/lib/middlewares/visitors/visitInboundVideoTrack.d.ts +1 -1
- package/lib/middlewares/visitors/visitInboundVideoTrack.d.ts.map +1 -1
- package/lib/middlewares/visitors/visitInboundVideoTrack.js +10 -2
- package/lib/middlewares/visitors/visitOutboundAudioTrack.d.ts.map +1 -1
- package/lib/middlewares/visitors/visitOutboundAudioTrack.js +5 -1
- package/lib/middlewares/visitors/visitOutboundVideoTarck.d.ts.map +1 -1
- package/lib/middlewares/visitors/visitOutboundVideoTarck.js +5 -1
- package/lib/middlewares/visitors/visitPeerConnection.d.ts.map +1 -1
- package/lib/middlewares/visitors/visitPeerConnection.js +15 -0
- package/lib/models/Models.d.ts +26 -22
- package/lib/models/Models.d.ts.map +1 -1
- package/lib/models/Models.js +16 -11
- package/lib/processes/findRemoteMatches.d.ts +9 -0
- package/lib/processes/findRemoteMatches.d.ts.map +1 -0
- package/lib/processes/findRemoteMatches.js +83 -0
- package/lib/processes/joinClientProcess.d.ts.map +1 -1
- package/lib/processes/joinClientProcess.js +1 -2
- package/lib/samples/ObservedCalls.d.ts.map +1 -1
- package/lib/samples/ObservedCalls.js +16 -7
- package/lib/samples/ObservedInboundAudioTrack.d.ts +2 -0
- package/lib/samples/ObservedInboundAudioTrack.d.ts.map +1 -1
- package/lib/samples/ObservedInboundVideoTrack.d.ts +2 -0
- package/lib/samples/ObservedInboundVideoTrack.d.ts.map +1 -1
- package/lib/samples/ObservedOutboundAudioTrack.d.ts +1 -0
- package/lib/samples/ObservedOutboundAudioTrack.d.ts.map +1 -1
- package/lib/samples/ObservedOutboundVideoTrack.d.ts +1 -0
- package/lib/samples/ObservedOutboundVideoTrack.d.ts.map +1 -1
- package/lib/samples/ObservedPeerConnection.d.ts.map +1 -1
- package/lib/samples/ObservedPeerConnection.js +15 -8
- package/lib/samples/ObservedSfus.d.ts.map +1 -1
- package/lib/samples/ObservedSfus.js +10 -4
- package/lib/storages/ObserverStorage.d.ts +4 -0
- package/lib/storages/ObserverStorage.d.ts.map +1 -1
- package/lib/storages/SimpleStorage.d.ts +1 -0
- package/lib/storages/SimpleStorage.d.ts.map +1 -1
- package/lib/storages/SimpleStorage.js +3 -0
- package/package.json +1 -1
- package/src/Evaluator.ts +7 -6
- package/src/Observer.ts +1 -0
- package/src/common/callMetaReports.ts +2 -0
- package/src/common/utils.ts +11 -0
- package/src/middlewares/DeleteOutdatedCallEntries.ts +151 -0
- package/src/middlewares/DeleteOutdatedSfuEntries.ts +159 -0
- package/src/middlewares/TransactionContext.ts +61 -29
- package/src/middlewares/TransactoinProcessor.ts +8 -2
- package/src/middlewares/VisitObservedCallsMiddleware.ts +42 -128
- package/src/middlewares/visitors/visitClient.ts +34 -18
- package/src/middlewares/visitors/visitInboundAudioTrack.ts +15 -5
- package/src/middlewares/visitors/visitInboundVideoTrack.ts +14 -2
- package/src/middlewares/visitors/visitOutboundAudioTrack.ts +6 -2
- package/src/middlewares/visitors/visitOutboundVideoTarck.ts +5 -1
- package/src/middlewares/visitors/visitPeerConnection.ts +17 -1
- package/src/models/Models.ts +40 -34
- package/src/processes/findRemoteMatches.ts +94 -0
- package/src/processes/joinClientProcess.ts +1 -3
- package/src/samples/ObservedCalls.ts +17 -7
- package/src/samples/ObservedInboundAudioTrack.ts +2 -0
- package/src/samples/ObservedInboundVideoTrack.ts +3 -1
- package/src/samples/ObservedOutboundAudioTrack.ts +2 -1
- package/src/samples/ObservedOutboundVideoTrack.ts +2 -1
- package/src/samples/ObservedPeerConnection.ts +29 -8
- package/src/samples/ObservedSfus.ts +10 -5
- package/src/storages/ObserverStorage.ts +5 -0
- package/src/storages/SimpleStorage.ts +4 -0
|
@@ -7,21 +7,31 @@ const logger_1 = require("../common/logger");
|
|
|
7
7
|
const visitInboundAudioTrack_1 = require("./visitors/visitInboundAudioTrack");
|
|
8
8
|
const visitOutboundAudioTrack_1 = require("./visitors/visitOutboundAudioTrack");
|
|
9
9
|
const visitOutboundVideoTarck_1 = require("./visitors/visitOutboundVideoTarck");
|
|
10
|
+
const visitInboundVideoTrack_1 = require("./visitors/visitInboundVideoTrack");
|
|
11
|
+
const findRemoteMatches_1 = require("../processes/findRemoteMatches");
|
|
10
12
|
exports.logger = (0, logger_1.createLogger)('VisitObservedCallsMiddleware');
|
|
11
|
-
|
|
13
|
+
const emptyMap = new Map();
|
|
14
|
+
function createVisitObservedCallsMiddleware(storages, reports, fetchSamples, findRemoteMatches) {
|
|
12
15
|
const process = async (transaction) => {
|
|
13
|
-
|
|
16
|
+
var _a, _b, _c, _d;
|
|
17
|
+
const { observedCalls, clients, updatedPeerConnections, updatedInboundAudioTracks, updatedInboundVideoTracks, updatedOutboundAudioTracks, updatedOutboundVideoTracks, } = transaction;
|
|
14
18
|
const visitedPeerConnectionIds = new Set();
|
|
15
19
|
const visitedInboundAudioTrackIds = new Set();
|
|
16
20
|
const visitedInboundVideoTrackIds = new Set();
|
|
17
21
|
const visitedOutboundAudioTrackIds = new Set();
|
|
18
22
|
const visitedOutboundVideoTrackIds = new Set();
|
|
23
|
+
const { remoteTrackIds, remotePeerConnectionIds, remoteClientIds } = !findRemoteMatches ? {
|
|
24
|
+
remoteTrackIds: emptyMap,
|
|
25
|
+
remotePeerConnectionIds: emptyMap,
|
|
26
|
+
remoteClientIds: emptyMap,
|
|
27
|
+
} : await (0, findRemoteMatches_1.findRemoteMatches)(storages, clients, new Map([...updatedInboundAudioTracks, ...updatedInboundVideoTracks]));
|
|
28
|
+
const now = BigInt(Date.now());
|
|
29
|
+
const fakeTouched = { touched: BigInt(0) };
|
|
19
30
|
for (const observedCall of observedCalls.observedCalls()) {
|
|
20
31
|
const { callId, serviceId, roomId } = observedCall;
|
|
21
32
|
for (const observedClient of observedCall.observedClients()) {
|
|
22
33
|
const { clientId } = observedClient;
|
|
23
34
|
const storedClient = clients.get(clientId);
|
|
24
|
-
// console.warn("dskfjhdkfhsdkf", observedClient, storedClient);
|
|
25
35
|
if (!storedClient) {
|
|
26
36
|
// should not happen as client joined must have run before this
|
|
27
37
|
exports.logger.warn('Client has not been registered');
|
|
@@ -37,115 +47,35 @@ function createVisitObservedCallsMiddleware(reports, fetchSamples) {
|
|
|
37
47
|
exports.logger.warn(`PeerConnection ${peerConnectionId} has not been registered for client: ${clientId}, call ${callId}, room: ${roomId}, service: ${serviceId}`);
|
|
38
48
|
continue;
|
|
39
49
|
}
|
|
50
|
+
storedPeerConnection.touched = now;
|
|
40
51
|
visitedPeerConnectionIds.add(peerConnectionId);
|
|
41
52
|
for (const observedInboundAudioTrack of observedPeerConnection.inboundAudioTracks()) {
|
|
42
53
|
const { trackId } = observedInboundAudioTrack;
|
|
43
|
-
(0, visitInboundAudioTrack_1.visitInboundAudioTrack)(observedInboundAudioTrack, storedPeerConnection, updatedInboundAudioTracks, reports, fetchSamples);
|
|
54
|
+
(0, visitInboundAudioTrack_1.visitInboundAudioTrack)(observedInboundAudioTrack, storedPeerConnection, updatedInboundAudioTracks, reports, fetchSamples, remoteTrackIds.get(trackId), remotePeerConnectionIds.get(trackId), remoteClientIds.get(trackId));
|
|
44
55
|
visitedInboundAudioTrackIds.add(trackId);
|
|
56
|
+
((_a = updatedInboundAudioTracks.get(trackId)) !== null && _a !== void 0 ? _a : fakeTouched).touched = now;
|
|
45
57
|
}
|
|
46
58
|
for (const observedInboundVideoTrack of observedPeerConnection.inboundVideoTracks()) {
|
|
47
59
|
const { trackId } = observedInboundVideoTrack;
|
|
48
|
-
(0,
|
|
60
|
+
(0, visitInboundVideoTrack_1.visitInboundVideoTrack)(observedInboundVideoTrack, storedPeerConnection, updatedInboundVideoTracks, reports, fetchSamples, remoteTrackIds.get(trackId), remotePeerConnectionIds.get(trackId), remoteClientIds.get(trackId));
|
|
49
61
|
visitedInboundVideoTrackIds.add(trackId);
|
|
62
|
+
((_b = updatedInboundVideoTracks.get(trackId)) !== null && _b !== void 0 ? _b : fakeTouched).touched = now;
|
|
50
63
|
}
|
|
51
64
|
for (const observedOutboundAudioTrack of observedPeerConnection.outboundAudioTracks()) {
|
|
52
65
|
const { trackId } = observedOutboundAudioTrack;
|
|
53
66
|
(0, visitOutboundAudioTrack_1.visitOutboundAudioTrack)(observedOutboundAudioTrack, storedPeerConnection, updatedOutboundAudioTracks, reports, fetchSamples);
|
|
54
67
|
visitedOutboundAudioTrackIds.add(trackId);
|
|
68
|
+
((_c = updatedOutboundAudioTracks.get(trackId)) !== null && _c !== void 0 ? _c : fakeTouched).touched = now;
|
|
55
69
|
}
|
|
56
70
|
for (const observedOutboundVideoTrack of observedPeerConnection.outboundVideoTracks()) {
|
|
57
71
|
const { trackId } = observedOutboundVideoTrack;
|
|
58
72
|
(0, visitOutboundVideoTarck_1.visitOutboundVideoTrack)(observedOutboundVideoTrack, storedPeerConnection, updatedOutboundVideoTracks, reports, fetchSamples);
|
|
59
73
|
visitedOutboundVideoTrackIds.add(trackId);
|
|
74
|
+
((_d = updatedOutboundVideoTracks.get(trackId)) !== null && _d !== void 0 ? _d : fakeTouched).touched = now;
|
|
60
75
|
}
|
|
61
76
|
}
|
|
62
77
|
}
|
|
63
78
|
}
|
|
64
|
-
for (const [peerConnectionId, peerConnection] of Array.from(updatedPeerConnections.entries())) {
|
|
65
|
-
if (visitedPeerConnectionIds.has(peerConnectionId)) {
|
|
66
|
-
continue;
|
|
67
|
-
}
|
|
68
|
-
// delete PeerConnection
|
|
69
|
-
const { serviceId, callId, clientId } = peerConnection;
|
|
70
|
-
if (!serviceId || !callId || !clientId) {
|
|
71
|
-
continue;
|
|
72
|
-
}
|
|
73
|
-
const storedClient = clients.get(clientId);
|
|
74
|
-
updatedPeerConnections.delete(peerConnectionId);
|
|
75
|
-
deletedPeerConnections.add(peerConnectionId);
|
|
76
|
-
// also update the client model
|
|
77
|
-
if (storedClient) {
|
|
78
|
-
storedClient.peerConnectionIds = storedClient.peerConnectionIds.filter((pcId) => pcId !== peerConnectionId);
|
|
79
|
-
}
|
|
80
|
-
}
|
|
81
|
-
for (const [trackId, inboundAudioTrack] of Array.from(updatedInboundAudioTracks.entries())) {
|
|
82
|
-
if (visitedInboundAudioTrackIds.has(trackId)) {
|
|
83
|
-
continue;
|
|
84
|
-
}
|
|
85
|
-
// delete PeerConnection
|
|
86
|
-
const { serviceId, callId, clientId, peerConnectionId } = inboundAudioTrack;
|
|
87
|
-
if (!serviceId || !callId || !clientId || !peerConnectionId) {
|
|
88
|
-
continue;
|
|
89
|
-
}
|
|
90
|
-
const storedPeerConnection = updatedPeerConnections.get(peerConnectionId);
|
|
91
|
-
updatedInboundAudioTracks.delete(peerConnectionId);
|
|
92
|
-
deletedInboundAudioTracks.add(peerConnectionId);
|
|
93
|
-
// also update the peer connection model
|
|
94
|
-
if (storedPeerConnection) {
|
|
95
|
-
storedPeerConnection.inboundTrackIds = storedPeerConnection.inboundTrackIds.filter((tId) => tId !== trackId);
|
|
96
|
-
}
|
|
97
|
-
}
|
|
98
|
-
for (const [trackId, inboundVideoTrack] of Array.from(updatedInboundVideoTracks.entries())) {
|
|
99
|
-
if (visitedInboundVideoTrackIds.has(trackId)) {
|
|
100
|
-
continue;
|
|
101
|
-
}
|
|
102
|
-
// delete PeerConnection
|
|
103
|
-
const { serviceId, callId, clientId, peerConnectionId } = inboundVideoTrack;
|
|
104
|
-
if (!serviceId || !callId || !clientId || !peerConnectionId) {
|
|
105
|
-
continue;
|
|
106
|
-
}
|
|
107
|
-
const storedPeerConnection = updatedPeerConnections.get(peerConnectionId);
|
|
108
|
-
updatedInboundVideoTracks.delete(peerConnectionId);
|
|
109
|
-
deletedInboundVideoTracks.add(peerConnectionId);
|
|
110
|
-
// also update the peer connection model
|
|
111
|
-
if (storedPeerConnection) {
|
|
112
|
-
storedPeerConnection.inboundTrackIds = storedPeerConnection.inboundTrackIds.filter((tId) => tId !== trackId);
|
|
113
|
-
}
|
|
114
|
-
}
|
|
115
|
-
for (const [trackId, OutboundAudioTrack] of Array.from(updatedOutboundAudioTracks.entries())) {
|
|
116
|
-
if (visitedOutboundAudioTrackIds.has(trackId)) {
|
|
117
|
-
continue;
|
|
118
|
-
}
|
|
119
|
-
// delete PeerConnection
|
|
120
|
-
const { serviceId, callId, clientId, peerConnectionId } = OutboundAudioTrack;
|
|
121
|
-
if (!serviceId || !callId || !clientId || !peerConnectionId) {
|
|
122
|
-
continue;
|
|
123
|
-
}
|
|
124
|
-
const storedPeerConnection = updatedPeerConnections.get(peerConnectionId);
|
|
125
|
-
updatedOutboundAudioTracks.delete(peerConnectionId);
|
|
126
|
-
deletedOutboundAudioTracks.add(peerConnectionId);
|
|
127
|
-
// also update the peer connection model
|
|
128
|
-
if (storedPeerConnection) {
|
|
129
|
-
storedPeerConnection.outboundTrackIds = storedPeerConnection.outboundTrackIds.filter((tId) => tId !== trackId);
|
|
130
|
-
}
|
|
131
|
-
}
|
|
132
|
-
for (const [trackId, OutboundVideoTrack] of Array.from(updatedOutboundVideoTracks.entries())) {
|
|
133
|
-
if (visitedOutboundVideoTrackIds.has(trackId)) {
|
|
134
|
-
continue;
|
|
135
|
-
}
|
|
136
|
-
// delete PeerConnection
|
|
137
|
-
const { serviceId, callId, clientId, peerConnectionId } = OutboundVideoTrack;
|
|
138
|
-
if (!serviceId || !callId || !clientId || !peerConnectionId) {
|
|
139
|
-
continue;
|
|
140
|
-
}
|
|
141
|
-
const storedPeerConnection = updatedPeerConnections.get(peerConnectionId);
|
|
142
|
-
updatedOutboundVideoTracks.delete(peerConnectionId);
|
|
143
|
-
deletedOutboundVideoTracks.add(peerConnectionId);
|
|
144
|
-
// also update the peer connection model
|
|
145
|
-
if (storedPeerConnection) {
|
|
146
|
-
storedPeerConnection.outboundTrackIds = storedPeerConnection.outboundTrackIds.filter((tId) => tId !== trackId);
|
|
147
|
-
}
|
|
148
|
-
}
|
|
149
79
|
};
|
|
150
80
|
const result = async (context, next) => {
|
|
151
81
|
await process(context);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"visitClient.d.ts","sourceRoot":"","sources":["../../../src/middlewares/visitors/visitClient.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,8BAA8B,CAAC;AAC9D,OAAO,KAAK,MAAM,MAAM,qBAAqB,CAAC;AAC9C,OAAO,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AASjE,wBAAgB,WAAW,CAC1B,cAAc,EAAE,cAAc,EAC9B,MAAM,EAAE,MAAM,CAAC,MAAM,EACrB,OAAO,EAAE,gBAAgB,EACzB,YAAY,EAAE,OAAO,
|
|
1
|
+
{"version":3,"file":"visitClient.d.ts","sourceRoot":"","sources":["../../../src/middlewares/visitors/visitClient.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,8BAA8B,CAAC;AAC9D,OAAO,KAAK,MAAM,MAAM,qBAAqB,CAAC;AAC9C,OAAO,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AASjE,wBAAgB,WAAW,CAC1B,cAAc,EAAE,cAAc,EAC9B,MAAM,EAAE,MAAM,CAAC,MAAM,EACrB,OAAO,EAAE,gBAAgB,EACzB,YAAY,EAAE,OAAO,QA6LrB"}
|
|
@@ -4,10 +4,13 @@ exports.visitClient = void 0;
|
|
|
4
4
|
const callMetaReports_1 = require("../../common/callMetaReports");
|
|
5
5
|
const samples_pb_1 = require("../../models/samples_pb");
|
|
6
6
|
function visitClient(observedClient, client, reports, fetchSamples) {
|
|
7
|
-
|
|
7
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
8
|
+
const { mediaUnitId, clientId, userId } = observedClient;
|
|
8
9
|
const { callId, serviceId, roomId } = observedClient.call;
|
|
9
10
|
for (const clientSample of observedClient.samples()) {
|
|
10
|
-
if (clientSample.os)
|
|
11
|
+
if (clientSample.os && (((_a = client.operationSystem) === null || _a === void 0 ? void 0 : _a.name) !== clientSample.os.name ||
|
|
12
|
+
((_b = client.operationSystem) === null || _b === void 0 ? void 0 : _b.version) !== clientSample.os.version ||
|
|
13
|
+
((_c = client.operationSystem) === null || _c === void 0 ? void 0 : _c.versionName) !== clientSample.os.versionName)) {
|
|
11
14
|
if (fetchSamples) {
|
|
12
15
|
client.operationSystem = new samples_pb_1.Samples_ClientSample_OperationSystem({
|
|
13
16
|
...clientSample.os,
|
|
@@ -16,10 +19,11 @@ function visitClient(observedClient, client, reports, fetchSamples) {
|
|
|
16
19
|
const callMetaReport = (0, callMetaReports_1.createCallMetaReport)(serviceId, mediaUnitId, roomId, callId, clientId, {
|
|
17
20
|
type: callMetaReports_1.CallMetaType.OPERATION_SYSTEM,
|
|
18
21
|
payload: clientSample.os,
|
|
19
|
-
});
|
|
22
|
+
}, userId);
|
|
20
23
|
reports.addCallMetaReport(callMetaReport);
|
|
21
24
|
}
|
|
22
|
-
if (clientSample.engine)
|
|
25
|
+
if (clientSample.engine && (((_d = client.engine) === null || _d === void 0 ? void 0 : _d.name) !== clientSample.engine.name ||
|
|
26
|
+
((_e = client.engine) === null || _e === void 0 ? void 0 : _e.version) !== clientSample.engine.version)) {
|
|
23
27
|
if (fetchSamples) {
|
|
24
28
|
client.engine = new samples_pb_1.Samples_ClientSample_Engine({
|
|
25
29
|
...clientSample.engine,
|
|
@@ -28,10 +32,12 @@ function visitClient(observedClient, client, reports, fetchSamples) {
|
|
|
28
32
|
const callMetaReport = (0, callMetaReports_1.createCallMetaReport)(serviceId, mediaUnitId, roomId, callId, clientId, {
|
|
29
33
|
type: callMetaReports_1.CallMetaType.ENGINE,
|
|
30
34
|
payload: clientSample.engine,
|
|
31
|
-
});
|
|
35
|
+
}, userId);
|
|
32
36
|
reports.addCallMetaReport(callMetaReport);
|
|
33
37
|
}
|
|
34
|
-
if (clientSample.platform)
|
|
38
|
+
if (clientSample.platform && (((_f = client.platform) === null || _f === void 0 ? void 0 : _f.model) !== clientSample.platform.model ||
|
|
39
|
+
((_g = client.platform) === null || _g === void 0 ? void 0 : _g.type) !== clientSample.platform.type ||
|
|
40
|
+
((_h = client.platform) === null || _h === void 0 ? void 0 : _h.vendor) !== clientSample.platform.vendor)) {
|
|
35
41
|
if (fetchSamples) {
|
|
36
42
|
client.platform = new samples_pb_1.Samples_ClientSample_Platform({
|
|
37
43
|
...clientSample.platform,
|
|
@@ -40,10 +46,11 @@ function visitClient(observedClient, client, reports, fetchSamples) {
|
|
|
40
46
|
const callMetaReport = (0, callMetaReports_1.createCallMetaReport)(serviceId, mediaUnitId, roomId, callId, clientId, {
|
|
41
47
|
type: callMetaReports_1.CallMetaType.PLATFORM,
|
|
42
48
|
payload: clientSample.platform,
|
|
43
|
-
});
|
|
49
|
+
}, userId);
|
|
44
50
|
reports.addCallMetaReport(callMetaReport);
|
|
45
51
|
}
|
|
46
|
-
if (clientSample.browser)
|
|
52
|
+
if (clientSample.browser && (((_j = client.browser) === null || _j === void 0 ? void 0 : _j.name) !== clientSample.browser.name ||
|
|
53
|
+
((_k = client.browser) === null || _k === void 0 ? void 0 : _k.version) !== clientSample.browser.version)) {
|
|
47
54
|
if (fetchSamples) {
|
|
48
55
|
client.browser = new samples_pb_1.Samples_ClientSample_Browser({
|
|
49
56
|
...clientSample.browser,
|
|
@@ -52,7 +59,7 @@ function visitClient(observedClient, client, reports, fetchSamples) {
|
|
|
52
59
|
const callMetaReport = (0, callMetaReports_1.createCallMetaReport)(serviceId, mediaUnitId, roomId, callId, clientId, {
|
|
53
60
|
type: callMetaReports_1.CallMetaType.BROWSER,
|
|
54
61
|
payload: clientSample.browser,
|
|
55
|
-
});
|
|
62
|
+
}, userId);
|
|
56
63
|
reports.addCallMetaReport(callMetaReport);
|
|
57
64
|
}
|
|
58
65
|
if (clientSample.mediaConstraints && 0 < clientSample.mediaConstraints.length) {
|
|
@@ -60,7 +67,7 @@ function visitClient(observedClient, client, reports, fetchSamples) {
|
|
|
60
67
|
const callMetaReport = (0, callMetaReports_1.createCallMetaReport)(serviceId, mediaUnitId, roomId, callId, clientId, {
|
|
61
68
|
type: callMetaReports_1.CallMetaType.MEDIA_CONSTRAINT,
|
|
62
69
|
payload: mediaConstraint,
|
|
63
|
-
});
|
|
70
|
+
}, userId);
|
|
64
71
|
reports.addCallMetaReport(callMetaReport);
|
|
65
72
|
}
|
|
66
73
|
}
|
|
@@ -69,7 +76,7 @@ function visitClient(observedClient, client, reports, fetchSamples) {
|
|
|
69
76
|
const callMetaReport = (0, callMetaReports_1.createCallMetaReport)(serviceId, mediaUnitId, roomId, callId, clientId, {
|
|
70
77
|
type: callMetaReports_1.CallMetaType.LOCAL_SDP,
|
|
71
78
|
payload: localSDP,
|
|
72
|
-
});
|
|
79
|
+
}, userId);
|
|
73
80
|
reports.addCallMetaReport(callMetaReport);
|
|
74
81
|
}
|
|
75
82
|
}
|
|
@@ -81,6 +88,7 @@ function visitClient(observedClient, client, reports, fetchSamples) {
|
|
|
81
88
|
roomId,
|
|
82
89
|
callId,
|
|
83
90
|
clientId,
|
|
91
|
+
userId,
|
|
84
92
|
timestamp: Date.now(),
|
|
85
93
|
payload: extensionStats.payload,
|
|
86
94
|
extensionType: extensionStats.type,
|
|
@@ -95,6 +103,7 @@ function visitClient(observedClient, client, reports, fetchSamples) {
|
|
|
95
103
|
roomId,
|
|
96
104
|
callId,
|
|
97
105
|
clientId,
|
|
106
|
+
userId,
|
|
98
107
|
timestamp: Date.now(),
|
|
99
108
|
...callEvent,
|
|
100
109
|
});
|
|
@@ -105,7 +114,7 @@ function visitClient(observedClient, client, reports, fetchSamples) {
|
|
|
105
114
|
const callMetaReport = (0, callMetaReports_1.createCallMetaReport)(serviceId, mediaUnitId, roomId, callId, clientId, {
|
|
106
115
|
type: callMetaReports_1.CallMetaType.USER_MEDIA_ERROR,
|
|
107
116
|
payload: userMediaError,
|
|
108
|
-
});
|
|
117
|
+
}, userId);
|
|
109
118
|
reports.addCallMetaReport(callMetaReport);
|
|
110
119
|
}
|
|
111
120
|
}
|
|
@@ -114,7 +123,7 @@ function visitClient(observedClient, client, reports, fetchSamples) {
|
|
|
114
123
|
const callMetaReport = (0, callMetaReports_1.createCallMetaReport)(serviceId, mediaUnitId, roomId, callId, clientId, {
|
|
115
124
|
type: callMetaReports_1.CallMetaType.CERTIFICATE,
|
|
116
125
|
payload: certificate,
|
|
117
|
-
});
|
|
126
|
+
}, userId);
|
|
118
127
|
reports.addCallMetaReport(callMetaReport);
|
|
119
128
|
}
|
|
120
129
|
}
|
|
@@ -123,7 +132,7 @@ function visitClient(observedClient, client, reports, fetchSamples) {
|
|
|
123
132
|
const callMetaReport = (0, callMetaReports_1.createCallMetaReport)(serviceId, mediaUnitId, roomId, callId, clientId, {
|
|
124
133
|
type: callMetaReports_1.CallMetaType.CODEC,
|
|
125
134
|
payload: codec,
|
|
126
|
-
});
|
|
135
|
+
}, userId);
|
|
127
136
|
reports.addCallMetaReport(callMetaReport);
|
|
128
137
|
}
|
|
129
138
|
}
|
|
@@ -132,7 +141,7 @@ function visitClient(observedClient, client, reports, fetchSamples) {
|
|
|
132
141
|
const callMetaReport = (0, callMetaReports_1.createCallMetaReport)(serviceId, mediaUnitId, roomId, callId, clientId, {
|
|
133
142
|
type: callMetaReports_1.CallMetaType.ICE_SERVER,
|
|
134
143
|
payload: iceServer,
|
|
135
|
-
});
|
|
144
|
+
}, userId);
|
|
136
145
|
reports.addCallMetaReport(callMetaReport);
|
|
137
146
|
}
|
|
138
147
|
}
|
|
@@ -141,7 +150,7 @@ function visitClient(observedClient, client, reports, fetchSamples) {
|
|
|
141
150
|
const callMetaReport = (0, callMetaReports_1.createCallMetaReport)(serviceId, mediaUnitId, roomId, callId, clientId, {
|
|
142
151
|
type: callMetaReports_1.CallMetaType.MEDIA_DEVICE,
|
|
143
152
|
payload: mediaDevice,
|
|
144
|
-
});
|
|
153
|
+
}, userId);
|
|
145
154
|
reports.addCallMetaReport(callMetaReport);
|
|
146
155
|
}
|
|
147
156
|
}
|
|
@@ -150,7 +159,7 @@ function visitClient(observedClient, client, reports, fetchSamples) {
|
|
|
150
159
|
const callMetaReport = (0, callMetaReports_1.createCallMetaReport)(serviceId, mediaUnitId, roomId, callId, clientId, {
|
|
151
160
|
type: callMetaReports_1.CallMetaType.MEDIA_SOURCE,
|
|
152
161
|
payload: mediaSource,
|
|
153
|
-
});
|
|
162
|
+
}, userId);
|
|
154
163
|
reports.addCallMetaReport(callMetaReport);
|
|
155
164
|
}
|
|
156
165
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as Models from '../../models/Models';
|
|
2
2
|
import { ReportsCollector } from '../../common/ReportsCollector';
|
|
3
3
|
import { ObservedInboundAudioTrack } from '../../samples/ObservedInboundAudioTrack';
|
|
4
|
-
export declare function visitInboundAudioTrack(observedInboundAudioTrack: ObservedInboundAudioTrack, storedPeerConnection: Models.PeerConnection, storedInboundTracks: Map<string, Models.InboundTrack>, reports: ReportsCollector, fetchSamples: boolean): void;
|
|
4
|
+
export declare function visitInboundAudioTrack(observedInboundAudioTrack: ObservedInboundAudioTrack, storedPeerConnection: Models.PeerConnection, storedInboundTracks: Map<string, Models.InboundTrack>, reports: ReportsCollector, fetchSamples: boolean, remoteTrackId?: string, remotePeerConnectionId?: string, remoteClientId?: string): void;
|
|
5
5
|
//# sourceMappingURL=visitInboundAudioTrack.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"visitInboundAudioTrack.d.ts","sourceRoot":"","sources":["../../../src/middlewares/visitors/visitInboundAudioTrack.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,MAAM,qBAAqB,CAAC;AAC9C,OAAO,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AACjE,OAAO,EAAE,yBAAyB,EAAE,MAAM,yCAAyC,CAAC;AAKpF,wBAAgB,sBAAsB,CACrC,yBAAyB,EAAE,yBAAyB,EACpD,oBAAoB,EAAE,MAAM,CAAC,cAAc,EAC3C,mBAAmB,EAAE,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,YAAY,CAAC,EACrD,OAAO,EAAE,gBAAgB,EACzB,YAAY,EAAE,OAAO,
|
|
1
|
+
{"version":3,"file":"visitInboundAudioTrack.d.ts","sourceRoot":"","sources":["../../../src/middlewares/visitors/visitInboundAudioTrack.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,MAAM,qBAAqB,CAAC;AAC9C,OAAO,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AACjE,OAAO,EAAE,yBAAyB,EAAE,MAAM,yCAAyC,CAAC;AAKpF,wBAAgB,sBAAsB,CACrC,yBAAyB,EAAE,yBAAyB,EACpD,oBAAoB,EAAE,MAAM,CAAC,cAAc,EAC3C,mBAAmB,EAAE,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,YAAY,CAAC,EACrD,OAAO,EAAE,gBAAgB,EACzB,YAAY,EAAE,OAAO,EACrB,aAAa,CAAC,EAAE,MAAM,EACtB,sBAAsB,CAAC,EAAE,MAAM,EAC/B,cAAc,CAAC,EAAE,MAAM,QA4FvB"}
|
|
@@ -27,8 +27,8 @@ exports.visitInboundAudioTrack = void 0;
|
|
|
27
27
|
const Models = __importStar(require("../../models/Models"));
|
|
28
28
|
const VisitObservedCallsMiddleware_1 = require("../VisitObservedCallsMiddleware");
|
|
29
29
|
const samples_pb_1 = require("../../models/samples_pb");
|
|
30
|
-
function visitInboundAudioTrack(observedInboundAudioTrack, storedPeerConnection, storedInboundTracks, reports, fetchSamples) {
|
|
31
|
-
const { trackId } = observedInboundAudioTrack;
|
|
30
|
+
function visitInboundAudioTrack(observedInboundAudioTrack, storedPeerConnection, storedInboundTracks, reports, fetchSamples, remoteTrackId, remotePeerConnectionId, remoteClientId) {
|
|
31
|
+
const { trackId, sfuStreamId, sfuSinkId } = observedInboundAudioTrack;
|
|
32
32
|
const { peerConnectionId } = observedInboundAudioTrack.peerConnection;
|
|
33
33
|
const { mediaUnitId, clientId, userId, marker, minTimestamp: timestamp, } = observedInboundAudioTrack.peerConnection.client;
|
|
34
34
|
const { serviceId, roomId, callId } = observedInboundAudioTrack.peerConnection.client.call;
|
|
@@ -39,9 +39,12 @@ function visitInboundAudioTrack(observedInboundAudioTrack, storedPeerConnection,
|
|
|
39
39
|
roomId,
|
|
40
40
|
callId,
|
|
41
41
|
clientId,
|
|
42
|
+
kind: 'audio',
|
|
42
43
|
peerConnectionId,
|
|
43
44
|
mediaUnitId,
|
|
44
45
|
trackId,
|
|
46
|
+
sfuSinkId,
|
|
47
|
+
sfuStreamId,
|
|
45
48
|
userId,
|
|
46
49
|
marker,
|
|
47
50
|
});
|
|
@@ -60,11 +63,15 @@ function visitInboundAudioTrack(observedInboundAudioTrack, storedPeerConnection,
|
|
|
60
63
|
roomId,
|
|
61
64
|
callId,
|
|
62
65
|
clientId,
|
|
66
|
+
userId,
|
|
63
67
|
mediaUnitId,
|
|
64
68
|
peerConnectionId,
|
|
65
69
|
...inboundAudioSample,
|
|
66
70
|
timestamp,
|
|
67
71
|
sampleSeq: -1,
|
|
72
|
+
remoteClientId,
|
|
73
|
+
remotePeerConnectionId,
|
|
74
|
+
remoteTrackId,
|
|
68
75
|
};
|
|
69
76
|
reports.addInboundAudioTrackReport(report);
|
|
70
77
|
if (fetchSamples) {
|
|
@@ -83,6 +90,7 @@ function visitInboundAudioTrack(observedInboundAudioTrack, storedPeerConnection,
|
|
|
83
90
|
statsMap.set(ssrc, videoStats);
|
|
84
91
|
}
|
|
85
92
|
}
|
|
93
|
+
storedInboundAudioTrack.ssrc = [...statsMap.keys()];
|
|
86
94
|
storedInboundAudioTrack.videoStats = Array.from(statsMap.values());
|
|
87
95
|
}
|
|
88
96
|
exports.visitInboundAudioTrack = visitInboundAudioTrack;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ReportsCollector } from '../../common/ReportsCollector';
|
|
2
2
|
import { ObservedInboundVideoTrack } from '../../samples/ObservedInboundVideoTrack';
|
|
3
3
|
import * as Models from '../../models/Models';
|
|
4
|
-
export declare function visitInboundVideoTrack(observedInboundVideoTrack: ObservedInboundVideoTrack, storedPeerConnection: Models.PeerConnection, storedInboundTracks: Map<string, Models.InboundTrack>, reports: ReportsCollector, fetchSamples: boolean): void;
|
|
4
|
+
export declare function visitInboundVideoTrack(observedInboundVideoTrack: ObservedInboundVideoTrack, storedPeerConnection: Models.PeerConnection, storedInboundTracks: Map<string, Models.InboundTrack>, reports: ReportsCollector, fetchSamples: boolean, remoteTrackId?: string, remotePeerConnectionId?: string, remoteClientId?: string): void;
|
|
5
5
|
//# sourceMappingURL=visitInboundVideoTrack.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"visitInboundVideoTrack.d.ts","sourceRoot":"","sources":["../../../src/middlewares/visitors/visitInboundVideoTrack.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AACjE,OAAO,EAAE,yBAAyB,EAAE,MAAM,yCAAyC,CAAC;AAEpF,OAAO,KAAK,MAAM,MAAM,qBAAqB,CAAC;AAK9C,wBAAgB,sBAAsB,CACrC,yBAAyB,EAAE,yBAAyB,EACpD,oBAAoB,EAAE,MAAM,CAAC,cAAc,EAC3C,mBAAmB,EAAE,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,YAAY,CAAC,EACrD,OAAO,EAAE,gBAAgB,EACzB,YAAY,EAAE,OAAO,
|
|
1
|
+
{"version":3,"file":"visitInboundVideoTrack.d.ts","sourceRoot":"","sources":["../../../src/middlewares/visitors/visitInboundVideoTrack.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AACjE,OAAO,EAAE,yBAAyB,EAAE,MAAM,yCAAyC,CAAC;AAEpF,OAAO,KAAK,MAAM,MAAM,qBAAqB,CAAC;AAK9C,wBAAgB,sBAAsB,CACrC,yBAAyB,EAAE,yBAAyB,EACpD,oBAAoB,EAAE,MAAM,CAAC,cAAc,EAC3C,mBAAmB,EAAE,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,YAAY,CAAC,EACrD,OAAO,EAAE,gBAAgB,EACzB,YAAY,EAAE,OAAO,EACrB,aAAa,CAAC,EAAE,MAAM,EACtB,sBAAsB,CAAC,EAAE,MAAM,EAC/B,cAAc,CAAC,EAAE,MAAM,QA8FvB"}
|
|
@@ -28,8 +28,8 @@ const VisitObservedCallsMiddleware_1 = require("../VisitObservedCallsMiddleware"
|
|
|
28
28
|
const Models = __importStar(require("../../models/Models"));
|
|
29
29
|
const samples_pb_1 = require("../../models/samples_pb");
|
|
30
30
|
// InboundVideoTrack visitor
|
|
31
|
-
function visitInboundVideoTrack(observedInboundVideoTrack, storedPeerConnection, storedInboundTracks, reports, fetchSamples) {
|
|
32
|
-
const { trackId } = observedInboundVideoTrack;
|
|
31
|
+
function visitInboundVideoTrack(observedInboundVideoTrack, storedPeerConnection, storedInboundTracks, reports, fetchSamples, remoteTrackId, remotePeerConnectionId, remoteClientId) {
|
|
32
|
+
const { trackId, sfuStreamId, sfuSinkId } = observedInboundVideoTrack;
|
|
33
33
|
const { peerConnectionId } = observedInboundVideoTrack.peerConnection;
|
|
34
34
|
const { mediaUnitId, clientId, userId, marker, minTimestamp: timestamp, } = observedInboundVideoTrack.peerConnection.client;
|
|
35
35
|
const { serviceId, roomId, callId } = observedInboundVideoTrack.peerConnection.client.call;
|
|
@@ -40,9 +40,12 @@ function visitInboundVideoTrack(observedInboundVideoTrack, storedPeerConnection,
|
|
|
40
40
|
roomId,
|
|
41
41
|
callId,
|
|
42
42
|
clientId,
|
|
43
|
+
kind: 'video',
|
|
43
44
|
peerConnectionId,
|
|
44
45
|
mediaUnitId,
|
|
45
46
|
trackId,
|
|
47
|
+
sfuStreamId,
|
|
48
|
+
sfuSinkId,
|
|
46
49
|
userId,
|
|
47
50
|
marker,
|
|
48
51
|
});
|
|
@@ -61,11 +64,15 @@ function visitInboundVideoTrack(observedInboundVideoTrack, storedPeerConnection,
|
|
|
61
64
|
roomId,
|
|
62
65
|
callId,
|
|
63
66
|
clientId,
|
|
67
|
+
userId,
|
|
64
68
|
mediaUnitId,
|
|
65
69
|
peerConnectionId,
|
|
66
70
|
...inboundVideoSample,
|
|
67
71
|
timestamp,
|
|
68
72
|
sampleSeq: -1,
|
|
73
|
+
remoteClientId,
|
|
74
|
+
remotePeerConnectionId,
|
|
75
|
+
remoteTrackId,
|
|
69
76
|
};
|
|
70
77
|
reports.addInboundVideoTrackReport(report);
|
|
71
78
|
if (fetchSamples) {
|
|
@@ -85,6 +92,7 @@ function visitInboundVideoTrack(observedInboundVideoTrack, storedPeerConnection,
|
|
|
85
92
|
statsMap.set(ssrc, videoStats);
|
|
86
93
|
}
|
|
87
94
|
}
|
|
95
|
+
storedInboundVideoTrack.ssrc = [...statsMap.keys()];
|
|
88
96
|
storedInboundVideoTrack.videoStats = Array.from(statsMap.values());
|
|
89
97
|
}
|
|
90
98
|
exports.visitInboundVideoTrack = visitInboundVideoTrack;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"visitOutboundAudioTrack.d.ts","sourceRoot":"","sources":["../../../src/middlewares/visitors/visitOutboundAudioTrack.ts"],"names":[],"mappings":"AAAA,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,
|
|
1
|
+
{"version":3,"file":"visitOutboundAudioTrack.d.ts","sourceRoot":"","sources":["../../../src/middlewares/visitors/visitOutboundAudioTrack.ts"],"names":[],"mappings":"AAAA,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,QAmFrB"}
|
|
@@ -28,7 +28,7 @@ const Models = __importStar(require("../../models/Models"));
|
|
|
28
28
|
const VisitObservedCallsMiddleware_1 = require("../VisitObservedCallsMiddleware");
|
|
29
29
|
const samples_pb_1 = require("../../models/samples_pb");
|
|
30
30
|
function visitOutboundAudioTrack(observedOutboundAudioTrack, storedPeerConnection, storedOutboundTracks, reports, fetchSamples) {
|
|
31
|
-
const { trackId } = observedOutboundAudioTrack;
|
|
31
|
+
const { trackId, sfuStreamId } = observedOutboundAudioTrack;
|
|
32
32
|
const { peerConnectionId } = observedOutboundAudioTrack.peerConnection;
|
|
33
33
|
const { mediaUnitId, clientId, userId, marker, minTimestamp: timestamp, } = observedOutboundAudioTrack.peerConnection.client;
|
|
34
34
|
const { serviceId, roomId, callId } = observedOutboundAudioTrack.peerConnection.client.call;
|
|
@@ -39,9 +39,11 @@ function visitOutboundAudioTrack(observedOutboundAudioTrack, storedPeerConnectio
|
|
|
39
39
|
roomId,
|
|
40
40
|
callId,
|
|
41
41
|
clientId,
|
|
42
|
+
kind: 'audio',
|
|
42
43
|
peerConnectionId,
|
|
43
44
|
mediaUnitId,
|
|
44
45
|
trackId,
|
|
46
|
+
sfuStreamId,
|
|
45
47
|
userId,
|
|
46
48
|
marker,
|
|
47
49
|
});
|
|
@@ -60,6 +62,7 @@ function visitOutboundAudioTrack(observedOutboundAudioTrack, storedPeerConnectio
|
|
|
60
62
|
roomId,
|
|
61
63
|
callId,
|
|
62
64
|
clientId,
|
|
65
|
+
userId,
|
|
63
66
|
mediaUnitId,
|
|
64
67
|
peerConnectionId,
|
|
65
68
|
...outboundAudioSample,
|
|
@@ -81,6 +84,7 @@ function visitOutboundAudioTrack(observedOutboundAudioTrack, storedPeerConnectio
|
|
|
81
84
|
statsMap.set(ssrc, audioStats);
|
|
82
85
|
}
|
|
83
86
|
}
|
|
87
|
+
storedOutboundAudioTrack.ssrc = [...statsMap.keys()];
|
|
84
88
|
storedOutboundAudioTrack.audioStats = Array.from(statsMap.values());
|
|
85
89
|
}
|
|
86
90
|
exports.visitOutboundAudioTrack = visitOutboundAudioTrack;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"visitOutboundVideoTarck.d.ts","sourceRoot":"","sources":["../../../src/middlewares/visitors/visitOutboundVideoTarck.ts"],"names":[],"mappings":"AAAA,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,
|
|
1
|
+
{"version":3,"file":"visitOutboundVideoTarck.d.ts","sourceRoot":"","sources":["../../../src/middlewares/visitors/visitOutboundVideoTarck.ts"],"names":[],"mappings":"AAAA,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,QAqFrB"}
|
|
@@ -28,7 +28,7 @@ const Models = __importStar(require("../../models/Models"));
|
|
|
28
28
|
const VisitObservedCallsMiddleware_1 = require("../VisitObservedCallsMiddleware");
|
|
29
29
|
const samples_pb_1 = require("../../models/samples_pb");
|
|
30
30
|
function visitOutboundVideoTrack(observedOutboundVideoTrack, storedPeerConnection, storedOutboundTracks, reports, fetchSamples) {
|
|
31
|
-
const { trackId } = observedOutboundVideoTrack;
|
|
31
|
+
const { trackId, sfuStreamId } = observedOutboundVideoTrack;
|
|
32
32
|
const { peerConnectionId } = observedOutboundVideoTrack.peerConnection;
|
|
33
33
|
const { mediaUnitId, clientId, userId, marker, minTimestamp: timestamp, } = observedOutboundVideoTrack.peerConnection.client;
|
|
34
34
|
const { serviceId, roomId, callId } = observedOutboundVideoTrack.peerConnection.client.call;
|
|
@@ -39,9 +39,11 @@ function visitOutboundVideoTrack(observedOutboundVideoTrack, storedPeerConnectio
|
|
|
39
39
|
roomId,
|
|
40
40
|
callId,
|
|
41
41
|
clientId,
|
|
42
|
+
kind: 'video',
|
|
42
43
|
peerConnectionId,
|
|
43
44
|
mediaUnitId,
|
|
44
45
|
trackId,
|
|
46
|
+
sfuStreamId,
|
|
45
47
|
userId,
|
|
46
48
|
marker,
|
|
47
49
|
});
|
|
@@ -60,6 +62,7 @@ function visitOutboundVideoTrack(observedOutboundVideoTrack, storedPeerConnectio
|
|
|
60
62
|
roomId,
|
|
61
63
|
callId,
|
|
62
64
|
clientId,
|
|
65
|
+
userId,
|
|
63
66
|
mediaUnitId,
|
|
64
67
|
peerConnectionId,
|
|
65
68
|
...outboundVideoSample,
|
|
@@ -82,6 +85,7 @@ function visitOutboundVideoTrack(observedOutboundVideoTrack, storedPeerConnectio
|
|
|
82
85
|
statsMap.set(ssrc, videoStats);
|
|
83
86
|
}
|
|
84
87
|
}
|
|
88
|
+
storedOutboundVideoTrack.ssrc = [...statsMap.keys()];
|
|
85
89
|
storedOutboundVideoTrack.videoStats = Array.from(statsMap.values());
|
|
86
90
|
}
|
|
87
91
|
exports.visitOutboundVideoTrack = visitOutboundVideoTrack;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"visitPeerConnection.d.ts","sourceRoot":"","sources":["../../../src/middlewares/visitors/visitPeerConnection.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,sBAAsB,EAAE,MAAM,sCAAsC,CAAC;AAC9E,OAAO,KAAK,MAAM,MAAM,qBAAqB,CAAC;AAC9C,OAAO,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AAKjE,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,
|
|
1
|
+
{"version":3,"file":"visitPeerConnection.d.ts","sourceRoot":"","sources":["../../../src/middlewares/visitors/visitPeerConnection.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,sBAAsB,EAAE,MAAM,sCAAsC,CAAC;AAC9E,OAAO,KAAK,MAAM,MAAM,qBAAqB,CAAC;AAC9C,OAAO,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AAKjE,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,QAwHrB"}
|
|
@@ -59,6 +59,7 @@ function visitPeerConnection(observedPeerConnection, storedClient, storedPeerCon
|
|
|
59
59
|
roomId,
|
|
60
60
|
callId,
|
|
61
61
|
clientId,
|
|
62
|
+
userId,
|
|
62
63
|
mediaUnitId,
|
|
63
64
|
...pcTransport,
|
|
64
65
|
timestamp,
|
|
@@ -66,6 +67,20 @@ function visitPeerConnection(observedPeerConnection, storedClient, storedPeerCon
|
|
|
66
67
|
};
|
|
67
68
|
reports.addPeerConnectionTransportReports(report);
|
|
68
69
|
}
|
|
70
|
+
for (const iceCandidatePair of observedPeerConnection.iceCandidatePairs()) {
|
|
71
|
+
const report = {
|
|
72
|
+
serviceId,
|
|
73
|
+
roomId,
|
|
74
|
+
callId,
|
|
75
|
+
userId,
|
|
76
|
+
clientId,
|
|
77
|
+
mediaUnitId,
|
|
78
|
+
...iceCandidatePair,
|
|
79
|
+
timestamp,
|
|
80
|
+
sampleSeq: -1, // deprecated
|
|
81
|
+
};
|
|
82
|
+
reports.addIceCandidatePairReport(report);
|
|
83
|
+
}
|
|
69
84
|
if (fetchSamples) {
|
|
70
85
|
storedPeerConnection.icelocalCandidates = [];
|
|
71
86
|
for (const iceLocalCandidate of observedPeerConnection.iceLocalCandidates()) {
|