@observertc/observer-js 0.9.27-beta → 0.30.0-e12fcb4.0
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
package/lib/entries/CallEntry.js
DELETED
|
@@ -1,75 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
-
});
|
|
10
|
-
};
|
|
11
|
-
var __await = (this && this.__await) || function (v) { return this instanceof __await ? (this.v = v, this) : new __await(v); }
|
|
12
|
-
var __asyncGenerator = (this && this.__asyncGenerator) || function (thisArg, _arguments, generator) {
|
|
13
|
-
if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined.");
|
|
14
|
-
var g = generator.apply(thisArg, _arguments || []), i, q = [];
|
|
15
|
-
return i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i;
|
|
16
|
-
function verb(n) { if (g[n]) i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; }
|
|
17
|
-
function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }
|
|
18
|
-
function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }
|
|
19
|
-
function fulfill(value) { resume("next", value); }
|
|
20
|
-
function reject(value) { resume("throw", value); }
|
|
21
|
-
function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }
|
|
22
|
-
};
|
|
23
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
24
|
-
exports.createCallEntry = exports.logger = void 0;
|
|
25
|
-
const logger_1 = require("../common/logger");
|
|
26
|
-
const utils_1 = require("../common/utils");
|
|
27
|
-
const ClientEntry_1 = require("./ClientEntry");
|
|
28
|
-
exports.logger = (0, logger_1.createLogger)('CallWrapper');
|
|
29
|
-
function createCallEntry(storageProvider, model) {
|
|
30
|
-
if (!model)
|
|
31
|
-
return;
|
|
32
|
-
const { callId, roomId, serviceId, started, } = model;
|
|
33
|
-
if (!callId)
|
|
34
|
-
return exports.logger.warn(`Call model without callId: ${JSON.stringify(model)}`);
|
|
35
|
-
if (!roomId)
|
|
36
|
-
return exports.logger.warn(`Call model without roomId: ${JSON.stringify(model)}`);
|
|
37
|
-
if (!serviceId)
|
|
38
|
-
return exports.logger.warn(`Call model without serviceId: ${JSON.stringify(model)}`);
|
|
39
|
-
if (!started)
|
|
40
|
-
return exports.logger.warn(`Call model without started: ${JSON.stringify(model)}`);
|
|
41
|
-
const getClient = (clientId) => __awaiter(this, void 0, void 0, function* () {
|
|
42
|
-
return model.clientIds.includes(clientId) ? (0, ClientEntry_1.createClientEntry)(storageProvider, yield storageProvider.clientStorage.get(clientId)) : undefined;
|
|
43
|
-
});
|
|
44
|
-
const asyncClientsGenerator = function (providedClientIds) {
|
|
45
|
-
return __asyncGenerator(this, arguments, function* () {
|
|
46
|
-
const { clientStorage } = storageProvider;
|
|
47
|
-
const clientModels = yield __await(Promise.all((providedClientIds !== null && providedClientIds !== void 0 ? providedClientIds : model.clientIds).map((clientId) => clientStorage.get(clientId))));
|
|
48
|
-
for (const clientModel of clientModels) {
|
|
49
|
-
if (!clientModel)
|
|
50
|
-
continue;
|
|
51
|
-
yield yield __await((0, ClientEntry_1.createClientEntry)(storageProvider, clientModel));
|
|
52
|
-
}
|
|
53
|
-
});
|
|
54
|
-
};
|
|
55
|
-
return {
|
|
56
|
-
callId,
|
|
57
|
-
roomId,
|
|
58
|
-
serviceId,
|
|
59
|
-
started,
|
|
60
|
-
get clientIds() {
|
|
61
|
-
return model.clientIds;
|
|
62
|
-
},
|
|
63
|
-
getClient,
|
|
64
|
-
get clients() {
|
|
65
|
-
return (0, utils_1.asyncIteratorConverter)(asyncClientsGenerator());
|
|
66
|
-
},
|
|
67
|
-
refresh: () => __awaiter(this, void 0, void 0, function* () {
|
|
68
|
-
const refreshedModel = yield storageProvider.callStorage.get(callId);
|
|
69
|
-
if (!refreshedModel)
|
|
70
|
-
return;
|
|
71
|
-
model.clientIds = refreshedModel.clientIds;
|
|
72
|
-
})
|
|
73
|
-
};
|
|
74
|
-
}
|
|
75
|
-
exports.createCallEntry = createCallEntry;
|
|
@@ -1,478 +0,0 @@
|
|
|
1
|
-
import * as Models from '../models/Models';
|
|
2
|
-
import { StorageProvider } from '../storages/StorageProvider';
|
|
3
|
-
export type ClientEntry = ReturnType<typeof createClientEntry>;
|
|
4
|
-
export declare function createClientEntry(storageProvider: StorageProvider, model?: Models.Client): void | {
|
|
5
|
-
clientId: string;
|
|
6
|
-
roomId: string;
|
|
7
|
-
serviceId: string;
|
|
8
|
-
mediaUnitId: string;
|
|
9
|
-
callId: string;
|
|
10
|
-
joined: bigint | undefined;
|
|
11
|
-
timeZoneId: string | undefined;
|
|
12
|
-
readonly browser: import("../models/samples_pb").Samples_ClientSample_Browser | undefined;
|
|
13
|
-
readonly engine: import("../models/samples_pb").Samples_ClientSample_Engine | undefined;
|
|
14
|
-
readonly operationSystem: import("../models/samples_pb").Samples_ClientSample_OperationSystem | undefined;
|
|
15
|
-
readonly platform: import("../models/samples_pb").Samples_ClientSample_Platform | undefined;
|
|
16
|
-
readonly peerConnectionIds: readonly string[];
|
|
17
|
-
readonly marker: string | undefined;
|
|
18
|
-
readonly coordinates: {
|
|
19
|
-
latitude: number;
|
|
20
|
-
longitude: number;
|
|
21
|
-
} | undefined;
|
|
22
|
-
getCall: () => Promise<void | {
|
|
23
|
-
callId: string;
|
|
24
|
-
roomId: string;
|
|
25
|
-
serviceId: string;
|
|
26
|
-
started: bigint;
|
|
27
|
-
readonly clientIds: readonly string[];
|
|
28
|
-
getClient: (clientId: string) => Promise<void | any>;
|
|
29
|
-
readonly clients: AsyncIterableIterator<void | any>;
|
|
30
|
-
refresh: () => Promise<void>;
|
|
31
|
-
}>;
|
|
32
|
-
readonly peerConnections: AsyncIterableIterator<void | {
|
|
33
|
-
callId: string;
|
|
34
|
-
clientId: string;
|
|
35
|
-
peerConnectionId: string;
|
|
36
|
-
marker: string | undefined;
|
|
37
|
-
label: string | undefined;
|
|
38
|
-
mediaUnitId: string | undefined;
|
|
39
|
-
opened: bigint | undefined;
|
|
40
|
-
serviceId: string | undefined;
|
|
41
|
-
roomId: string | undefined;
|
|
42
|
-
userId: string | undefined;
|
|
43
|
-
getClient: () => Promise<void | any>;
|
|
44
|
-
getCall: () => Promise<void | {
|
|
45
|
-
callId: string;
|
|
46
|
-
roomId: string;
|
|
47
|
-
serviceId: string;
|
|
48
|
-
started: bigint;
|
|
49
|
-
readonly clientIds: readonly string[];
|
|
50
|
-
getClient: (clientId: string) => Promise<void | any>;
|
|
51
|
-
readonly clients: AsyncIterableIterator<void | any>;
|
|
52
|
-
refresh: () => Promise<void>;
|
|
53
|
-
}>;
|
|
54
|
-
readonly iceCandidatePairs: import("../models/samples_pb").Samples_ClientSample_IceCandidatePair[];
|
|
55
|
-
readonly iceRemoteCandidates: import("../models/samples_pb").Samples_ClientSample_IceRemoteCandidate[];
|
|
56
|
-
readonly iceLocalCandidates: import("../models/samples_pb").Samples_ClientSample_IceLocalCandidate[];
|
|
57
|
-
readonly transports: import("../models/samples_pb").Samples_ClientSample_PeerConnectionTransport[];
|
|
58
|
-
readonly inboundTrackIds: readonly string[];
|
|
59
|
-
readonly outboundTrackIds: readonly string[];
|
|
60
|
-
readonly inboundTracks: AsyncIterableIterator<void | {
|
|
61
|
-
callId: string;
|
|
62
|
-
clientId: string;
|
|
63
|
-
peerConnectionId: string;
|
|
64
|
-
trackId: string;
|
|
65
|
-
direction: "inbound";
|
|
66
|
-
readonly kind: "audio" | "video";
|
|
67
|
-
readonly stats: import("../models/samples_pb").Samples_ClientSample_InboundAudioTrack[] | import("../models/samples_pb").Samples_ClientSample_InboundVideoTrack[] | undefined;
|
|
68
|
-
readonly marker: string | undefined;
|
|
69
|
-
readonly ssrc: bigint[];
|
|
70
|
-
getCall: () => Promise<void | {
|
|
71
|
-
callId: string;
|
|
72
|
-
roomId: string;
|
|
73
|
-
serviceId: string;
|
|
74
|
-
started: bigint;
|
|
75
|
-
readonly clientIds: readonly string[];
|
|
76
|
-
getClient: (clientId: string) => Promise<void | any>;
|
|
77
|
-
readonly clients: AsyncIterableIterator<void | any>;
|
|
78
|
-
refresh: () => Promise<void>;
|
|
79
|
-
}>;
|
|
80
|
-
getClient: () => Promise<void | any>;
|
|
81
|
-
getPeerConnection: () => Promise<void | any>;
|
|
82
|
-
refresh(): Promise<void>;
|
|
83
|
-
}>;
|
|
84
|
-
readonly outboundTracks: AsyncIterableIterator<void | {
|
|
85
|
-
callId: string;
|
|
86
|
-
clientId: string;
|
|
87
|
-
peerConnectionId: string;
|
|
88
|
-
trackId: string;
|
|
89
|
-
direction: "outbound";
|
|
90
|
-
readonly kind: "audio" | "video";
|
|
91
|
-
readonly stats: import("../models/samples_pb").Samples_ClientSample_OutboundAudioTrack[] | import("../models/samples_pb").Samples_ClientSample_OutboundVideoTrack[] | undefined;
|
|
92
|
-
readonly marker: string | undefined;
|
|
93
|
-
readonly ssrc: bigint[];
|
|
94
|
-
getCall: () => Promise<void | {
|
|
95
|
-
callId: string;
|
|
96
|
-
roomId: string;
|
|
97
|
-
serviceId: string;
|
|
98
|
-
started: bigint;
|
|
99
|
-
readonly clientIds: readonly string[];
|
|
100
|
-
getClient: (clientId: string) => Promise<void | any>;
|
|
101
|
-
readonly clients: AsyncIterableIterator<void | any>;
|
|
102
|
-
refresh: () => Promise<void>;
|
|
103
|
-
}>;
|
|
104
|
-
getClient: () => Promise<void | any>;
|
|
105
|
-
getPeerConnection: () => Promise<void | any>;
|
|
106
|
-
refresh: () => Promise<void>;
|
|
107
|
-
}>;
|
|
108
|
-
readonly inboundAudioTracks: AsyncIterableIterator<void | {
|
|
109
|
-
callId: string;
|
|
110
|
-
clientId: string;
|
|
111
|
-
peerConnectionId: string;
|
|
112
|
-
trackId: string;
|
|
113
|
-
direction: "inbound";
|
|
114
|
-
readonly kind: "audio" | "video";
|
|
115
|
-
readonly stats: import("../models/samples_pb").Samples_ClientSample_InboundAudioTrack[] | import("../models/samples_pb").Samples_ClientSample_InboundVideoTrack[] | undefined;
|
|
116
|
-
readonly marker: string | undefined;
|
|
117
|
-
readonly ssrc: bigint[];
|
|
118
|
-
getCall: () => Promise<void | {
|
|
119
|
-
callId: string;
|
|
120
|
-
roomId: string;
|
|
121
|
-
serviceId: string;
|
|
122
|
-
started: bigint;
|
|
123
|
-
readonly clientIds: readonly string[];
|
|
124
|
-
getClient: (clientId: string) => Promise<void | any>;
|
|
125
|
-
readonly clients: AsyncIterableIterator<void | any>;
|
|
126
|
-
refresh: () => Promise<void>;
|
|
127
|
-
}>;
|
|
128
|
-
getClient: () => Promise<void | any>;
|
|
129
|
-
getPeerConnection: () => Promise<void | any>;
|
|
130
|
-
refresh(): Promise<void>;
|
|
131
|
-
}>;
|
|
132
|
-
readonly outboundAudioTracks: AsyncIterableIterator<void | {
|
|
133
|
-
callId: string;
|
|
134
|
-
clientId: string;
|
|
135
|
-
peerConnectionId: string;
|
|
136
|
-
trackId: string;
|
|
137
|
-
direction: "outbound";
|
|
138
|
-
readonly kind: "audio" | "video";
|
|
139
|
-
readonly stats: import("../models/samples_pb").Samples_ClientSample_OutboundAudioTrack[] | import("../models/samples_pb").Samples_ClientSample_OutboundVideoTrack[] | undefined;
|
|
140
|
-
readonly marker: string | undefined;
|
|
141
|
-
readonly ssrc: bigint[];
|
|
142
|
-
getCall: () => Promise<void | {
|
|
143
|
-
callId: string;
|
|
144
|
-
roomId: string;
|
|
145
|
-
serviceId: string;
|
|
146
|
-
started: bigint;
|
|
147
|
-
readonly clientIds: readonly string[];
|
|
148
|
-
getClient: (clientId: string) => Promise<void | any>;
|
|
149
|
-
readonly clients: AsyncIterableIterator<void | any>;
|
|
150
|
-
refresh: () => Promise<void>;
|
|
151
|
-
}>;
|
|
152
|
-
getClient: () => Promise<void | any>;
|
|
153
|
-
getPeerConnection: () => Promise<void | any>;
|
|
154
|
-
refresh: () => Promise<void>;
|
|
155
|
-
}>;
|
|
156
|
-
readonly inboundVideoTracks: AsyncIterableIterator<void | {
|
|
157
|
-
callId: string;
|
|
158
|
-
clientId: string;
|
|
159
|
-
peerConnectionId: string;
|
|
160
|
-
trackId: string;
|
|
161
|
-
direction: "inbound";
|
|
162
|
-
readonly kind: "audio" | "video";
|
|
163
|
-
readonly stats: import("../models/samples_pb").Samples_ClientSample_InboundAudioTrack[] | import("../models/samples_pb").Samples_ClientSample_InboundVideoTrack[] | undefined;
|
|
164
|
-
readonly marker: string | undefined;
|
|
165
|
-
readonly ssrc: bigint[];
|
|
166
|
-
getCall: () => Promise<void | {
|
|
167
|
-
callId: string;
|
|
168
|
-
roomId: string;
|
|
169
|
-
serviceId: string;
|
|
170
|
-
started: bigint;
|
|
171
|
-
readonly clientIds: readonly string[];
|
|
172
|
-
getClient: (clientId: string) => Promise<void | any>;
|
|
173
|
-
readonly clients: AsyncIterableIterator<void | any>;
|
|
174
|
-
refresh: () => Promise<void>;
|
|
175
|
-
}>;
|
|
176
|
-
getClient: () => Promise<void | any>;
|
|
177
|
-
getPeerConnection: () => Promise<void | any>;
|
|
178
|
-
refresh(): Promise<void>;
|
|
179
|
-
}>;
|
|
180
|
-
readonly outboundVideoTracks: AsyncIterableIterator<void | {
|
|
181
|
-
callId: string;
|
|
182
|
-
clientId: string;
|
|
183
|
-
peerConnectionId: string;
|
|
184
|
-
trackId: string;
|
|
185
|
-
direction: "outbound";
|
|
186
|
-
readonly kind: "audio" | "video";
|
|
187
|
-
readonly stats: import("../models/samples_pb").Samples_ClientSample_OutboundAudioTrack[] | import("../models/samples_pb").Samples_ClientSample_OutboundVideoTrack[] | undefined;
|
|
188
|
-
readonly marker: string | undefined;
|
|
189
|
-
readonly ssrc: bigint[];
|
|
190
|
-
getCall: () => Promise<void | {
|
|
191
|
-
callId: string;
|
|
192
|
-
roomId: string;
|
|
193
|
-
serviceId: string;
|
|
194
|
-
started: bigint;
|
|
195
|
-
readonly clientIds: readonly string[];
|
|
196
|
-
getClient: (clientId: string) => Promise<void | any>;
|
|
197
|
-
readonly clients: AsyncIterableIterator<void | any>;
|
|
198
|
-
refresh: () => Promise<void>;
|
|
199
|
-
}>;
|
|
200
|
-
getClient: () => Promise<void | any>;
|
|
201
|
-
getPeerConnection: () => Promise<void | any>;
|
|
202
|
-
refresh: () => Promise<void>;
|
|
203
|
-
}>;
|
|
204
|
-
getInboundTrack(inboundTrackId: string): Promise<void | {
|
|
205
|
-
callId: string;
|
|
206
|
-
clientId: string;
|
|
207
|
-
peerConnectionId: string;
|
|
208
|
-
trackId: string;
|
|
209
|
-
direction: "inbound";
|
|
210
|
-
readonly kind: "audio" | "video";
|
|
211
|
-
readonly stats: import("../models/samples_pb").Samples_ClientSample_InboundAudioTrack[] | import("../models/samples_pb").Samples_ClientSample_InboundVideoTrack[] | undefined;
|
|
212
|
-
readonly marker: string | undefined;
|
|
213
|
-
readonly ssrc: bigint[];
|
|
214
|
-
getCall: () => Promise<void | {
|
|
215
|
-
callId: string;
|
|
216
|
-
roomId: string;
|
|
217
|
-
serviceId: string;
|
|
218
|
-
started: bigint;
|
|
219
|
-
readonly clientIds: readonly string[];
|
|
220
|
-
getClient: (clientId: string) => Promise<void | any>;
|
|
221
|
-
readonly clients: AsyncIterableIterator<void | any>;
|
|
222
|
-
refresh: () => Promise<void>;
|
|
223
|
-
}>;
|
|
224
|
-
getClient: () => Promise<void | any>;
|
|
225
|
-
getPeerConnection: () => Promise<void | any>;
|
|
226
|
-
refresh(): Promise<void>;
|
|
227
|
-
}>;
|
|
228
|
-
getOutboundTrack(outboundTrackId: string): Promise<void | {
|
|
229
|
-
callId: string;
|
|
230
|
-
clientId: string;
|
|
231
|
-
peerConnectionId: string;
|
|
232
|
-
trackId: string;
|
|
233
|
-
direction: "outbound";
|
|
234
|
-
readonly kind: "audio" | "video";
|
|
235
|
-
readonly stats: import("../models/samples_pb").Samples_ClientSample_OutboundAudioTrack[] | import("../models/samples_pb").Samples_ClientSample_OutboundVideoTrack[] | undefined;
|
|
236
|
-
readonly marker: string | undefined;
|
|
237
|
-
readonly ssrc: bigint[];
|
|
238
|
-
getCall: () => Promise<void | {
|
|
239
|
-
callId: string;
|
|
240
|
-
roomId: string;
|
|
241
|
-
serviceId: string;
|
|
242
|
-
started: bigint;
|
|
243
|
-
readonly clientIds: readonly string[];
|
|
244
|
-
getClient: (clientId: string) => Promise<void | any>;
|
|
245
|
-
readonly clients: AsyncIterableIterator<void | any>;
|
|
246
|
-
refresh: () => Promise<void>;
|
|
247
|
-
}>;
|
|
248
|
-
getClient: () => Promise<void | any>;
|
|
249
|
-
getPeerConnection: () => Promise<void | any>;
|
|
250
|
-
refresh: () => Promise<void>;
|
|
251
|
-
}>;
|
|
252
|
-
refresh(): Promise<void>;
|
|
253
|
-
}>;
|
|
254
|
-
getPeerConnection: (peerConnectionId: string) => Promise<void | {
|
|
255
|
-
callId: string;
|
|
256
|
-
clientId: string;
|
|
257
|
-
peerConnectionId: string;
|
|
258
|
-
marker: string | undefined;
|
|
259
|
-
label: string | undefined;
|
|
260
|
-
mediaUnitId: string | undefined;
|
|
261
|
-
opened: bigint | undefined;
|
|
262
|
-
serviceId: string | undefined;
|
|
263
|
-
roomId: string | undefined;
|
|
264
|
-
userId: string | undefined;
|
|
265
|
-
getClient: () => Promise<void | any>;
|
|
266
|
-
getCall: () => Promise<void | {
|
|
267
|
-
callId: string;
|
|
268
|
-
roomId: string;
|
|
269
|
-
serviceId: string;
|
|
270
|
-
started: bigint;
|
|
271
|
-
readonly clientIds: readonly string[];
|
|
272
|
-
getClient: (clientId: string) => Promise<void | any>;
|
|
273
|
-
readonly clients: AsyncIterableIterator<void | any>;
|
|
274
|
-
refresh: () => Promise<void>;
|
|
275
|
-
}>;
|
|
276
|
-
readonly iceCandidatePairs: import("../models/samples_pb").Samples_ClientSample_IceCandidatePair[];
|
|
277
|
-
readonly iceRemoteCandidates: import("../models/samples_pb").Samples_ClientSample_IceRemoteCandidate[];
|
|
278
|
-
readonly iceLocalCandidates: import("../models/samples_pb").Samples_ClientSample_IceLocalCandidate[];
|
|
279
|
-
readonly transports: import("../models/samples_pb").Samples_ClientSample_PeerConnectionTransport[];
|
|
280
|
-
readonly inboundTrackIds: readonly string[];
|
|
281
|
-
readonly outboundTrackIds: readonly string[];
|
|
282
|
-
readonly inboundTracks: AsyncIterableIterator<void | {
|
|
283
|
-
callId: string;
|
|
284
|
-
clientId: string;
|
|
285
|
-
peerConnectionId: string;
|
|
286
|
-
trackId: string;
|
|
287
|
-
direction: "inbound";
|
|
288
|
-
readonly kind: "audio" | "video";
|
|
289
|
-
readonly stats: import("../models/samples_pb").Samples_ClientSample_InboundAudioTrack[] | import("../models/samples_pb").Samples_ClientSample_InboundVideoTrack[] | undefined;
|
|
290
|
-
readonly marker: string | undefined;
|
|
291
|
-
readonly ssrc: bigint[];
|
|
292
|
-
getCall: () => Promise<void | {
|
|
293
|
-
callId: string;
|
|
294
|
-
roomId: string;
|
|
295
|
-
serviceId: string;
|
|
296
|
-
started: bigint;
|
|
297
|
-
readonly clientIds: readonly string[];
|
|
298
|
-
getClient: (clientId: string) => Promise<void | any>;
|
|
299
|
-
readonly clients: AsyncIterableIterator<void | any>;
|
|
300
|
-
refresh: () => Promise<void>;
|
|
301
|
-
}>;
|
|
302
|
-
getClient: () => Promise<void | any>;
|
|
303
|
-
getPeerConnection: () => Promise<void | any>;
|
|
304
|
-
refresh(): Promise<void>;
|
|
305
|
-
}>;
|
|
306
|
-
readonly outboundTracks: AsyncIterableIterator<void | {
|
|
307
|
-
callId: string;
|
|
308
|
-
clientId: string;
|
|
309
|
-
peerConnectionId: string;
|
|
310
|
-
trackId: string;
|
|
311
|
-
direction: "outbound";
|
|
312
|
-
readonly kind: "audio" | "video";
|
|
313
|
-
readonly stats: import("../models/samples_pb").Samples_ClientSample_OutboundAudioTrack[] | import("../models/samples_pb").Samples_ClientSample_OutboundVideoTrack[] | undefined;
|
|
314
|
-
readonly marker: string | undefined;
|
|
315
|
-
readonly ssrc: bigint[];
|
|
316
|
-
getCall: () => Promise<void | {
|
|
317
|
-
callId: string;
|
|
318
|
-
roomId: string;
|
|
319
|
-
serviceId: string;
|
|
320
|
-
started: bigint;
|
|
321
|
-
readonly clientIds: readonly string[];
|
|
322
|
-
getClient: (clientId: string) => Promise<void | any>;
|
|
323
|
-
readonly clients: AsyncIterableIterator<void | any>;
|
|
324
|
-
refresh: () => Promise<void>;
|
|
325
|
-
}>;
|
|
326
|
-
getClient: () => Promise<void | any>;
|
|
327
|
-
getPeerConnection: () => Promise<void | any>;
|
|
328
|
-
refresh: () => Promise<void>;
|
|
329
|
-
}>;
|
|
330
|
-
readonly inboundAudioTracks: AsyncIterableIterator<void | {
|
|
331
|
-
callId: string;
|
|
332
|
-
clientId: string;
|
|
333
|
-
peerConnectionId: string;
|
|
334
|
-
trackId: string;
|
|
335
|
-
direction: "inbound";
|
|
336
|
-
readonly kind: "audio" | "video";
|
|
337
|
-
readonly stats: import("../models/samples_pb").Samples_ClientSample_InboundAudioTrack[] | import("../models/samples_pb").Samples_ClientSample_InboundVideoTrack[] | undefined;
|
|
338
|
-
readonly marker: string | undefined;
|
|
339
|
-
readonly ssrc: bigint[];
|
|
340
|
-
getCall: () => Promise<void | {
|
|
341
|
-
callId: string;
|
|
342
|
-
roomId: string;
|
|
343
|
-
serviceId: string;
|
|
344
|
-
started: bigint;
|
|
345
|
-
readonly clientIds: readonly string[];
|
|
346
|
-
getClient: (clientId: string) => Promise<void | any>;
|
|
347
|
-
readonly clients: AsyncIterableIterator<void | any>;
|
|
348
|
-
refresh: () => Promise<void>;
|
|
349
|
-
}>;
|
|
350
|
-
getClient: () => Promise<void | any>;
|
|
351
|
-
getPeerConnection: () => Promise<void | any>;
|
|
352
|
-
refresh(): Promise<void>;
|
|
353
|
-
}>;
|
|
354
|
-
readonly outboundAudioTracks: AsyncIterableIterator<void | {
|
|
355
|
-
callId: string;
|
|
356
|
-
clientId: string;
|
|
357
|
-
peerConnectionId: string;
|
|
358
|
-
trackId: string;
|
|
359
|
-
direction: "outbound";
|
|
360
|
-
readonly kind: "audio" | "video";
|
|
361
|
-
readonly stats: import("../models/samples_pb").Samples_ClientSample_OutboundAudioTrack[] | import("../models/samples_pb").Samples_ClientSample_OutboundVideoTrack[] | undefined;
|
|
362
|
-
readonly marker: string | undefined;
|
|
363
|
-
readonly ssrc: bigint[];
|
|
364
|
-
getCall: () => Promise<void | {
|
|
365
|
-
callId: string;
|
|
366
|
-
roomId: string;
|
|
367
|
-
serviceId: string;
|
|
368
|
-
started: bigint;
|
|
369
|
-
readonly clientIds: readonly string[];
|
|
370
|
-
getClient: (clientId: string) => Promise<void | any>;
|
|
371
|
-
readonly clients: AsyncIterableIterator<void | any>;
|
|
372
|
-
refresh: () => Promise<void>;
|
|
373
|
-
}>;
|
|
374
|
-
getClient: () => Promise<void | any>;
|
|
375
|
-
getPeerConnection: () => Promise<void | any>;
|
|
376
|
-
refresh: () => Promise<void>;
|
|
377
|
-
}>;
|
|
378
|
-
readonly inboundVideoTracks: AsyncIterableIterator<void | {
|
|
379
|
-
callId: string;
|
|
380
|
-
clientId: string;
|
|
381
|
-
peerConnectionId: string;
|
|
382
|
-
trackId: string;
|
|
383
|
-
direction: "inbound";
|
|
384
|
-
readonly kind: "audio" | "video";
|
|
385
|
-
readonly stats: import("../models/samples_pb").Samples_ClientSample_InboundAudioTrack[] | import("../models/samples_pb").Samples_ClientSample_InboundVideoTrack[] | undefined;
|
|
386
|
-
readonly marker: string | undefined;
|
|
387
|
-
readonly ssrc: bigint[];
|
|
388
|
-
getCall: () => Promise<void | {
|
|
389
|
-
callId: string;
|
|
390
|
-
roomId: string;
|
|
391
|
-
serviceId: string;
|
|
392
|
-
started: bigint;
|
|
393
|
-
readonly clientIds: readonly string[];
|
|
394
|
-
getClient: (clientId: string) => Promise<void | any>;
|
|
395
|
-
readonly clients: AsyncIterableIterator<void | any>;
|
|
396
|
-
refresh: () => Promise<void>;
|
|
397
|
-
}>;
|
|
398
|
-
getClient: () => Promise<void | any>;
|
|
399
|
-
getPeerConnection: () => Promise<void | any>;
|
|
400
|
-
refresh(): Promise<void>;
|
|
401
|
-
}>;
|
|
402
|
-
readonly outboundVideoTracks: AsyncIterableIterator<void | {
|
|
403
|
-
callId: string;
|
|
404
|
-
clientId: string;
|
|
405
|
-
peerConnectionId: string;
|
|
406
|
-
trackId: string;
|
|
407
|
-
direction: "outbound";
|
|
408
|
-
readonly kind: "audio" | "video";
|
|
409
|
-
readonly stats: import("../models/samples_pb").Samples_ClientSample_OutboundAudioTrack[] | import("../models/samples_pb").Samples_ClientSample_OutboundVideoTrack[] | undefined;
|
|
410
|
-
readonly marker: string | undefined;
|
|
411
|
-
readonly ssrc: bigint[];
|
|
412
|
-
getCall: () => Promise<void | {
|
|
413
|
-
callId: string;
|
|
414
|
-
roomId: string;
|
|
415
|
-
serviceId: string;
|
|
416
|
-
started: bigint;
|
|
417
|
-
readonly clientIds: readonly string[];
|
|
418
|
-
getClient: (clientId: string) => Promise<void | any>;
|
|
419
|
-
readonly clients: AsyncIterableIterator<void | any>;
|
|
420
|
-
refresh: () => Promise<void>;
|
|
421
|
-
}>;
|
|
422
|
-
getClient: () => Promise<void | any>;
|
|
423
|
-
getPeerConnection: () => Promise<void | any>;
|
|
424
|
-
refresh: () => Promise<void>;
|
|
425
|
-
}>;
|
|
426
|
-
getInboundTrack(inboundTrackId: string): Promise<void | {
|
|
427
|
-
callId: string;
|
|
428
|
-
clientId: string;
|
|
429
|
-
peerConnectionId: string;
|
|
430
|
-
trackId: string;
|
|
431
|
-
direction: "inbound";
|
|
432
|
-
readonly kind: "audio" | "video";
|
|
433
|
-
readonly stats: import("../models/samples_pb").Samples_ClientSample_InboundAudioTrack[] | import("../models/samples_pb").Samples_ClientSample_InboundVideoTrack[] | undefined;
|
|
434
|
-
readonly marker: string | undefined;
|
|
435
|
-
readonly ssrc: bigint[];
|
|
436
|
-
getCall: () => Promise<void | {
|
|
437
|
-
callId: string;
|
|
438
|
-
roomId: string;
|
|
439
|
-
serviceId: string;
|
|
440
|
-
started: bigint;
|
|
441
|
-
readonly clientIds: readonly string[];
|
|
442
|
-
getClient: (clientId: string) => Promise<void | any>;
|
|
443
|
-
readonly clients: AsyncIterableIterator<void | any>;
|
|
444
|
-
refresh: () => Promise<void>;
|
|
445
|
-
}>;
|
|
446
|
-
getClient: () => Promise<void | any>;
|
|
447
|
-
getPeerConnection: () => Promise<void | any>;
|
|
448
|
-
refresh(): Promise<void>;
|
|
449
|
-
}>;
|
|
450
|
-
getOutboundTrack(outboundTrackId: string): Promise<void | {
|
|
451
|
-
callId: string;
|
|
452
|
-
clientId: string;
|
|
453
|
-
peerConnectionId: string;
|
|
454
|
-
trackId: string;
|
|
455
|
-
direction: "outbound";
|
|
456
|
-
readonly kind: "audio" | "video";
|
|
457
|
-
readonly stats: import("../models/samples_pb").Samples_ClientSample_OutboundAudioTrack[] | import("../models/samples_pb").Samples_ClientSample_OutboundVideoTrack[] | undefined;
|
|
458
|
-
readonly marker: string | undefined;
|
|
459
|
-
readonly ssrc: bigint[];
|
|
460
|
-
getCall: () => Promise<void | {
|
|
461
|
-
callId: string;
|
|
462
|
-
roomId: string;
|
|
463
|
-
serviceId: string;
|
|
464
|
-
started: bigint;
|
|
465
|
-
readonly clientIds: readonly string[];
|
|
466
|
-
getClient: (clientId: string) => Promise<void | any>;
|
|
467
|
-
readonly clients: AsyncIterableIterator<void | any>;
|
|
468
|
-
refresh: () => Promise<void>;
|
|
469
|
-
}>;
|
|
470
|
-
getClient: () => Promise<void | any>;
|
|
471
|
-
getPeerConnection: () => Promise<void | any>;
|
|
472
|
-
refresh: () => Promise<void>;
|
|
473
|
-
}>;
|
|
474
|
-
refresh(): Promise<void>;
|
|
475
|
-
}>;
|
|
476
|
-
refresh: () => Promise<void>;
|
|
477
|
-
};
|
|
478
|
-
//# sourceMappingURL=ClientEntry.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
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"}
|
|
@@ -1,114 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
-
});
|
|
10
|
-
};
|
|
11
|
-
var __await = (this && this.__await) || function (v) { return this instanceof __await ? (this.v = v, this) : new __await(v); }
|
|
12
|
-
var __asyncGenerator = (this && this.__asyncGenerator) || function (thisArg, _arguments, generator) {
|
|
13
|
-
if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined.");
|
|
14
|
-
var g = generator.apply(thisArg, _arguments || []), i, q = [];
|
|
15
|
-
return i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i;
|
|
16
|
-
function verb(n) { if (g[n]) i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; }
|
|
17
|
-
function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }
|
|
18
|
-
function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }
|
|
19
|
-
function fulfill(value) { resume("next", value); }
|
|
20
|
-
function reject(value) { resume("throw", value); }
|
|
21
|
-
function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }
|
|
22
|
-
};
|
|
23
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
24
|
-
exports.createClientEntry = void 0;
|
|
25
|
-
const CallEntry_1 = require("./CallEntry");
|
|
26
|
-
const utils_1 = require("../common/utils");
|
|
27
|
-
const PeerConnectionEntry_1 = require("./PeerConnectionEntry");
|
|
28
|
-
function createClientEntry(storageProvider, model) {
|
|
29
|
-
if (!model)
|
|
30
|
-
return;
|
|
31
|
-
const { clientId, roomId, serviceId, mediaUnitId, callId, joined, timeZoneId, } = model;
|
|
32
|
-
if (!callId)
|
|
33
|
-
return CallEntry_1.logger.warn(`Client model without callId: ${JSON.stringify(model)}`);
|
|
34
|
-
if (!roomId)
|
|
35
|
-
return CallEntry_1.logger.warn(`Client model without roomId: ${JSON.stringify(model)}`);
|
|
36
|
-
if (!clientId)
|
|
37
|
-
return CallEntry_1.logger.warn(`Client model without clientId: ${JSON.stringify(model)}`);
|
|
38
|
-
if (!serviceId)
|
|
39
|
-
return CallEntry_1.logger.warn(`Client model without serviceId: ${JSON.stringify(model)}`);
|
|
40
|
-
if (!mediaUnitId)
|
|
41
|
-
return CallEntry_1.logger.warn(`Client model without mediaUnitId: ${JSON.stringify(model)}`);
|
|
42
|
-
const getCall = () => __awaiter(this, void 0, void 0, function* () {
|
|
43
|
-
return (0, CallEntry_1.createCallEntry)(storageProvider, yield storageProvider.callStorage.get(callId));
|
|
44
|
-
});
|
|
45
|
-
const asyncPeerConnectionGenerator = function (providedPeerConnectionIds) {
|
|
46
|
-
return __asyncGenerator(this, arguments, function* () {
|
|
47
|
-
const peerConnectionModels = yield __await(Promise.all((providedPeerConnectionIds !== null && providedPeerConnectionIds !== void 0 ? providedPeerConnectionIds : model.peerConnectionIds).map((peerConnectionId) => storageProvider.peerConnectionStorage.get(peerConnectionId))));
|
|
48
|
-
for (const peerConnectionModel of peerConnectionModels) {
|
|
49
|
-
if (!peerConnectionModel)
|
|
50
|
-
continue;
|
|
51
|
-
yield yield __await((0, PeerConnectionEntry_1.createPeerConnectionEntry)(storageProvider, peerConnectionModel));
|
|
52
|
-
}
|
|
53
|
-
});
|
|
54
|
-
};
|
|
55
|
-
return {
|
|
56
|
-
clientId,
|
|
57
|
-
roomId,
|
|
58
|
-
serviceId,
|
|
59
|
-
mediaUnitId,
|
|
60
|
-
callId,
|
|
61
|
-
joined,
|
|
62
|
-
timeZoneId,
|
|
63
|
-
get browser() {
|
|
64
|
-
return model.browser;
|
|
65
|
-
},
|
|
66
|
-
get engine() {
|
|
67
|
-
return model.engine;
|
|
68
|
-
},
|
|
69
|
-
get operationSystem() {
|
|
70
|
-
return model.operationSystem;
|
|
71
|
-
},
|
|
72
|
-
get platform() {
|
|
73
|
-
return model.platform;
|
|
74
|
-
},
|
|
75
|
-
get peerConnectionIds() {
|
|
76
|
-
return model.peerConnectionIds;
|
|
77
|
-
},
|
|
78
|
-
get marker() {
|
|
79
|
-
return model.marker;
|
|
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
|
-
},
|
|
94
|
-
getCall,
|
|
95
|
-
get peerConnections() {
|
|
96
|
-
return (0, utils_1.asyncIteratorConverter)(asyncPeerConnectionGenerator());
|
|
97
|
-
},
|
|
98
|
-
getPeerConnection: (peerConnectionId) => __awaiter(this, void 0, void 0, function* () {
|
|
99
|
-
return model.peerConnectionIds.includes(peerConnectionId) ? (0, PeerConnectionEntry_1.createPeerConnectionEntry)(storageProvider, yield storageProvider.peerConnectionStorage.get(peerConnectionId)) : undefined;
|
|
100
|
-
}),
|
|
101
|
-
refresh: () => __awaiter(this, void 0, void 0, function* () {
|
|
102
|
-
const refreshedModel = yield storageProvider.clientStorage.get(clientId);
|
|
103
|
-
if (!refreshedModel)
|
|
104
|
-
return;
|
|
105
|
-
model.browser = refreshedModel.browser;
|
|
106
|
-
model.engine = refreshedModel.engine;
|
|
107
|
-
model.operationSystem = refreshedModel.operationSystem;
|
|
108
|
-
model.platform = refreshedModel.platform;
|
|
109
|
-
model.peerConnectionIds = refreshedModel.peerConnectionIds;
|
|
110
|
-
model.marker = refreshedModel.marker;
|
|
111
|
-
})
|
|
112
|
-
};
|
|
113
|
-
}
|
|
114
|
-
exports.createClientEntry = createClientEntry;
|