@observertc/observer-js 0.9.23-beta → 0.9.24-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/Observer.d.ts +26 -0
- package/lib/Observer.d.ts.map +1 -1
- package/lib/Observer.js +8 -0
- package/lib/entries/CallEntry.d.ts +8 -0
- package/lib/entries/CallEntry.d.ts.map +1 -1
- package/lib/entries/ClientEntry.d.ts +4 -0
- package/lib/entries/ClientEntry.d.ts.map +1 -1
- package/lib/entries/ClientEntry.js +13 -0
- package/lib/entries/InboundTrackEntry.d.ts +12 -0
- package/lib/entries/InboundTrackEntry.d.ts.map +1 -1
- package/lib/entries/OutboundTrackEntry.d.ts +12 -0
- package/lib/entries/OutboundTrackEntry.d.ts.map +1 -1
- package/lib/entries/PeerConnectionEntry.d.ts +36 -0
- package/lib/entries/PeerConnectionEntry.d.ts.map +1 -1
- package/lib/evaluators/SetClientsCoordinateEvaluator.d.ts +9 -0
- package/lib/evaluators/SetClientsCoordinateEvaluator.d.ts.map +1 -0
- package/lib/evaluators/SetClientsCoordinateEvaluator.js +95 -0
- package/lib/index.d.ts +1 -0
- package/lib/index.d.ts.map +1 -1
- package/lib/middlewares/visitors/visitInboundAudioTrack.d.ts.map +1 -1
- package/lib/middlewares/visitors/visitInboundAudioTrack.js +2 -2
- package/lib/middlewares/visitors/visitInboundVideoTrack.d.ts.map +1 -1
- package/lib/middlewares/visitors/visitInboundVideoTrack.js +1 -0
- package/lib/middlewares/visitors/visitPeerConnection.d.ts.map +1 -1
- package/lib/middlewares/visitors/visitPeerConnection.js +24 -21
- package/lib/models/Models.d.ts +83 -0
- package/lib/models/Models.d.ts.map +1 -1
- package/lib/models/Models.js +88 -1
- package/lib/processes/joinClientProcess.d.ts.map +1 -1
- package/lib/processes/joinClientProcess.js +3 -0
- package/lib/samples/ObservedCall.d.ts +1 -0
- package/lib/samples/ObservedCall.d.ts.map +1 -1
- package/lib/sinks/ObserverSink.d.ts.map +1 -1
- package/lib/sinks/ObserverSink.js +1 -0
- package/lib/sources/ObservedCallSource.d.ts +1 -0
- package/lib/sources/ObservedCallSource.d.ts.map +1 -1
- package/lib/sources/Sources.js +4 -4
- package/package.json +2 -1
- package/src/Observer.ts +10 -0
- package/src/entries/ClientEntry.ts +16 -0
- package/src/evaluators/SetClientsCoordinateEvaluator.ts +78 -0
- package/src/index.ts +1 -0
- package/src/middlewares/visitors/visitInboundAudioTrack.ts +4 -2
- package/src/middlewares/visitors/visitInboundVideoTrack.ts +1 -0
- package/src/middlewares/visitors/visitPeerConnection.ts +64 -59
- package/src/models/Models.ts +155 -0
- package/src/processes/joinClientProcess.ts +3 -0
- package/src/samples/ObservedCall.ts +2 -1
- package/src/sinks/ObserverSink.ts +1 -0
- package/src/sources/ObservedCallSource.ts +2 -0
- package/src/sources/Sources.ts +4 -4
package/lib/Observer.d.ts
CHANGED
|
@@ -17,6 +17,7 @@ import { SfuTransportEntry } from './entries/SfuTransportEntry';
|
|
|
17
17
|
import { SfuInboundRtpPadEntry } from './entries/SfuInboundRtpPadEntry';
|
|
18
18
|
import { SfuOutboundRtpPadEntry } from './entries/SfuOutboundRtpPadEntry';
|
|
19
19
|
import { SfuSctpChannelEntry } from './entries/SfuSctpChannelEntry';
|
|
20
|
+
import { GetClientCoordinate } from './evaluators/SetClientsCoordinateEvaluator';
|
|
20
21
|
export type ObserverEvents = {
|
|
21
22
|
'processing-started': undefined;
|
|
22
23
|
'client-added': string;
|
|
@@ -70,6 +71,7 @@ export declare class Observer {
|
|
|
70
71
|
get reports(): ObserverReportsEmitter;
|
|
71
72
|
addEvaluators(...processes: EvaluatorProcess[]): void;
|
|
72
73
|
removeEvaluators(...processes: EvaluatorProcess[]): void;
|
|
74
|
+
addCoordinateEvaluator(getClientCoordinate: GetClientCoordinate): void;
|
|
73
75
|
addSinks(...processes: ObserverSinkProcess[]): void;
|
|
74
76
|
removeSinks(...processes: ObserverSinkProcess[]): void;
|
|
75
77
|
calls(): AsyncIterableIterator<CallEntry>;
|
|
@@ -109,6 +111,10 @@ export declare class Observer {
|
|
|
109
111
|
readonly platform: import("./models/samples_pb").Samples_ClientSample_Platform | undefined;
|
|
110
112
|
readonly peerConnectionIds: readonly string[];
|
|
111
113
|
readonly marker: string | undefined;
|
|
114
|
+
readonly coordinates: {
|
|
115
|
+
latitude: number;
|
|
116
|
+
longitude: number;
|
|
117
|
+
} | undefined;
|
|
112
118
|
getCall: () => Promise<void | any>;
|
|
113
119
|
readonly peerConnections: AsyncIterableIterator<void | {
|
|
114
120
|
callId: string;
|
|
@@ -296,6 +302,10 @@ export declare class Observer {
|
|
|
296
302
|
readonly platform: import("./models/samples_pb").Samples_ClientSample_Platform | undefined;
|
|
297
303
|
readonly peerConnectionIds: readonly string[];
|
|
298
304
|
readonly marker: string | undefined;
|
|
305
|
+
readonly coordinates: {
|
|
306
|
+
latitude: number;
|
|
307
|
+
longitude: number;
|
|
308
|
+
} | undefined;
|
|
299
309
|
getCall: () => Promise<void | any>;
|
|
300
310
|
readonly peerConnections: AsyncIterableIterator<void | {
|
|
301
311
|
callId: string;
|
|
@@ -485,6 +495,10 @@ export declare class Observer {
|
|
|
485
495
|
readonly platform: import("./models/samples_pb").Samples_ClientSample_Platform | undefined;
|
|
486
496
|
readonly peerConnectionIds: readonly string[];
|
|
487
497
|
readonly marker: string | undefined;
|
|
498
|
+
readonly coordinates: {
|
|
499
|
+
latitude: number;
|
|
500
|
+
longitude: number;
|
|
501
|
+
} | undefined;
|
|
488
502
|
getCall: () => Promise<void | any>;
|
|
489
503
|
readonly peerConnections: AsyncIterableIterator<void | {
|
|
490
504
|
callId: string;
|
|
@@ -789,6 +803,10 @@ export declare class Observer {
|
|
|
789
803
|
readonly platform: import("./models/samples_pb").Samples_ClientSample_Platform | undefined;
|
|
790
804
|
readonly peerConnectionIds: readonly string[];
|
|
791
805
|
readonly marker: string | undefined;
|
|
806
|
+
readonly coordinates: {
|
|
807
|
+
latitude: number;
|
|
808
|
+
longitude: number;
|
|
809
|
+
} | undefined;
|
|
792
810
|
getCall: () => Promise<void | any>;
|
|
793
811
|
readonly peerConnections: AsyncIterableIterator<void | {
|
|
794
812
|
callId: string;
|
|
@@ -976,6 +994,10 @@ export declare class Observer {
|
|
|
976
994
|
readonly platform: import("./models/samples_pb").Samples_ClientSample_Platform | undefined;
|
|
977
995
|
readonly peerConnectionIds: readonly string[];
|
|
978
996
|
readonly marker: string | undefined;
|
|
997
|
+
readonly coordinates: {
|
|
998
|
+
latitude: number;
|
|
999
|
+
longitude: number;
|
|
1000
|
+
} | undefined;
|
|
979
1001
|
getCall: () => Promise<void | any>;
|
|
980
1002
|
readonly peerConnections: AsyncIterableIterator<void | {
|
|
981
1003
|
callId: string;
|
|
@@ -1165,6 +1187,10 @@ export declare class Observer {
|
|
|
1165
1187
|
readonly platform: import("./models/samples_pb").Samples_ClientSample_Platform | undefined;
|
|
1166
1188
|
readonly peerConnectionIds: readonly string[];
|
|
1167
1189
|
readonly marker: string | undefined;
|
|
1190
|
+
readonly coordinates: {
|
|
1191
|
+
latitude: number;
|
|
1192
|
+
longitude: number;
|
|
1193
|
+
} | undefined;
|
|
1168
1194
|
getCall: () => Promise<void | any>;
|
|
1169
1195
|
readonly peerConnections: AsyncIterableIterator<void | {
|
|
1170
1196
|
callId: string;
|
package/lib/Observer.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Observer.d.ts","sourceRoot":"","sources":["../src/Observer.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,sBAAsB,EAAE,mBAAmB,EAAE,UAAU,EAAY,MAAM,sBAAsB,CAAC;AACzG,OAAO,EAAE,OAAO,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAC3D,OAAO,EAA+B,eAAe,EAAE,MAAM,4BAA4B,CAAC;AAC1F,OAAO,EAAa,eAAe,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAC3E,OAAO,EAAiC,iBAAiB,EAAE,MAAM,oBA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1 = require("./entries/SfuTransportEntry");
|
|
|
58
58
|
const SfuInboundRtpPadEntry_1 = require("./entries/SfuInboundRtpPadEntry");
|
|
59
59
|
const SfuOutboundRtpPadEntry_1 = require("./entries/SfuOutboundRtpPadEntry");
|
|
60
60
|
const SfuSctpChannelEntry_1 = require("./entries/SfuSctpChannelEntry");
|
|
61
|
+
const SetClientsCoordinateEvaluator_1 = require("./evaluators/SetClientsCoordinateEvaluator");
|
|
61
62
|
const logger = (0, logger_1.createLogger)('Observer');
|
|
62
63
|
class Observer {
|
|
63
64
|
static create(providedConfig) {
|
|
@@ -173,6 +174,13 @@ class Observer {
|
|
|
173
174
|
this._evaluator.removeProcess(process);
|
|
174
175
|
}
|
|
175
176
|
}
|
|
177
|
+
addCoordinateEvaluator(getClientCoordinate) {
|
|
178
|
+
if (this._closed) {
|
|
179
|
+
throw new Error('Attempted to add an evaluator to a closed observer');
|
|
180
|
+
}
|
|
181
|
+
const process = (0, SetClientsCoordinateEvaluator_1.createSetClientsCoordinateEvaluator)(getClientCoordinate);
|
|
182
|
+
this._evaluator.addProcess((context) => __awaiter(this, void 0, void 0, function* () { return process(context); }));
|
|
183
|
+
}
|
|
176
184
|
addSinks(...processes) {
|
|
177
185
|
if (this._closed) {
|
|
178
186
|
throw new Error('Attempted to add an evaluator to a closed observer');
|
|
@@ -22,6 +22,10 @@ export declare function createCallEntry(storageProvider: StorageProvider, model?
|
|
|
22
22
|
readonly platform: import("../models/samples_pb").Samples_ClientSample_Platform | undefined;
|
|
23
23
|
readonly peerConnectionIds: readonly string[];
|
|
24
24
|
readonly marker: string | undefined;
|
|
25
|
+
readonly coordinates: {
|
|
26
|
+
latitude: number;
|
|
27
|
+
longitude: number;
|
|
28
|
+
} | undefined;
|
|
25
29
|
getCall: () => Promise<void | any>;
|
|
26
30
|
readonly peerConnections: AsyncIterableIterator<void | {
|
|
27
31
|
callId: string;
|
|
@@ -321,6 +325,10 @@ export declare function createCallEntry(storageProvider: StorageProvider, model?
|
|
|
321
325
|
readonly platform: import("../models/samples_pb").Samples_ClientSample_Platform | undefined;
|
|
322
326
|
readonly peerConnectionIds: readonly string[];
|
|
323
327
|
readonly marker: string | undefined;
|
|
328
|
+
readonly coordinates: {
|
|
329
|
+
latitude: number;
|
|
330
|
+
longitude: number;
|
|
331
|
+
} | undefined;
|
|
324
332
|
getCall: () => Promise<void | any>;
|
|
325
333
|
readonly peerConnections: AsyncIterableIterator<void | {
|
|
326
334
|
callId: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CallEntry.d.ts","sourceRoot":"","sources":["../../src/entries/CallEntry.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,MAAM,kBAAkB,CAAC;AAC3C,OAAO,EAAE,eAAe,EAAE,MAAM,6BAA6B,CAAC;AAK9D,eAAO,MAAM,MAAM,0CAA8B,CAAC;AAElD,MAAM,MAAM,SAAS,GAAG,UAAU,CAAC,OAAO,eAAe,CAAC,CAAC;AAE3D,wBAAgB,eAAe,CAAC,eAAe,EAAE,eAAe,EAAE,KAAK,CAAC,EAAE,MAAM,CAAC,IAAI;;;;;;0BAcjD,MAAM
|
|
1
|
+
{"version":3,"file":"CallEntry.d.ts","sourceRoot":"","sources":["../../src/entries/CallEntry.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,MAAM,kBAAkB,CAAC;AAC3C,OAAO,EAAE,eAAe,EAAE,MAAM,6BAA6B,CAAC;AAK9D,eAAO,MAAM,MAAM,0CAA8B,CAAC;AAElD,MAAM,MAAM,SAAS,GAAG,UAAU,CAAC,OAAO,eAAe,CAAC,CAAC;AAE3D,wBAAgB,eAAe,CAAC,eAAe,EAAE,eAAe,EAAE,KAAK,CAAC,EAAE,MAAM,CAAC,IAAI;;;;;;0BAcjD,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAqCzC"}
|
|
@@ -15,6 +15,10 @@ export declare function createClientEntry(storageProvider: StorageProvider, mode
|
|
|
15
15
|
readonly platform: import("../models/samples_pb").Samples_ClientSample_Platform | undefined;
|
|
16
16
|
readonly peerConnectionIds: readonly string[];
|
|
17
17
|
readonly marker: string | undefined;
|
|
18
|
+
readonly coordinates: {
|
|
19
|
+
latitude: number;
|
|
20
|
+
longitude: number;
|
|
21
|
+
} | undefined;
|
|
18
22
|
getCall: () => Promise<void | {
|
|
19
23
|
callId: string;
|
|
20
24
|
roomId: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ClientEntry.d.ts","sourceRoot":"","sources":["../../src/entries/ClientEntry.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,MAAM,kBAAkB,CAAC;AAC3C,OAAO,EAAE,eAAe,EAAE,MAAM,6BAA6B,CAAC;AAK9D,MAAM,MAAM,WAAW,GAAG,UAAU,CAAC,OAAO,iBAAiB,CAAC,CAAC;AAE/D,wBAAgB,iBAAiB,CAAC,eAAe,EAAE,eAAe,EAAE,KAAK,CAAC,EAAE,MAAM,CAAC,MAAM
|
|
1
|
+
{"version":3,"file":"ClientEntry.d.ts","sourceRoot":"","sources":["../../src/entries/ClientEntry.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,MAAM,kBAAkB,CAAC;AAC3C,OAAO,EAAE,eAAe,EAAE,MAAM,6BAA6B,CAAC;AAK9D,MAAM,MAAM,WAAW,GAAG,UAAU,CAAC,OAAO,iBAAiB,CAAC,CAAC;AAE/D,wBAAgB,iBAAiB,CAAC,eAAe,EAAE,eAAe,EAAE,KAAK,CAAC,EAAE,MAAM,CAAC,MAAM;;;;;;;;;;;;;;;kBA4DxD,MAAM;mBAAa,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;0CAoBZ,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAiBnD"}
|
|
@@ -78,6 +78,19 @@ function createClientEntry(storageProvider, model) {
|
|
|
78
78
|
get marker() {
|
|
79
79
|
return model.marker;
|
|
80
80
|
},
|
|
81
|
+
get coordinates() {
|
|
82
|
+
if (!model.coordinates)
|
|
83
|
+
return;
|
|
84
|
+
const { longitude, latitude } = model.coordinates;
|
|
85
|
+
if (!latitude)
|
|
86
|
+
return;
|
|
87
|
+
if (!longitude)
|
|
88
|
+
return;
|
|
89
|
+
return {
|
|
90
|
+
latitude,
|
|
91
|
+
longitude
|
|
92
|
+
};
|
|
93
|
+
},
|
|
81
94
|
getCall,
|
|
82
95
|
get peerConnections() {
|
|
83
96
|
return (0, utils_1.asyncIteratorConverter)(asyncPeerConnectionGenerator());
|
|
@@ -31,6 +31,10 @@ export declare function createInboundTrackEntry(storageProvider: StorageProvider
|
|
|
31
31
|
readonly platform: import("../models/samples_pb").Samples_ClientSample_Platform | undefined;
|
|
32
32
|
readonly peerConnectionIds: readonly string[];
|
|
33
33
|
readonly marker: string | undefined;
|
|
34
|
+
readonly coordinates: {
|
|
35
|
+
latitude: number;
|
|
36
|
+
longitude: number;
|
|
37
|
+
} | undefined;
|
|
34
38
|
getCall: () => Promise<void | any>;
|
|
35
39
|
readonly peerConnections: AsyncIterableIterator<void | {
|
|
36
40
|
callId: string;
|
|
@@ -218,6 +222,10 @@ export declare function createInboundTrackEntry(storageProvider: StorageProvider
|
|
|
218
222
|
readonly platform: import("../models/samples_pb").Samples_ClientSample_Platform | undefined;
|
|
219
223
|
readonly peerConnectionIds: readonly string[];
|
|
220
224
|
readonly marker: string | undefined;
|
|
225
|
+
readonly coordinates: {
|
|
226
|
+
latitude: number;
|
|
227
|
+
longitude: number;
|
|
228
|
+
} | undefined;
|
|
221
229
|
getCall: () => Promise<void | any>;
|
|
222
230
|
readonly peerConnections: AsyncIterableIterator<void | {
|
|
223
231
|
callId: string;
|
|
@@ -407,6 +415,10 @@ export declare function createInboundTrackEntry(storageProvider: StorageProvider
|
|
|
407
415
|
readonly platform: import("../models/samples_pb").Samples_ClientSample_Platform | undefined;
|
|
408
416
|
readonly peerConnectionIds: readonly string[];
|
|
409
417
|
readonly marker: string | undefined;
|
|
418
|
+
readonly coordinates: {
|
|
419
|
+
latitude: number;
|
|
420
|
+
longitude: number;
|
|
421
|
+
} | undefined;
|
|
410
422
|
getCall: () => Promise<void | any>;
|
|
411
423
|
readonly peerConnections: AsyncIterableIterator<void | {
|
|
412
424
|
callId: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"InboundTrackEntry.d.ts","sourceRoot":"","sources":["../../src/entries/InboundTrackEntry.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,MAAM,MAAM,kBAAkB,CAAC;AAC3C,OAAO,EAAE,eAAe,EAAE,MAAM,6BAA6B,CAAC;AAO9D,MAAM,MAAM,iBAAiB,GAAG,UAAU,CAAC,OAAO,uBAAuB,CAAC,CAAC;AAE3E,wBAAgB,uBAAuB,CAAC,eAAe,EAAE,eAAe,EAAE,KAAK,CAAC,EAAE,MAAM,CAAC,YAAY
|
|
1
|
+
{"version":3,"file":"InboundTrackEntry.d.ts","sourceRoot":"","sources":["../../src/entries/InboundTrackEntry.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,MAAM,MAAM,kBAAkB,CAAC;AAC3C,OAAO,EAAE,eAAe,EAAE,MAAM,6BAA6B,CAAC;AAO9D,MAAM,MAAM,iBAAiB,GAAG,UAAU,CAAC,OAAO,uBAAuB,CAAC,CAAC;AAE3E,wBAAgB,uBAAuB,CAAC,eAAe,EAAE,eAAe,EAAE,KAAK,CAAC,EAAE,MAAM,CAAC,YAAY;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA8DpG"}
|
|
@@ -31,6 +31,10 @@ export declare function createOutboundTrackEntry(storageProvider: StorageProvide
|
|
|
31
31
|
readonly platform: import("../models/samples_pb").Samples_ClientSample_Platform | undefined;
|
|
32
32
|
readonly peerConnectionIds: readonly string[];
|
|
33
33
|
readonly marker: string | undefined;
|
|
34
|
+
readonly coordinates: {
|
|
35
|
+
latitude: number;
|
|
36
|
+
longitude: number;
|
|
37
|
+
} | undefined;
|
|
34
38
|
getCall: () => Promise<void | any>;
|
|
35
39
|
readonly peerConnections: AsyncIterableIterator<void | {
|
|
36
40
|
callId: string;
|
|
@@ -218,6 +222,10 @@ export declare function createOutboundTrackEntry(storageProvider: StorageProvide
|
|
|
218
222
|
readonly platform: import("../models/samples_pb").Samples_ClientSample_Platform | undefined;
|
|
219
223
|
readonly peerConnectionIds: readonly string[];
|
|
220
224
|
readonly marker: string | undefined;
|
|
225
|
+
readonly coordinates: {
|
|
226
|
+
latitude: number;
|
|
227
|
+
longitude: number;
|
|
228
|
+
} | undefined;
|
|
221
229
|
getCall: () => Promise<void | any>;
|
|
222
230
|
readonly peerConnections: AsyncIterableIterator<void | {
|
|
223
231
|
callId: string;
|
|
@@ -407,6 +415,10 @@ export declare function createOutboundTrackEntry(storageProvider: StorageProvide
|
|
|
407
415
|
readonly platform: import("../models/samples_pb").Samples_ClientSample_Platform | undefined;
|
|
408
416
|
readonly peerConnectionIds: readonly string[];
|
|
409
417
|
readonly marker: string | undefined;
|
|
418
|
+
readonly coordinates: {
|
|
419
|
+
latitude: number;
|
|
420
|
+
longitude: number;
|
|
421
|
+
} | undefined;
|
|
410
422
|
getCall: () => Promise<void | any>;
|
|
411
423
|
readonly peerConnections: AsyncIterableIterator<void | {
|
|
412
424
|
callId: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"OutboundTrackEntry.d.ts","sourceRoot":"","sources":["../../src/entries/OutboundTrackEntry.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,MAAM,MAAM,kBAAkB,CAAC;AAC3C,OAAO,EAAE,eAAe,EAAE,MAAM,6BAA6B,CAAC;AAO9D,MAAM,MAAM,kBAAkB,GAAG,UAAU,CAAC,OAAO,wBAAwB,CAAC,CAAC;AAE7E,wBAAgB,wBAAwB,CAAC,eAAe,EAAE,eAAe,EAAE,KAAK,CAAC,EAAE,MAAM,CAAC,aAAa
|
|
1
|
+
{"version":3,"file":"OutboundTrackEntry.d.ts","sourceRoot":"","sources":["../../src/entries/OutboundTrackEntry.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,MAAM,MAAM,kBAAkB,CAAC;AAC3C,OAAO,EAAE,eAAe,EAAE,MAAM,6BAA6B,CAAC;AAO9D,MAAM,MAAM,kBAAkB,GAAG,UAAU,CAAC,OAAO,wBAAwB,CAAC,CAAC;AAE7E,wBAAgB,wBAAwB,CAAC,eAAe,EAAE,eAAe,EAAE,KAAK,CAAC,EAAE,MAAM,CAAC,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA4DtG"}
|
|
@@ -26,6 +26,10 @@ export declare function createPeerConnectionEntry(storageProvider: StorageProvid
|
|
|
26
26
|
readonly platform: import("../models/samples_pb").Samples_ClientSample_Platform | undefined;
|
|
27
27
|
readonly peerConnectionIds: readonly string[];
|
|
28
28
|
readonly marker: string | undefined;
|
|
29
|
+
readonly coordinates: {
|
|
30
|
+
latitude: number;
|
|
31
|
+
longitude: number;
|
|
32
|
+
} | undefined;
|
|
29
33
|
getCall: () => Promise<void | {
|
|
30
34
|
callId: string;
|
|
31
35
|
roomId: string;
|
|
@@ -90,6 +94,10 @@ export declare function createPeerConnectionEntry(storageProvider: StorageProvid
|
|
|
90
94
|
readonly platform: import("../models/samples_pb").Samples_ClientSample_Platform | undefined;
|
|
91
95
|
readonly peerConnectionIds: readonly string[];
|
|
92
96
|
readonly marker: string | undefined;
|
|
97
|
+
readonly coordinates: {
|
|
98
|
+
latitude: number;
|
|
99
|
+
longitude: number;
|
|
100
|
+
} | undefined;
|
|
93
101
|
getCall: () => Promise<void | {
|
|
94
102
|
callId: string;
|
|
95
103
|
roomId: string;
|
|
@@ -141,6 +149,10 @@ export declare function createPeerConnectionEntry(storageProvider: StorageProvid
|
|
|
141
149
|
readonly platform: import("../models/samples_pb").Samples_ClientSample_Platform | undefined;
|
|
142
150
|
readonly peerConnectionIds: readonly string[];
|
|
143
151
|
readonly marker: string | undefined;
|
|
152
|
+
readonly coordinates: {
|
|
153
|
+
latitude: number;
|
|
154
|
+
longitude: number;
|
|
155
|
+
} | undefined;
|
|
144
156
|
getCall: () => Promise<void | {
|
|
145
157
|
callId: string;
|
|
146
158
|
roomId: string;
|
|
@@ -192,6 +204,10 @@ export declare function createPeerConnectionEntry(storageProvider: StorageProvid
|
|
|
192
204
|
readonly platform: import("../models/samples_pb").Samples_ClientSample_Platform | undefined;
|
|
193
205
|
readonly peerConnectionIds: readonly string[];
|
|
194
206
|
readonly marker: string | undefined;
|
|
207
|
+
readonly coordinates: {
|
|
208
|
+
latitude: number;
|
|
209
|
+
longitude: number;
|
|
210
|
+
} | undefined;
|
|
195
211
|
getCall: () => Promise<void | {
|
|
196
212
|
callId: string;
|
|
197
213
|
roomId: string;
|
|
@@ -243,6 +259,10 @@ export declare function createPeerConnectionEntry(storageProvider: StorageProvid
|
|
|
243
259
|
readonly platform: import("../models/samples_pb").Samples_ClientSample_Platform | undefined;
|
|
244
260
|
readonly peerConnectionIds: readonly string[];
|
|
245
261
|
readonly marker: string | undefined;
|
|
262
|
+
readonly coordinates: {
|
|
263
|
+
latitude: number;
|
|
264
|
+
longitude: number;
|
|
265
|
+
} | undefined;
|
|
246
266
|
getCall: () => Promise<void | {
|
|
247
267
|
callId: string;
|
|
248
268
|
roomId: string;
|
|
@@ -294,6 +314,10 @@ export declare function createPeerConnectionEntry(storageProvider: StorageProvid
|
|
|
294
314
|
readonly platform: import("../models/samples_pb").Samples_ClientSample_Platform | undefined;
|
|
295
315
|
readonly peerConnectionIds: readonly string[];
|
|
296
316
|
readonly marker: string | undefined;
|
|
317
|
+
readonly coordinates: {
|
|
318
|
+
latitude: number;
|
|
319
|
+
longitude: number;
|
|
320
|
+
} | undefined;
|
|
297
321
|
getCall: () => Promise<void | {
|
|
298
322
|
callId: string;
|
|
299
323
|
roomId: string;
|
|
@@ -345,6 +369,10 @@ export declare function createPeerConnectionEntry(storageProvider: StorageProvid
|
|
|
345
369
|
readonly platform: import("../models/samples_pb").Samples_ClientSample_Platform | undefined;
|
|
346
370
|
readonly peerConnectionIds: readonly string[];
|
|
347
371
|
readonly marker: string | undefined;
|
|
372
|
+
readonly coordinates: {
|
|
373
|
+
latitude: number;
|
|
374
|
+
longitude: number;
|
|
375
|
+
} | undefined;
|
|
348
376
|
getCall: () => Promise<void | {
|
|
349
377
|
callId: string;
|
|
350
378
|
roomId: string;
|
|
@@ -396,6 +424,10 @@ export declare function createPeerConnectionEntry(storageProvider: StorageProvid
|
|
|
396
424
|
readonly platform: import("../models/samples_pb").Samples_ClientSample_Platform | undefined;
|
|
397
425
|
readonly peerConnectionIds: readonly string[];
|
|
398
426
|
readonly marker: string | undefined;
|
|
427
|
+
readonly coordinates: {
|
|
428
|
+
latitude: number;
|
|
429
|
+
longitude: number;
|
|
430
|
+
} | undefined;
|
|
399
431
|
getCall: () => Promise<void | {
|
|
400
432
|
callId: string;
|
|
401
433
|
roomId: string;
|
|
@@ -447,6 +479,10 @@ export declare function createPeerConnectionEntry(storageProvider: StorageProvid
|
|
|
447
479
|
readonly platform: import("../models/samples_pb").Samples_ClientSample_Platform | undefined;
|
|
448
480
|
readonly peerConnectionIds: readonly string[];
|
|
449
481
|
readonly marker: string | undefined;
|
|
482
|
+
readonly coordinates: {
|
|
483
|
+
latitude: number;
|
|
484
|
+
longitude: number;
|
|
485
|
+
} | undefined;
|
|
450
486
|
getCall: () => Promise<void | {
|
|
451
487
|
callId: string;
|
|
452
488
|
roomId: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PeerConnectionEntry.d.ts","sourceRoot":"","sources":["../../src/entries/PeerConnectionEntry.ts"],"names":[],"mapp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;;;;;;;;;;;;;EAiB/C"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { EvaluatorProcess } from '..';
|
|
2
|
+
export declare const logger: import("../common/logger").WrappedLogger;
|
|
3
|
+
export type ClientCoordinate = {
|
|
4
|
+
latitude: number;
|
|
5
|
+
longitude: number;
|
|
6
|
+
};
|
|
7
|
+
export type GetClientCoordinate = (ipAddress: string) => ClientCoordinate | undefined;
|
|
8
|
+
export declare function createSetClientsCoordinateEvaluator(getCoordinate: GetClientCoordinate): EvaluatorProcess;
|
|
9
|
+
//# sourceMappingURL=SetClientsCoordinateEvaluator.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SetClientsCoordinateEvaluator.d.ts","sourceRoot":"","sources":["../../src/evaluators/SetClientsCoordinateEvaluator.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,gBAAgB,EAAE,MAAM,IAAI,CAAC;AAEtC,eAAO,MAAM,MAAM,0CAAgD,CAAC;AAEpE,MAAM,MAAM,gBAAgB,GAAG;IAC9B,QAAQ,EAAE,MAAM,CAAC;IACjB,SAAS,EAAE,MAAM,CAAC;CAClB,CAAC;AAEF,MAAM,MAAM,mBAAmB,GAAG,CAAC,SAAS,EAAE,MAAM,KAAK,gBAAgB,GAAG,SAAS,CAAC;AAEtF,wBAAgB,mCAAmC,CAClD,aAAa,EAAE,mBAAmB,GAChC,gBAAgB,CA6DlB"}
|
|
@@ -0,0 +1,95 @@
|
|
|
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 __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
26
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
27
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
28
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
29
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
30
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
31
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
32
|
+
});
|
|
33
|
+
};
|
|
34
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
35
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
36
|
+
};
|
|
37
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
38
|
+
exports.createSetClientsCoordinateEvaluator = exports.logger = void 0;
|
|
39
|
+
const logger_1 = require("../common/logger");
|
|
40
|
+
const Models = __importStar(require("../models/Models"));
|
|
41
|
+
const ipaddr_js_1 = __importDefault(require("ipaddr.js"));
|
|
42
|
+
exports.logger = (0, logger_1.createLogger)('SetClientsCoordinateEvaluator');
|
|
43
|
+
function createSetClientsCoordinateEvaluator(getCoordinate) {
|
|
44
|
+
const process = (context) => __awaiter(this, void 0, void 0, function* () {
|
|
45
|
+
const clientIds = new Set();
|
|
46
|
+
for (const observedCall of context.observedCalls.observedCalls()) {
|
|
47
|
+
for (const observedClient of observedCall.observedClients()) {
|
|
48
|
+
clientIds.add(observedClient.clientId);
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
if (clientIds.size < 1)
|
|
52
|
+
return;
|
|
53
|
+
const storedClients = yield context.storages.clientStorage.getAll(clientIds);
|
|
54
|
+
for (const observedCall of context.observedCalls.observedCalls()) {
|
|
55
|
+
for (const observedClient of observedCall.observedClients()) {
|
|
56
|
+
const { clientId } = observedClient;
|
|
57
|
+
const storedClient = storedClients.get(clientId);
|
|
58
|
+
if (!storedClient || storedClient.coordinates)
|
|
59
|
+
continue;
|
|
60
|
+
let ipAddress;
|
|
61
|
+
searchForIp: for (const observedPeerConnection of observedClient.observedPeerConnections()) {
|
|
62
|
+
for (const iceLocalCandidate of observedPeerConnection.iceLocalCandidates()) {
|
|
63
|
+
if (!iceLocalCandidate.address)
|
|
64
|
+
continue;
|
|
65
|
+
try {
|
|
66
|
+
const addr = ipaddr_js_1.default.parse(iceLocalCandidate.address);
|
|
67
|
+
ipAddress = addr.toString();
|
|
68
|
+
break searchForIp;
|
|
69
|
+
}
|
|
70
|
+
catch (e) {
|
|
71
|
+
exports.logger.warn(`Failed to parse ip address: ${iceLocalCandidate.address}`, e);
|
|
72
|
+
continue;
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
if (!ipAddress)
|
|
77
|
+
continue;
|
|
78
|
+
try {
|
|
79
|
+
const coordinate = getCoordinate(ipAddress);
|
|
80
|
+
if (!coordinate)
|
|
81
|
+
continue;
|
|
82
|
+
storedClient.coordinates = new Models.ClientCoordinate({
|
|
83
|
+
latitude: coordinate.latitude,
|
|
84
|
+
longitude: coordinate.longitude,
|
|
85
|
+
});
|
|
86
|
+
}
|
|
87
|
+
catch (e) {
|
|
88
|
+
exports.logger.warn(`Failed to get coordinate for ip address: ${ipAddress}`, e);
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
});
|
|
93
|
+
return process;
|
|
94
|
+
}
|
|
95
|
+
exports.createSetClientsCoordinateEvaluator = createSetClientsCoordinateEvaluator;
|
package/lib/index.d.ts
CHANGED
|
@@ -18,6 +18,7 @@ export type { SfuTransportEntry } from './entries/SfuTransportEntry';
|
|
|
18
18
|
export type { SfuInboundRtpPadEntry } from './entries/SfuInboundRtpPadEntry';
|
|
19
19
|
export type { SfuOutboundRtpPadEntry } from './entries/SfuOutboundRtpPadEntry';
|
|
20
20
|
export type { SfuSctpChannelEntry } from './entries/SfuSctpChannelEntry';
|
|
21
|
+
export type { GetClientCoordinate, ClientCoordinate } from './evaluators/SetClientsCoordinateEvaluator';
|
|
21
22
|
export type { Samples, ClientSample, SfuSample, ExtensionStat, PeerConnectionTransport, IceCandidatePair, MediaSourceStat, MediaCodecStats, InboundAudioTrack, InboundVideoTrack, OutboundAudioTrack, OutboundVideoTrack, IceLocalCandidate, IceRemoteCandidate, CustomCallEvent, SfuTransport, SfuInboundRtpPad, SfuOutboundRtpPad, SfuSctpChannel, SfuExtensionStats, DataChannel, } from '@observertc/sample-schemas-js';
|
|
22
23
|
export type { CallEventReport, CallMetaReport, ClientDataChannelReport, ClientExtensionReport, IceCandidatePairReport, InboundAudioTrackReport, InboundVideoTrackReport, ObserverEventReport, OutboundAudioTrackReport, OutboundVideoTrackReport, PeerConnectionTransportReport, SfuEventReport, SfuExtensionReport, SfuInboundRtpPadReport, SfuMetaReport, SfuOutboundRtpPadReport, SfuSctpStreamReport, SFUTransportReport, } from '@observertc/report-schemas-js';
|
|
23
24
|
export type { ObservedClientSource, ObservedClientSourceConfig } from './sources/ObservedClientSource';
|
package/lib/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,YAAY,EAAE,cAAc,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AAEjE,YAAY,EAAE,eAAe,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAErE,YAAY,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAEvD,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AACtC,YAAY,EAAE,sBAAsB,EAAE,mBAAmB,EAAE,MAAM,sBAAsB,CAAC;AACxF,YAAY,EAAE,eAAe,EAAE,MAAM,4BAA4B,CAAC;AAClE,YAAY,EAAE,eAAe,EAAE,MAAM,4BAA4B,CAAC;AAClE,OAAO,KAAK,MAAM,MAAM,iBAAiB,CAAC;AAE1C,OAAO,KAAK,YAAY,MAAM,+BAA+B,CAAC;AAC9D,OAAO,KAAK,YAAY,MAAM,+BAA+B,CAAC;AAE9D,YAAY,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAC;AACrD,YAAY,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AACzD,YAAY,EAAE,mBAAmB,EAAE,MAAM,+BAA+B,CAAC;AACzE,YAAY,EAAE,iBAAiB,EAAE,MAAM,6BAA6B,CAAC;AACrE,YAAY,EAAE,kBAAkB,EAAE,MAAM,8BAA8B,CAAC;AACvE,YAAY,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AACnD,YAAY,EAAE,iBAAiB,EAAE,MAAM,6BAA6B,CAAC;AACrE,YAAY,EAAE,qBAAqB,EAAE,MAAM,iCAAiC,CAAC;AAC7E,YAAY,EAAE,sBAAsB,EAAE,MAAM,kCAAkC,CAAC;AAC/E,YAAY,EAAE,mBAAmB,EAAE,MAAM,+BAA+B,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,YAAY,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EACjB,iBAAiB,EACjB,kBAAkB,EAClB,kBAAkB,EAClB,iBAAiB,EACjB,kBAAkB,EAClB,eAAe,EACf,YAAY,EACZ,gBAAgB,EAChB,iBAAiB,EACjB,cAAc,EACd,iBAAiB,EACjB,WAAW,GACX,MAAM,+BAA+B,CAAC;AAEvC,YAAY,EACX,eAAe,EACf,cAAc,EACd,uBAAuB,EACvB,qBAAqB,EACrB,sBAAsB,EACtB,uBAAuB,EACvB,uBAAuB,EACvB,mBAAmB,EACnB,wBAAwB,EACxB,wBAAwB,EACxB,6BAA6B,EAC7B,cAAc,EACd,kBAAkB,EAClB,sBAAsB,EACtB,aAAa,EACb,uBAAuB,EACvB,mBAAmB,EACnB,kBAAkB,GAClB,MAAM,+BAA+B,CAAC;AAEvC,YAAY,EAAE,oBAAoB,EAAE,0BAA0B,EAAE,MAAM,gCAAgC,CAAC;AAEvG,YAAY,EAAE,iBAAiB,EAAE,uBAAuB,EAAE,MAAM,6BAA6B,CAAC;AAE9F,YAAY,EAAE,kBAAkB,EAAE,wBAAwB,IAAI,kBAAkB,EAAE,MAAM,8BAA8B,CAAC;AAEvH,YAAY,EAAE,gBAAgB,EAAE,mBAAmB,EAAE,mBAAmB,EAAE,sBAAsB,EAAE,MAAM,gBAAgB,CAAC;AAEzH,OAAO,EAAE,QAAQ,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AACtD,wBAAgB,cAAc,CAAC,MAAM,CAAC,EAAE,OAAO,CAAC,cAAc,CAAC,YAE9D"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"visitInboundAudioTrack.d.ts","sourceRoot":"","sources":["../../../src/middlewares/visitors/visitInboundAudioTrack.ts"],"names":[],"mappings":"AACA,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,
|
|
1
|
+
{"version":3,"file":"visitInboundAudioTrack.d.ts","sourceRoot":"","sources":["../../../src/middlewares/visitors/visitInboundAudioTrack.ts"],"names":[],"mappings":"AACA,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,QAgGvB"}
|
|
@@ -83,8 +83,8 @@ function visitInboundAudioTrack(observedInboundAudioTrack, storedPeerConnection,
|
|
|
83
83
|
if (fetchSamples) {
|
|
84
84
|
const { ssrc: sample_ssrc, bytesReceived: sample_bytesReceived, bytesSent: sample_bytesSent, estimatedPlayoutTimestamp: samples_estimatedPlayoutTimestamp, headerBytesReceived: samples_headerBytesReceived, lastPacketReceivedTimestamp: samples_lastPacketReceivedTimestamp, remoteTimestamp: samples_remoteTimestamp } = inboundAudioSample, sample = __rest(inboundAudioSample, ["ssrc", "bytesReceived", "bytesSent", "estimatedPlayoutTimestamp", "headerBytesReceived", "lastPacketReceivedTimestamp", "remoteTimestamp"]);
|
|
85
85
|
const ssrc = BigInt(sample_ssrc);
|
|
86
|
-
const
|
|
87
|
-
statsMap.set(ssrc,
|
|
86
|
+
const audioStats = new samples_pb_1.Samples_ClientSample_InboundAudioTrack(Object.assign({ ssrc, bytesReceived: BigInt(sample_bytesReceived !== null && sample_bytesReceived !== void 0 ? sample_bytesReceived : -1), bytesSent: BigInt(sample_bytesSent !== null && sample_bytesSent !== void 0 ? sample_bytesSent : -1), estimatedPlayoutTimestamp: BigInt(samples_estimatedPlayoutTimestamp !== null && samples_estimatedPlayoutTimestamp !== void 0 ? samples_estimatedPlayoutTimestamp : -1), headerBytesReceived: BigInt(samples_headerBytesReceived !== null && samples_headerBytesReceived !== void 0 ? samples_headerBytesReceived : -1), lastPacketReceivedTimestamp: BigInt(samples_lastPacketReceivedTimestamp !== null && samples_lastPacketReceivedTimestamp !== void 0 ? samples_lastPacketReceivedTimestamp : -1), remoteTimestamp: BigInt(samples_remoteTimestamp !== null && samples_remoteTimestamp !== void 0 ? samples_remoteTimestamp : -1) }, sample));
|
|
87
|
+
statsMap.set(ssrc, audioStats);
|
|
88
88
|
}
|
|
89
89
|
}
|
|
90
90
|
storedInboundAudioTrack.ssrc = [...statsMap.keys()];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"visitInboundVideoTrack.d.ts","sourceRoot":"","sources":["../../../src/middlewares/visitors/visitInboundVideoTrack.ts"],"names":[],"mappings":"AAEA,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,
|
|
1
|
+
{"version":3,"file":"visitInboundVideoTrack.d.ts","sourceRoot":"","sources":["../../../src/middlewares/visitors/visitInboundVideoTrack.ts"],"names":[],"mappings":"AAEA,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,QAkGvB"}
|
|
@@ -83,6 +83,7 @@ function visitInboundVideoTrack(observedInboundVideoTrack, storedPeerConnection,
|
|
|
83
83
|
if (fetchSamples) {
|
|
84
84
|
const { ssrc: sample_ssrc, bytesReceived: sample_bytesReceived, bytesSent: sample_bytesSent, estimatedPlayoutTimestamp: samples_estimatedPlayoutTimestamp, headerBytesReceived: samples_headerBytesReceived, lastPacketReceivedTimestamp: samples_lastPacketReceivedTimestamp, remoteTimestamp: samples_remoteTimestamp, qpSum: bytes_qpSum } = inboundVideoSample, sample = __rest(inboundVideoSample, ["ssrc", "bytesReceived", "bytesSent", "estimatedPlayoutTimestamp", "headerBytesReceived", "lastPacketReceivedTimestamp", "remoteTimestamp", "qpSum"]);
|
|
85
85
|
const ssrc = BigInt(sample_ssrc);
|
|
86
|
+
// const lastVideoStats = storedInboundVideoTrack.videoStats.find((stats) => stats.ssrc === ssrc);
|
|
86
87
|
const videoStats = new samples_pb_1.Samples_ClientSample_InboundVideoTrack(Object.assign({ ssrc, bytesReceived: BigInt(sample_bytesReceived !== null && sample_bytesReceived !== void 0 ? sample_bytesReceived : -1), bytesSent: BigInt(sample_bytesSent !== null && sample_bytesSent !== void 0 ? sample_bytesSent : -1), estimatedPlayoutTimestamp: BigInt(samples_estimatedPlayoutTimestamp !== null && samples_estimatedPlayoutTimestamp !== void 0 ? samples_estimatedPlayoutTimestamp : -1), headerBytesReceived: BigInt(samples_headerBytesReceived !== null && samples_headerBytesReceived !== void 0 ? samples_headerBytesReceived : -1), lastPacketReceivedTimestamp: BigInt(samples_lastPacketReceivedTimestamp !== null && samples_lastPacketReceivedTimestamp !== void 0 ? samples_lastPacketReceivedTimestamp : -1), remoteTimestamp: BigInt(samples_remoteTimestamp !== null && samples_remoteTimestamp !== void 0 ? samples_remoteTimestamp : -1), qpSum: BigInt(bytes_qpSum !== null && bytes_qpSum !== void 0 ? bytes_qpSum : -1) }, sample));
|
|
87
88
|
statsMap.set(ssrc, videoStats);
|
|
88
89
|
}
|
|
@@ -1 +1 @@
|
|
|
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,
|
|
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"}
|