@observertc/observer-js 1.0.1-c3edea3.0 → 1.0.1-ec27289.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 +41 -7
- package/lib/ObservedCall.d.ts.map +1 -1
- package/lib/ObservedCall.js +125 -13
- package/lib/ObservedCallSummary.d.ts +18 -0
- package/lib/ObservedCallSummary.d.ts.map +1 -0
- package/lib/ObservedClient.d.ts +70 -11
- package/lib/ObservedClient.d.ts.map +1 -1
- package/lib/ObservedClient.js +394 -72
- package/lib/ObservedClientEventMonitor.d.ts +89 -0
- package/lib/ObservedClientEventMonitor.d.ts.map +1 -0
- package/lib/ObservedClientEventMonitor.js +247 -0
- package/lib/ObservedClientSummary.d.ts +23 -0
- package/lib/ObservedClientSummary.d.ts.map +1 -0
- package/lib/ObservedClientSummary.js +2 -0
- package/lib/ObservedDataChannel.d.ts +6 -0
- package/lib/ObservedDataChannel.d.ts.map +1 -1
- package/lib/ObservedDataChannel.js +30 -0
- package/lib/ObservedIceCandidatePair.d.ts +4 -0
- package/lib/ObservedIceCandidatePair.d.ts.map +1 -1
- package/lib/ObservedIceCandidatePair.js +28 -0
- package/lib/ObservedIceTransport.d.ts +4 -0
- package/lib/ObservedIceTransport.d.ts.map +1 -1
- package/lib/ObservedIceTransport.js +28 -0
- package/lib/ObservedInboundTrack.d.ts +2 -0
- package/lib/ObservedInboundTrack.d.ts.map +1 -1
- package/lib/ObservedInboundTrack.js +2 -0
- package/lib/ObservedOutboundTrack.d.ts +2 -0
- package/lib/ObservedOutboundTrack.d.ts.map +1 -1
- package/lib/ObservedOutboundTrack.js +2 -0
- package/lib/ObservedPeerConnection.d.ts +14 -2
- package/lib/ObservedPeerConnection.d.ts.map +1 -1
- package/lib/ObservedPeerConnection.js +106 -14
- package/lib/ObservedTURN.d.ts +31 -0
- package/lib/ObservedTURN.d.ts.map +1 -0
- package/lib/ObservedTURN.js +58 -0
- package/lib/ObservedTurnServer.d.ts +25 -0
- package/lib/ObservedTurnServer.d.ts.map +1 -0
- package/lib/ObservedTurnServer.js +59 -0
- package/lib/Observer.d.ts +38 -21
- package/lib/Observer.d.ts.map +1 -1
- package/lib/Observer.js +114 -40
- package/lib/ObserverSummary.d.ts +13 -0
- package/lib/ObserverSummary.d.ts.map +1 -0
- package/lib/ObserverSummary.js +2 -0
- package/lib/common/utils.d.ts +2 -1
- package/lib/common/utils.d.ts.map +1 -1
- package/lib/common/utils.js +11 -3
- package/lib/index.d.ts +5 -0
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +7 -1
- package/lib/schema/ClientEventTypes.d.ts +100 -0
- package/lib/schema/ClientEventTypes.d.ts.map +1 -0
- package/lib/schema/ClientEventTypes.js +38 -0
- package/lib/schema/{metaTypes.d.ts → ClientMetaTypes.d.ts} +2 -2
- package/lib/schema/ClientMetaTypes.d.ts.map +1 -0
- package/lib/schema/ClientMetaTypes.js +16 -0
- package/lib/updaters/CallUpdater.d.ts.map +1 -0
- package/lib/updaters/CallUpdater.js +2 -0
- package/lib/updaters/ObserverUpdater.d.ts +5 -0
- package/lib/updaters/ObserverUpdater.d.ts.map +1 -0
- package/lib/updaters/ObserverUpdater.js +2 -0
- package/lib/updaters/OnAllCallObserverUpdater_.d.ts +13 -0
- package/lib/updaters/OnAllCallObserverUpdater_.d.ts.map +1 -0
- package/lib/updaters/OnAllCallObserverUpdater_.js +38 -0
- package/lib/updaters/OnAllClientCallUpdater.d.ts +13 -0
- package/lib/updaters/OnAllClientCallUpdater.d.ts.map +1 -0
- package/lib/updaters/OnAllClientCallUpdater.js +37 -0
- package/lib/updaters/OnAnyCallObserverUpdater_.d.ts +11 -0
- package/lib/updaters/OnAnyCallObserverUpdater_.d.ts.map +1 -0
- package/lib/updaters/OnAnyCallObserverUpdater_.js +27 -0
- package/lib/updaters/OnAnyClientCallUpdater.d.ts +11 -0
- package/lib/updaters/OnAnyClientCallUpdater.d.ts.map +1 -0
- package/lib/updaters/OnAnyClientCallUpdater.js +27 -0
- package/lib/updaters/OnIntervalUpdater.d.ts +10 -0
- package/lib/updaters/OnIntervalUpdater.d.ts.map +1 -0
- package/lib/updaters/OnIntervalUpdater.js +17 -0
- package/lib/updaters/Updater.d.ts +6 -0
- package/lib/updaters/Updater.d.ts.map +1 -0
- package/lib/updaters/Updater.js +2 -0
- package/package.json +1 -1
- package/src/ObservedCall.ts +205 -16
- package/src/ObservedCallSummary.ts +22 -0
- package/src/ObservedClient.ts +492 -78
- package/src/ObservedClientEventMonitor.ts +301 -0
- package/src/ObservedClientSummary.ts +24 -0
- package/src/ObservedDataChannel.ts +32 -0
- package/src/ObservedIceCandidatePair.ts +26 -0
- package/src/ObservedIceTransport.ts +29 -0
- package/src/ObservedInboundTrack.ts +3 -0
- package/src/ObservedOutboundTrack.ts +3 -0
- package/src/ObservedPeerConnection.ts +120 -16
- package/src/ObservedTURN.ts +86 -0
- package/src/ObservedTurnServer.ts +72 -0
- package/src/Observer.ts +164 -64
- package/src/ObserverSummary.ts +15 -0
- package/src/common/utils.ts +12 -2
- package/src/index.ts +5 -0
- package/src/schema/ClientEventTypes.ts +112 -0
- package/src/schema/{metaTypes.ts → ClientMetaTypes.ts} +1 -1
- package/src/updaters/ObserverUpdater.ts +5 -0
- package/src/updaters/OnAllCallObserverUpdater_.ts +46 -0
- package/src/updaters/OnAllClientCallUpdater.ts +46 -0
- package/src/updaters/OnAnyCallObserverUpdater_.ts +32 -0
- package/src/updaters/OnAnyClientCallUpdater.ts +32 -0
- package/src/updaters/OnIntervalUpdater.ts +19 -0
- package/src/updaters/Updater.ts +5 -0
- package/tsconfig.json +1 -1
- package/lib/schema/eventTypes.d.ts +0 -33
- package/lib/schema/eventTypes.d.ts.map +0 -1
- package/lib/schema/eventTypes.js +0 -38
- package/lib/schema/metaTypes.d.ts.map +0 -1
- package/lib/schema/metaTypes.js +0 -16
- package/lib/utils/CallUpdater.d.ts.map +0 -1
- package/lib/utils/OnAllClientCallUpdater.d.ts +0 -16
- package/lib/utils/OnAllClientCallUpdater.d.ts.map +0 -1
- package/lib/utils/OnAllClientCallUpdater.js +0 -58
- package/lib/utils/onAnyClientCallUpdater.d.ts +0 -14
- package/lib/utils/onAnyClientCallUpdater.d.ts.map +0 -1
- package/lib/utils/onAnyClientCallUpdater.js +0 -51
- package/src/schema/eventTypes.ts +0 -36
- package/src/utils/OnAllClientCallUpdater.ts +0 -68
- package/src/utils/onAnyClientCallUpdater.ts +0 -59
- /package/lib/{utils/CallUpdater.js → ObservedCallSummary.js} +0 -0
- /package/lib/{utils → updaters}/CallUpdater.d.ts +0 -0
- /package/src/{utils → updaters}/CallUpdater.ts +0 -0
package/lib/ObservedClient.js
CHANGED
|
@@ -4,10 +4,11 @@ exports.ObservedClient = void 0;
|
|
|
4
4
|
const events_1 = require("events");
|
|
5
5
|
const ObservedPeerConnection_1 = require("./ObservedPeerConnection");
|
|
6
6
|
const logger_1 = require("./common/logger");
|
|
7
|
-
const
|
|
8
|
-
const
|
|
7
|
+
const ClientEventTypes_1 = require("./schema/ClientEventTypes");
|
|
8
|
+
const ClientMetaTypes_1 = require("./schema/ClientMetaTypes");
|
|
9
9
|
const utils_1 = require("./common/utils");
|
|
10
10
|
const Detectors_1 = require("./detectors/Detectors");
|
|
11
|
+
const ObservedClientEventMonitor_1 = require("./ObservedClientEventMonitor");
|
|
11
12
|
const logger = (0, logger_1.createLogger)('ObservedClient');
|
|
12
13
|
class ObservedClient extends events_1.EventEmitter {
|
|
13
14
|
call;
|
|
@@ -25,6 +26,7 @@ class ObservedClient extends events_1.EventEmitter {
|
|
|
25
26
|
closed = false;
|
|
26
27
|
joinedAt;
|
|
27
28
|
leftAt;
|
|
29
|
+
closedAt;
|
|
28
30
|
// the timestamp of the CLIENT_JOINED event
|
|
29
31
|
operationSystem;
|
|
30
32
|
engine;
|
|
@@ -32,43 +34,73 @@ class ObservedClient extends events_1.EventEmitter {
|
|
|
32
34
|
browser;
|
|
33
35
|
mediaConstraints = [];
|
|
34
36
|
usingTURN = false;
|
|
37
|
+
usingTCP = false;
|
|
35
38
|
availableOutgoingBitrate = 0;
|
|
36
39
|
availableIncomingBitrate = 0;
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
40
|
+
totalInboundPacketsLost = 0;
|
|
41
|
+
totalInboundPacketsReceived = 0;
|
|
42
|
+
totalOutboundPacketsSent = 0;
|
|
43
|
+
totalDataChannelBytesSent = 0;
|
|
44
|
+
totalDataChannelBytesReceived = 0;
|
|
45
|
+
totalDataChannelMessagesSent = 0;
|
|
46
|
+
totalDataChannelMessagesReceived = 0;
|
|
47
|
+
totalReceivedAudioBytes = 0;
|
|
48
|
+
totalReceivedVideoBytes = 0;
|
|
49
|
+
totalSentAudioBytes = 0;
|
|
50
|
+
totalSentVideoBytes = 0;
|
|
51
|
+
totalSentBytes = 0;
|
|
52
|
+
totalReceivedBytes = 0;
|
|
53
|
+
deltaReceivedAudioBytes = 0;
|
|
54
|
+
deltaReceivedVideoBytes = 0;
|
|
55
|
+
deltaSentAudioBytes = 0;
|
|
56
|
+
deltaSentVideoBytes = 0;
|
|
57
|
+
deltaDataChannelBytesSent = 0;
|
|
58
|
+
deltaDataChannelBytesReceived = 0;
|
|
59
|
+
deltaDataChannelMessagesSent = 0;
|
|
60
|
+
deltaDataChannelMessagesReceived = 0;
|
|
61
|
+
deltaInboundPacketsLost = 0;
|
|
62
|
+
deltaInboundPacketsReceived = 0;
|
|
63
|
+
deltaOutboundPacketsSent = 0;
|
|
64
|
+
deltaTransportSentBytes = 0;
|
|
65
|
+
deltaTransportReceivedBytes = 0;
|
|
66
|
+
deltaRttLt50Measurements = 0;
|
|
67
|
+
deltaRttLt150Measurements = 0;
|
|
68
|
+
deltaRttLt300Measurements = 0;
|
|
69
|
+
deltaRttGtOrEq300Measurements = 0;
|
|
70
|
+
currentMaxRttInMs;
|
|
71
|
+
currentMinRttInMs;
|
|
72
|
+
currentAvgRttInMs;
|
|
73
|
+
sendingAudioBitrate = 0;
|
|
74
|
+
sendingVideoBitrate = 0;
|
|
75
|
+
receivingAudioBitrate = 0;
|
|
76
|
+
receivingVideoBitrate = 0;
|
|
77
|
+
numberOfInboundRtpStreams = 0;
|
|
78
|
+
numberOfInbundTracks = 0;
|
|
79
|
+
numberOfOutboundRtpStreams = 0;
|
|
80
|
+
numberOfOutboundTracks = 0;
|
|
81
|
+
numberOfDataChannels = 0;
|
|
82
|
+
totalRttLt50Measurements = 0;
|
|
83
|
+
totalRttLt150Measurements = 0;
|
|
84
|
+
totalRttLt300Measurements = 0;
|
|
85
|
+
totalRttGtOrEq300Measurements = 0;
|
|
86
|
+
deltaNumberOfIssues = 0;
|
|
87
|
+
totalScoreSum = 0;
|
|
88
|
+
numberOfScoreMeasurements = 0;
|
|
89
|
+
totalNumberOfIssues = 0;
|
|
62
90
|
mediaDevices = [];
|
|
63
91
|
issues = [];
|
|
92
|
+
_injections = {};
|
|
64
93
|
constructor(settings, call) {
|
|
65
94
|
super();
|
|
66
95
|
this.call = call;
|
|
67
96
|
this.setMaxListeners(Infinity);
|
|
68
97
|
this.clientId = settings.clientId;
|
|
69
|
-
this.appData = settings.appData;
|
|
98
|
+
this.appData = settings.appData ?? {};
|
|
70
99
|
this.detectors = new Detectors_1.Detectors();
|
|
71
100
|
}
|
|
101
|
+
get numberOfPeerConnections() {
|
|
102
|
+
return this.observedPeerConnections.size;
|
|
103
|
+
}
|
|
72
104
|
get score() {
|
|
73
105
|
return this.calculatedScore.value;
|
|
74
106
|
}
|
|
@@ -77,19 +109,144 @@ class ObservedClient extends events_1.EventEmitter {
|
|
|
77
109
|
return;
|
|
78
110
|
this.closed = true;
|
|
79
111
|
Array.from(this.observedPeerConnections.values()).forEach((peerConnection) => peerConnection.close());
|
|
112
|
+
this.closedAt = Date.now();
|
|
80
113
|
this.emit('close');
|
|
81
114
|
}
|
|
82
115
|
accept(sample) {
|
|
83
116
|
if (this.closed)
|
|
84
117
|
throw new Error(`Client ${this.clientId} is closed`);
|
|
85
118
|
const now = Date.now();
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
119
|
+
const elapsedInMs = now - this.updated;
|
|
120
|
+
const elapsedInSeconds = elapsedInMs / 1000;
|
|
121
|
+
let sumOfRtts = 0;
|
|
122
|
+
let numberOfRttMeasurements = 0;
|
|
123
|
+
++this.acceptedSamples;
|
|
124
|
+
this.availableIncomingBitrate = 0;
|
|
125
|
+
this.availableOutgoingBitrate = 0;
|
|
126
|
+
this.deltaDataChannelBytesReceived = 0;
|
|
127
|
+
this.deltaDataChannelBytesSent = 0;
|
|
128
|
+
this.deltaDataChannelMessagesReceived = 0;
|
|
129
|
+
this.deltaDataChannelMessagesSent = 0;
|
|
130
|
+
this.deltaInboundPacketsLost = 0;
|
|
131
|
+
this.deltaInboundPacketsReceived = 0;
|
|
132
|
+
this.deltaOutboundPacketsSent = 0;
|
|
133
|
+
this.deltaReceivedAudioBytes = 0;
|
|
134
|
+
this.deltaReceivedVideoBytes = 0;
|
|
135
|
+
this.deltaSentAudioBytes = 0;
|
|
136
|
+
this.deltaSentVideoBytes = 0;
|
|
137
|
+
this.deltaTransportReceivedBytes = 0;
|
|
138
|
+
this.deltaTransportSentBytes = 0;
|
|
139
|
+
this.deltaRttLt50Measurements = 0;
|
|
140
|
+
this.deltaRttLt150Measurements = 0;
|
|
141
|
+
this.deltaRttLt300Measurements = 0;
|
|
142
|
+
this.deltaRttGtOrEq300Measurements = 0;
|
|
143
|
+
this.deltaNumberOfIssues = 0;
|
|
144
|
+
this.numberOfDataChannels = 0;
|
|
145
|
+
this.numberOfInboundRtpStreams = 0;
|
|
146
|
+
this.numberOfInbundTracks = 0;
|
|
147
|
+
this.numberOfOutboundRtpStreams = 0;
|
|
148
|
+
this.numberOfOutboundTracks = 0;
|
|
149
|
+
this.usingTURN = false;
|
|
150
|
+
this.usingTCP = false;
|
|
151
|
+
this.currentMinRttInMs = undefined;
|
|
152
|
+
this.currentMaxRttInMs = undefined;
|
|
153
|
+
this._mergeInjections(sample);
|
|
154
|
+
const clientEventsPostBuffer = [];
|
|
155
|
+
for (const clientEvent of sample.clientEvents ?? []) {
|
|
156
|
+
this._processClientEvent(clientEvent, clientEventsPostBuffer);
|
|
157
|
+
this.call.observer.emit('client-event', this, clientEvent);
|
|
158
|
+
}
|
|
159
|
+
for (const metaData of sample.clientMetaItems ?? []) {
|
|
160
|
+
this.addMetadata(metaData);
|
|
161
|
+
}
|
|
162
|
+
for (const issue of sample.clientIssues ?? []) {
|
|
163
|
+
this.addIssue(issue);
|
|
164
|
+
++this.deltaNumberOfIssues;
|
|
165
|
+
}
|
|
166
|
+
for (const extensionStat of sample.extensionStats ?? []) {
|
|
167
|
+
this.addExtensionStats(extensionStat);
|
|
168
|
+
}
|
|
169
|
+
for (const pcSample of sample.peerConnections ?? []) {
|
|
170
|
+
const observedPeerConnection = this._updatePeerConnection(pcSample);
|
|
171
|
+
if (!observedPeerConnection)
|
|
172
|
+
continue;
|
|
173
|
+
this.deltaDataChannelBytesReceived += observedPeerConnection.deltaDataChannelBytesReceived;
|
|
174
|
+
this.deltaDataChannelBytesSent += observedPeerConnection.deltaDataChannelBytesSent;
|
|
175
|
+
this.deltaDataChannelMessagesReceived += observedPeerConnection.deltaDataChannelMessagesReceived;
|
|
176
|
+
this.deltaDataChannelMessagesSent += observedPeerConnection.deltaDataChannelMessagesSent;
|
|
177
|
+
this.deltaInboundPacketsLost += observedPeerConnection.deltaInboundPacketsLost;
|
|
178
|
+
this.deltaInboundPacketsReceived += observedPeerConnection.deltaInboundPacketsReceived;
|
|
179
|
+
this.deltaOutboundPacketsSent += observedPeerConnection.deltaOutboundPacketsSent;
|
|
180
|
+
this.deltaReceivedAudioBytes += observedPeerConnection.deltaReceivedAudioBytes;
|
|
181
|
+
this.deltaReceivedVideoBytes += observedPeerConnection.deltaReceivedVideoBytes;
|
|
182
|
+
this.deltaSentAudioBytes += observedPeerConnection.deltaSentAudioBytes;
|
|
183
|
+
this.deltaSentVideoBytes += observedPeerConnection.deltaSentVideoBytes;
|
|
184
|
+
this.deltaTransportReceivedBytes += observedPeerConnection.deltaTransportReceivedBytes;
|
|
185
|
+
this.deltaTransportSentBytes += observedPeerConnection.deltaTransportSentBytes;
|
|
186
|
+
this.availableIncomingBitrate += observedPeerConnection.availableIncomingBitrate;
|
|
187
|
+
this.availableOutgoingBitrate += observedPeerConnection.availableOutgoingBitrate;
|
|
188
|
+
this.numberOfDataChannels += observedPeerConnection.observedDataChannels.size;
|
|
189
|
+
this.numberOfInbundTracks += observedPeerConnection.observedInboundTracks.size;
|
|
190
|
+
this.numberOfOutboundRtpStreams += observedPeerConnection.observedOutboundRtps.size;
|
|
191
|
+
this.numberOfOutboundTracks += observedPeerConnection.observedOutboundTracks.size;
|
|
192
|
+
this.numberOfInboundRtpStreams += observedPeerConnection.observedInboundRtps.size;
|
|
193
|
+
if (observedPeerConnection.usingTURN) {
|
|
194
|
+
this.usingTURN = true;
|
|
195
|
+
}
|
|
196
|
+
if (observedPeerConnection.usingTCP) {
|
|
197
|
+
this.usingTCP = true;
|
|
198
|
+
}
|
|
199
|
+
if (observedPeerConnection.currentRttInMs) {
|
|
200
|
+
if (this.currentMinRttInMs === undefined || observedPeerConnection.currentRttInMs < this.currentMinRttInMs) {
|
|
201
|
+
this.currentMinRttInMs = observedPeerConnection.currentRttInMs;
|
|
202
|
+
}
|
|
203
|
+
if (this.currentMaxRttInMs === undefined || observedPeerConnection.currentRttInMs > this.currentMaxRttInMs) {
|
|
204
|
+
this.currentMaxRttInMs = observedPeerConnection.currentRttInMs;
|
|
205
|
+
}
|
|
206
|
+
if (observedPeerConnection.currentRttInMs < 50) {
|
|
207
|
+
this.deltaRttLt50Measurements += 1;
|
|
208
|
+
}
|
|
209
|
+
else if (observedPeerConnection.currentRttInMs < 150) {
|
|
210
|
+
this.deltaRttLt150Measurements += 1;
|
|
211
|
+
}
|
|
212
|
+
else if (observedPeerConnection.currentRttInMs < 300) {
|
|
213
|
+
this.deltaRttLt300Measurements += 1;
|
|
214
|
+
}
|
|
215
|
+
else if (300 <= observedPeerConnection.currentRttInMs) {
|
|
216
|
+
this.deltaRttGtOrEq300Measurements += 1;
|
|
217
|
+
}
|
|
218
|
+
sumOfRtts += observedPeerConnection.currentRttInMs;
|
|
219
|
+
++numberOfRttMeasurements;
|
|
220
|
+
}
|
|
221
|
+
}
|
|
222
|
+
for (const clientEvent of clientEventsPostBuffer) {
|
|
223
|
+
this._processClientEvent(clientEvent);
|
|
224
|
+
}
|
|
91
225
|
// emit new attachments?
|
|
92
226
|
this.attachments = sample.attachments;
|
|
227
|
+
this.totalDataChannelBytesReceived += this.deltaDataChannelBytesReceived;
|
|
228
|
+
this.totalDataChannelBytesSent += this.deltaDataChannelBytesSent;
|
|
229
|
+
this.totalDataChannelMessagesReceived += this.deltaDataChannelMessagesReceived;
|
|
230
|
+
this.totalDataChannelMessagesSent += this.deltaDataChannelMessagesSent;
|
|
231
|
+
this.totalInboundPacketsLost += this.deltaInboundPacketsLost;
|
|
232
|
+
this.totalInboundPacketsReceived += this.deltaInboundPacketsReceived;
|
|
233
|
+
this.totalOutboundPacketsSent += this.deltaOutboundPacketsSent;
|
|
234
|
+
this.totalReceivedAudioBytes += this.deltaReceivedAudioBytes;
|
|
235
|
+
this.totalReceivedVideoBytes += this.deltaReceivedVideoBytes;
|
|
236
|
+
this.totalSentAudioBytes += this.deltaSentAudioBytes;
|
|
237
|
+
this.totalSentVideoBytes += this.deltaSentVideoBytes;
|
|
238
|
+
this.totalReceivedBytes += this.deltaTransportReceivedBytes;
|
|
239
|
+
this.totalSentBytes += this.deltaTransportSentBytes;
|
|
240
|
+
this.totalRttLt50Measurements += this.deltaRttLt50Measurements;
|
|
241
|
+
this.totalRttLt150Measurements += this.deltaRttLt150Measurements;
|
|
242
|
+
this.totalRttLt300Measurements += this.deltaRttLt300Measurements;
|
|
243
|
+
this.totalRttGtOrEq300Measurements += this.deltaRttGtOrEq300Measurements;
|
|
244
|
+
this.totalNumberOfIssues += this.deltaNumberOfIssues;
|
|
245
|
+
this.receivingAudioBitrate = (this.deltaReceivedAudioBytes * 8) / (elapsedInSeconds);
|
|
246
|
+
this.receivingVideoBitrate = (this.totalReceivedVideoBytes * 8) / (elapsedInSeconds);
|
|
247
|
+
this.sendingAudioBitrate = (this.deltaSentAudioBytes * 8) / (elapsedInSeconds);
|
|
248
|
+
this.sendingVideoBitrate = (this.deltaSentVideoBytes * 8) / (elapsedInSeconds);
|
|
249
|
+
this.currentAvgRttInMs = 0 < numberOfRttMeasurements ? sumOfRtts / numberOfRttMeasurements : undefined;
|
|
93
250
|
this.calculatedScore.value = sample.score;
|
|
94
251
|
this.detectors.update();
|
|
95
252
|
// emit update
|
|
@@ -98,18 +255,17 @@ class ObservedClient extends events_1.EventEmitter {
|
|
|
98
255
|
elapsedTimeInMs: now - this.updated,
|
|
99
256
|
});
|
|
100
257
|
this.updated = now;
|
|
258
|
+
// if result changed after update
|
|
259
|
+
if (this.calculatedScore.value) {
|
|
260
|
+
this.totalScoreSum += this.calculatedScore.value;
|
|
261
|
+
++this.numberOfScoreMeasurements;
|
|
262
|
+
}
|
|
101
263
|
}
|
|
102
|
-
_processClientEvent(event) {
|
|
264
|
+
_processClientEvent(event, postBuffer) {
|
|
265
|
+
// eslint-disable-next-line no-console
|
|
266
|
+
// console.warn('ClientEvent', event);
|
|
103
267
|
switch (event.type) {
|
|
104
|
-
case
|
|
105
|
-
// update call timestamp if it's the first time
|
|
106
|
-
break;
|
|
107
|
-
}
|
|
108
|
-
case eventTypes_1.ClientEventType.CALL_ENDED: {
|
|
109
|
-
// update call timestamp if it's the first time
|
|
110
|
-
break;
|
|
111
|
-
}
|
|
112
|
-
case eventTypes_1.ClientEventType.CLIENT_JOINED: {
|
|
268
|
+
case ClientEventTypes_1.ClientEventTypes.CLIENT_JOINED: {
|
|
113
269
|
if (event.timestamp) {
|
|
114
270
|
if (!this.joinedAt) {
|
|
115
271
|
this.joinedAt = event.timestamp;
|
|
@@ -125,74 +281,240 @@ class ObservedClient extends events_1.EventEmitter {
|
|
|
125
281
|
}
|
|
126
282
|
break;
|
|
127
283
|
}
|
|
128
|
-
case
|
|
284
|
+
case ClientEventTypes_1.ClientEventTypes.CLIENT_LEFT: {
|
|
129
285
|
if (event.timestamp) {
|
|
130
286
|
if (!this.leftAt) {
|
|
131
287
|
this.leftAt = event.timestamp;
|
|
132
288
|
this.emit('left');
|
|
133
289
|
}
|
|
290
|
+
else {
|
|
291
|
+
logger.warn(`Client ${this.clientId} leftAt timestamp was already set`);
|
|
292
|
+
}
|
|
293
|
+
}
|
|
294
|
+
break;
|
|
295
|
+
}
|
|
296
|
+
case ClientEventTypes_1.ClientEventTypes.PEER_CONNECTION_OPENED: {
|
|
297
|
+
const payload = (0, utils_1.parseJsonAs)(event.payload);
|
|
298
|
+
if (payload?.peerConnectionId && typeof payload.peerConnectionId === 'string') {
|
|
299
|
+
const observedPeerConnection = this.observedPeerConnections.get(payload.peerConnectionId);
|
|
300
|
+
if (observedPeerConnection) {
|
|
301
|
+
observedPeerConnection.openedAt = event.timestamp;
|
|
302
|
+
}
|
|
303
|
+
else if (postBuffer) {
|
|
304
|
+
postBuffer.push(event);
|
|
305
|
+
}
|
|
306
|
+
else {
|
|
307
|
+
logger.warn('Received PEER_CONNECTION_OPENED event without a corresponding observedPeerConnection', event);
|
|
308
|
+
}
|
|
309
|
+
}
|
|
310
|
+
break;
|
|
311
|
+
}
|
|
312
|
+
case ClientEventTypes_1.ClientEventTypes.PEER_CONNECTION_CLOSED: {
|
|
313
|
+
const payload = (0, utils_1.parseJsonAs)(event.payload);
|
|
314
|
+
if (payload?.peerConnectionId && typeof payload.peerConnectionId === 'string') {
|
|
315
|
+
const observedPeerConnection = this.observedPeerConnections.get(payload.peerConnectionId);
|
|
316
|
+
if (observedPeerConnection) {
|
|
317
|
+
observedPeerConnection.closedAt = event.timestamp;
|
|
318
|
+
}
|
|
319
|
+
else if (postBuffer) {
|
|
320
|
+
postBuffer.push(event);
|
|
321
|
+
}
|
|
322
|
+
else {
|
|
323
|
+
logger.warn('Received PEER_CONNECTION_CLOSED event without a corresponding observedPeerConnection', event);
|
|
324
|
+
}
|
|
325
|
+
}
|
|
326
|
+
break;
|
|
327
|
+
}
|
|
328
|
+
case ClientEventTypes_1.ClientEventTypes.MEDIA_TRACK_ADDED: {
|
|
329
|
+
const payload = (0, utils_1.parseJsonAs)(event.payload);
|
|
330
|
+
if (payload?.peerConnectionId && typeof payload.peerConnectionId === 'string' && payload?.trackId && typeof payload.trackId === 'string') {
|
|
331
|
+
const observedPeerConnection = this.observedPeerConnections.get(payload.peerConnectionId);
|
|
332
|
+
const observedTrack = observedPeerConnection?.observedInboundTracks.get(payload.trackId) ?? observedPeerConnection?.observedOutboundTracks.get(payload.trackId);
|
|
333
|
+
if (observedTrack) {
|
|
334
|
+
observedTrack.addedAt = event.timestamp;
|
|
335
|
+
}
|
|
336
|
+
else if (postBuffer) {
|
|
337
|
+
postBuffer.push(event);
|
|
338
|
+
}
|
|
339
|
+
else {
|
|
340
|
+
logger.warn('Received MEDIA_TRACK_ADDED event without a corresponding observedPeerConnection or observedTrack', event);
|
|
341
|
+
}
|
|
342
|
+
}
|
|
343
|
+
break;
|
|
344
|
+
}
|
|
345
|
+
case ClientEventTypes_1.ClientEventTypes.MEDIA_TRACK_REMOVED: {
|
|
346
|
+
const payload = (0, utils_1.parseJsonAs)(event.payload);
|
|
347
|
+
if (payload?.peerConnectionId && typeof payload.peerConnectionId === 'string' && payload?.trackId && typeof payload.trackId === 'string') {
|
|
348
|
+
const observedPeerConnection = this.observedPeerConnections.get(payload.peerConnectionId);
|
|
349
|
+
const observedTrack = observedPeerConnection?.observedInboundTracks.get(payload.trackId) ?? observedPeerConnection?.observedOutboundTracks.get(payload.trackId);
|
|
350
|
+
if (observedTrack) {
|
|
351
|
+
observedTrack.removedAt = event.timestamp;
|
|
352
|
+
}
|
|
353
|
+
else if (postBuffer) {
|
|
354
|
+
postBuffer.push(event);
|
|
355
|
+
}
|
|
356
|
+
else {
|
|
357
|
+
logger.warn('Received MEDIA_TRACK_REMOVED event without a corresponding observedPeerConnection or observedTrack', event);
|
|
358
|
+
}
|
|
359
|
+
}
|
|
360
|
+
break;
|
|
361
|
+
}
|
|
362
|
+
case ClientEventTypes_1.ClientEventTypes.DATA_CHANNEL_OPEN: {
|
|
363
|
+
const payload = (0, utils_1.parseJsonAs)(event.payload);
|
|
364
|
+
if (payload?.peerConnectionId && typeof payload.peerConnectionId === 'string' && payload?.dataChannelId && typeof payload.dataChannelId === 'string') {
|
|
365
|
+
const observedPeerConnection = this.observedPeerConnections.get(payload.peerConnectionId);
|
|
366
|
+
const observedDataChannel = observedPeerConnection?.observedDataChannels.get(payload.dataChannelId);
|
|
367
|
+
if (observedDataChannel) {
|
|
368
|
+
observedDataChannel.addedAt = event.timestamp;
|
|
369
|
+
}
|
|
370
|
+
else if (postBuffer) {
|
|
371
|
+
postBuffer.push(event);
|
|
372
|
+
}
|
|
373
|
+
else {
|
|
374
|
+
logger.warn('Received DATA_CHANNEL_OPENED event without a corresponding observedPeerConnection or observedDataChannel', event);
|
|
375
|
+
}
|
|
376
|
+
}
|
|
377
|
+
break;
|
|
378
|
+
}
|
|
379
|
+
case ClientEventTypes_1.ClientEventTypes.DATA_CHANNEL_CLOSED: {
|
|
380
|
+
const payload = (0, utils_1.parseJsonAs)(event.payload);
|
|
381
|
+
if (payload?.peerConnectionId && typeof payload.peerConnectionId === 'string' && payload?.dataChannelId && typeof payload.dataChannelId === 'string') {
|
|
382
|
+
const observedPeerConnection = this.observedPeerConnections.get(payload.peerConnectionId);
|
|
383
|
+
const observedDataChannel = observedPeerConnection?.observedDataChannels.get(payload.dataChannelId);
|
|
384
|
+
if (observedDataChannel) {
|
|
385
|
+
observedDataChannel.removedAt = event.timestamp;
|
|
386
|
+
}
|
|
387
|
+
else if (postBuffer) {
|
|
388
|
+
postBuffer.push(event);
|
|
389
|
+
}
|
|
390
|
+
else {
|
|
391
|
+
logger.warn('Received DATA_CHANNEL_CLOSE event without a corresponding observedPeerConnection or observedDataChannel', event);
|
|
392
|
+
}
|
|
134
393
|
}
|
|
135
394
|
break;
|
|
136
395
|
}
|
|
137
396
|
}
|
|
138
|
-
this.call.observer.processors.events.process({
|
|
139
|
-
call: this.call,
|
|
140
|
-
client: this,
|
|
141
|
-
data: event,
|
|
142
|
-
});
|
|
143
397
|
}
|
|
144
|
-
|
|
398
|
+
injectMetaData(metaData) {
|
|
399
|
+
if (this.closed)
|
|
400
|
+
return;
|
|
401
|
+
if (!this._injections.clientMetaItems)
|
|
402
|
+
this._injections.clientMetaItems = [];
|
|
403
|
+
this._injections.clientMetaItems.push(metaData);
|
|
404
|
+
}
|
|
405
|
+
injectEvent(event) {
|
|
406
|
+
if (this.closed)
|
|
407
|
+
return;
|
|
408
|
+
if (!this._injections.clientEvents)
|
|
409
|
+
this._injections.clientEvents = [];
|
|
410
|
+
this._injections.clientEvents.push(event);
|
|
411
|
+
}
|
|
412
|
+
injectIssue(issue) {
|
|
413
|
+
if (this.closed)
|
|
414
|
+
return;
|
|
415
|
+
if (!this._injections.clientIssues)
|
|
416
|
+
this._injections.clientIssues = [];
|
|
417
|
+
this._injections.clientIssues.push(issue);
|
|
418
|
+
}
|
|
419
|
+
injectExtensionStat(stat) {
|
|
420
|
+
if (this.closed)
|
|
421
|
+
return;
|
|
422
|
+
if (!this._injections.extensionStats)
|
|
423
|
+
this._injections.extensionStats = [];
|
|
424
|
+
this._injections.extensionStats.push(stat);
|
|
425
|
+
}
|
|
426
|
+
injectAttachment(key, value) {
|
|
427
|
+
if (this.closed)
|
|
428
|
+
return;
|
|
429
|
+
if (!this._injections.attachments)
|
|
430
|
+
this._injections.attachments = {};
|
|
431
|
+
this._injections.attachments[key] = value;
|
|
432
|
+
}
|
|
433
|
+
addMetadata(metadata) {
|
|
434
|
+
if (this.closed)
|
|
435
|
+
return;
|
|
145
436
|
switch (metadata.type) {
|
|
146
|
-
case
|
|
437
|
+
case ClientMetaTypes_1.ClientMetaTypes.BROWSER: {
|
|
147
438
|
this.browser = (0, utils_1.parseJsonAs)(metadata.payload);
|
|
148
439
|
break;
|
|
149
440
|
}
|
|
150
|
-
case
|
|
441
|
+
case ClientMetaTypes_1.ClientMetaTypes.ENGINE: {
|
|
151
442
|
this.engine = (0, utils_1.parseJsonAs)(metadata.payload);
|
|
152
443
|
break;
|
|
153
444
|
}
|
|
154
|
-
case
|
|
445
|
+
case ClientMetaTypes_1.ClientMetaTypes.PLATFORM: {
|
|
155
446
|
this.platform = (0, utils_1.parseJsonAs)(metadata.payload);
|
|
156
447
|
break;
|
|
157
448
|
}
|
|
158
|
-
case
|
|
449
|
+
case ClientMetaTypes_1.ClientMetaTypes.OPERATION_SYSTEM: {
|
|
159
450
|
this.operationSystem = (0, utils_1.parseJsonAs)(metadata.payload);
|
|
160
451
|
break;
|
|
161
452
|
}
|
|
162
453
|
}
|
|
163
|
-
this.call.observer.
|
|
164
|
-
call: this.call,
|
|
165
|
-
client: this,
|
|
166
|
-
data: metadata,
|
|
167
|
-
});
|
|
454
|
+
this.call.observer.emit('client-metadata', this, metadata);
|
|
168
455
|
}
|
|
169
|
-
|
|
170
|
-
this.
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
});
|
|
456
|
+
addIssue(issue) {
|
|
457
|
+
if (this.closed)
|
|
458
|
+
return;
|
|
459
|
+
this.emit('issue', issue);
|
|
460
|
+
this.call.observer.emit('client-issue', this, issue);
|
|
175
461
|
}
|
|
176
|
-
|
|
177
|
-
this.call.observer.
|
|
178
|
-
call: this.call,
|
|
179
|
-
client: this,
|
|
180
|
-
data: stats,
|
|
181
|
-
});
|
|
462
|
+
addExtensionStats(stats) {
|
|
463
|
+
this.call.observer.emit('client-extension-stats', this, stats);
|
|
182
464
|
}
|
|
183
465
|
_updatePeerConnection(sample) {
|
|
184
466
|
let observedPeerConnection = this.observedPeerConnections.get(sample.peerConnectionId);
|
|
185
467
|
if (!observedPeerConnection) {
|
|
186
468
|
if (!sample.peerConnectionId) {
|
|
187
|
-
return logger.warn(`ObservedClient received an invalid PeerConnectionSample (missing peerConnectionId field). ClientId: ${this.clientId}, CallId: ${this.call.callId}`, sample);
|
|
469
|
+
return (logger.warn(`ObservedClient received an invalid PeerConnectionSample (missing peerConnectionId field). ClientId: ${this.clientId}, CallId: ${this.call.callId}`, sample), void 0);
|
|
188
470
|
}
|
|
189
471
|
observedPeerConnection = new ObservedPeerConnection_1.ObservedPeerConnection(sample.peerConnectionId, this);
|
|
190
472
|
observedPeerConnection.once('close', () => {
|
|
191
473
|
this.observedPeerConnections.delete(sample.peerConnectionId);
|
|
192
474
|
});
|
|
193
475
|
this.observedPeerConnections.set(sample.peerConnectionId, observedPeerConnection);
|
|
476
|
+
this.emit('newpeerconnection', observedPeerConnection);
|
|
194
477
|
}
|
|
195
478
|
observedPeerConnection.accept(sample);
|
|
479
|
+
return observedPeerConnection;
|
|
480
|
+
}
|
|
481
|
+
createEventMonitor(ctx) {
|
|
482
|
+
return new ObservedClientEventMonitor_1.ObservedClientEventMonitor(this, ctx ?? {});
|
|
483
|
+
}
|
|
484
|
+
_mergeInjections(sample) {
|
|
485
|
+
if (this.closed)
|
|
486
|
+
return sample;
|
|
487
|
+
if (this._injections.clientEvents) {
|
|
488
|
+
if (!sample.clientEvents)
|
|
489
|
+
sample.clientEvents = [];
|
|
490
|
+
sample.clientEvents.push(...this._injections.clientEvents);
|
|
491
|
+
this._injections.clientEvents = undefined;
|
|
492
|
+
}
|
|
493
|
+
if (this._injections.clientIssues) {
|
|
494
|
+
if (!sample.clientIssues)
|
|
495
|
+
sample.clientIssues = [];
|
|
496
|
+
sample.clientIssues.push(...this._injections.clientIssues);
|
|
497
|
+
this._injections.clientIssues = undefined;
|
|
498
|
+
}
|
|
499
|
+
if (this._injections.extensionStats) {
|
|
500
|
+
if (!sample.extensionStats)
|
|
501
|
+
sample.extensionStats = [];
|
|
502
|
+
sample.extensionStats.push(...this._injections.extensionStats);
|
|
503
|
+
this._injections.extensionStats = undefined;
|
|
504
|
+
}
|
|
505
|
+
if (this._injections.attachments) {
|
|
506
|
+
if (!sample.attachments)
|
|
507
|
+
sample.attachments = {};
|
|
508
|
+
Object.assign(sample.attachments, this._injections.attachments);
|
|
509
|
+
this._injections.attachments = undefined;
|
|
510
|
+
}
|
|
511
|
+
if (this._injections.clientMetaItems) {
|
|
512
|
+
if (!sample.clientMetaItems)
|
|
513
|
+
sample.clientMetaItems = [];
|
|
514
|
+
sample.clientMetaItems.push(...this._injections.clientMetaItems);
|
|
515
|
+
this._injections.clientMetaItems = undefined;
|
|
516
|
+
}
|
|
517
|
+
return sample;
|
|
196
518
|
}
|
|
197
519
|
}
|
|
198
520
|
exports.ObservedClient = ObservedClient;
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
import { ObservedCertificate } from './ObservedCertificate';
|
|
2
|
+
import { ObservedClient } from './ObservedClient';
|
|
3
|
+
import { ObservedCodec } from './ObservedCodec';
|
|
4
|
+
import { ObservedDataChannel } from './ObservedDataChannel';
|
|
5
|
+
import { ObservedIceCandidate } from './ObservedIceCandidate';
|
|
6
|
+
import { ObservedIceCandidatePair } from './ObservedIceCandidatePair';
|
|
7
|
+
import { ObservedIceTransport } from './ObservedIceTransport';
|
|
8
|
+
import { ObservedInboundRtp } from './ObservedInboundRtp';
|
|
9
|
+
import { ObservedInboundTrack } from './ObservedInboundTrack';
|
|
10
|
+
import { ObservedMediaPlayout } from './ObservedMediaPlayout';
|
|
11
|
+
import { ObservedMediaSource } from './ObservedMediaSource';
|
|
12
|
+
import { ObservedOutboundRtp } from './ObservedOutboundRtp';
|
|
13
|
+
import { ObservedOutboundTrack } from './ObservedOutboundTrack';
|
|
14
|
+
import { ObservedPeerConnection } from './ObservedPeerConnection';
|
|
15
|
+
import { ClientIssue, ClientMetaData, ExtensionStat } from './schema/ClientSample';
|
|
16
|
+
export declare class ObservedClientEventMonitor<Context> {
|
|
17
|
+
readonly observedClient: ObservedClient;
|
|
18
|
+
readonly context: Context;
|
|
19
|
+
constructor(observedClient: ObservedClient, context: Context);
|
|
20
|
+
onClientClosed?: (client: ObservedClient, ctx: Context) => void;
|
|
21
|
+
private _onClientClosed;
|
|
22
|
+
onPeerConnectionAdded?: (peerConnection: ObservedPeerConnection, ctx: Context) => void;
|
|
23
|
+
private _onPeerConnconnectionAdded;
|
|
24
|
+
onPeerConnectionRemoved?: (peerConnection: ObservedPeerConnection, ctx: Context) => void;
|
|
25
|
+
private _onPeerConnectionRemoved;
|
|
26
|
+
onCertificateAdded?: (certificate: ObservedCertificate, ctx: Context) => void;
|
|
27
|
+
private _onCertificateAdded;
|
|
28
|
+
onCertificateRemoved?: (certificate: ObservedCertificate, ctx: Context) => void;
|
|
29
|
+
private _onCertificateRemoved;
|
|
30
|
+
onInboundTrackAdded?: (inboundTrack: ObservedInboundTrack, ctx: Context) => void;
|
|
31
|
+
private _onInboundTrackAdded;
|
|
32
|
+
onInboundTrackRemoved?: (inboundTrack: ObservedInboundTrack, ctx: Context) => void;
|
|
33
|
+
private _onInboundTrackRemoved;
|
|
34
|
+
onOutboundTrackAdded?: (outboundTrack: ObservedOutboundTrack, ctx: Context) => void;
|
|
35
|
+
private _onOutboundTrackAdded;
|
|
36
|
+
onOutboundTrackRemoved?: (outboundTrack: ObservedOutboundTrack, ctx: Context) => void;
|
|
37
|
+
private _onOutboundTrackRemoved;
|
|
38
|
+
onInboundRtpAdded?: (inboundRtp: ObservedInboundRtp, ctx: Context) => void;
|
|
39
|
+
private _onInboundRtpAdded;
|
|
40
|
+
onInboundRtpRemoved?: (inboundRtp: ObservedInboundRtp, ctx: Context) => void;
|
|
41
|
+
private _onInboundRtpRemoved;
|
|
42
|
+
onOutboundRtpAdded?: (outboundRtp: ObservedOutboundRtp, ctx: Context) => void;
|
|
43
|
+
private _onOutboundRtpAdded;
|
|
44
|
+
onOutboundRtpRemoved?: (outboundRtp: ObservedOutboundRtp, ctx: Context) => void;
|
|
45
|
+
private _onOutboundRtpRemoved;
|
|
46
|
+
onDataChannelAdded?: (dataChannel: ObservedDataChannel, ctx: Context) => void;
|
|
47
|
+
private _onDataChannelAdded;
|
|
48
|
+
onDataChannelRemoved?: (dataChannel: ObservedDataChannel, ctx: Context) => void;
|
|
49
|
+
private _onDataChannelRemoved;
|
|
50
|
+
onAddedIceTransport?: (iceTransport: ObservedIceTransport, ctx: Context) => void;
|
|
51
|
+
private _onAddedIceTransport;
|
|
52
|
+
onRemovedIceTransport?: (iceTransport: ObservedIceTransport, ctx: Context) => void;
|
|
53
|
+
private _onRemovedIceTransport;
|
|
54
|
+
onIceCandidateAdded?: (iceCandidate: ObservedIceCandidate, ctx: Context) => void;
|
|
55
|
+
private _onIceCandidateAdded;
|
|
56
|
+
onIceCandidateRemoved?: (iceCandidate: ObservedIceCandidate, ctx: Context) => void;
|
|
57
|
+
private _onIceCandidateRemoved;
|
|
58
|
+
onAddedIceCandidatePair?: (candidatePair: ObservedIceCandidatePair, ctx: Context) => void;
|
|
59
|
+
private _onAddedIceCandidatePair;
|
|
60
|
+
onRemovedIceCandidatePair?: (candidatePair: ObservedIceCandidatePair, ctx: Context) => void;
|
|
61
|
+
private _onRemovedIceCandidatePair;
|
|
62
|
+
onAddedMediaCodec?: (codec: ObservedCodec, ctx: Context) => void;
|
|
63
|
+
private _onAddedMediaCodec;
|
|
64
|
+
onRemovedMediaCodec?: (codec: ObservedCodec, ctx: Context) => void;
|
|
65
|
+
private _onRemovedMediaCodec;
|
|
66
|
+
onAddedMediaPlayout?: (mediaPlayout: ObservedMediaPlayout, ctx: Context) => void;
|
|
67
|
+
private _onAddedMediaPlayout;
|
|
68
|
+
onRemovedMediaPlayout?: (mediaPlayout: ObservedMediaPlayout, ctx: Context) => void;
|
|
69
|
+
private _onRemovedMediaPlayout;
|
|
70
|
+
onMediaSourceAdded?: (mediaSource: ObservedMediaSource, ctx: Context) => void;
|
|
71
|
+
private _onMediaSourceAdded;
|
|
72
|
+
onMediaSourceRemoved?: (mediaSource: ObservedMediaSource, ctx: Context) => void;
|
|
73
|
+
private _onMediaSourceRemoved;
|
|
74
|
+
onClientIssue?: (issue: ClientIssue, ctx: Context) => void;
|
|
75
|
+
private _onClientIssue;
|
|
76
|
+
onClientMetadata?: (metadata: ClientMetaData, ctx: Context) => void;
|
|
77
|
+
private _onClientMetadata;
|
|
78
|
+
onClientExtensionStats?: (extensionStats: ExtensionStat, ctx: Context) => void;
|
|
79
|
+
private _onClientExtensionStats;
|
|
80
|
+
onClientJoined?: (client: ObservedClient, ctx: Context) => void;
|
|
81
|
+
private _onClientJoined;
|
|
82
|
+
onClientLeft?: (client: ObservedClient, ctx: Context) => void;
|
|
83
|
+
private _onClientLeft;
|
|
84
|
+
onUserMediaError?: (error: string, observedClient: ObservedClient, ctx: Context) => void;
|
|
85
|
+
private _onUserMediaError;
|
|
86
|
+
onUsingTurn?: (client: ObservedClient, ctx: Context) => void;
|
|
87
|
+
private _onUsingTurn;
|
|
88
|
+
}
|
|
89
|
+
//# sourceMappingURL=ObservedClientEventMonitor.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ObservedClientEventMonitor.d.ts","sourceRoot":"","sources":["../src/ObservedClientEventMonitor.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAC5D,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAClD,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAChD,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAC5D,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