@observertc/observer-js 0.42.9 → 1.0.1-23e88d8.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 +25 -41
- package/lib/ObservedCall.d.ts.map +1 -1
- package/lib/ObservedCall.js +61 -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 +33 -143
- package/lib/ObservedClient.d.ts.map +1 -1
- package/lib/ObservedClient.js +156 -757
- 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 +20 -70
- package/lib/ObservedDataChannel.d.ts.map +1 -1
- package/lib/ObservedDataChannel.js +39 -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 +40 -0
- package/lib/ObservedIceCandidatePair.d.ts.map +1 -0
- package/lib/ObservedIceCandidatePair.js +83 -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 +118 -78
- package/lib/ObservedPeerConnection.d.ts.map +1 -1
- package/lib/ObservedPeerConnection.js +556 -359
- 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/Observer.d.ts +30 -53
- package/lib/Observer.d.ts.map +1 -1
- package/lib/Observer.js +52 -225
- 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 +23 -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 +74 -167
- package/src/ObservedCertificate.ts +43 -0
- package/src/ObservedClient.ts +173 -1085
- package/src/ObservedCodec.ts +49 -0
- package/src/ObservedDataChannel.ts +36 -178
- package/src/ObservedIceCandidate.ts +64 -0
- package/src/ObservedIceCandidatePair.ts +92 -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 +743 -401
- package/src/ObservedPeerConnectionTransport.ts +38 -0
- package/src/ObservedRemoteInboundRtp.ts +64 -0
- package/src/ObservedRemoteOutboundRtp.ts +65 -0
- package/src/Observer.ts +65 -285
- 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 +23 -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,17 @@
|
|
|
1
|
+
import { ObservedPeerConnection } from './ObservedPeerConnection';
|
|
2
|
+
import { PeerConnectionTransportStats } from './schema/ClientSample';
|
|
3
|
+
export declare class ObservedPeerConnectionTransport implements PeerConnectionTransportStats {
|
|
4
|
+
timestamp: number;
|
|
5
|
+
id: string;
|
|
6
|
+
private readonly _peerConnection;
|
|
7
|
+
private _visited;
|
|
8
|
+
appData?: Record<string, unknown>;
|
|
9
|
+
dataChannelsOpened?: number | undefined;
|
|
10
|
+
dataChannelsClosed?: number | undefined;
|
|
11
|
+
attachments?: Record<string, unknown> | undefined;
|
|
12
|
+
constructor(timestamp: number, id: string, _peerConnection: ObservedPeerConnection);
|
|
13
|
+
get visited(): boolean;
|
|
14
|
+
getPeerConnection(): ObservedPeerConnection;
|
|
15
|
+
update(stats: PeerConnectionTransportStats): void;
|
|
16
|
+
}
|
|
17
|
+
//# sourceMappingURL=ObservedPeerConnectionTransport.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ObservedPeerConnectionTransport.d.ts","sourceRoot":"","sources":["../src/ObservedPeerConnectionTransport.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,sBAAsB,EAAE,MAAM,0BAA0B,CAAC;AAClE,OAAO,EAAE,4BAA4B,EAAE,MAAM,uBAAuB,CAAC;AAErE,qBAAa,+BAAgC,YAAW,4BAA4B;IAS3E,SAAS,EAAE,MAAM;IACjB,EAAE,EAAE,MAAM;IACjB,OAAO,CAAC,QAAQ,CAAC,eAAe;IAVjC,OAAO,CAAC,QAAQ,CAAS;IAClB,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAEzC,kBAAkB,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IACxC,kBAAkB,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IACxC,WAAW,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,SAAS,CAAC;gBAG1C,SAAS,EAAE,MAAM,EACjB,EAAE,EAAE,MAAM,EACA,eAAe,EAAE,sBAAsB;IAGzD,IAAW,OAAO,YAMjB;IAEM,iBAAiB;IAIjB,MAAM,CAAC,KAAK,EAAE,4BAA4B;CAQjD"}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ObservedPeerConnectionTransport = void 0;
|
|
4
|
+
class ObservedPeerConnectionTransport {
|
|
5
|
+
timestamp;
|
|
6
|
+
id;
|
|
7
|
+
_peerConnection;
|
|
8
|
+
_visited = false;
|
|
9
|
+
appData;
|
|
10
|
+
dataChannelsOpened;
|
|
11
|
+
dataChannelsClosed;
|
|
12
|
+
attachments;
|
|
13
|
+
constructor(timestamp, id, _peerConnection) {
|
|
14
|
+
this.timestamp = timestamp;
|
|
15
|
+
this.id = id;
|
|
16
|
+
this._peerConnection = _peerConnection;
|
|
17
|
+
}
|
|
18
|
+
get visited() {
|
|
19
|
+
const visited = this._visited;
|
|
20
|
+
this._visited = false;
|
|
21
|
+
return visited;
|
|
22
|
+
}
|
|
23
|
+
getPeerConnection() {
|
|
24
|
+
return this._peerConnection;
|
|
25
|
+
}
|
|
26
|
+
update(stats) {
|
|
27
|
+
this._visited = true;
|
|
28
|
+
this.timestamp = stats.timestamp;
|
|
29
|
+
this.dataChannelsOpened = stats.dataChannelsOpened;
|
|
30
|
+
this.dataChannelsClosed = stats.dataChannelsClosed;
|
|
31
|
+
this.attachments = stats.attachments;
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
exports.ObservedPeerConnectionTransport = ObservedPeerConnectionTransport;
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { MediaKind } from './common/types';
|
|
2
|
+
import { ObservedPeerConnection } from './ObservedPeerConnection';
|
|
3
|
+
import { RemoteInboundRtpStats } from './schema/ClientSample';
|
|
4
|
+
export declare class ObservedRemoteInboundRtp implements RemoteInboundRtpStats {
|
|
5
|
+
timestamp: number;
|
|
6
|
+
id: string;
|
|
7
|
+
ssrc: number;
|
|
8
|
+
kind: MediaKind;
|
|
9
|
+
private readonly _peerConnection;
|
|
10
|
+
private _visited;
|
|
11
|
+
appData?: Record<string, unknown>;
|
|
12
|
+
transportId?: string | undefined;
|
|
13
|
+
codecId?: string | undefined;
|
|
14
|
+
packetsReceived?: number | undefined;
|
|
15
|
+
packetsLost?: number | undefined;
|
|
16
|
+
jitter?: number | undefined;
|
|
17
|
+
localId?: string | undefined;
|
|
18
|
+
roundTripTime?: number | undefined;
|
|
19
|
+
totalRoundTripTime?: number | undefined;
|
|
20
|
+
fractionLost?: number | undefined;
|
|
21
|
+
roundTripTimeMeasurements?: number | undefined;
|
|
22
|
+
attachments?: Record<string, unknown> | undefined;
|
|
23
|
+
constructor(timestamp: number, id: string, ssrc: number, kind: MediaKind, _peerConnection: ObservedPeerConnection);
|
|
24
|
+
get visited(): boolean;
|
|
25
|
+
getPeerConnection(): ObservedPeerConnection;
|
|
26
|
+
getOutboundRtp(): import("./ObservedOutboundRtp").ObservedOutboundRtp | undefined;
|
|
27
|
+
getCodec(): import("./ObservedCodec").ObservedCodec | undefined;
|
|
28
|
+
update(stats: RemoteInboundRtpStats): void;
|
|
29
|
+
}
|
|
30
|
+
//# sourceMappingURL=ObservedRemoteInboundRtp.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ObservedRemoteInboundRtp.d.ts","sourceRoot":"","sources":["../src/ObservedRemoteInboundRtp.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC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
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ObservedRemoteInboundRtp = void 0;
|
|
4
|
+
class ObservedRemoteInboundRtp {
|
|
5
|
+
timestamp;
|
|
6
|
+
id;
|
|
7
|
+
ssrc;
|
|
8
|
+
kind;
|
|
9
|
+
_peerConnection;
|
|
10
|
+
_visited = false;
|
|
11
|
+
appData;
|
|
12
|
+
transportId;
|
|
13
|
+
codecId;
|
|
14
|
+
packetsReceived;
|
|
15
|
+
packetsLost;
|
|
16
|
+
jitter;
|
|
17
|
+
localId;
|
|
18
|
+
roundTripTime;
|
|
19
|
+
totalRoundTripTime;
|
|
20
|
+
fractionLost;
|
|
21
|
+
roundTripTimeMeasurements;
|
|
22
|
+
attachments;
|
|
23
|
+
constructor(timestamp, id, ssrc, kind, _peerConnection) {
|
|
24
|
+
this.timestamp = timestamp;
|
|
25
|
+
this.id = id;
|
|
26
|
+
this.ssrc = ssrc;
|
|
27
|
+
this.kind = kind;
|
|
28
|
+
this._peerConnection = _peerConnection;
|
|
29
|
+
}
|
|
30
|
+
get visited() {
|
|
31
|
+
const visited = this._visited;
|
|
32
|
+
this._visited = false;
|
|
33
|
+
return visited;
|
|
34
|
+
}
|
|
35
|
+
getPeerConnection() {
|
|
36
|
+
return this._peerConnection;
|
|
37
|
+
}
|
|
38
|
+
getOutboundRtp() {
|
|
39
|
+
return this._peerConnection.observedOutboundRtps.get(this.ssrc);
|
|
40
|
+
}
|
|
41
|
+
getCodec() {
|
|
42
|
+
return this._peerConnection.observedCodecs.get(this.codecId ?? '');
|
|
43
|
+
}
|
|
44
|
+
update(stats) {
|
|
45
|
+
this._visited = true;
|
|
46
|
+
this.timestamp = stats.timestamp;
|
|
47
|
+
this.transportId = stats.transportId;
|
|
48
|
+
this.codecId = stats.codecId;
|
|
49
|
+
this.packetsReceived = stats.packetsReceived;
|
|
50
|
+
this.packetsLost = stats.packetsLost;
|
|
51
|
+
this.jitter = stats.jitter;
|
|
52
|
+
this.localId = stats.localId;
|
|
53
|
+
this.roundTripTime = stats.roundTripTime;
|
|
54
|
+
this.totalRoundTripTime = stats.totalRoundTripTime;
|
|
55
|
+
this.fractionLost = stats.fractionLost;
|
|
56
|
+
this.roundTripTimeMeasurements = stats.roundTripTimeMeasurements;
|
|
57
|
+
this.attachments = stats.attachments;
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
exports.ObservedRemoteInboundRtp = ObservedRemoteInboundRtp;
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { MediaKind } from './common/types';
|
|
2
|
+
import { ObservedPeerConnection } from './ObservedPeerConnection';
|
|
3
|
+
import { RemoteOutboundRtpStats } from './schema/ClientSample';
|
|
4
|
+
export declare class ObservedRemoteOutboundRtp implements RemoteOutboundRtpStats {
|
|
5
|
+
timestamp: number;
|
|
6
|
+
id: string;
|
|
7
|
+
ssrc: number;
|
|
8
|
+
kind: MediaKind;
|
|
9
|
+
private readonly _peerConnection;
|
|
10
|
+
private _visited;
|
|
11
|
+
appData?: Record<string, unknown>;
|
|
12
|
+
transportId?: string | undefined;
|
|
13
|
+
codecId?: string | undefined;
|
|
14
|
+
packetsSent?: number | undefined;
|
|
15
|
+
bytesSent?: number | undefined;
|
|
16
|
+
localId?: string | undefined;
|
|
17
|
+
remoteTimestamp?: number | undefined;
|
|
18
|
+
reportsSent?: number | undefined;
|
|
19
|
+
roundTripTime?: number | undefined;
|
|
20
|
+
totalRoundTripTime?: number | undefined;
|
|
21
|
+
roundTripTimeMeasurements?: number | undefined;
|
|
22
|
+
attachments?: Record<string, unknown> | undefined;
|
|
23
|
+
constructor(timestamp: number, id: string, ssrc: number, kind: MediaKind, _peerConnection: ObservedPeerConnection);
|
|
24
|
+
get visited(): boolean;
|
|
25
|
+
getPeerConnection(): ObservedPeerConnection;
|
|
26
|
+
getInboundRtp(): import("./ObservedInboundRtp").ObservedInboundRtp | undefined;
|
|
27
|
+
getCodec(): import("./ObservedCodec").ObservedCodec | undefined;
|
|
28
|
+
update(stats: RemoteOutboundRtpStats): void;
|
|
29
|
+
}
|
|
30
|
+
//# sourceMappingURL=ObservedRemoteOutboundRtp.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ObservedRemoteOutboundRtp.d.ts","sourceRoot":"","sources":["../src/ObservedRemoteOutboundRtp.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAC3C,OAAO,EAAE,sBAAsB,EAAE,MAAM,0BAA0B,CAAC;AAClE,OAAO,EAAE,sBAAsB,EAAE,MAAM,uBAAuB,CAAC;AAE/D,qBAAa,yBAA0B,YAAW,sBAAsB;IAiB/D,SAAS,EAAE,MAAM;IACjB,EAAE,EAAE,MAAM;IACV,IAAI,EAAE,MAAM;IACZ,IAAI,EAAE,SAAS;IACtB,OAAO,CAAC,QAAQ,CAAC,eAAe;IApBjC,OAAO,CAAC,QAAQ,CAAS;IAClB,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAEzC,WAAW,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IACjC,OAAO,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC7B,WAAW,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IACjC,SAAS,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC/B,OAAO,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC7B,eAAe,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IACrC,WAAW,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IACjC,aAAa,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IACnC,kBAAkB,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IACxC,yBAAyB,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC/C,WAAW,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,SAAS,CAAC;gBAG1C,SAAS,EAAE,MAAM,EACjB,EAAE,EAAE,MAAM,EACV,IAAI,EAAE,MAAM,EACZ,IAAI,EAAE,SAAS,EACL,eAAe,EAAE,sBAAsB;IAGzD,IAAW,OAAO,YAMjB;IAEM,iBAAiB;IAIjB,aAAa;IAIb,QAAQ;IAIR,MAAM,CAAC,KAAK,EAAE,sBAAsB;CAgB3C"}
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ObservedRemoteOutboundRtp = void 0;
|
|
4
|
+
class ObservedRemoteOutboundRtp {
|
|
5
|
+
timestamp;
|
|
6
|
+
id;
|
|
7
|
+
ssrc;
|
|
8
|
+
kind;
|
|
9
|
+
_peerConnection;
|
|
10
|
+
_visited = false;
|
|
11
|
+
appData;
|
|
12
|
+
transportId;
|
|
13
|
+
codecId;
|
|
14
|
+
packetsSent;
|
|
15
|
+
bytesSent;
|
|
16
|
+
localId;
|
|
17
|
+
remoteTimestamp;
|
|
18
|
+
reportsSent;
|
|
19
|
+
roundTripTime;
|
|
20
|
+
totalRoundTripTime;
|
|
21
|
+
roundTripTimeMeasurements;
|
|
22
|
+
attachments;
|
|
23
|
+
constructor(timestamp, id, ssrc, kind, _peerConnection) {
|
|
24
|
+
this.timestamp = timestamp;
|
|
25
|
+
this.id = id;
|
|
26
|
+
this.ssrc = ssrc;
|
|
27
|
+
this.kind = kind;
|
|
28
|
+
this._peerConnection = _peerConnection;
|
|
29
|
+
}
|
|
30
|
+
get visited() {
|
|
31
|
+
const visited = this._visited;
|
|
32
|
+
this._visited = false;
|
|
33
|
+
return visited;
|
|
34
|
+
}
|
|
35
|
+
getPeerConnection() {
|
|
36
|
+
return this._peerConnection;
|
|
37
|
+
}
|
|
38
|
+
getInboundRtp() {
|
|
39
|
+
return this._peerConnection.observedInboundRtps.get(this.ssrc);
|
|
40
|
+
}
|
|
41
|
+
getCodec() {
|
|
42
|
+
return this._peerConnection.observedCodecs.get(this.codecId ?? '');
|
|
43
|
+
}
|
|
44
|
+
update(stats) {
|
|
45
|
+
this._visited = true;
|
|
46
|
+
this.timestamp = stats.timestamp;
|
|
47
|
+
this.transportId = stats.transportId;
|
|
48
|
+
this.codecId = stats.codecId;
|
|
49
|
+
this.packetsSent = stats.packetsSent;
|
|
50
|
+
this.bytesSent = stats.bytesSent;
|
|
51
|
+
this.localId = stats.localId;
|
|
52
|
+
this.remoteTimestamp = stats.remoteTimestamp;
|
|
53
|
+
this.reportsSent = stats.reportsSent;
|
|
54
|
+
this.roundTripTime = stats.roundTripTime;
|
|
55
|
+
this.totalRoundTripTime = stats.totalRoundTripTime;
|
|
56
|
+
this.roundTripTimeMeasurements = stats.roundTripTimeMeasurements;
|
|
57
|
+
this.attachments = stats.attachments;
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
exports.ObservedRemoteOutboundRtp = ObservedRemoteOutboundRtp;
|
package/lib/Observer.d.ts
CHANGED
|
@@ -1,37 +1,17 @@
|
|
|
1
1
|
/// <reference types="node" />
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
2
|
+
import { Middleware, MiddlewareProcessor } from './common/Middleware';
|
|
3
|
+
import { ObservedCall, ObservedCallSettings } from './ObservedCall';
|
|
4
4
|
import { EventEmitter } from 'events';
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import { ObservedSfu, ObservedSfuModel } from './ObservedSfu';
|
|
8
|
-
import { CallSummaryMonitor, CallSummaryMonitorConfig } from './monitors/CallSummaryMonitor';
|
|
9
|
-
import { TurnUsageMonitor } from './monitors/TurnUsageMonitor';
|
|
10
|
-
import { ClientIssueMonitor } from './monitors/ClientIssueMonitor';
|
|
11
|
-
import { SfuServerMonitor } from './monitors/SfuServerMonitor';
|
|
5
|
+
import { ClientEvent, ClientMetaData, ClientIssue, ExtensionStat } from './schema/ClientSample';
|
|
6
|
+
import { ObservedClient } from './ObservedClient';
|
|
12
7
|
export type ObserverEvents = {
|
|
13
8
|
'newcall': [ObservedCall];
|
|
14
|
-
'newsfu': [ObservedSfu];
|
|
15
|
-
'reports': [ObserverSinkContext];
|
|
16
9
|
'close': [];
|
|
17
10
|
};
|
|
18
|
-
export type
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
*
|
|
23
|
-
* For more information about a serviceId please visit https://observertc.org
|
|
24
|
-
*
|
|
25
|
-
*/
|
|
26
|
-
defaultServiceId: string;
|
|
27
|
-
/**
|
|
28
|
-
* Sets the default mediaUnitId for samples.
|
|
29
|
-
*
|
|
30
|
-
* For more information about a mediaUnitId please visit https://observertc.org
|
|
31
|
-
*/
|
|
32
|
-
defaultMediaUnitId: string;
|
|
33
|
-
maxReports?: number | undefined;
|
|
34
|
-
maxCollectingTimeInMs?: number | undefined;
|
|
11
|
+
export type ProcessorInputContext<T> = {
|
|
12
|
+
call: ObservedCall;
|
|
13
|
+
client: ObservedClient;
|
|
14
|
+
data: T;
|
|
35
15
|
};
|
|
36
16
|
export declare interface Observer {
|
|
37
17
|
on<U extends keyof ObserverEvents>(event: U, listener: (...args: ObserverEvents[U]) => void): this;
|
|
@@ -39,32 +19,29 @@ export declare interface Observer {
|
|
|
39
19
|
once<U extends keyof ObserverEvents>(event: U, listener: (...args: ObserverEvents[U]) => void): this;
|
|
40
20
|
emit<U extends keyof ObserverEvents>(event: U, ...args: ObserverEvents[U]): boolean;
|
|
41
21
|
}
|
|
22
|
+
export type ObserverSummary = {
|
|
23
|
+
rttlt50: number;
|
|
24
|
+
};
|
|
42
25
|
export declare class Observer extends EventEmitter {
|
|
43
|
-
readonly
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
constructor(
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
createSfuServerMonitor(): SfuServerMonitor;
|
|
63
|
-
createClientIssueMonitor(): ClientIssueMonitor;
|
|
64
|
-
get observedCalls(): ReadonlyMap<string, ObservedCall>;
|
|
65
|
-
get observedSfus(): ReadonlyMap<string, ObservedSfu>;
|
|
66
|
-
get closed(): boolean;
|
|
26
|
+
readonly processors: {
|
|
27
|
+
events: MiddlewareProcessor<ProcessorInputContext<ClientEvent>>;
|
|
28
|
+
metaData: MiddlewareProcessor<ProcessorInputContext<ClientMetaData>>;
|
|
29
|
+
issues: MiddlewareProcessor<ProcessorInputContext<ClientIssue>>;
|
|
30
|
+
extensionStats: MiddlewareProcessor<ProcessorInputContext<ExtensionStat>>;
|
|
31
|
+
};
|
|
32
|
+
readonly observedCalls: Map<string, ObservedCall<Record<string, unknown>>>;
|
|
33
|
+
closed: boolean;
|
|
34
|
+
constructor();
|
|
35
|
+
getObservedCall<T extends Record<string, unknown> = Record<string, unknown>>(callId: string): ObservedCall<T> | undefined;
|
|
36
|
+
createObservedCall<T extends Record<string, unknown> = Record<string, unknown>>(settings: ObservedCallSettings<T>): ObservedCall<T>;
|
|
37
|
+
addClientEventMiddleware(...middlewares: Middleware<ProcessorInputContext<ClientEvent>>[]): Observer;
|
|
38
|
+
removeClientEventMiddleware(...middlewares: Middleware<ProcessorInputContext<ClientEvent>>[]): Observer;
|
|
39
|
+
addClientMetaDataMiddleware(...middlewares: Middleware<ProcessorInputContext<ClientMetaData>>[]): Observer;
|
|
40
|
+
removeClientMetaDataMiddleware(...middlewares: Middleware<ProcessorInputContext<ClientMetaData>>[]): Observer;
|
|
41
|
+
addClientIssueMiddleware(...middlewares: Middleware<ProcessorInputContext<ClientIssue>>[]): Observer;
|
|
42
|
+
removeClientIssueMiddleware(...middlewares: Middleware<ProcessorInputContext<ClientIssue>>[]): Observer;
|
|
43
|
+
addExtensionStatMiddleware(...middlewares: Middleware<ProcessorInputContext<ExtensionStat>>[]): Observer;
|
|
44
|
+
removeExtensionStatMiddleware(...middlewares: Middleware<ProcessorInputContext<ExtensionStat>>[]): Observer;
|
|
67
45
|
close(): void;
|
|
68
|
-
private _emitReports;
|
|
69
46
|
}
|
|
70
47
|
//# sourceMappingURL=Observer.d.ts.map
|
package/lib/Observer.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Observer.d.ts","sourceRoot":"","sources":["../src/Observer.ts"],"names":[],"mappings":";AACA,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"Observer.d.ts","sourceRoot":"","sources":["../src/Observer.ts"],"names":[],"mappings":";AACA,OAAO,EAAE,UAAU,EAAE,mBAAmB,EAAE,MAAM,qBAAqB,CAAC;AACtE,OAAO,EAAE,YAAY,EAAE,oBAAoB,EAAE,MAAM,gBAAgB,CAAC;AACpE,OAAO,EAAE,YAAY,EAAE,MAAM,QAAQ,CAAC;AACtC,OAAO,EAAE,WAAW,EAAE,cAAc,EAAE,WAAW,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AAChG,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAIlD,MAAM,MAAM,cAAc,GAAG;IAC5B,SAAS,EAAE,CAAC,YAAY,CAAC,CAAC;IAC1B,OAAO,EAAE,EAAE,CAAC;CACZ,CAAA;AAED,MAAM,MAAM,qBAAqB,CAAC,CAAC,IAAI;IACtC,IAAI,EAAE,YAAY,CAAC;IACnB,MAAM,EAAE,cAAc,CAAC;IACvB,IAAI,EAAE,CAAC,CAAC;CACR,CAAA;AAED,MAAM,CAAC,OAAO,WAAW,QAAQ;IAChC,EAAE,CAAC,CAAC,SAAS,MAAM,cAAc,EAAE,KAAK,EAAE,CAAC,EAAE,QAAQ,EAAE,CAAC,GAAG,IAAI,EAAE,cAAc,CAAC,CAAC,CAAC,KAAK,IAAI,GAAG,IAAI,CAAC;IACnG,GAAG,CAAC,CAAC,SAAS,MAAM,cAAc,EAAE,KAAK,EAAE,CAAC,EAAE,QAAQ,EAAE,CAAC,GAAG,IAA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