@observertc/observer-js 0.42.9 → 1.0.1-57a1811.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/.prettierrc +6 -6
- package/README.md +0 -104
- package/lib/ObservedCall.d.ts +38 -41
- package/lib/ObservedCall.d.ts.map +1 -1
- package/lib/ObservedCall.js +97 -109
- package/lib/ObservedCertificate.d.ts +19 -0
- package/lib/ObservedCertificate.d.ts.map +1 -0
- package/lib/ObservedCertificate.js +38 -0
- package/lib/ObservedClient.d.ts +49 -127
- package/lib/ObservedClient.d.ts.map +1 -1
- package/lib/ObservedClient.js +201 -750
- package/lib/ObservedCodec.d.ts +22 -0
- package/lib/ObservedCodec.d.ts.map +1 -0
- package/lib/ObservedCodec.js +45 -0
- package/lib/ObservedDataChannel.d.ts +23 -69
- package/lib/ObservedDataChannel.d.ts.map +1 -1
- package/lib/ObservedDataChannel.js +67 -109
- package/lib/ObservedIceCandidate.d.ts +29 -0
- package/lib/ObservedIceCandidate.d.ts.map +1 -0
- package/lib/ObservedIceCandidate.js +59 -0
- package/lib/ObservedIceCandidatePair.d.ts +44 -0
- package/lib/ObservedIceCandidatePair.d.ts.map +1 -0
- package/lib/ObservedIceCandidatePair.js +111 -0
- package/lib/ObservedIceTransport.d.ts +32 -0
- package/lib/ObservedIceTransport.d.ts.map +1 -0
- package/lib/ObservedIceTransport.js +65 -0
- package/lib/ObservedInboundRtp.d.ts +92 -0
- package/lib/ObservedInboundRtp.d.ts.map +1 -0
- package/lib/ObservedInboundRtp.js +193 -0
- package/lib/ObservedInboundTrack.d.ts +29 -0
- package/lib/ObservedInboundTrack.d.ts.map +1 -0
- package/lib/ObservedInboundTrack.js +57 -0
- package/lib/ObservedMediaPlayout.d.ts +22 -0
- package/lib/ObservedMediaPlayout.d.ts.map +1 -0
- package/lib/ObservedMediaPlayout.js +42 -0
- package/lib/ObservedMediaSource.d.ts +28 -0
- package/lib/ObservedMediaSource.d.ts.map +1 -0
- package/lib/ObservedMediaSource.js +55 -0
- package/lib/ObservedOutboundRtp.d.ts +62 -0
- package/lib/ObservedOutboundRtp.d.ts.map +1 -0
- package/lib/ObservedOutboundRtp.js +144 -0
- package/lib/ObservedOutboundTrack.d.ts +29 -0
- package/lib/ObservedOutboundTrack.d.ts.map +1 -0
- package/lib/ObservedOutboundTrack.js +57 -0
- package/lib/ObservedPeerConnection.d.ts +128 -78
- package/lib/ObservedPeerConnection.d.ts.map +1 -1
- package/lib/ObservedPeerConnection.js +624 -357
- package/lib/ObservedPeerConnectionTransport.d.ts +17 -0
- package/lib/ObservedPeerConnectionTransport.d.ts.map +1 -0
- package/lib/ObservedPeerConnectionTransport.js +34 -0
- package/lib/ObservedRemoteInboundRtp.d.ts +30 -0
- package/lib/ObservedRemoteInboundRtp.d.ts.map +1 -0
- package/lib/ObservedRemoteInboundRtp.js +60 -0
- package/lib/ObservedRemoteOutboundRtp.d.ts +30 -0
- package/lib/ObservedRemoteOutboundRtp.d.ts.map +1 -0
- package/lib/ObservedRemoteOutboundRtp.js +60 -0
- 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 +31 -51
- package/lib/Observer.d.ts.map +1 -1
- package/lib/Observer.js +75 -229
- package/lib/common/Middleware.d.ts +10 -1
- package/lib/common/Middleware.d.ts.map +1 -1
- package/lib/common/Middleware.js +55 -36
- package/lib/common/logger.d.ts +8 -4
- package/lib/common/logger.d.ts.map +1 -1
- package/lib/common/logger.js +44 -68
- package/lib/common/types.d.ts +0 -21
- package/lib/common/types.d.ts.map +1 -1
- package/lib/common/types.js +1 -0
- package/lib/common/utils.d.ts +1 -0
- package/lib/common/utils.d.ts.map +1 -1
- package/lib/common/utils.js +13 -1
- package/lib/detectors/Detector.d.ts +5 -0
- package/lib/detectors/Detector.d.ts.map +1 -0
- package/lib/detectors/Detector.js +3 -0
- package/lib/detectors/Detectors.d.ts +11 -0
- package/lib/detectors/Detectors.d.ts.map +1 -0
- package/lib/detectors/Detectors.js +34 -0
- package/lib/index.d.ts +24 -25
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +41 -41
- package/lib/monitors/TurnUsageMonitor.d.ts +0 -52
- package/lib/monitors/TurnUsageMonitor.d.ts.map +1 -1
- package/lib/monitors/TurnUsageMonitor.js +145 -120
- package/lib/schema/ClientEventTypes.d.ts +33 -0
- package/lib/schema/ClientEventTypes.d.ts.map +1 -0
- package/lib/schema/ClientEventTypes.js +38 -0
- package/lib/schema/ClientMetaTypes.d.ts +34 -0
- package/lib/schema/ClientMetaTypes.d.ts.map +1 -0
- package/lib/schema/ClientMetaTypes.js +16 -0
- package/lib/schema/ClientSample.d.ts +1333 -0
- package/lib/schema/ClientSample.d.ts.map +1 -0
- package/lib/schema/ClientSample.js +4 -0
- package/lib/scores/CalculatedScore.d.ts +6 -0
- package/lib/scores/CalculatedScore.d.ts.map +1 -0
- package/lib/scores/DefaultCallScoreCalculator.d.ts +7 -0
- package/lib/scores/DefaultCallScoreCalculator.d.ts.map +1 -0
- package/lib/scores/DefaultCallScoreCalculator.js +21 -0
- package/lib/scores/ScoreCalculator.d.ts +4 -0
- package/lib/scores/ScoreCalculator.d.ts.map +1 -0
- package/lib/scores/ScoreCalculator.js +2 -0
- package/lib/utils/CallUpdater.d.ts +5 -0
- package/lib/utils/CallUpdater.d.ts.map +1 -0
- package/lib/utils/CallUpdater.js +2 -0
- package/lib/utils/OnAllClientCallUpdater.d.ts +16 -0
- package/lib/utils/OnAllClientCallUpdater.d.ts.map +1 -0
- package/lib/utils/OnAllClientCallUpdater.js +58 -0
- package/lib/utils/RemoteTrackResolver.d.ts +7 -0
- package/lib/utils/RemoteTrackResolver.d.ts.map +1 -0
- package/lib/utils/RemoteTrackResolver.js +2 -0
- package/lib/utils/onAnyClientCallUpdater.d.ts +14 -0
- package/lib/utils/onAnyClientCallUpdater.d.ts.map +1 -0
- package/lib/utils/onAnyClientCallUpdater.js +51 -0
- package/package.json +4 -4
- package/src/ObservedCall.ts +116 -166
- package/src/ObservedCertificate.ts +43 -0
- package/src/ObservedClient.ts +213 -1060
- package/src/ObservedCodec.ts +49 -0
- package/src/ObservedDataChannel.ts +68 -181
- package/src/ObservedIceCandidate.ts +64 -0
- package/src/ObservedIceCandidatePair.ts +118 -0
- package/src/ObservedIceTransport.ts +70 -0
- package/src/ObservedInboundRtp.ts +205 -0
- package/src/ObservedInboundTrack.ts +70 -0
- package/src/ObservedMediaPlayout.ts +49 -0
- package/src/ObservedMediaSource.ts +60 -0
- package/src/ObservedOutboundRtp.ts +156 -0
- package/src/ObservedOutboundTrack.ts +69 -0
- package/src/ObservedPeerConnection.ts +827 -405
- package/src/ObservedPeerConnectionTransport.ts +38 -0
- package/src/ObservedRemoteInboundRtp.ts +64 -0
- package/src/ObservedRemoteOutboundRtp.ts +65 -0
- package/src/ObservedTURN.ts +86 -0
- package/src/ObservedTurnServer.ts +72 -0
- package/src/Observer.ts +91 -302
- package/src/common/Middleware.ts +70 -42
- package/src/common/logger.ts +60 -69
- package/src/common/types.ts +0 -42
- package/src/common/utils.ts +12 -0
- package/src/detectors/Detector.ts +6 -0
- package/src/detectors/Detectors.ts +38 -0
- package/src/index.ts +24 -90
- package/src/monitors/TurnUsageMonitor.ts +164 -164
- package/src/schema/ClientEventTypes.ts +36 -0
- package/src/schema/ClientMetaTypes.ts +41 -0
- package/src/schema/ClientSample.ts +1682 -0
- package/src/scores/CalculatedScore.ts +6 -0
- package/src/scores/DefaultCallScoreCalculator.ts +23 -0
- package/src/scores/ScoreCalculator.ts +3 -0
- package/src/utils/CallUpdater.ts +5 -0
- package/src/utils/OnAllClientCallUpdater.ts +68 -0
- package/src/utils/RemoteTrackResolver.ts +12 -0
- package/src/utils/onAnyClientCallUpdater.ts +59 -0
- package/tsconfig.json +3 -3
- package/lib/ObservedICE.d.ts +0 -64
- package/lib/ObservedICE.d.ts.map +0 -1
- package/lib/ObservedICE.js +0 -141
- package/lib/ObservedInboundAudioTrack.d.ts +0 -96
- package/lib/ObservedInboundAudioTrack.d.ts.map +0 -1
- package/lib/ObservedInboundAudioTrack.js +0 -217
- package/lib/ObservedInboundVideoTrack.d.ts +0 -101
- package/lib/ObservedInboundVideoTrack.d.ts.map +0 -1
- package/lib/ObservedInboundVideoTrack.js +0 -232
- package/lib/ObservedOutboundAudioTrack.d.ts +0 -87
- package/lib/ObservedOutboundAudioTrack.d.ts.map +0 -1
- package/lib/ObservedOutboundAudioTrack.js +0 -186
- package/lib/ObservedOutboundVideoTrack.d.ts +0 -91
- package/lib/ObservedOutboundVideoTrack.d.ts.map +0 -1
- package/lib/ObservedOutboundVideoTrack.js +0 -193
- package/lib/ObservedSfu.d.ts +0 -59
- package/lib/ObservedSfu.d.ts.map +0 -1
- package/lib/ObservedSfu.js +0 -157
- package/lib/ObservedSfuInboundRtpPad.d.ts +0 -42
- package/lib/ObservedSfuInboundRtpPad.d.ts.map +0 -1
- package/lib/ObservedSfuInboundRtpPad.js +0 -71
- package/lib/ObservedSfuOutboundRtpPad.d.ts +0 -42
- package/lib/ObservedSfuOutboundRtpPad.d.ts.map +0 -1
- package/lib/ObservedSfuOutboundRtpPad.js +0 -72
- package/lib/ObservedSfuSctpChannel.d.ts +0 -42
- package/lib/ObservedSfuSctpChannel.d.ts.map +0 -1
- package/lib/ObservedSfuSctpChannel.js +0 -57
- package/lib/ObservedSfuTransport.d.ts +0 -58
- package/lib/ObservedSfuTransport.d.ts.map +0 -1
- package/lib/ObservedSfuTransport.js +0 -120
- package/lib/RemoteTrackAssigner.d.ts +0 -14
- package/lib/RemoteTrackAssigner.d.ts.map +0 -1
- package/lib/RemoteTrackAssigner.js +0 -52
- package/lib/ReportsCollector.d.ts +0 -109
- package/lib/ReportsCollector.d.ts.map +0 -1
- package/lib/ReportsCollector.js +0 -207
- package/lib/common/CalculatedScore.d.ts +0 -80
- package/lib/common/CalculatedScore.d.ts.map +0 -1
- package/lib/common/CalculatedScore.js +0 -162
- package/lib/common/CallEventType.d.ts +0 -63
- package/lib/common/CallEventType.d.ts.map +0 -1
- package/lib/common/CallEventType.js +0 -39
- package/lib/common/CallMetaReports.d.ts +0 -42
- package/lib/common/CallMetaReports.d.ts.map +0 -1
- package/lib/common/CallMetaReports.js +0 -36
- package/lib/common/QualityScoreUtils.d.ts +0 -1
- package/lib/common/QualityScoreUtils.d.ts.map +0 -1
- package/lib/common/QualityScoreUtils.js +0 -1
- package/lib/common/TypedEventEmitter.d.ts +0 -22
- package/lib/common/TypedEventEmitter.d.ts.map +0 -1
- package/lib/common/TypedEventEmitter.js +0 -11
- package/lib/common/callEventReports.d.ts +0 -10
- package/lib/common/callEventReports.d.ts.map +0 -1
- package/lib/common/callEventReports.js +0 -112
- package/lib/monitors/CallSummary.d.ts +0 -37
- package/lib/monitors/CallSummary.d.ts.map +0 -1
- package/lib/monitors/CallSummaryMonitor.d.ts +0 -32
- package/lib/monitors/CallSummaryMonitor.d.ts.map +0 -1
- package/lib/monitors/CallSummaryMonitor.js +0 -152
- package/lib/monitors/ClientIssueMonitor.d.ts +0 -32
- package/lib/monitors/ClientIssueMonitor.d.ts.map +0 -1
- package/lib/monitors/ClientIssueMonitor.js +0 -49
- package/lib/monitors/SfuServerMonitor.d.ts +0 -79
- package/lib/monitors/SfuServerMonitor.d.ts.map +0 -1
- package/lib/monitors/SfuServerMonitor.js +0 -198
- package/src/ObservedICE.ts +0 -237
- package/src/ObservedInboundAudioTrack.ts +0 -344
- package/src/ObservedInboundVideoTrack.ts +0 -361
- package/src/ObservedOutboundAudioTrack.ts +0 -307
- package/src/ObservedOutboundVideoTrack.ts +0 -319
- package/src/ObservedSfu.ts +0 -231
- package/src/ObservedSfuInboundRtpPad.ts +0 -106
- package/src/ObservedSfuOutboundRtpPad.ts +0 -107
- package/src/ObservedSfuSctpChannel.ts +0 -103
- package/src/ObservedSfuTransport.ts +0 -185
- package/src/RemoteTrackAssigner.ts +0 -68
- package/src/ReportsCollector.ts +0 -336
- package/src/common/CalculatedScore.ts +0 -188
- package/src/common/CallEventType.ts +0 -69
- package/src/common/CallMetaReports.ts +0 -82
- package/src/common/QualityScoreUtils.ts +0 -0
- package/src/common/TypedEventEmitter.ts +0 -32
- package/src/common/callEventReports.ts +0 -178
- package/src/monitors/CallSummary.ts +0 -38
- package/src/monitors/CallSummaryMonitor.ts +0 -192
- package/src/monitors/ClientIssueMonitor.ts +0 -88
- package/src/monitors/SfuServerMonitor.ts +0 -285
- /package/lib/{monitors/CallSummary.js → scores/CalculatedScore.js} +0 -0
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { ObservedCall } from '../ObservedCall';
|
|
2
|
+
|
|
3
|
+
export class DefaultCallScoreCalculator {
|
|
4
|
+
|
|
5
|
+
public constructor(
|
|
6
|
+
public readonly observedCall: ObservedCall,
|
|
7
|
+
) {
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
public update() {
|
|
11
|
+
let totalScore = 0;
|
|
12
|
+
let totalWeight = 0;
|
|
13
|
+
|
|
14
|
+
for (const client of this.observedCall.observedClients.values()) {
|
|
15
|
+
if (client.score === undefined) continue;
|
|
16
|
+
|
|
17
|
+
totalScore += client.score * client.calculatedScore.weight;
|
|
18
|
+
totalWeight += client.calculatedScore.weight;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
this.observedCall.calculatedScore.value = totalWeight ? totalScore / totalWeight : undefined;
|
|
22
|
+
}
|
|
23
|
+
}
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
import { ObservedCall } from '../ObservedCall';
|
|
2
|
+
import { ObservedClient } from '../ObservedClient';
|
|
3
|
+
import { CallUpdater } from './CallUpdater';
|
|
4
|
+
|
|
5
|
+
export class OnAllClientCallUpdater implements CallUpdater {
|
|
6
|
+
|
|
7
|
+
private readonly _updatedClients = new Set<string>();
|
|
8
|
+
private _minClientJoinedTimestamp?: number;
|
|
9
|
+
private _maxClientLeftTimestamp?: number;
|
|
10
|
+
|
|
11
|
+
public constructor(
|
|
12
|
+
private _observedCall: ObservedCall
|
|
13
|
+
) {
|
|
14
|
+
this._onNewObservedClient = this._onNewObservedClient.bind(this);
|
|
15
|
+
this._onCallEmpty = this._onCallEmpty.bind(this);
|
|
16
|
+
|
|
17
|
+
this._observedCall.once('close', () => {
|
|
18
|
+
this._observedCall.off('empty', this._onCallEmpty);
|
|
19
|
+
this._observedCall.off('newclient', this._onNewObservedClient);
|
|
20
|
+
});
|
|
21
|
+
this._observedCall.on('newclient', this._onNewObservedClient);
|
|
22
|
+
this._observedCall.on('empty', this._onCallEmpty);
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
public onClientUpdate(observedClient: ObservedClient) {
|
|
26
|
+
this._updatedClients.add(observedClient.clientId);
|
|
27
|
+
|
|
28
|
+
if (this._updatedClients.size < this._observedCall.observedClients.size) {
|
|
29
|
+
return;
|
|
30
|
+
}
|
|
31
|
+
this._updatedClients.clear();
|
|
32
|
+
this._observedCall.update();
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
private _onNewObservedClient(observedClient: ObservedClient) {
|
|
36
|
+
const onJoined = () => this._onClientJoined(observedClient);
|
|
37
|
+
const onLeft = () => this._onClientLeft(observedClient);
|
|
38
|
+
|
|
39
|
+
observedClient.once('close', () => {
|
|
40
|
+
observedClient.off('joined', onJoined);
|
|
41
|
+
observedClient.off('left', onLeft);
|
|
42
|
+
this._updatedClients.delete(observedClient.clientId);
|
|
43
|
+
});
|
|
44
|
+
observedClient.on('joined', onJoined);
|
|
45
|
+
observedClient.on('left', onLeft);
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
private _onClientJoined(observedClient: ObservedClient) {
|
|
49
|
+
if (!observedClient.joinedAt) return;
|
|
50
|
+
|
|
51
|
+
if (!this._minClientJoinedTimestamp || observedClient.joinedAt < this._minClientJoinedTimestamp) {
|
|
52
|
+
this._minClientJoinedTimestamp = observedClient.joinedAt;
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
private _onClientLeft(observedClient: ObservedClient) {
|
|
57
|
+
if (!observedClient.leftAt) return;
|
|
58
|
+
|
|
59
|
+
if (!this._maxClientLeftTimestamp || observedClient.leftAt > this._maxClientLeftTimestamp) {
|
|
60
|
+
this._maxClientLeftTimestamp = observedClient.leftAt;
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
private _onCallEmpty() {
|
|
65
|
+
this._observedCall.started = this._minClientJoinedTimestamp;
|
|
66
|
+
this._observedCall.ended = this._maxClientLeftTimestamp;
|
|
67
|
+
}
|
|
68
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { ObservedInboundTrack } from '../ObservedInboundTrack';
|
|
2
|
+
import { ObservedOutboundTrack } from '../ObservedOutboundTrack';
|
|
3
|
+
|
|
4
|
+
export interface RemoteTrackResolver {
|
|
5
|
+
resolveRemoteOutboundTrack(
|
|
6
|
+
inboundTrack: ObservedInboundTrack,
|
|
7
|
+
): ObservedOutboundTrack | undefined;
|
|
8
|
+
|
|
9
|
+
resolveRemoteInboundTracks(
|
|
10
|
+
outboundTrack: ObservedOutboundTrack,
|
|
11
|
+
): ObservedInboundTrack[] | undefined;
|
|
12
|
+
}
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import { ObservedCall } from '../ObservedCall';
|
|
2
|
+
import { ObservedClient } from '../ObservedClient';
|
|
3
|
+
import { CallUpdater } from './CallUpdater';
|
|
4
|
+
|
|
5
|
+
export class OnAnyClientCallUpdater implements CallUpdater {
|
|
6
|
+
private _minClientJoinedTimestamp?: number;
|
|
7
|
+
private _maxClientLeftTimestamp?: number;
|
|
8
|
+
|
|
9
|
+
public constructor(
|
|
10
|
+
private _observedCall: ObservedCall
|
|
11
|
+
) {
|
|
12
|
+
this._onNewObservedClient = this._onNewObservedClient.bind(this);
|
|
13
|
+
this._onCallEmpty = this._onCallEmpty.bind(this);
|
|
14
|
+
|
|
15
|
+
this._observedCall.once('close', () => {
|
|
16
|
+
this._observedCall.off('empty', this._onCallEmpty);
|
|
17
|
+
this._observedCall.off('newclient', this._onNewObservedClient);
|
|
18
|
+
});
|
|
19
|
+
this._observedCall.on('newclient', this._onNewObservedClient);
|
|
20
|
+
this._observedCall.on('empty', this._onCallEmpty);
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
public onClientUpdate() {
|
|
24
|
+
this._observedCall.update();
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
private _onNewObservedClient(observedClient: ObservedClient) {
|
|
28
|
+
const onJoined = () => this._onClientJoined(observedClient);
|
|
29
|
+
const onLeft = () => this._onClientLeft(observedClient);
|
|
30
|
+
|
|
31
|
+
observedClient.once('close', () => {
|
|
32
|
+
observedClient.off('joined', onJoined);
|
|
33
|
+
observedClient.off('left', onLeft);
|
|
34
|
+
});
|
|
35
|
+
observedClient.on('joined', onJoined);
|
|
36
|
+
observedClient.on('left', onLeft);
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
private _onClientJoined(observedClient: ObservedClient) {
|
|
40
|
+
if (!observedClient.joinedAt) return;
|
|
41
|
+
|
|
42
|
+
if (!this._minClientJoinedTimestamp || observedClient.joinedAt < this._minClientJoinedTimestamp) {
|
|
43
|
+
this._minClientJoinedTimestamp = observedClient.joinedAt;
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
private _onClientLeft(observedClient: ObservedClient) {
|
|
48
|
+
if (!observedClient.leftAt) return;
|
|
49
|
+
|
|
50
|
+
if (!this._maxClientLeftTimestamp || observedClient.leftAt > this._maxClientLeftTimestamp) {
|
|
51
|
+
this._maxClientLeftTimestamp = observedClient.leftAt;
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
private _onCallEmpty() {
|
|
56
|
+
this._observedCall.started = this._minClientJoinedTimestamp;
|
|
57
|
+
this._observedCall.ended = this._maxClientLeftTimestamp;
|
|
58
|
+
}
|
|
59
|
+
}
|
package/tsconfig.json
CHANGED
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
"compileOnSave": true,
|
|
3
3
|
"compilerOptions":
|
|
4
4
|
{
|
|
5
|
-
"lib": [ "
|
|
6
|
-
"target": "
|
|
7
|
-
"module": "
|
|
5
|
+
"lib": [ "ES2020" ],
|
|
6
|
+
"target": "ESNext",
|
|
7
|
+
"module": "CommonJS",
|
|
8
8
|
"moduleResolution": "node",
|
|
9
9
|
"esModuleInterop": true,
|
|
10
10
|
"strict": true,
|
package/lib/ObservedICE.d.ts
DELETED
|
@@ -1,64 +0,0 @@
|
|
|
1
|
-
/// <reference types="node" />
|
|
2
|
-
import { IceCandidatePair, IceLocalCandidate, IceRemoteCandidate } from '@observertc/sample-schemas-js';
|
|
3
|
-
import { EventEmitter } from 'events';
|
|
4
|
-
import { ObservedPeerConnection } from './ObservedPeerConnection';
|
|
5
|
-
export type ObservedICEEvents = {
|
|
6
|
-
update: [
|
|
7
|
-
{
|
|
8
|
-
elapsedTimeInMs: number;
|
|
9
|
-
}
|
|
10
|
-
];
|
|
11
|
-
'new-local-candidate': [IceLocalCandidate];
|
|
12
|
-
'new-remote-candidate': [IceRemoteCandidate];
|
|
13
|
-
'new-selected-candidate-pair': [
|
|
14
|
-
{
|
|
15
|
-
localCandidate: IceLocalCandidate;
|
|
16
|
-
remoteCandidate: IceRemoteCandidate;
|
|
17
|
-
}
|
|
18
|
-
];
|
|
19
|
-
usingturnchanged: [boolean];
|
|
20
|
-
close: [];
|
|
21
|
-
};
|
|
22
|
-
export declare interface ObservedICE {
|
|
23
|
-
on<U extends keyof ObservedICEEvents>(event: U, listener: (...args: ObservedICEEvents[U]) => void): this;
|
|
24
|
-
off<U extends keyof ObservedICEEvents>(event: U, listener: (...args: ObservedICEEvents[U]) => void): this;
|
|
25
|
-
once<U extends keyof ObservedICEEvents>(event: U, listener: (...args: ObservedICEEvents[U]) => void): this;
|
|
26
|
-
emit<U extends keyof ObservedICEEvents>(event: U, ...args: ObservedICEEvents[U]): boolean;
|
|
27
|
-
}
|
|
28
|
-
export declare class ObservedICE extends EventEmitter {
|
|
29
|
-
readonly peerConnection: ObservedPeerConnection;
|
|
30
|
-
static create(peerConnection: ObservedPeerConnection): ObservedICE;
|
|
31
|
-
marker?: string;
|
|
32
|
-
private readonly _localCandidates;
|
|
33
|
-
private readonly _remoteCandidates;
|
|
34
|
-
usingTURN: boolean;
|
|
35
|
-
deltaBytesReceived: number;
|
|
36
|
-
deltaBytesSent: number;
|
|
37
|
-
deltaPacketsReceived: number;
|
|
38
|
-
deltaPacketsSent: number;
|
|
39
|
-
totalBytesReceived: number;
|
|
40
|
-
totalBytesSent: number;
|
|
41
|
-
totalPacketsReceived: number;
|
|
42
|
-
totalPacketsSent: number;
|
|
43
|
-
currentRttInMs?: number;
|
|
44
|
-
private _selectedLocalCandidateId?;
|
|
45
|
-
private _selectedRemoteCandidateId?;
|
|
46
|
-
private _updated;
|
|
47
|
-
private _stats?;
|
|
48
|
-
private _closed;
|
|
49
|
-
private constructor();
|
|
50
|
-
get reports(): import("./ReportsCollector").ReportsCollector;
|
|
51
|
-
get localCandidates(): ReadonlyMap<string, IceLocalCandidate>;
|
|
52
|
-
get remoteCandidates(): ReadonlyMap<string, IceRemoteCandidate>;
|
|
53
|
-
get selectedLocalCandidate(): IceLocalCandidate | undefined;
|
|
54
|
-
get selectedRemoteCandidate(): IceLocalCandidate | undefined;
|
|
55
|
-
get stats(): IceCandidatePair | undefined;
|
|
56
|
-
get updated(): number;
|
|
57
|
-
get closed(): boolean;
|
|
58
|
-
close(): void;
|
|
59
|
-
addLocalCandidate(candidate: IceLocalCandidate, sampleTimestamp?: number): void;
|
|
60
|
-
addRemoteCandidate(candidate: IceRemoteCandidate, sampleTimestamp?: number): void;
|
|
61
|
-
resetMetrics(): void;
|
|
62
|
-
update(candidatePair: IceCandidatePair, timestamp: number): void;
|
|
63
|
-
}
|
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BxE,kBAAkB,CAAC,SAAS,EAAE,kBAAkB,EAAE,eAAe,CAAC,EAAE,MAAM;IA4B1E,YAAY;IASZ,MAAM,CAAC,aAAa,EAAE,gBAAgB,EAAE,SAAS,EAAE,MAAM;CAqEhE"}
|
package/lib/ObservedICE.js
DELETED
|
@@ -1,141 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.ObservedICE = void 0;
|
|
4
|
-
const events_1 = require("events");
|
|
5
|
-
const CallMetaReports_1 = require("./common/CallMetaReports");
|
|
6
|
-
class ObservedICE extends events_1.EventEmitter {
|
|
7
|
-
static create(peerConnection) {
|
|
8
|
-
return new ObservedICE(peerConnection);
|
|
9
|
-
}
|
|
10
|
-
constructor(peerConnection) {
|
|
11
|
-
super();
|
|
12
|
-
this.peerConnection = peerConnection;
|
|
13
|
-
this._localCandidates = new Map();
|
|
14
|
-
this._remoteCandidates = new Map();
|
|
15
|
-
this.usingTURN = false;
|
|
16
|
-
this.deltaBytesReceived = 0;
|
|
17
|
-
this.deltaBytesSent = 0;
|
|
18
|
-
this.deltaPacketsReceived = 0;
|
|
19
|
-
this.deltaPacketsSent = 0;
|
|
20
|
-
this.totalBytesReceived = 0;
|
|
21
|
-
this.totalBytesSent = 0;
|
|
22
|
-
this.totalPacketsReceived = 0;
|
|
23
|
-
this.totalPacketsSent = 0;
|
|
24
|
-
this._updated = Date.now();
|
|
25
|
-
this._closed = false;
|
|
26
|
-
this.setMaxListeners(Infinity);
|
|
27
|
-
}
|
|
28
|
-
get reports() {
|
|
29
|
-
return this.peerConnection.reports;
|
|
30
|
-
}
|
|
31
|
-
get localCandidates() {
|
|
32
|
-
return this._localCandidates;
|
|
33
|
-
}
|
|
34
|
-
get remoteCandidates() {
|
|
35
|
-
return this._remoteCandidates;
|
|
36
|
-
}
|
|
37
|
-
get selectedLocalCandidate() {
|
|
38
|
-
var _a;
|
|
39
|
-
return this._localCandidates.get((_a = this._selectedLocalCandidateId) !== null && _a !== void 0 ? _a : '');
|
|
40
|
-
}
|
|
41
|
-
get selectedRemoteCandidate() {
|
|
42
|
-
var _a;
|
|
43
|
-
return this._remoteCandidates.get((_a = this._selectedRemoteCandidateId) !== null && _a !== void 0 ? _a : '');
|
|
44
|
-
}
|
|
45
|
-
get stats() {
|
|
46
|
-
return this._stats;
|
|
47
|
-
}
|
|
48
|
-
get updated() {
|
|
49
|
-
return this._updated;
|
|
50
|
-
}
|
|
51
|
-
get closed() {
|
|
52
|
-
return this._closed;
|
|
53
|
-
}
|
|
54
|
-
close() {
|
|
55
|
-
if (this._closed)
|
|
56
|
-
return;
|
|
57
|
-
this._closed = true;
|
|
58
|
-
this.emit('close');
|
|
59
|
-
}
|
|
60
|
-
addLocalCandidate(candidate, sampleTimestamp) {
|
|
61
|
-
if (!candidate.id)
|
|
62
|
-
return;
|
|
63
|
-
const newCandidate = !this._localCandidates.has(candidate.id);
|
|
64
|
-
this._localCandidates.set(candidate.id, candidate);
|
|
65
|
-
if (newCandidate) {
|
|
66
|
-
const callMetaReport = (0, CallMetaReports_1.createCallMetaReport)(this.peerConnection.client.serviceId, this.peerConnection.client.mediaUnitId, this.peerConnection.client.roomId, this.peerConnection.client.callId, this.peerConnection.client.clientId, {
|
|
67
|
-
type: CallMetaReports_1.CallMetaType.ICE_LOCAL_CANDIDATE,
|
|
68
|
-
payload: candidate,
|
|
69
|
-
}, this.peerConnection.client.userId, this.peerConnection.peerConnectionId, sampleTimestamp);
|
|
70
|
-
this.reports.addCallMetaReport(callMetaReport);
|
|
71
|
-
this.emit('new-local-candidate', candidate);
|
|
72
|
-
}
|
|
73
|
-
}
|
|
74
|
-
addRemoteCandidate(candidate, sampleTimestamp) {
|
|
75
|
-
if (!candidate.id)
|
|
76
|
-
return;
|
|
77
|
-
const newCandidate = !this._remoteCandidates.has(candidate.id);
|
|
78
|
-
this._remoteCandidates.set(candidate.id, candidate);
|
|
79
|
-
if (newCandidate) {
|
|
80
|
-
const callMetaReport = (0, CallMetaReports_1.createCallMetaReport)(this.peerConnection.client.serviceId, this.peerConnection.client.mediaUnitId, this.peerConnection.client.roomId, this.peerConnection.client.callId, this.peerConnection.client.clientId, {
|
|
81
|
-
type: CallMetaReports_1.CallMetaType.ICE_REMOTE_CANDIDATE,
|
|
82
|
-
payload: candidate,
|
|
83
|
-
}, this.peerConnection.client.userId, this.peerConnection.peerConnectionId, sampleTimestamp);
|
|
84
|
-
this.reports.addCallMetaReport(callMetaReport);
|
|
85
|
-
this.emit('new-remote-candidate', candidate);
|
|
86
|
-
}
|
|
87
|
-
}
|
|
88
|
-
resetMetrics() {
|
|
89
|
-
this.deltaBytesReceived = 0;
|
|
90
|
-
this.deltaBytesSent = 0;
|
|
91
|
-
this.deltaPacketsReceived = 0;
|
|
92
|
-
this.deltaPacketsSent = 0;
|
|
93
|
-
this.currentRttInMs = undefined;
|
|
94
|
-
}
|
|
95
|
-
update(candidatePair, timestamp) {
|
|
96
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r;
|
|
97
|
-
const now = Date.now();
|
|
98
|
-
const elapsedTimeInMs = now - this._updated;
|
|
99
|
-
const report = Object.assign(Object.assign({ serviceId: this.peerConnection.client.serviceId, mediaUnitId: this.peerConnection.client.mediaUnitId, roomId: this.peerConnection.client.roomId, callId: this.peerConnection.client.callId, clientId: this.peerConnection.client.clientId, userId: this.peerConnection.client.userId, timestamp }, candidatePair), { sampleSeq: -1, marker: this.marker });
|
|
100
|
-
this.reports.addIceCandidatePairReport(report);
|
|
101
|
-
if (!candidatePair.nominated)
|
|
102
|
-
return;
|
|
103
|
-
this.deltaBytesReceived = ((_a = candidatePair.bytesReceived) !== null && _a !== void 0 ? _a : 0) - ((_c = (_b = this._stats) === null || _b === void 0 ? void 0 : _b.bytesReceived) !== null && _c !== void 0 ? _c : 0);
|
|
104
|
-
this.deltaBytesSent = ((_d = candidatePair.bytesSent) !== null && _d !== void 0 ? _d : 0) - ((_f = (_e = this._stats) === null || _e === void 0 ? void 0 : _e.bytesSent) !== null && _f !== void 0 ? _f : 0);
|
|
105
|
-
this.deltaPacketsReceived = ((_g = candidatePair.packetsReceived) !== null && _g !== void 0 ? _g : 0) - ((_j = (_h = this._stats) === null || _h === void 0 ? void 0 : _h.packetsReceived) !== null && _j !== void 0 ? _j : 0);
|
|
106
|
-
this.deltaPacketsSent = ((_k = candidatePair.packetsSent) !== null && _k !== void 0 ? _k : 0) - ((_m = (_l = this._stats) === null || _l === void 0 ? void 0 : _l.packetsSent) !== null && _m !== void 0 ? _m : 0);
|
|
107
|
-
this.totalBytesReceived += this.deltaBytesReceived;
|
|
108
|
-
this.totalBytesSent += this.deltaBytesSent;
|
|
109
|
-
this.totalPacketsReceived += this.deltaPacketsReceived;
|
|
110
|
-
this.totalPacketsSent += this.deltaPacketsSent;
|
|
111
|
-
this.currentRttInMs = candidatePair.currentRoundTripTime ? candidatePair.currentRoundTripTime * 1000 : undefined;
|
|
112
|
-
this._stats = candidatePair;
|
|
113
|
-
if (candidatePair.localCandidateId &&
|
|
114
|
-
candidatePair.localCandidateId !== this._selectedLocalCandidateId &&
|
|
115
|
-
this._localCandidates.has(candidatePair.localCandidateId) &&
|
|
116
|
-
candidatePair.remoteCandidateId &&
|
|
117
|
-
candidatePair.remoteCandidateId !== this._selectedRemoteCandidateId &&
|
|
118
|
-
this._remoteCandidates.has(candidatePair.remoteCandidateId)) {
|
|
119
|
-
this._selectedLocalCandidateId = candidatePair.localCandidateId;
|
|
120
|
-
this._selectedRemoteCandidateId = candidatePair.remoteCandidateId;
|
|
121
|
-
const localCandidate = this._localCandidates.get(candidatePair.localCandidateId);
|
|
122
|
-
const remoteCandidate = this._remoteCandidates.get(candidatePair.remoteCandidateId);
|
|
123
|
-
if (localCandidate && remoteCandidate) {
|
|
124
|
-
const wasUsingTURN = this.usingTURN;
|
|
125
|
-
this.usingTURN = ((_p = ((_o = localCandidate.candidateType) === null || _o === void 0 ? void 0 : _o.toLocaleLowerCase()) === 'relay') !== null && _p !== void 0 ? _p : false) && ((_r = (_q = localCandidate.url) === null || _q === void 0 ? void 0 : _q.startsWith('turn:')) !== null && _r !== void 0 ? _r : false);
|
|
126
|
-
this.emit('new-selected-candidate-pair', {
|
|
127
|
-
localCandidate,
|
|
128
|
-
remoteCandidate,
|
|
129
|
-
});
|
|
130
|
-
if (wasUsingTURN !== this.usingTURN) {
|
|
131
|
-
this.emit('usingturnchanged', this.usingTURN);
|
|
132
|
-
}
|
|
133
|
-
}
|
|
134
|
-
}
|
|
135
|
-
this._updated = now;
|
|
136
|
-
this.emit('update', {
|
|
137
|
-
elapsedTimeInMs,
|
|
138
|
-
});
|
|
139
|
-
}
|
|
140
|
-
}
|
|
141
|
-
exports.ObservedICE = ObservedICE;
|
|
@@ -1,96 +0,0 @@
|
|
|
1
|
-
/// <reference types="node" />
|
|
2
|
-
import { EventEmitter } from 'events';
|
|
3
|
-
import { ObservedPeerConnection } from './ObservedPeerConnection';
|
|
4
|
-
import { InboundAudioTrack } from '@observertc/sample-schemas-js';
|
|
5
|
-
import { CalculatedScore } from './common/CalculatedScore';
|
|
6
|
-
import { ClientIssue } from './monitors/CallSummary';
|
|
7
|
-
import { ObservedOutboundAudioTrack } from './ObservedOutboundAudioTrack';
|
|
8
|
-
export type ObservedInboundAudioTrackModel = {
|
|
9
|
-
trackId: string;
|
|
10
|
-
sfuStreamId?: string;
|
|
11
|
-
sfuSinkId?: string;
|
|
12
|
-
};
|
|
13
|
-
export type ObservedInboundAudioTrackEvents = {
|
|
14
|
-
update: [
|
|
15
|
-
{
|
|
16
|
-
elapsedTimeInMs: number;
|
|
17
|
-
}
|
|
18
|
-
];
|
|
19
|
-
score: [CalculatedScore];
|
|
20
|
-
close: [];
|
|
21
|
-
remoteoutboundtrack: [ObservedOutboundAudioTrack | undefined];
|
|
22
|
-
};
|
|
23
|
-
export type ObservedInboundAudioTrackStats = InboundAudioTrack & {
|
|
24
|
-
ssrc: number;
|
|
25
|
-
bitrate: number;
|
|
26
|
-
fractionLost: number;
|
|
27
|
-
rttInMs?: number;
|
|
28
|
-
deltaReceivedBytes?: number;
|
|
29
|
-
deltaLostPackets?: number;
|
|
30
|
-
deltaReceivedPackets?: number;
|
|
31
|
-
deltaReceivedFrames?: number;
|
|
32
|
-
deltaDecodedFrames?: number;
|
|
33
|
-
deltaDroppedFrames?: number;
|
|
34
|
-
deltaReceivedSamples?: number;
|
|
35
|
-
deltaSilentConcealedSamples?: number;
|
|
36
|
-
fractionLoss?: number;
|
|
37
|
-
statsTimestamp: number;
|
|
38
|
-
};
|
|
39
|
-
export declare interface ObservedInboundAudioTrack {
|
|
40
|
-
on<U extends keyof ObservedInboundAudioTrackEvents>(event: U, listener: (...args: ObservedInboundAudioTrackEvents[U]) => void): this;
|
|
41
|
-
off<U extends keyof ObservedInboundAudioTrackEvents>(event: U, listener: (...args: ObservedInboundAudioTrackEvents[U]) => void): this;
|
|
42
|
-
once<U extends keyof ObservedInboundAudioTrackEvents>(event: U, listener: (...args: ObservedInboundAudioTrackEvents[U]) => void): this;
|
|
43
|
-
emit<U extends keyof ObservedInboundAudioTrackEvents>(event: U, ...args: ObservedInboundAudioTrackEvents[U]): boolean;
|
|
44
|
-
update(sample: InboundAudioTrack, timestamp: number): void;
|
|
45
|
-
}
|
|
46
|
-
export declare class ObservedInboundAudioTrack extends EventEmitter {
|
|
47
|
-
private readonly _model;
|
|
48
|
-
readonly peerConnection: ObservedPeerConnection;
|
|
49
|
-
readonly created: number;
|
|
50
|
-
visited: boolean;
|
|
51
|
-
added?: number;
|
|
52
|
-
removed?: number;
|
|
53
|
-
private readonly _stats;
|
|
54
|
-
private _closed;
|
|
55
|
-
private _updated;
|
|
56
|
-
private _remoteOutboundTrack?;
|
|
57
|
-
private _lastMaxStatsTimestamp;
|
|
58
|
-
bitrate: number;
|
|
59
|
-
rttInMs?: number;
|
|
60
|
-
jitter?: number;
|
|
61
|
-
fractionLoss: number;
|
|
62
|
-
marker?: string;
|
|
63
|
-
totalLostPackets: number;
|
|
64
|
-
totalReceivedPackets: number;
|
|
65
|
-
totalBytesReceived: number;
|
|
66
|
-
totalReceivedSamples: number;
|
|
67
|
-
totalSilentConcealedSamples: number;
|
|
68
|
-
deltaLostPackets: number;
|
|
69
|
-
deltaReceivedPackets: number;
|
|
70
|
-
deltaBytesReceived: number;
|
|
71
|
-
deltaReceivedSamples: number;
|
|
72
|
-
deltaSilentConcealedSamples: number;
|
|
73
|
-
score?: CalculatedScore;
|
|
74
|
-
ωpendingIssuesForScores: ClientIssue[];
|
|
75
|
-
constructor(_model: ObservedInboundAudioTrackModel, peerConnection: ObservedPeerConnection);
|
|
76
|
-
get serviceId(): string;
|
|
77
|
-
get roomId(): string;
|
|
78
|
-
get callId(): string;
|
|
79
|
-
get clientId(): string;
|
|
80
|
-
get mediaUnitId(): string;
|
|
81
|
-
get peerConnectionId(): string;
|
|
82
|
-
get trackId(): string;
|
|
83
|
-
get sfuStreamId(): string | undefined;
|
|
84
|
-
get sfuSinkId(): string | undefined;
|
|
85
|
-
get updated(): number;
|
|
86
|
-
get statsTimestamp(): number;
|
|
87
|
-
get stats(): ReadonlyMap<number, ObservedInboundAudioTrackStats>;
|
|
88
|
-
get reports(): import("./ReportsCollector").ReportsCollector;
|
|
89
|
-
set remoteOutboundTrack(track: ObservedOutboundAudioTrack | undefined);
|
|
90
|
-
get remoteOutboundTrack(): ObservedOutboundAudioTrack | undefined;
|
|
91
|
-
get closed(): boolean;
|
|
92
|
-
close(): void;
|
|
93
|
-
updateMetrics(): void;
|
|
94
|
-
private _updateQualityScore;
|
|
95
|
-
}
|
|
96
|
-
//# sourceMappingURL=ObservedInboundAudioTrack.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ObservedInboundAudioTrack.d.ts","sourceRoot":"","sources":["../src/ObservedInboundAudioTrack.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,QAAQ,CAAC;AACtC,OA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