@observertc/observer-js 0.9.26-beta → 0.30.0-beta
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/ObservedCall.d.ts +54 -0
- package/lib/ObservedCall.d.ts.map +1 -0
- package/lib/ObservedCall.js +166 -0
- package/lib/ObservedClient.d.ts +73 -0
- package/lib/ObservedClient.d.ts.map +1 -0
- package/lib/ObservedClient.js +487 -0
- package/lib/ObservedInboundTrack.d.ts +65 -0
- package/lib/ObservedInboundTrack.d.ts.map +1 -0
- package/lib/ObservedInboundTrack.js +192 -0
- package/lib/ObservedOutboundTrack.d.ts +55 -0
- package/lib/ObservedOutboundTrack.d.ts.map +1 -0
- package/lib/ObservedOutboundTrack.js +166 -0
- package/lib/ObservedPeerConnection.d.ts +57 -0
- package/lib/ObservedPeerConnection.d.ts.map +1 -0
- package/lib/ObservedPeerConnection.js +217 -0
- package/lib/Observer.d.ts +26 -1465
- package/lib/Observer.d.ts.map +1 -1
- package/lib/Observer.js +53 -605
- package/lib/{sinks/ObserverSink.d.ts → ReportsCollector.d.ts} +7 -23
- package/lib/ReportsCollector.d.ts.map +1 -0
- package/lib/{sinks/ObserverSink.js → ReportsCollector.js} +27 -85
- package/lib/common/ReportsCollector.d.ts +21 -24
- package/lib/common/ReportsCollector.d.ts.map +1 -1
- package/lib/common/ReportsCollector.js +24 -0
- package/lib/common/SingleExecutor.d.ts +3 -0
- package/lib/common/SingleExecutor.d.ts.map +1 -0
- package/lib/common/SingleExecutor.js +31 -0
- package/lib/common/TypedEventEmitter.d.ts +22 -0
- package/lib/common/TypedEventEmitter.d.ts.map +1 -0
- package/lib/common/TypedEventEmitter.js +11 -0
- package/lib/common/callEventReports.d.ts.map +1 -0
- package/lib/common/logger.d.ts +3 -9
- package/lib/common/logger.d.ts.map +1 -1
- package/lib/common/logger.js +58 -141
- package/lib/common/types.d.ts +2 -14
- package/lib/common/types.d.ts.map +1 -1
- package/lib/common/utils.d.ts +1 -0
- package/lib/common/utils.d.ts.map +1 -1
- package/lib/common/utils.js +6 -1
- package/lib/index.d.ts +8 -19
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +7 -2
- package/package.json +1 -1
- package/src/ObservedCall.ts +201 -0
- package/src/ObservedClient.ts +681 -0
- package/src/ObservedInboundTrack.ts +238 -0
- package/src/ObservedOutboundTrack.ts +205 -0
- package/src/ObservedPeerConnection.ts +249 -0
- package/src/Observer.ts +86 -442
- package/src/{sinks/ObserverSink.ts → ReportsCollector.ts} +29 -94
- package/src/common/ReportsCollector.ts +48 -23
- package/src/common/SingleExecutor.ts +36 -0
- package/src/common/TypedEventEmitter.ts +32 -0
- package/src/common/logger.ts +58 -161
- package/src/common/types.ts +4 -24
- package/src/common/utils.ts +6 -0
- package/src/index.ts +12 -23
- package/lib/Evaluator.d.ts +0 -43
- package/lib/Evaluator.d.ts.map +0 -1
- package/lib/Evaluator.js +0 -171
- package/lib/common/Semaphore.d.ts +0 -31
- package/lib/common/Semaphore.d.ts.map +0 -1
- package/lib/common/Semaphore.js +0 -16
- package/lib/entries/CallEntry.d.ts +0 -619
- package/lib/entries/CallEntry.d.ts.map +0 -1
- package/lib/entries/CallEntry.js +0 -75
- package/lib/entries/ClientEntry.d.ts +0 -478
- package/lib/entries/ClientEntry.d.ts.map +0 -1
- package/lib/entries/ClientEntry.js +0 -114
- package/lib/entries/InboundTrackEntry.d.ts +0 -682
- package/lib/entries/InboundTrackEntry.d.ts.map +0 -1
- package/lib/entries/InboundTrackEntry.js +0 -76
- package/lib/entries/OutboundTrackEntry.d.ts +0 -682
- package/lib/entries/OutboundTrackEntry.d.ts.map +0 -1
- package/lib/entries/OutboundTrackEntry.js +0 -73
- package/lib/entries/PeerConnectionEntry.d.ts +0 -505
- package/lib/entries/PeerConnectionEntry.d.ts.map +0 -1
- package/lib/entries/PeerConnectionEntry.js +0 -144
- package/lib/entries/SfuEntry.d.ts +0 -150
- package/lib/entries/SfuEntry.d.ts.map +0 -1
- package/lib/entries/SfuEntry.js +0 -77
- package/lib/entries/SfuInboundRtpPadEntry.d.ts +0 -14
- package/lib/entries/SfuInboundRtpPadEntry.d.ts.map +0 -1
- package/lib/entries/SfuInboundRtpPadEntry.js +0 -49
- package/lib/entries/SfuOutboundRtpPadEntry.d.ts +0 -14
- package/lib/entries/SfuOutboundRtpPadEntry.d.ts.map +0 -1
- package/lib/entries/SfuOutboundRtpPadEntry.js +0 -47
- package/lib/entries/SfuSctpChannelEntry.d.ts +0 -12
- package/lib/entries/SfuSctpChannelEntry.d.ts.map +0 -1
- package/lib/entries/SfuSctpChannelEntry.js +0 -43
- package/lib/entries/SfuTransportEntry.d.ts +0 -82
- package/lib/entries/SfuTransportEntry.d.ts.map +0 -1
- package/lib/entries/SfuTransportEntry.js +0 -122
- package/lib/evaluators/SetClientsCoordinateEvaluator.d.ts +0 -9
- package/lib/evaluators/SetClientsCoordinateEvaluator.d.ts.map +0 -1
- package/lib/evaluators/SetClientsCoordinateEvaluator.js +0 -95
- package/lib/middlewares/CallOperationsContext.d.ts +0 -18
- package/lib/middlewares/CallOperationsContext.d.ts.map +0 -1
- package/lib/middlewares/CallOperationsContext.js +0 -27
- package/lib/middlewares/CallProcessor.d.ts +0 -6
- package/lib/middlewares/CallProcessor.d.ts.map +0 -1
- package/lib/middlewares/CallProcessor.js +0 -36
- package/lib/middlewares/CommitTransactionMiddleware.d.ts +0 -6
- package/lib/middlewares/CommitTransactionMiddleware.d.ts.map +0 -1
- package/lib/middlewares/CommitTransactionMiddleware.js +0 -179
- package/lib/middlewares/DeleteOutdatedCallEntries.d.ts +0 -6
- package/lib/middlewares/DeleteOutdatedCallEntries.d.ts.map +0 -1
- package/lib/middlewares/DeleteOutdatedCallEntries.js +0 -121
- package/lib/middlewares/DeleteOutdatedSfuEntries.d.ts +0 -6
- package/lib/middlewares/DeleteOutdatedSfuEntries.d.ts.map +0 -1
- package/lib/middlewares/DeleteOutdatedSfuEntries.js +0 -127
- package/lib/middlewares/Middleware.d.ts +0 -3
- package/lib/middlewares/Middleware.d.ts.map +0 -1
- package/lib/middlewares/Middleware.js +0 -21
- package/lib/middlewares/Processor.d.ts +0 -9
- package/lib/middlewares/Processor.d.ts.map +0 -1
- package/lib/middlewares/Processor.js +0 -54
- package/lib/middlewares/TransactionContext.d.ts +0 -35
- package/lib/middlewares/TransactionContext.d.ts.map +0 -1
- package/lib/middlewares/TransactionContext.js +0 -90
- package/lib/middlewares/TransactoinProcessor.d.ts +0 -6
- package/lib/middlewares/TransactoinProcessor.d.ts.map +0 -1
- package/lib/middlewares/TransactoinProcessor.js +0 -17
- package/lib/middlewares/VisitObservedCallsMiddleware.d.ts +0 -7
- package/lib/middlewares/VisitObservedCallsMiddleware.d.ts.map +0 -1
- package/lib/middlewares/VisitObservedCallsMiddleware.js +0 -96
- package/lib/middlewares/VisitObservedSfusMiddleware.d.ts +0 -6
- package/lib/middlewares/VisitObservedSfusMiddleware.d.ts.map +0 -1
- package/lib/middlewares/VisitObservedSfusMiddleware.js +0 -151
- package/lib/middlewares/visitors/visitClient.d.ts +0 -5
- package/lib/middlewares/visitors/visitClient.d.ts.map +0 -1
- package/lib/middlewares/visitors/visitClient.js +0 -174
- package/lib/middlewares/visitors/visitInboundAudioTrack.d.ts +0 -5
- package/lib/middlewares/visitors/visitInboundAudioTrack.d.ts.map +0 -1
- package/lib/middlewares/visitors/visitInboundAudioTrack.js +0 -93
- package/lib/middlewares/visitors/visitInboundVideoTrack.d.ts +0 -5
- package/lib/middlewares/visitors/visitInboundVideoTrack.d.ts.map +0 -1
- package/lib/middlewares/visitors/visitInboundVideoTrack.js +0 -94
- package/lib/middlewares/visitors/visitOutboundAudioTrack.d.ts +0 -5
- package/lib/middlewares/visitors/visitOutboundAudioTrack.d.ts.map +0 -1
- package/lib/middlewares/visitors/visitOutboundAudioTrack.js +0 -90
- package/lib/middlewares/visitors/visitOutboundVideoTarck.d.ts +0 -5
- package/lib/middlewares/visitors/visitOutboundVideoTarck.d.ts.map +0 -1
- package/lib/middlewares/visitors/visitOutboundVideoTarck.js +0 -90
- package/lib/middlewares/visitors/visitPeerConnection.d.ts +0 -5
- package/lib/middlewares/visitors/visitPeerConnection.d.ts.map +0 -1
- package/lib/middlewares/visitors/visitPeerConnection.js +0 -111
- package/lib/middlewares/visitors/visitSfu.d.ts +0 -5
- package/lib/middlewares/visitors/visitSfu.d.ts.map +0 -1
- package/lib/middlewares/visitors/visitSfu.js +0 -78
- package/lib/middlewares/visitors/visitSfuInboundRtpPad.d.ts +0 -5
- package/lib/middlewares/visitors/visitSfuInboundRtpPad.d.ts.map +0 -1
- package/lib/middlewares/visitors/visitSfuInboundRtpPad.js +0 -56
- package/lib/middlewares/visitors/visitSfuOutboundRtpPad.d.ts +0 -5
- package/lib/middlewares/visitors/visitSfuOutboundRtpPad.d.ts.map +0 -1
- package/lib/middlewares/visitors/visitSfuOutboundRtpPad.js +0 -56
- package/lib/middlewares/visitors/visitSfuSctpChannel.d.ts +0 -5
- package/lib/middlewares/visitors/visitSfuSctpChannel.d.ts.map +0 -1
- package/lib/middlewares/visitors/visitSfuSctpChannel.js +0 -55
- package/lib/middlewares/visitors/visitSfuTransport.d.ts +0 -5
- package/lib/middlewares/visitors/visitSfuTransport.d.ts.map +0 -1
- package/lib/middlewares/visitors/visitSfuTransport.js +0 -56
- package/lib/processes/closePeerConnectionProcess.d.ts +0 -10
- package/lib/processes/closePeerConnectionProcess.d.ts.map +0 -1
- package/lib/processes/closePeerConnectionProcess.js +0 -51
- package/lib/processes/detachClientProcess.d.ts +0 -14
- package/lib/processes/detachClientProcess.d.ts.map +0 -1
- package/lib/processes/detachClientProcess.js +0 -106
- package/lib/processes/findRemoteMatches.d.ts +0 -9
- package/lib/processes/findRemoteMatches.d.ts.map +0 -1
- package/lib/processes/findRemoteMatches.js +0 -96
- package/lib/processes/inboundTrackRemoved.d.ts +0 -9
- package/lib/processes/inboundTrackRemoved.d.ts.map +0 -1
- package/lib/processes/inboundTrackRemoved.js +0 -22
- package/lib/processes/joinClientProcess.d.ts +0 -11
- package/lib/processes/joinClientProcess.d.ts.map +0 -1
- package/lib/processes/joinClientProcess.js +0 -120
- package/lib/processes/outboundTrackRemoved.d.ts +0 -9
- package/lib/processes/outboundTrackRemoved.d.ts.map +0 -1
- package/lib/processes/outboundTrackRemoved.js +0 -22
- package/lib/samples/ObservedCall.d.ts +0 -17
- package/lib/samples/ObservedCall.d.ts.map +0 -1
- package/lib/samples/ObservedCall.js +0 -29
- package/lib/samples/ObservedCalls.d.ts +0 -19
- package/lib/samples/ObservedCalls.d.ts.map +0 -1
- package/lib/samples/ObservedCalls.js +0 -113
- package/lib/samples/ObservedClient.d.ts +0 -28
- package/lib/samples/ObservedClient.d.ts.map +0 -1
- package/lib/samples/ObservedClient.js +0 -110
- package/lib/samples/ObservedInboundAudioTrack.d.ts +0 -17
- package/lib/samples/ObservedInboundAudioTrack.d.ts.map +0 -1
- package/lib/samples/ObservedInboundAudioTrack.js +0 -17
- package/lib/samples/ObservedInboundVideoTrack.d.ts +0 -17
- package/lib/samples/ObservedInboundVideoTrack.d.ts.map +0 -1
- package/lib/samples/ObservedInboundVideoTrack.js +0 -17
- package/lib/samples/ObservedOutboundAudioTrack.d.ts +0 -16
- package/lib/samples/ObservedOutboundAudioTrack.d.ts.map +0 -1
- package/lib/samples/ObservedOutboundAudioTrack.js +0 -17
- package/lib/samples/ObservedOutboundVideoTrack.d.ts +0 -16
- package/lib/samples/ObservedOutboundVideoTrack.d.ts.map +0 -1
- package/lib/samples/ObservedOutboundVideoTrack.js +0 -17
- package/lib/samples/ObservedPeerConnection.d.ts +0 -47
- package/lib/samples/ObservedPeerConnection.d.ts.map +0 -1
- package/lib/samples/ObservedPeerConnection.js +0 -130
- package/lib/samples/ObservedSfu.d.ts +0 -27
- package/lib/samples/ObservedSfu.d.ts.map +0 -1
- package/lib/samples/ObservedSfu.js +0 -65
- package/lib/samples/ObservedSfuInboundRtpPad.d.ts +0 -15
- package/lib/samples/ObservedSfuInboundRtpPad.d.ts.map +0 -1
- package/lib/samples/ObservedSfuInboundRtpPad.js +0 -17
- package/lib/samples/ObservedSfuOutboundRtpPad.d.ts +0 -15
- package/lib/samples/ObservedSfuOutboundRtpPad.d.ts.map +0 -1
- package/lib/samples/ObservedSfuOutboundRtpPad.js +0 -17
- package/lib/samples/ObservedSfuSctpChannel.d.ts +0 -15
- package/lib/samples/ObservedSfuSctpChannel.d.ts.map +0 -1
- package/lib/samples/ObservedSfuSctpChannel.js +0 -17
- package/lib/samples/ObservedSfuTransport.d.ts +0 -30
- package/lib/samples/ObservedSfuTransport.d.ts.map +0 -1
- package/lib/samples/ObservedSfuTransport.js +0 -86
- package/lib/samples/ObservedSfus.d.ts +0 -16
- package/lib/samples/ObservedSfus.d.ts.map +0 -1
- package/lib/samples/ObservedSfus.js +0 -72
- package/lib/sinks/ObserverSink.d.ts.map +0 -1
- package/lib/sinks/callEventReports.d.ts.map +0 -1
- package/lib/sources/ObservedCallSource.d.ts +0 -18
- package/lib/sources/ObservedCallSource.d.ts.map +0 -1
- package/lib/sources/ObservedCallSource.js +0 -2
- package/lib/sources/ObservedClientSource.d.ts +0 -19
- package/lib/sources/ObservedClientSource.d.ts.map +0 -1
- package/lib/sources/ObservedClientSource.js +0 -2
- package/lib/sources/ObservedSfuSource.d.ts +0 -15
- package/lib/sources/ObservedSfuSource.d.ts.map +0 -1
- package/lib/sources/ObservedSfuSource.js +0 -2
- package/lib/sources/Sources.d.ts +0 -47
- package/lib/sources/Sources.d.ts.map +0 -1
- package/lib/sources/Sources.js +0 -211
- 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 -294
- /package/lib/{sinks → common}/callEventReports.d.ts +0 -0
- /package/lib/{sinks → common}/callEventReports.js +0 -0
- /package/src/{sinks → common}/callEventReports.ts +0 -0
|
@@ -1,144 +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.createPeerConnectionEntry = void 0;
|
|
25
|
-
const CallEntry_1 = require("./CallEntry");
|
|
26
|
-
const utils_1 = require("../common/utils");
|
|
27
|
-
const ClientEntry_1 = require("./ClientEntry");
|
|
28
|
-
const InboundTrackEntry_1 = require("./InboundTrackEntry");
|
|
29
|
-
const OutboundTrackEntry_1 = require("./OutboundTrackEntry");
|
|
30
|
-
function createPeerConnectionEntry(storageProvider, model) {
|
|
31
|
-
if (!model)
|
|
32
|
-
return;
|
|
33
|
-
const { callId, clientId, peerConnectionId, label, mediaUnitId, opened, serviceId, roomId, userId, marker } = model;
|
|
34
|
-
if (!peerConnectionId)
|
|
35
|
-
return CallEntry_1.logger.warn(`PeerConnection model without peerConnectionId: ${JSON.stringify(model)}`);
|
|
36
|
-
if (!callId)
|
|
37
|
-
return CallEntry_1.logger.warn(`PeerConnection model without callId: ${JSON.stringify(model)}`);
|
|
38
|
-
if (!clientId)
|
|
39
|
-
return CallEntry_1.logger.warn(`PeerConnection model without clientId: ${JSON.stringify(model)}`);
|
|
40
|
-
const getClient = () => __awaiter(this, void 0, void 0, function* () {
|
|
41
|
-
return (0, ClientEntry_1.createClientEntry)(storageProvider, yield storageProvider.clientStorage.get(clientId));
|
|
42
|
-
});
|
|
43
|
-
const getCall = () => __awaiter(this, void 0, void 0, function* () {
|
|
44
|
-
return (0, CallEntry_1.createCallEntry)(storageProvider, yield storageProvider.callStorage.get(callId));
|
|
45
|
-
});
|
|
46
|
-
const asyncInboundTrackGenerator = function (providedInboundTrackIds, kind) {
|
|
47
|
-
return __asyncGenerator(this, arguments, function* () {
|
|
48
|
-
const inboundTrackModels = yield __await(Promise.all((providedInboundTrackIds !== null && providedInboundTrackIds !== void 0 ? providedInboundTrackIds : model.inboundTrackIds).map((inboundTrackId) => storageProvider.inboundTrackStorage.get(inboundTrackId))));
|
|
49
|
-
for (const inboundTrackModel of inboundTrackModels) {
|
|
50
|
-
if (!inboundTrackModel)
|
|
51
|
-
continue;
|
|
52
|
-
if (kind && inboundTrackModel.kind !== kind)
|
|
53
|
-
continue;
|
|
54
|
-
yield yield __await((0, InboundTrackEntry_1.createInboundTrackEntry)(storageProvider, inboundTrackModel));
|
|
55
|
-
}
|
|
56
|
-
});
|
|
57
|
-
};
|
|
58
|
-
const asyncOutboundTrackGenerator = function (providedOutboundTrackIds, kind) {
|
|
59
|
-
return __asyncGenerator(this, arguments, function* () {
|
|
60
|
-
const outboundTrackModels = yield __await(Promise.all((providedOutboundTrackIds !== null && providedOutboundTrackIds !== void 0 ? providedOutboundTrackIds : model.outboundTrackIds).map((outboundTrackId) => storageProvider.outboundTrackStorage.get(outboundTrackId))));
|
|
61
|
-
for (const outboundTrackModel of outboundTrackModels) {
|
|
62
|
-
if (!outboundTrackModel)
|
|
63
|
-
continue;
|
|
64
|
-
if (kind && outboundTrackModel.kind !== kind)
|
|
65
|
-
continue;
|
|
66
|
-
yield yield __await((0, OutboundTrackEntry_1.createOutboundTrackEntry)(storageProvider, outboundTrackModel));
|
|
67
|
-
}
|
|
68
|
-
});
|
|
69
|
-
};
|
|
70
|
-
return {
|
|
71
|
-
callId,
|
|
72
|
-
clientId,
|
|
73
|
-
peerConnectionId,
|
|
74
|
-
marker,
|
|
75
|
-
label,
|
|
76
|
-
mediaUnitId,
|
|
77
|
-
opened,
|
|
78
|
-
serviceId,
|
|
79
|
-
roomId,
|
|
80
|
-
userId,
|
|
81
|
-
getClient,
|
|
82
|
-
getCall,
|
|
83
|
-
get iceCandidatePairs() {
|
|
84
|
-
return model.iceCandidatePairs;
|
|
85
|
-
},
|
|
86
|
-
get iceRemoteCandidates() {
|
|
87
|
-
return model.iceRemoteCandidates;
|
|
88
|
-
},
|
|
89
|
-
get iceLocalCandidates() {
|
|
90
|
-
return model.icelocalCandidates;
|
|
91
|
-
},
|
|
92
|
-
get transports() {
|
|
93
|
-
return model.transports;
|
|
94
|
-
},
|
|
95
|
-
get inboundTrackIds() {
|
|
96
|
-
return model.inboundTrackIds;
|
|
97
|
-
},
|
|
98
|
-
get outboundTrackIds() {
|
|
99
|
-
return model.outboundTrackIds;
|
|
100
|
-
},
|
|
101
|
-
get inboundTracks() {
|
|
102
|
-
return (0, utils_1.asyncIteratorConverter)(asyncInboundTrackGenerator());
|
|
103
|
-
},
|
|
104
|
-
get outboundTracks() {
|
|
105
|
-
return (0, utils_1.asyncIteratorConverter)(asyncOutboundTrackGenerator());
|
|
106
|
-
},
|
|
107
|
-
get inboundAudioTracks() {
|
|
108
|
-
return (0, utils_1.asyncIteratorConverter)(asyncInboundTrackGenerator(undefined, 'audio'));
|
|
109
|
-
},
|
|
110
|
-
get outboundAudioTracks() {
|
|
111
|
-
return (0, utils_1.asyncIteratorConverter)(asyncOutboundTrackGenerator(undefined, 'audio'));
|
|
112
|
-
},
|
|
113
|
-
get inboundVideoTracks() {
|
|
114
|
-
return (0, utils_1.asyncIteratorConverter)(asyncInboundTrackGenerator(undefined, 'video'));
|
|
115
|
-
},
|
|
116
|
-
get outboundVideoTracks() {
|
|
117
|
-
return (0, utils_1.asyncIteratorConverter)(asyncOutboundTrackGenerator(undefined, 'video'));
|
|
118
|
-
},
|
|
119
|
-
getInboundTrack(inboundTrackId) {
|
|
120
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
121
|
-
return model.inboundTrackIds.includes(inboundTrackId) ? (0, InboundTrackEntry_1.createInboundTrackEntry)(storageProvider, yield storageProvider.inboundTrackStorage.get(inboundTrackId)) : undefined;
|
|
122
|
-
});
|
|
123
|
-
},
|
|
124
|
-
getOutboundTrack(outboundTrackId) {
|
|
125
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
126
|
-
return model.outboundTrackIds.includes(outboundTrackId) ? (0, OutboundTrackEntry_1.createOutboundTrackEntry)(storageProvider, yield storageProvider.outboundTrackStorage.get(outboundTrackId)) : undefined;
|
|
127
|
-
});
|
|
128
|
-
},
|
|
129
|
-
refresh() {
|
|
130
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
131
|
-
const refreshedModel = yield storageProvider.peerConnectionStorage.get(peerConnectionId);
|
|
132
|
-
if (!refreshedModel)
|
|
133
|
-
return;
|
|
134
|
-
model.iceCandidatePairs = refreshedModel.iceCandidatePairs;
|
|
135
|
-
model.iceRemoteCandidates = refreshedModel.iceRemoteCandidates;
|
|
136
|
-
model.icelocalCandidates = refreshedModel.icelocalCandidates;
|
|
137
|
-
model.transports = refreshedModel.transports;
|
|
138
|
-
model.inboundTrackIds = refreshedModel.inboundTrackIds;
|
|
139
|
-
model.outboundTrackIds = refreshedModel.outboundTrackIds;
|
|
140
|
-
});
|
|
141
|
-
}
|
|
142
|
-
};
|
|
143
|
-
}
|
|
144
|
-
exports.createPeerConnectionEntry = createPeerConnectionEntry;
|
|
@@ -1,150 +0,0 @@
|
|
|
1
|
-
import * as Models from '../models/Models';
|
|
2
|
-
import { StorageProvider } from '../storages/StorageProvider';
|
|
3
|
-
export declare const logger: import("../common/logger").WrappedLogger;
|
|
4
|
-
export type SfuEntry = ReturnType<typeof createSfuEntry>;
|
|
5
|
-
export declare function createSfuEntry(storageProvider: StorageProvider, model?: Models.Sfu): void | {
|
|
6
|
-
sfuId: string;
|
|
7
|
-
serviceId: string;
|
|
8
|
-
mediaUnitId: string;
|
|
9
|
-
joined: bigint;
|
|
10
|
-
readonly marker: string | undefined;
|
|
11
|
-
readonly sfuTransportIds: readonly string[];
|
|
12
|
-
readonly sfuTransports: AsyncIterableIterator<void | {
|
|
13
|
-
sfuTransportId: string;
|
|
14
|
-
sfuId: string;
|
|
15
|
-
opened: bigint;
|
|
16
|
-
readonly internal: boolean;
|
|
17
|
-
readonly marker: string | undefined;
|
|
18
|
-
readonly inboundRtpPadIds: readonly string[];
|
|
19
|
-
readonly outboundRtpPadIds: readonly string[];
|
|
20
|
-
readonly sctpChannelIds: readonly string[];
|
|
21
|
-
readonly inboundRtpPads: AsyncIterableIterator<void | {
|
|
22
|
-
sfuId: string;
|
|
23
|
-
sfuTransportId: string;
|
|
24
|
-
rtpPadId: string;
|
|
25
|
-
direction: "inbound";
|
|
26
|
-
added: bigint;
|
|
27
|
-
readonly internal: boolean;
|
|
28
|
-
readonly marker: string | undefined;
|
|
29
|
-
refresh: () => Promise<void>;
|
|
30
|
-
}>;
|
|
31
|
-
readonly outboundRtpPads: AsyncIterableIterator<void | {
|
|
32
|
-
sfuTransportId: string;
|
|
33
|
-
sfuId: string;
|
|
34
|
-
rtpPadId: string;
|
|
35
|
-
added: bigint;
|
|
36
|
-
direction: "outbound";
|
|
37
|
-
readonly internal: boolean;
|
|
38
|
-
readonly marker: string | undefined;
|
|
39
|
-
refresh: () => Promise<void>;
|
|
40
|
-
}>;
|
|
41
|
-
readonly sctpChannels: AsyncIterableIterator<void | {
|
|
42
|
-
sfuId: string;
|
|
43
|
-
sfuTransportId: string;
|
|
44
|
-
sfuSctpChannelId: string;
|
|
45
|
-
opened: bigint;
|
|
46
|
-
readonly marker: string | undefined;
|
|
47
|
-
refresh: () => Promise<void>;
|
|
48
|
-
}>;
|
|
49
|
-
getSfu: () => Promise<void | any>;
|
|
50
|
-
getSfuInboundRtpPad: (sfuInboundRtpPadId: string) => Promise<void | {
|
|
51
|
-
sfuId: string;
|
|
52
|
-
sfuTransportId: string;
|
|
53
|
-
rtpPadId: string;
|
|
54
|
-
direction: "inbound";
|
|
55
|
-
added: bigint;
|
|
56
|
-
readonly internal: boolean;
|
|
57
|
-
readonly marker: string | undefined;
|
|
58
|
-
refresh: () => Promise<void>;
|
|
59
|
-
}>;
|
|
60
|
-
getSfuOutboundRtpPad: (sfuOutboundRtpPadId: string) => Promise<void | {
|
|
61
|
-
sfuTransportId: string;
|
|
62
|
-
sfuId: string;
|
|
63
|
-
rtpPadId: string;
|
|
64
|
-
added: bigint;
|
|
65
|
-
direction: "outbound";
|
|
66
|
-
readonly internal: boolean;
|
|
67
|
-
readonly marker: string | undefined;
|
|
68
|
-
refresh: () => Promise<void>;
|
|
69
|
-
}>;
|
|
70
|
-
getSfuSctpChannel: (sfuSctpChannelId: string) => Promise<void | {
|
|
71
|
-
sfuId: string;
|
|
72
|
-
sfuTransportId: string;
|
|
73
|
-
sfuSctpChannelId: string;
|
|
74
|
-
opened: bigint;
|
|
75
|
-
readonly marker: string | undefined;
|
|
76
|
-
refresh: () => Promise<void>;
|
|
77
|
-
}>;
|
|
78
|
-
refresh: () => Promise<void>;
|
|
79
|
-
}>;
|
|
80
|
-
getSfuTransport: (sfuTransportId: string) => Promise<void | {
|
|
81
|
-
sfuTransportId: string;
|
|
82
|
-
sfuId: string;
|
|
83
|
-
opened: bigint;
|
|
84
|
-
readonly internal: boolean;
|
|
85
|
-
readonly marker: string | undefined;
|
|
86
|
-
readonly inboundRtpPadIds: readonly string[];
|
|
87
|
-
readonly outboundRtpPadIds: readonly string[];
|
|
88
|
-
readonly sctpChannelIds: readonly string[];
|
|
89
|
-
readonly inboundRtpPads: AsyncIterableIterator<void | {
|
|
90
|
-
sfuId: string;
|
|
91
|
-
sfuTransportId: string;
|
|
92
|
-
rtpPadId: string;
|
|
93
|
-
direction: "inbound";
|
|
94
|
-
added: bigint;
|
|
95
|
-
readonly internal: boolean;
|
|
96
|
-
readonly marker: string | undefined;
|
|
97
|
-
refresh: () => Promise<void>;
|
|
98
|
-
}>;
|
|
99
|
-
readonly outboundRtpPads: AsyncIterableIterator<void | {
|
|
100
|
-
sfuTransportId: string;
|
|
101
|
-
sfuId: string;
|
|
102
|
-
rtpPadId: string;
|
|
103
|
-
added: bigint;
|
|
104
|
-
direction: "outbound";
|
|
105
|
-
readonly internal: boolean;
|
|
106
|
-
readonly marker: string | undefined;
|
|
107
|
-
refresh: () => Promise<void>;
|
|
108
|
-
}>;
|
|
109
|
-
readonly sctpChannels: AsyncIterableIterator<void | {
|
|
110
|
-
sfuId: string;
|
|
111
|
-
sfuTransportId: string;
|
|
112
|
-
sfuSctpChannelId: string;
|
|
113
|
-
opened: bigint;
|
|
114
|
-
readonly marker: string | undefined;
|
|
115
|
-
refresh: () => Promise<void>;
|
|
116
|
-
}>;
|
|
117
|
-
getSfu: () => Promise<void | any>;
|
|
118
|
-
getSfuInboundRtpPad: (sfuInboundRtpPadId: string) => Promise<void | {
|
|
119
|
-
sfuId: string;
|
|
120
|
-
sfuTransportId: string;
|
|
121
|
-
rtpPadId: string;
|
|
122
|
-
direction: "inbound";
|
|
123
|
-
added: bigint;
|
|
124
|
-
readonly internal: boolean;
|
|
125
|
-
readonly marker: string | undefined;
|
|
126
|
-
refresh: () => Promise<void>;
|
|
127
|
-
}>;
|
|
128
|
-
getSfuOutboundRtpPad: (sfuOutboundRtpPadId: string) => Promise<void | {
|
|
129
|
-
sfuTransportId: string;
|
|
130
|
-
sfuId: string;
|
|
131
|
-
rtpPadId: string;
|
|
132
|
-
added: bigint;
|
|
133
|
-
direction: "outbound";
|
|
134
|
-
readonly internal: boolean;
|
|
135
|
-
readonly marker: string | undefined;
|
|
136
|
-
refresh: () => Promise<void>;
|
|
137
|
-
}>;
|
|
138
|
-
getSfuSctpChannel: (sfuSctpChannelId: string) => Promise<void | {
|
|
139
|
-
sfuId: string;
|
|
140
|
-
sfuTransportId: string;
|
|
141
|
-
sfuSctpChannelId: string;
|
|
142
|
-
opened: bigint;
|
|
143
|
-
readonly marker: string | undefined;
|
|
144
|
-
refresh: () => Promise<void>;
|
|
145
|
-
}>;
|
|
146
|
-
refresh: () => Promise<void>;
|
|
147
|
-
}>;
|
|
148
|
-
refresh: () => Promise<void>;
|
|
149
|
-
};
|
|
150
|
-
//# sourceMappingURL=SfuEntry.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"SfuEntry.d.ts","sourceRoot":"","sources":["../../src/entries/SfuEntry.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,QAAQ,GAAG,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;AAEzD,wBAAgB,cAAc,CAAC,eAAe,EAAE,eAAe,EAAE,KAAK,CAAC,EAAE,MAAM,CAAC,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;sCAcnC,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAqCrD"}
|
package/lib/entries/SfuEntry.js
DELETED
|
@@ -1,77 +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.createSfuEntry = exports.logger = void 0;
|
|
25
|
-
const logger_1 = require("../common/logger");
|
|
26
|
-
const SfuTransportEntry_1 = require("./SfuTransportEntry");
|
|
27
|
-
const utils_1 = require("../common/utils");
|
|
28
|
-
exports.logger = (0, logger_1.createLogger)('CallWrapper');
|
|
29
|
-
function createSfuEntry(storageProvider, model) {
|
|
30
|
-
if (!model)
|
|
31
|
-
return;
|
|
32
|
-
const { sfuId, serviceId, mediaUnitId, joined, } = model;
|
|
33
|
-
if (!sfuId)
|
|
34
|
-
return exports.logger.warn(`Sfu model without sfuId: ${JSON.stringify(model)}`);
|
|
35
|
-
if (!serviceId)
|
|
36
|
-
return exports.logger.warn(`Sfu model without serviceId: ${JSON.stringify(model)}`);
|
|
37
|
-
if (!mediaUnitId)
|
|
38
|
-
return exports.logger.warn(`Sfu model without mediaUnitId: ${JSON.stringify(model)}`);
|
|
39
|
-
if (!joined)
|
|
40
|
-
return exports.logger.warn(`Sfu model without joined: ${JSON.stringify(model)}`);
|
|
41
|
-
const getSfuTransport = (sfuTransportId) => __awaiter(this, void 0, void 0, function* () {
|
|
42
|
-
return (0, SfuTransportEntry_1.createSfuTransportEntry)(storageProvider, yield storageProvider.sfuTransportStorage.get(sfuTransportId));
|
|
43
|
-
});
|
|
44
|
-
const asyncSfuTransportGenerator = function () {
|
|
45
|
-
return __asyncGenerator(this, arguments, function* () {
|
|
46
|
-
const sfuTransportModels = yield __await(Promise.all(model.sfuTransportIds.map((sfuTransportId) => storageProvider.sfuTransportStorage.get(sfuTransportId))));
|
|
47
|
-
for (const sfuTransportModel of sfuTransportModels) {
|
|
48
|
-
if (!sfuTransportModel)
|
|
49
|
-
continue;
|
|
50
|
-
yield yield __await((0, SfuTransportEntry_1.createSfuTransportEntry)(storageProvider, sfuTransportModel));
|
|
51
|
-
}
|
|
52
|
-
});
|
|
53
|
-
};
|
|
54
|
-
return {
|
|
55
|
-
sfuId,
|
|
56
|
-
serviceId,
|
|
57
|
-
mediaUnitId,
|
|
58
|
-
joined,
|
|
59
|
-
get marker() {
|
|
60
|
-
return model.marker;
|
|
61
|
-
},
|
|
62
|
-
get sfuTransportIds() {
|
|
63
|
-
return model.sfuTransportIds;
|
|
64
|
-
},
|
|
65
|
-
get sfuTransports() {
|
|
66
|
-
return (0, utils_1.asyncIteratorConverter)(asyncSfuTransportGenerator());
|
|
67
|
-
},
|
|
68
|
-
getSfuTransport,
|
|
69
|
-
refresh: () => __awaiter(this, void 0, void 0, function* () {
|
|
70
|
-
const refreshedModel = yield storageProvider.sfuStorage.get(sfuId);
|
|
71
|
-
if (!refreshedModel)
|
|
72
|
-
return;
|
|
73
|
-
model.marker = refreshedModel.marker;
|
|
74
|
-
})
|
|
75
|
-
};
|
|
76
|
-
}
|
|
77
|
-
exports.createSfuEntry = createSfuEntry;
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import * as Models from '../models/Models';
|
|
2
|
-
import { StorageProvider } from '../storages/StorageProvider';
|
|
3
|
-
export type SfuInboundRtpPadEntry = ReturnType<typeof createSfuInboundRtpPadEntry>;
|
|
4
|
-
export declare function createSfuInboundRtpPadEntry(storageProvider: StorageProvider, model?: Models.SfuInboundRtpPad): void | {
|
|
5
|
-
sfuId: string;
|
|
6
|
-
sfuTransportId: string;
|
|
7
|
-
rtpPadId: string;
|
|
8
|
-
direction: "inbound";
|
|
9
|
-
added: bigint;
|
|
10
|
-
readonly internal: boolean;
|
|
11
|
-
readonly marker: string | undefined;
|
|
12
|
-
refresh: () => Promise<void>;
|
|
13
|
-
};
|
|
14
|
-
//# sourceMappingURL=SfuInboundRtpPadEntry.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"SfuInboundRtpPadEntry.d.ts","sourceRoot":"","sources":["../../src/entries/SfuInboundRtpPadEntry.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,MAAM,kBAAkB,CAAC;AAC3C,OAAO,EAAE,eAAe,EAAE,MAAM,6BAA6B,CAAC;AAG9D,MAAM,MAAM,qBAAqB,GAAG,UAAU,CAAC,OAAO,2BAA2B,CAAC,CAAC;AAEnF,wBAAgB,2BAA2B,CAAC,eAAe,EAAE,eAAe,EAAE,KAAK,CAAC,EAAE,MAAM,CAAC,gBAAgB;;;;;;;;;EAuC5G"}
|
|
@@ -1,49 +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
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
-
exports.createSfuInboundRtpPadEntry = void 0;
|
|
13
|
-
const SfuEntry_1 = require("./SfuEntry");
|
|
14
|
-
function createSfuInboundRtpPadEntry(storageProvider, model) {
|
|
15
|
-
if (!model)
|
|
16
|
-
return;
|
|
17
|
-
const { sfuId, sfuTransportId, added, internal, rtpPadId, mediaUnitId, } = model;
|
|
18
|
-
if (!sfuId)
|
|
19
|
-
return SfuEntry_1.logger.warn(`SfuInboundRtpPad model without sfuId: ${JSON.stringify(model)}`);
|
|
20
|
-
if (!sfuTransportId)
|
|
21
|
-
return SfuEntry_1.logger.warn(`SfuInboundRtpPad model without sfuTransportId: ${JSON.stringify(model)}`);
|
|
22
|
-
if (!added)
|
|
23
|
-
return SfuEntry_1.logger.warn(`SfuInboundRtpPad model without added: ${JSON.stringify(model)}`);
|
|
24
|
-
if (!rtpPadId)
|
|
25
|
-
return SfuEntry_1.logger.warn(`SfuInboundRtpPad model without rtpPadId: ${JSON.stringify(model)}`);
|
|
26
|
-
if (!mediaUnitId)
|
|
27
|
-
return SfuEntry_1.logger.warn(`SfuInboundRtpPad model without mediaUnitId: ${JSON.stringify(model)}`);
|
|
28
|
-
const direction = 'inbound';
|
|
29
|
-
return {
|
|
30
|
-
sfuId,
|
|
31
|
-
sfuTransportId,
|
|
32
|
-
rtpPadId,
|
|
33
|
-
direction,
|
|
34
|
-
added,
|
|
35
|
-
get internal() {
|
|
36
|
-
return internal === true;
|
|
37
|
-
},
|
|
38
|
-
get marker() {
|
|
39
|
-
return model.marker;
|
|
40
|
-
},
|
|
41
|
-
refresh: () => __awaiter(this, void 0, void 0, function* () {
|
|
42
|
-
const refreshedModel = yield storageProvider.sfuInboundRtpPadStorage.get(sfuTransportId);
|
|
43
|
-
if (!refreshedModel)
|
|
44
|
-
return;
|
|
45
|
-
model.marker = refreshedModel.marker;
|
|
46
|
-
})
|
|
47
|
-
};
|
|
48
|
-
}
|
|
49
|
-
exports.createSfuInboundRtpPadEntry = createSfuInboundRtpPadEntry;
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import * as Models from '../models/Models';
|
|
2
|
-
import { StorageProvider } from '../storages/StorageProvider';
|
|
3
|
-
export type SfuOutboundRtpPadEntry = ReturnType<typeof createSfuOutboundRtpPadEntry>;
|
|
4
|
-
export declare function createSfuOutboundRtpPadEntry(storageProvider: StorageProvider, model?: Models.SfuOutboundRtpPad): void | {
|
|
5
|
-
sfuTransportId: string;
|
|
6
|
-
sfuId: string;
|
|
7
|
-
rtpPadId: string;
|
|
8
|
-
added: bigint;
|
|
9
|
-
direction: "outbound";
|
|
10
|
-
readonly internal: boolean;
|
|
11
|
-
readonly marker: string | undefined;
|
|
12
|
-
refresh: () => Promise<void>;
|
|
13
|
-
};
|
|
14
|
-
//# sourceMappingURL=SfuOutboundRtpPadEntry.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"SfuOutboundRtpPadEntry.d.ts","sourceRoot":"","sources":["../../src/entries/SfuOutboundRtpPadEntry.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,MAAM,kBAAkB,CAAC;AAC3C,OAAO,EAAE,eAAe,EAAE,MAAM,6BAA6B,CAAC;AAG9D,MAAM,MAAM,sBAAsB,GAAG,UAAU,CAAC,OAAO,4BAA4B,CAAC,CAAC;AAErF,wBAAgB,4BAA4B,CAAC,eAAe,EAAE,eAAe,EAAE,KAAK,CAAC,EAAE,MAAM,CAAC,iBAAiB;;;;;;;;;EAqC9G"}
|
|
@@ -1,47 +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
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
-
exports.createSfuOutboundRtpPadEntry = void 0;
|
|
13
|
-
const SfuEntry_1 = require("./SfuEntry");
|
|
14
|
-
function createSfuOutboundRtpPadEntry(storageProvider, model) {
|
|
15
|
-
if (!model)
|
|
16
|
-
return;
|
|
17
|
-
const { sfuId, sfuTransportId, rtpPadId, added, internal, } = model;
|
|
18
|
-
if (!sfuId)
|
|
19
|
-
return SfuEntry_1.logger.warn(`SfuTransport model without sfuId: ${JSON.stringify(model)}`);
|
|
20
|
-
if (!sfuTransportId)
|
|
21
|
-
return SfuEntry_1.logger.warn(`SfuTransport model without sfuTransportId: ${JSON.stringify(model)}`);
|
|
22
|
-
if (!rtpPadId)
|
|
23
|
-
return SfuEntry_1.logger.warn(`SfuTransport model without rtpPadId: ${JSON.stringify(model)}`);
|
|
24
|
-
if (!added)
|
|
25
|
-
return SfuEntry_1.logger.warn(`SfuTransport model without added: ${JSON.stringify(model)}`);
|
|
26
|
-
const direction = 'outbound';
|
|
27
|
-
return {
|
|
28
|
-
sfuTransportId,
|
|
29
|
-
sfuId,
|
|
30
|
-
rtpPadId,
|
|
31
|
-
added,
|
|
32
|
-
direction,
|
|
33
|
-
get internal() {
|
|
34
|
-
return internal === true;
|
|
35
|
-
},
|
|
36
|
-
get marker() {
|
|
37
|
-
return model.marker;
|
|
38
|
-
},
|
|
39
|
-
refresh: () => __awaiter(this, void 0, void 0, function* () {
|
|
40
|
-
const refreshedModel = yield storageProvider.sfuTransportStorage.get(sfuTransportId);
|
|
41
|
-
if (!refreshedModel)
|
|
42
|
-
return;
|
|
43
|
-
model.marker = refreshedModel.marker;
|
|
44
|
-
})
|
|
45
|
-
};
|
|
46
|
-
}
|
|
47
|
-
exports.createSfuOutboundRtpPadEntry = createSfuOutboundRtpPadEntry;
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import * as Models from '../models/Models';
|
|
2
|
-
import { StorageProvider } from '../storages/StorageProvider';
|
|
3
|
-
export type SfuSctpChannelEntry = ReturnType<typeof createSfuSctpChannelEntry>;
|
|
4
|
-
export declare function createSfuSctpChannelEntry(storageProvider: StorageProvider, model?: Models.SfuSctpChannel): void | {
|
|
5
|
-
sfuId: string;
|
|
6
|
-
sfuTransportId: string;
|
|
7
|
-
sfuSctpChannelId: string;
|
|
8
|
-
opened: bigint;
|
|
9
|
-
readonly marker: string | undefined;
|
|
10
|
-
refresh: () => Promise<void>;
|
|
11
|
-
};
|
|
12
|
-
//# sourceMappingURL=SfuSctpChannelEntry.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"SfuSctpChannelEntry.d.ts","sourceRoot":"","sources":["../../src/entries/SfuSctpChannelEntry.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,MAAM,kBAAkB,CAAC;AAC3C,OAAO,EAAE,eAAe,EAAE,MAAM,6BAA6B,CAAC;AAG9D,MAAM,MAAM,mBAAmB,GAAG,UAAU,CAAC,OAAO,yBAAyB,CAAC,CAAC;AAE/E,wBAAgB,yBAAyB,CAAC,eAAe,EAAE,eAAe,EAAE,KAAK,CAAC,EAAE,MAAM,CAAC,cAAc;;;;;;;EAgCxG"}
|
|
@@ -1,43 +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
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
-
exports.createSfuSctpChannelEntry = void 0;
|
|
13
|
-
const SfuEntry_1 = require("./SfuEntry");
|
|
14
|
-
function createSfuSctpChannelEntry(storageProvider, model) {
|
|
15
|
-
if (!model)
|
|
16
|
-
return;
|
|
17
|
-
const { sfuId, sfuTransportId, sfuSctpChannelId, opened, } = model;
|
|
18
|
-
model.sfuTransportId;
|
|
19
|
-
if (!sfuId)
|
|
20
|
-
return SfuEntry_1.logger.warn(`SfuSctpChannel model without sfuId: ${JSON.stringify(model)}`);
|
|
21
|
-
if (!sfuTransportId)
|
|
22
|
-
return SfuEntry_1.logger.warn(`SfuSctpChannel model without sfuTransportId: ${JSON.stringify(model)}`);
|
|
23
|
-
if (!sfuSctpChannelId)
|
|
24
|
-
return SfuEntry_1.logger.warn(`SfuSctpChannel model without sfuSctpChannelId: ${JSON.stringify(model)}`);
|
|
25
|
-
if (!opened)
|
|
26
|
-
return SfuEntry_1.logger.warn(`SfuSctpChannel model without opened: ${JSON.stringify(model)}`);
|
|
27
|
-
return {
|
|
28
|
-
sfuId,
|
|
29
|
-
sfuTransportId,
|
|
30
|
-
sfuSctpChannelId,
|
|
31
|
-
opened,
|
|
32
|
-
get marker() {
|
|
33
|
-
return model.marker;
|
|
34
|
-
},
|
|
35
|
-
refresh: () => __awaiter(this, void 0, void 0, function* () {
|
|
36
|
-
const refreshedModel = yield storageProvider.sfuSctpChannelStorage.get(sfuSctpChannelId);
|
|
37
|
-
if (!refreshedModel)
|
|
38
|
-
return;
|
|
39
|
-
model.marker = refreshedModel.marker;
|
|
40
|
-
})
|
|
41
|
-
};
|
|
42
|
-
}
|
|
43
|
-
exports.createSfuSctpChannelEntry = createSfuSctpChannelEntry;
|
|
@@ -1,82 +0,0 @@
|
|
|
1
|
-
import * as Models from '../models/Models';
|
|
2
|
-
import { StorageProvider } from '../storages/StorageProvider';
|
|
3
|
-
export type SfuTransportEntry = ReturnType<typeof createSfuTransportEntry>;
|
|
4
|
-
export declare function createSfuTransportEntry(storageProvider: StorageProvider, model?: Models.SfuTransport): void | {
|
|
5
|
-
sfuTransportId: string;
|
|
6
|
-
sfuId: string;
|
|
7
|
-
opened: bigint;
|
|
8
|
-
readonly internal: boolean;
|
|
9
|
-
readonly marker: string | undefined;
|
|
10
|
-
readonly inboundRtpPadIds: readonly string[];
|
|
11
|
-
readonly outboundRtpPadIds: readonly string[];
|
|
12
|
-
readonly sctpChannelIds: readonly string[];
|
|
13
|
-
readonly inboundRtpPads: AsyncIterableIterator<void | {
|
|
14
|
-
sfuId: string;
|
|
15
|
-
sfuTransportId: string;
|
|
16
|
-
rtpPadId: string;
|
|
17
|
-
direction: "inbound";
|
|
18
|
-
added: bigint;
|
|
19
|
-
readonly internal: boolean;
|
|
20
|
-
readonly marker: string | undefined;
|
|
21
|
-
refresh: () => Promise<void>;
|
|
22
|
-
}>;
|
|
23
|
-
readonly outboundRtpPads: AsyncIterableIterator<void | {
|
|
24
|
-
sfuTransportId: string;
|
|
25
|
-
sfuId: string;
|
|
26
|
-
rtpPadId: string;
|
|
27
|
-
added: bigint;
|
|
28
|
-
direction: "outbound";
|
|
29
|
-
readonly internal: boolean;
|
|
30
|
-
readonly marker: string | undefined;
|
|
31
|
-
refresh: () => Promise<void>;
|
|
32
|
-
}>;
|
|
33
|
-
readonly sctpChannels: AsyncIterableIterator<void | {
|
|
34
|
-
sfuId: string;
|
|
35
|
-
sfuTransportId: string;
|
|
36
|
-
sfuSctpChannelId: string;
|
|
37
|
-
opened: bigint;
|
|
38
|
-
readonly marker: string | undefined;
|
|
39
|
-
refresh: () => Promise<void>;
|
|
40
|
-
}>;
|
|
41
|
-
getSfu: () => Promise<void | {
|
|
42
|
-
sfuId: string;
|
|
43
|
-
serviceId: string;
|
|
44
|
-
mediaUnitId: string;
|
|
45
|
-
joined: bigint;
|
|
46
|
-
readonly marker: string | undefined;
|
|
47
|
-
readonly sfuTransportIds: readonly string[];
|
|
48
|
-
readonly sfuTransports: AsyncIterableIterator<void | any>;
|
|
49
|
-
getSfuTransport: (sfuTransportId: string) => Promise<void | any>;
|
|
50
|
-
refresh: () => Promise<void>;
|
|
51
|
-
}>;
|
|
52
|
-
getSfuInboundRtpPad: (sfuInboundRtpPadId: string) => Promise<void | {
|
|
53
|
-
sfuId: string;
|
|
54
|
-
sfuTransportId: string;
|
|
55
|
-
rtpPadId: string;
|
|
56
|
-
direction: "inbound";
|
|
57
|
-
added: bigint;
|
|
58
|
-
readonly internal: boolean;
|
|
59
|
-
readonly marker: string | undefined;
|
|
60
|
-
refresh: () => Promise<void>;
|
|
61
|
-
}>;
|
|
62
|
-
getSfuOutboundRtpPad: (sfuOutboundRtpPadId: string) => Promise<void | {
|
|
63
|
-
sfuTransportId: string;
|
|
64
|
-
sfuId: string;
|
|
65
|
-
rtpPadId: string;
|
|
66
|
-
added: bigint;
|
|
67
|
-
direction: "outbound";
|
|
68
|
-
readonly internal: boolean;
|
|
69
|
-
readonly marker: string | undefined;
|
|
70
|
-
refresh: () => Promise<void>;
|
|
71
|
-
}>;
|
|
72
|
-
getSfuSctpChannel: (sfuSctpChannelId: string) => Promise<void | {
|
|
73
|
-
sfuId: string;
|
|
74
|
-
sfuTransportId: string;
|
|
75
|
-
sfuSctpChannelId: string;
|
|
76
|
-
opened: bigint;
|
|
77
|
-
readonly marker: string | undefined;
|
|
78
|
-
refresh: () => Promise<void>;
|
|
79
|
-
}>;
|
|
80
|
-
refresh: () => Promise<void>;
|
|
81
|
-
};
|
|
82
|
-
//# sourceMappingURL=SfuTransportEntry.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"SfuTransportEntry.d.ts","sourceRoot":"","sources":["../../src/entries/SfuTransportEntry.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,MAAM,MAAM,kBAAkB,CAAC;AAC3C,OAAO,EAAE,eAAe,EAAE,MAAM,6BAA6B,CAAC;AAM9D,MAAM,MAAM,iBAAiB,GAAG,UAAU,CAAC,OAAO,uBAAuB,CAAC,CAAC;AAE3E,wBAAgB,uBAAuB,CAAC,eAAe,EAAE,eAAe,EAAE,KAAK,CAAC,EAAE,MAAM,CAAC,YAAY;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8CAgB7C,MAAM;;;;;;;;;;gDAGJ,MAAM;;;;;;;;;;0CAGZ,MAAM;;;;;;;;;EA4EzD"}
|