@observertc/observer-js 1.0.0-beta.3 → 1.0.0-beta.4
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/README.md +773 -388
- package/dist/index.d.mts +2793 -0
- package/dist/index.mjs +3719 -0
- package/dist/index.mjs.map +1 -0
- package/package.json +21 -14
- package/.eslintrc.json +0 -143
- package/.prettierignore +0 -5
- package/.prettierrc +0 -7
- package/jest.config.js +0 -9
- package/lib/ObservedCall.d.ts +0 -70
- package/lib/ObservedCall.d.ts.map +0 -1
- package/lib/ObservedCall.js +0 -196
- package/lib/ObservedCallEventMonitor.d.ts +0 -107
- package/lib/ObservedCallEventMonitor.d.ts.map +0 -1
- package/lib/ObservedCallEventMonitor.js +0 -321
- package/lib/ObservedCallSummary.d.ts +0 -18
- package/lib/ObservedCallSummary.d.ts.map +0 -1
- package/lib/ObservedCallSummary.js +0 -2
- package/lib/ObservedCertificate.d.ts +0 -19
- package/lib/ObservedCertificate.d.ts.map +0 -1
- package/lib/ObservedCertificate.js +0 -38
- package/lib/ObservedClient.d.ts +0 -115
- package/lib/ObservedClient.d.ts.map +0 -1
- package/lib/ObservedClient.js +0 -714
- package/lib/ObservedClientEventMonitor.d.ts +0 -91
- package/lib/ObservedClientEventMonitor.d.ts.map +0 -1
- package/lib/ObservedClientEventMonitor.js +0 -254
- package/lib/ObservedClientSummary.d.ts +0 -23
- package/lib/ObservedClientSummary.d.ts.map +0 -1
- package/lib/ObservedClientSummary.js +0 -2
- package/lib/ObservedCodec.d.ts +0 -22
- package/lib/ObservedCodec.d.ts.map +0 -1
- package/lib/ObservedCodec.js +0 -45
- package/lib/ObservedDataChannel.d.ts +0 -30
- package/lib/ObservedDataChannel.d.ts.map +0 -1
- package/lib/ObservedDataChannel.js +0 -75
- package/lib/ObservedIceCandidate.d.ts +0 -29
- package/lib/ObservedIceCandidate.d.ts.map +0 -1
- package/lib/ObservedIceCandidate.js +0 -59
- package/lib/ObservedIceCandidatePair.d.ts +0 -45
- package/lib/ObservedIceCandidatePair.d.ts.map +0 -1
- package/lib/ObservedIceCandidatePair.js +0 -127
- package/lib/ObservedIceTransport.d.ts +0 -36
- package/lib/ObservedIceTransport.d.ts.map +0 -1
- package/lib/ObservedIceTransport.js +0 -93
- package/lib/ObservedInboundRtp.d.ts +0 -92
- package/lib/ObservedInboundRtp.d.ts.map +0 -1
- package/lib/ObservedInboundRtp.js +0 -193
- package/lib/ObservedInboundTrack.d.ts +0 -34
- package/lib/ObservedInboundTrack.d.ts.map +0 -1
- package/lib/ObservedInboundTrack.js +0 -92
- package/lib/ObservedMediaPlayout.d.ts +0 -22
- package/lib/ObservedMediaPlayout.d.ts.map +0 -1
- package/lib/ObservedMediaPlayout.js +0 -42
- package/lib/ObservedMediaSource.d.ts +0 -28
- package/lib/ObservedMediaSource.d.ts.map +0 -1
- package/lib/ObservedMediaSource.js +0 -55
- package/lib/ObservedOutboundRtp.d.ts +0 -62
- package/lib/ObservedOutboundRtp.d.ts.map +0 -1
- package/lib/ObservedOutboundRtp.js +0 -144
- package/lib/ObservedOutboundTrack.d.ts +0 -34
- package/lib/ObservedOutboundTrack.d.ts.map +0 -1
- package/lib/ObservedOutboundTrack.js +0 -65
- package/lib/ObservedPeerConnection.d.ts +0 -207
- package/lib/ObservedPeerConnection.d.ts.map +0 -1
- package/lib/ObservedPeerConnection.js +0 -788
- package/lib/ObservedPeerConnectionTransport.d.ts +0 -17
- package/lib/ObservedPeerConnectionTransport.d.ts.map +0 -1
- package/lib/ObservedPeerConnectionTransport.js +0 -34
- package/lib/ObservedRemoteInboundRtp.d.ts +0 -30
- package/lib/ObservedRemoteInboundRtp.d.ts.map +0 -1
- package/lib/ObservedRemoteInboundRtp.js +0 -60
- package/lib/ObservedRemoteOutboundRtp.d.ts +0 -30
- package/lib/ObservedRemoteOutboundRtp.d.ts.map +0 -1
- package/lib/ObservedRemoteOutboundRtp.js +0 -60
- package/lib/ObservedTURN.d.ts +0 -31
- package/lib/ObservedTURN.d.ts.map +0 -1
- package/lib/ObservedTURN.js +0 -58
- package/lib/ObservedTurnServer.d.ts +0 -25
- package/lib/ObservedTurnServer.d.ts.map +0 -1
- package/lib/ObservedTurnServer.js +0 -59
- package/lib/Observer.d.ts +0 -62
- package/lib/Observer.d.ts.map +0 -1
- package/lib/Observer.js +0 -160
- package/lib/ObserverEventMonitor.d.ts +0 -141
- package/lib/ObserverEventMonitor.d.ts.map +0 -1
- package/lib/ObserverEventMonitor.js +0 -440
- package/lib/ObserverSummary.d.ts +0 -13
- package/lib/ObserverSummary.d.ts.map +0 -1
- package/lib/ObserverSummary.js +0 -2
- package/lib/Reports.d.ts +0 -85
- package/lib/Reports.d.ts.map +0 -1
- package/lib/Reports.js +0 -2
- package/lib/common/Middleware.d.ts +0 -17
- package/lib/common/Middleware.d.ts.map +0 -1
- package/lib/common/Middleware.js +0 -60
- package/lib/common/SingleExecutor.d.ts +0 -3
- package/lib/common/SingleExecutor.d.ts.map +0 -1
- package/lib/common/SingleExecutor.js +0 -31
- package/lib/common/logger.d.ts +0 -17
- package/lib/common/logger.d.ts.map +0 -1
- package/lib/common/logger.js +0 -50
- package/lib/common/types.d.ts +0 -3
- package/lib/common/types.d.ts.map +0 -1
- package/lib/common/types.js +0 -3
- package/lib/common/utils.d.ts +0 -11
- package/lib/common/utils.d.ts.map +0 -1
- package/lib/common/utils.js +0 -63
- package/lib/detectors/Detector.d.ts +0 -5
- package/lib/detectors/Detector.d.ts.map +0 -1
- package/lib/detectors/Detector.js +0 -3
- package/lib/detectors/Detectors.d.ts +0 -11
- package/lib/detectors/Detectors.d.ts.map +0 -1
- package/lib/detectors/Detectors.js +0 -34
- package/lib/index.d.ts +0 -29
- package/lib/index.d.ts.map +0 -1
- package/lib/index.js +0 -49
- package/lib/mediasoup/ObservedMediaRouter.d.ts +0 -10
- package/lib/mediasoup/ObservedMediaRouter.d.ts.map +0 -1
- package/lib/mediasoup/ObservedMediaRouter.js +0 -6
- package/lib/monitors/TurnUsageMonitor.d.ts +0 -1
- package/lib/monitors/TurnUsageMonitor.d.ts.map +0 -1
- package/lib/monitors/TurnUsageMonitor.js +0 -146
- package/lib/schema/ClientEventTypes.d.ts +0 -228
- package/lib/schema/ClientEventTypes.d.ts.map +0 -1
- package/lib/schema/ClientEventTypes.js +0 -41
- package/lib/schema/ClientMetaTypes.d.ts +0 -34
- package/lib/schema/ClientMetaTypes.d.ts.map +0 -1
- package/lib/schema/ClientMetaTypes.js +0 -16
- package/lib/schema/ClientSample.d.ts +0 -1333
- package/lib/schema/ClientSample.d.ts.map +0 -1
- package/lib/schema/ClientSample.js +0 -4
- package/lib/scores/CalculatedScore.d.ts +0 -6
- package/lib/scores/CalculatedScore.d.ts.map +0 -1
- package/lib/scores/CalculatedScore.js +0 -2
- package/lib/scores/DefaultCallScoreCalculator.d.ts +0 -7
- package/lib/scores/DefaultCallScoreCalculator.d.ts.map +0 -1
- package/lib/scores/DefaultCallScoreCalculator.js +0 -21
- package/lib/scores/ScoreCalculator.d.ts +0 -4
- package/lib/scores/ScoreCalculator.d.ts.map +0 -1
- package/lib/scores/ScoreCalculator.js +0 -2
- package/lib/updaters/CallUpdater.d.ts +0 -5
- package/lib/updaters/CallUpdater.d.ts.map +0 -1
- package/lib/updaters/CallUpdater.js +0 -2
- package/lib/updaters/ObserverUpdater.d.ts +0 -5
- package/lib/updaters/ObserverUpdater.d.ts.map +0 -1
- package/lib/updaters/ObserverUpdater.js +0 -2
- package/lib/updaters/OnAllCallObserverUpdater.d.ts +0 -15
- package/lib/updaters/OnAllCallObserverUpdater.d.ts.map +0 -1
- package/lib/updaters/OnAllCallObserverUpdater.js +0 -50
- package/lib/updaters/OnAllClientCallUpdater.d.ts +0 -15
- package/lib/updaters/OnAllClientCallUpdater.d.ts.map +0 -1
- package/lib/updaters/OnAllClientCallUpdater.js +0 -53
- package/lib/updaters/OnAnyCallObserverUpdater.d.ts +0 -12
- package/lib/updaters/OnAnyCallObserverUpdater.d.ts.map +0 -1
- package/lib/updaters/OnAnyCallObserverUpdater.js +0 -37
- package/lib/updaters/OnAnyClientCallUpdater.d.ts +0 -12
- package/lib/updaters/OnAnyClientCallUpdater.d.ts.map +0 -1
- package/lib/updaters/OnAnyClientCallUpdater.js +0 -36
- package/lib/updaters/OnIntervalUpdater.d.ts +0 -10
- package/lib/updaters/OnIntervalUpdater.d.ts.map +0 -1
- package/lib/updaters/OnIntervalUpdater.js +0 -17
- package/lib/updaters/Updater.d.ts +0 -6
- package/lib/updaters/Updater.d.ts.map +0 -1
- package/lib/updaters/Updater.js +0 -2
- package/lib/utils/MediasoupRemoteTrackResolver.d.ts +0 -25
- package/lib/utils/MediasoupRemoteTrackResolver.d.ts.map +0 -1
- package/lib/utils/MediasoupRemoteTrackResolver.js +0 -110
- package/lib/utils/RemoteTrackResolver.d.ts +0 -7
- package/lib/utils/RemoteTrackResolver.d.ts.map +0 -1
- package/lib/utils/RemoteTrackResolver.js +0 -2
- package/src/ObservedCall.ts +0 -308
- package/src/ObservedCallEventMonitor.ts +0 -402
- package/src/ObservedCallSummary.ts +0 -22
- package/src/ObservedCertificate.ts +0 -43
- package/src/ObservedClient.ts +0 -883
- package/src/ObservedClientEventMonitor.ts +0 -309
- package/src/ObservedClientSummary.ts +0 -24
- package/src/ObservedCodec.ts +0 -49
- package/src/ObservedDataChannel.ts +0 -85
- package/src/ObservedIceCandidate.ts +0 -64
- package/src/ObservedIceCandidatePair.ts +0 -134
- package/src/ObservedIceTransport.ts +0 -99
- package/src/ObservedInboundRtp.ts +0 -205
- package/src/ObservedInboundTrack.ts +0 -105
- package/src/ObservedMediaPlayout.ts +0 -49
- package/src/ObservedMediaSource.ts +0 -60
- package/src/ObservedOutboundRtp.ts +0 -156
- package/src/ObservedOutboundTrack.ts +0 -82
- package/src/ObservedPeerConnection.ts +0 -1104
- package/src/ObservedPeerConnectionTransport.ts +0 -38
- package/src/ObservedRemoteInboundRtp.ts +0 -64
- package/src/ObservedRemoteOutboundRtp.ts +0 -65
- package/src/ObservedTURN.ts +0 -86
- package/src/ObservedTurnServer.ts +0 -72
- package/src/Observer.ts +0 -248
- package/src/ObserverEventMonitor.ts +0 -561
- package/src/ObserverSummary.ts +0 -15
- package/src/Reports.ts +0 -87
- package/src/common/Middleware.ts +0 -84
- package/src/common/SingleExecutor.ts +0 -36
- package/src/common/logger.ts +0 -82
- package/src/common/types.ts +0 -4
- package/src/common/utils.ts +0 -69
- package/src/detectors/Detector.ts +0 -6
- package/src/detectors/Detectors.ts +0 -38
- package/src/index.ts +0 -32
- package/src/mediasoup/ObservedMediaRouter.ts +0 -10
- package/src/monitors/TurnUsageMonitor.ts +0 -187
- package/src/schema/ClientEventTypes.ts +0 -280
- package/src/schema/ClientMetaTypes.ts +0 -41
- package/src/schema/ClientSample.ts +0 -1682
- package/src/scores/CalculatedScore.ts +0 -6
- package/src/scores/DefaultCallScoreCalculator.ts +0 -23
- package/src/scores/ScoreCalculator.ts +0 -3
- package/src/updaters/CallUpdater.ts +0 -5
- package/src/updaters/ObserverUpdater.ts +0 -5
- package/src/updaters/OnAllCallObserverUpdater.ts +0 -59
- package/src/updaters/OnAllClientCallUpdater.ts +0 -61
- package/src/updaters/OnAnyCallObserverUpdater.ts +0 -41
- package/src/updaters/OnAnyClientCallUpdater.ts +0 -39
- package/src/updaters/OnIntervalUpdater.ts +0 -19
- package/src/updaters/Updater.ts +0 -5
- package/src/utils/MediasoupRemoteTrackResolver.ts +0 -155
- package/src/utils/RemoteTrackResolver.ts +0 -12
- package/tsconfig.json +0 -19
- package/tslint.json +0 -6
|
@@ -1,561 +0,0 @@
|
|
|
1
|
-
import { ObservedCall } from './ObservedCall';
|
|
2
|
-
import { ObservedCertificate } from './ObservedCertificate';
|
|
3
|
-
import { ObservedClient, ObservedClientEvents } from './ObservedClient';
|
|
4
|
-
import { ObservedCodec } from './ObservedCodec';
|
|
5
|
-
import { ObservedDataChannel } from './ObservedDataChannel';
|
|
6
|
-
import { ObservedIceCandidate } from './ObservedIceCandidate';
|
|
7
|
-
import { ObservedIceCandidatePair } from './ObservedIceCandidatePair';
|
|
8
|
-
import { ObservedIceTransport } from './ObservedIceTransport';
|
|
9
|
-
import { ObservedInboundRtp } from './ObservedInboundRtp';
|
|
10
|
-
import { ObservedInboundTrack } from './ObservedInboundTrack';
|
|
11
|
-
import { ObservedMediaPlayout } from './ObservedMediaPlayout';
|
|
12
|
-
import { ObservedMediaSource } from './ObservedMediaSource';
|
|
13
|
-
import { ObservedOutboundRtp } from './ObservedOutboundRtp';
|
|
14
|
-
import { ObservedOutboundTrack } from './ObservedOutboundTrack';
|
|
15
|
-
import { ObservedPeerConnection } from './ObservedPeerConnection';
|
|
16
|
-
import { Observer } from './Observer';
|
|
17
|
-
import { TrackReport } from './Reports';
|
|
18
|
-
import { ClientEvent, ClientIssue, ClientMetaData, ClientSample, ExtensionStat } from './schema/ClientSample';
|
|
19
|
-
|
|
20
|
-
export class ObserverEventMonitor<Context> {
|
|
21
|
-
public constructor(
|
|
22
|
-
public readonly observer: Observer,
|
|
23
|
-
public readonly context: Context,
|
|
24
|
-
) {
|
|
25
|
-
this._onPeerConnconnectionAdded = this._onPeerConnconnectionAdded.bind(this);
|
|
26
|
-
this._onPeerConnectionRemoved = this._onPeerConnectionRemoved.bind(this);
|
|
27
|
-
this._onCertificateAdded = this._onCertificateAdded.bind(this);
|
|
28
|
-
this._onCertificateRemoved = this._onCertificateRemoved.bind(this);
|
|
29
|
-
this._onInboundTrackAdded = this._onInboundTrackAdded.bind(this);
|
|
30
|
-
this._onInboundTrackRemoved = this._onInboundTrackRemoved.bind(this);
|
|
31
|
-
this._onOutboundTrackAdded = this._onOutboundTrackAdded.bind(this);
|
|
32
|
-
this._onOutboundTrackRemoved = this._onOutboundTrackRemoved.bind(this);
|
|
33
|
-
this._onOutboundTrackMuted = this._onOutboundTrackMuted.bind(this);
|
|
34
|
-
this._onOutboundTrackUnmuted = this._onOutboundTrackUnmuted.bind(this);
|
|
35
|
-
this._onInboundRtpAdded = this._onInboundRtpAdded.bind(this);
|
|
36
|
-
this._onInboundRtpRemoved = this._onInboundRtpRemoved.bind(this);
|
|
37
|
-
this._onInboundRtpUpdated = this._onInboundRtpUpdated.bind(this);
|
|
38
|
-
this._onOutboundTrackUpdated = this._onOutboundTrackUpdated.bind(this);
|
|
39
|
-
this._onInboundTrackUpdated = this._onInboundTrackUpdated.bind(this);
|
|
40
|
-
this._onOutboundRtpAdded = this._onOutboundRtpAdded.bind(this);
|
|
41
|
-
this._onOutboundRtpRemoved = this._onOutboundRtpRemoved.bind(this);
|
|
42
|
-
this._onDataChannelAdded = this._onDataChannelAdded.bind(this);
|
|
43
|
-
this._onDataChannelRemoved = this._onDataChannelRemoved.bind(this);
|
|
44
|
-
this._onAddedIceTransport = this._onAddedIceTransport.bind(this);
|
|
45
|
-
this._onRemovedIceTransport = this._onRemovedIceTransport.bind(this);
|
|
46
|
-
this._onIceCandidateAdded = this._onIceCandidateAdded.bind(this);
|
|
47
|
-
this._onIceCandidateRemoved = this._onIceCandidateRemoved.bind(this);
|
|
48
|
-
this._onAddedIceCandidatePair = this._onAddedIceCandidatePair.bind(this);
|
|
49
|
-
this._onRemovedIceCandidatePair = this._onRemovedIceCandidatePair.bind(this);
|
|
50
|
-
this._onAddedMediaCodec = this._onAddedMediaCodec.bind(this);
|
|
51
|
-
this._onRemovedMediaCodec = this._onRemovedMediaCodec.bind(this);
|
|
52
|
-
this._onAddedMediaPlayout = this._onAddedMediaPlayout.bind(this);
|
|
53
|
-
this._onRemovedMediaPlayout = this._onRemovedMediaPlayout.bind(this);
|
|
54
|
-
this._onMediaSourceAdded = this._onMediaSourceAdded.bind(this);
|
|
55
|
-
this._onMediaSourceRemoved = this._onMediaSourceRemoved.bind(this);
|
|
56
|
-
this._onClientIssue = this._onClientIssue.bind(this);
|
|
57
|
-
this._onClientMetadata = this._onClientMetadata.bind(this);
|
|
58
|
-
this._onClientJoined = this._onClientJoined.bind(this);
|
|
59
|
-
this._onClientLeft = this._onClientLeft.bind(this);
|
|
60
|
-
this._onUserMediaError = this._onUserMediaError.bind(this);
|
|
61
|
-
this._onUsingTurn = this._onUsingTurn.bind(this);
|
|
62
|
-
this._onClientAdded = this._onClientAdded.bind(this);
|
|
63
|
-
this._onCallAdded = this._onCallAdded.bind(this);
|
|
64
|
-
this._onClientRejoined = this._onClientRejoined.bind(this);
|
|
65
|
-
this._onClientExtensionStats = this._onClientExtensionStats.bind(this);
|
|
66
|
-
this._onCertificateUpdated = this._onCertificateUpdated.bind(this);
|
|
67
|
-
this._onInboundRtpUpdated = this._onInboundRtpUpdated.bind(this);
|
|
68
|
-
this._onOutboundRtpUpdated = this._onOutboundRtpUpdated.bind(this);
|
|
69
|
-
this._onInboundTrackUpdated = this._onInboundTrackUpdated.bind(this);
|
|
70
|
-
this._onOutboundTrackUpdated = this._onOutboundTrackUpdated.bind(this);
|
|
71
|
-
this._onDataChannelUpdated = this._onDataChannelUpdated.bind(this);
|
|
72
|
-
this._onIceTransportUpdated = this._onIceTransportUpdated.bind(this);
|
|
73
|
-
this._onIceCandidatePairUpdated = this._onIceCandidatePairUpdated.bind(this);
|
|
74
|
-
this._onMediaCodecUpdated = this._onMediaCodecUpdated.bind(this);
|
|
75
|
-
this._onMediaPlayoutUpdated = this._onMediaPlayoutUpdated.bind(this);
|
|
76
|
-
this._onMediaSourceUpdated = this._onMediaSourceUpdated.bind(this);
|
|
77
|
-
this._onIceCandidateUpdated = this._onIceCandidateUpdated.bind(this);
|
|
78
|
-
|
|
79
|
-
this.observer.once('close', () => {
|
|
80
|
-
this.observer.off('newcall', this._onCallAdded);
|
|
81
|
-
});
|
|
82
|
-
this.observer.on('newcall', this._onCallAdded);
|
|
83
|
-
}
|
|
84
|
-
|
|
85
|
-
// Public event handlers
|
|
86
|
-
public onCallAdded?: (call: ObservedCall, ctx: Context) => void;
|
|
87
|
-
public onCallRemoved?: (call: ObservedCall, ctx: Context) => void;
|
|
88
|
-
public onCallEmpty?: (call: ObservedCall, ctx: Context) => void;
|
|
89
|
-
public onCallNotEmpty?: (call: ObservedCall, ctx: Context) => void;
|
|
90
|
-
public onCallUpdated?: (call: ObservedCall, ctx: Context) => void;
|
|
91
|
-
|
|
92
|
-
public onClientAdded?: (client: ObservedClient, ctx: Context) => void;
|
|
93
|
-
public onClientClosed?: (client: ObservedClient, ctx: Context) => void;
|
|
94
|
-
public onClientRejoined?: (client: ObservedClient, ctx: Context) => void;
|
|
95
|
-
public onClientIssue?: (observedClent: ObservedClient, issue: ClientIssue, ctx: Context) => void;
|
|
96
|
-
public onClientMetadata?: (observedClient: ObservedClient, metadata: ClientMetaData, ctx: Context) => void;
|
|
97
|
-
public onClientExtensionStats?: (observedClient: ObservedClient, extensionStats: ExtensionStat, ctx: Context) => void;
|
|
98
|
-
public onClientJoined?: (client: ObservedClient, ctx: Context) => void;
|
|
99
|
-
public onClientLeft?: (client: ObservedClient, ctx: Context) => void;
|
|
100
|
-
public onClientUserMediaError?: (observedClient: ObservedClient, error: string, ctx: Context) => void;
|
|
101
|
-
public onClientUsingTurn?: (client: ObservedClient, usingTurn: boolean, ctx: Context) => void;
|
|
102
|
-
public onClientUpdated?: (client: ObservedClient, sample: ClientSample, ctx: Context) => void;
|
|
103
|
-
public onClientEvent?: (client: ObservedClient, event: ClientEvent, ctx: Context) => void;
|
|
104
|
-
|
|
105
|
-
public onPeerConnectionAdded?: (peerConnection: ObservedPeerConnection, ctx: Context) => void;
|
|
106
|
-
public onPeerConnectionRemoved?: (peerConnection: ObservedPeerConnection, ctx: Context) => void;
|
|
107
|
-
public onSelectedCandidatePairChanged?: (peerConnection: ObservedPeerConnection, ctx: Context) => void;
|
|
108
|
-
public onIceGatheringStateChange?: (peerConnection: ObservedPeerConnection, ctx: Context) => void;
|
|
109
|
-
public onIceConnectionStateChange?: (peerConnection: ObservedPeerConnection, ctx: Context) => void;
|
|
110
|
-
public onConnectionStateChange?: (peerConnection: ObservedPeerConnection, ctx: Context) => void;
|
|
111
|
-
|
|
112
|
-
public onCertificateAdded?: (certificate: ObservedCertificate, ctx: Context) => void;
|
|
113
|
-
public onCertificateRemoved?: (certificate: ObservedCertificate, ctx: Context) => void;
|
|
114
|
-
public onCertificateUpdated?: (certificate: ObservedCertificate, ctx: Context) => void;
|
|
115
|
-
|
|
116
|
-
public onInboundTrackAdded?: (inboundTrack: ObservedInboundTrack, ctx: Context) => void;
|
|
117
|
-
public onInboundTrackRemoved?: (inboundTrack: ObservedInboundTrack, ctx: Context) => void;
|
|
118
|
-
public onInboundTrackUpdated?: (inboundTrack: ObservedInboundTrack, ctx: Context) => void;
|
|
119
|
-
public onInboundTrackMuted?: (inboundTrack: ObservedInboundTrack, ctx: Context) => void;
|
|
120
|
-
public onInboundTrackUnmuted?: (inboundTrack: ObservedInboundTrack, ctx: Context) => void;
|
|
121
|
-
|
|
122
|
-
public onOutboundTrackAdded?: (outboundTrack: ObservedOutboundTrack, ctx: Context) => void;
|
|
123
|
-
public onOutboundTrackRemoved?: (outboundTrack: ObservedOutboundTrack, ctx: Context) => void;
|
|
124
|
-
public onOutboundTrackUpdated?: (outboundTrack: ObservedOutboundTrack, ctx: Context) => void;
|
|
125
|
-
public onOutboundTrackMuted?: (outboundTrack: ObservedOutboundTrack, ctx: Context) => void;
|
|
126
|
-
public onOutboundTrackUnmuted?: (outboundTrack: ObservedOutboundTrack, ctx: Context) => void;
|
|
127
|
-
|
|
128
|
-
public onInboundRtpAdded?: (inboundRtp: ObservedInboundRtp, ctx: Context) => void;
|
|
129
|
-
public onInboundRtpRemoved?: (inboundRtp: ObservedInboundRtp, ctx: Context) => void;
|
|
130
|
-
public onInboundRtpUpdated?: (inboundRtp: ObservedInboundRtp, ctx: Context) => void;
|
|
131
|
-
|
|
132
|
-
public onOutboundRtpAdded?: (outboundRtp: ObservedOutboundRtp, ctx: Context) => void;
|
|
133
|
-
public onOutboundRtpRemoved?: (outboundRtp: ObservedOutboundRtp, ctx: Context) => void;
|
|
134
|
-
public onOutboundRtpUpdated?: (outboundRtp: ObservedOutboundRtp, ctx: Context) => void;
|
|
135
|
-
|
|
136
|
-
public onDataChannelAdded?: (dataChannel: ObservedDataChannel, ctx: Context) => void;
|
|
137
|
-
public onDataChannelRemoved?: (dataChannel: ObservedDataChannel, ctx: Context) => void;
|
|
138
|
-
public onDataChannelUpdated?: (dataChannel: ObservedDataChannel, ctx: Context) => void;
|
|
139
|
-
|
|
140
|
-
public onAddedIceTransport?: (iceTransport: ObservedIceTransport, ctx: Context) => void;
|
|
141
|
-
public onRemovedIceTransport?: (iceTransport: ObservedIceTransport, ctx: Context) => void;
|
|
142
|
-
public onIceTransportUpdated?: (iceTransport: ObservedIceTransport, ctx: Context) => void;
|
|
143
|
-
|
|
144
|
-
public onIceCandidateAdded?: (iceCandidate: ObservedIceCandidate, ctx: Context) => void;
|
|
145
|
-
public onIceCandidateRemoved?: (iceCandidate: ObservedIceCandidate, ctx: Context) => void;
|
|
146
|
-
public onIceCandidateUpdated?: (iceCandidate: ObservedIceCandidate, ctx: Context) => void;
|
|
147
|
-
|
|
148
|
-
public onAddedIceCandidatePair?: (candidatePair: ObservedIceCandidatePair, ctx: Context) => void;
|
|
149
|
-
public onRemovedIceCandidatePair?: (candidatePair: ObservedIceCandidatePair, ctx: Context) => void;
|
|
150
|
-
public onIceCandidatePairUpdated?: (candidatePair: ObservedIceCandidatePair, ctx: Context) => void;
|
|
151
|
-
|
|
152
|
-
public onAddedMediaCodec?: (codec: ObservedCodec, ctx: Context) => void;
|
|
153
|
-
public onRemovedMediaCodec?: (codec: ObservedCodec, ctx: Context) => void;
|
|
154
|
-
public onMediaCodecUpdated?: (codec: ObservedCodec, ctx: Context) => void;
|
|
155
|
-
|
|
156
|
-
public onAddedMediaPlayout?: (mediaPlayout: ObservedMediaPlayout, ctx: Context) => void;
|
|
157
|
-
public onRemovedMediaPlayout?: (mediaPlayout: ObservedMediaPlayout, ctx: Context) => void;
|
|
158
|
-
public onMediaPlayoutUpdated?: (mediaPlayout: ObservedMediaPlayout, ctx: Context) => void;
|
|
159
|
-
|
|
160
|
-
public onMediaSourceAdded?: (mediaSource: ObservedMediaSource, ctx: Context) => void;
|
|
161
|
-
public onMediaSourceRemoved?: (mediaSource: ObservedMediaSource, ctx: Context) => void;
|
|
162
|
-
public onMediaSourceUpdated?: (mediaSource: ObservedMediaSource, ctx: Context) => void;
|
|
163
|
-
|
|
164
|
-
public onTrackReport?: (report: TrackReport, observedClient: ObservedClient, ctx: Context) => void;
|
|
165
|
-
|
|
166
|
-
private _onCallAdded(call: ObservedCall) {
|
|
167
|
-
const onCallEmpty = () => this.onCallEmpty?.(call, this.context);
|
|
168
|
-
const onCallNotEmpty = () => this.onCallNotEmpty?.(call, this.context);
|
|
169
|
-
const onCallUpdated = () => this.onCallUpdated?.(call, this.context);
|
|
170
|
-
|
|
171
|
-
call.once('close', () => {
|
|
172
|
-
call.off('newclient', this._onClientAdded);
|
|
173
|
-
call.off('empty', onCallEmpty);
|
|
174
|
-
call.off('not-empty', onCallNotEmpty);
|
|
175
|
-
call.off('update', onCallUpdated);
|
|
176
|
-
|
|
177
|
-
this.onCallRemoved?.(call, this.context);
|
|
178
|
-
});
|
|
179
|
-
call.on('newclient', this._onClientAdded);
|
|
180
|
-
call.on('empty', onCallEmpty);
|
|
181
|
-
call.on('not-empty', onCallNotEmpty);
|
|
182
|
-
call.on('update', onCallUpdated);
|
|
183
|
-
|
|
184
|
-
this.onCallAdded?.(call, this.context);
|
|
185
|
-
}
|
|
186
|
-
|
|
187
|
-
private _onClientAdded(observedClient: ObservedClient) {
|
|
188
|
-
const onClientIssue = (issue: ClientIssue) => this._onClientIssue(observedClient, issue);
|
|
189
|
-
const onClientMetadata = (metaData: ClientMetaData) => this._onClientMetadata(observedClient, metaData);
|
|
190
|
-
const onClientJoined = () => this._onClientJoined(observedClient);
|
|
191
|
-
const onClientLeft = () => this._onClientLeft(observedClient);
|
|
192
|
-
const onClientRejoined = () => this._onClientRejoined(observedClient);
|
|
193
|
-
const onClientExtensionStats = (extensionStats: ExtensionStat) => this._onClientExtensionStats(observedClient, extensionStats);
|
|
194
|
-
const onUsingTurn = (usingTurn: boolean) => this._onUsingTurn(observedClient, usingTurn);
|
|
195
|
-
const onUserMediaError = (error: string) => this._onUserMediaError(observedClient, error);
|
|
196
|
-
const onClientUpdated = (...args: ObservedClientEvents['update']) => this.onClientUpdated?.(observedClient, args[0], this.context);
|
|
197
|
-
const onClientEvent = (event: ClientEvent) => this.onClientEvent?.(observedClient, event, this.context);
|
|
198
|
-
const onTrackReport = (report: TrackReport) => this._onTrackReport(report, observedClient);
|
|
199
|
-
|
|
200
|
-
observedClient.once('close', () => {
|
|
201
|
-
observedClient.off('newpeerconnection', this._onPeerConnconnectionAdded);
|
|
202
|
-
observedClient.off('issue', onClientIssue);
|
|
203
|
-
observedClient.off('metaData', onClientMetadata);
|
|
204
|
-
observedClient.off('joined', onClientJoined);
|
|
205
|
-
observedClient.off('left', onClientLeft);
|
|
206
|
-
observedClient.off('rejoined', onClientJoined);
|
|
207
|
-
observedClient.off('usermediaerror', onUserMediaError);
|
|
208
|
-
observedClient.off('usingturn', onUsingTurn);
|
|
209
|
-
observedClient.off('extensionStats', onClientExtensionStats);
|
|
210
|
-
observedClient.off('update', onClientUpdated);
|
|
211
|
-
observedClient.off('clientEvent', onClientEvent);
|
|
212
|
-
observedClient.off('trackreport', onTrackReport);
|
|
213
|
-
|
|
214
|
-
this.onClientClosed?.(observedClient, this.context);
|
|
215
|
-
});
|
|
216
|
-
|
|
217
|
-
observedClient.on('newpeerconnection', this._onPeerConnconnectionAdded);
|
|
218
|
-
observedClient.on('issue', onClientIssue);
|
|
219
|
-
observedClient.on('metaData', onClientMetadata);
|
|
220
|
-
observedClient.on('joined', onClientJoined);
|
|
221
|
-
observedClient.on('left', onClientLeft);
|
|
222
|
-
observedClient.on('rejoined', onClientRejoined);
|
|
223
|
-
observedClient.on('usermediaerror', onUserMediaError);
|
|
224
|
-
observedClient.on('usingturn', onUsingTurn);
|
|
225
|
-
observedClient.on('extensionStats', onClientExtensionStats);
|
|
226
|
-
observedClient.on('update', onClientUpdated);
|
|
227
|
-
observedClient.on('clientEvent', onClientEvent);
|
|
228
|
-
observedClient.on('trackreport', onTrackReport);
|
|
229
|
-
|
|
230
|
-
this.onClientAdded?.(observedClient, this.context);
|
|
231
|
-
}
|
|
232
|
-
|
|
233
|
-
private _onClientRejoined(observedClient: ObservedClient) {
|
|
234
|
-
this.onClientRejoined?.(observedClient, this.context);
|
|
235
|
-
}
|
|
236
|
-
|
|
237
|
-
private _onPeerConnconnectionAdded(peerConnection: ObservedPeerConnection) {
|
|
238
|
-
const onSelectedCandidatePairChanged = () => this.onSelectedCandidatePairChanged?.(peerConnection, this.context);
|
|
239
|
-
const onIceGatheringStateChange = () => this.onIceGatheringStateChange?.(peerConnection, this.context);
|
|
240
|
-
const onIceConnectionStateChange = () => this.onIceConnectionStateChange?.(peerConnection, this.context);
|
|
241
|
-
const onConnectionStateChange = () => this.onConnectionStateChange?.(peerConnection, this.context);
|
|
242
|
-
|
|
243
|
-
peerConnection.once('close', () => {
|
|
244
|
-
peerConnection.off('added-certificate', this._onCertificateAdded);
|
|
245
|
-
peerConnection.off('removed-certificate', this._onCertificateRemoved);
|
|
246
|
-
peerConnection.off('updated-certificate', this._onCertificateUpdated);
|
|
247
|
-
|
|
248
|
-
peerConnection.off('added-inbound-track', this._onInboundTrackAdded);
|
|
249
|
-
peerConnection.off('removed-inbound-track', this._onInboundTrackRemoved);
|
|
250
|
-
peerConnection.off('updated-inbound-track', this._onInboundTrackUpdated);
|
|
251
|
-
peerConnection.off('muted-inbound-track', this._onInboundTrackMuted);
|
|
252
|
-
peerConnection.off('unmuted-inbound-track', this._onInboundTrackUnmuted);
|
|
253
|
-
|
|
254
|
-
peerConnection.off('added-outbound-track', this._onOutboundTrackAdded);
|
|
255
|
-
peerConnection.off('removed-outbound-track', this._onOutboundTrackRemoved);
|
|
256
|
-
peerConnection.off('updated-outbound-track', this._onOutboundTrackUpdated);
|
|
257
|
-
peerConnection.off('muted-outbound-track', this._onOutboundTrackMuted);
|
|
258
|
-
peerConnection.off('unmuted-outbound-track', this._onOutboundTrackUnmuted);
|
|
259
|
-
|
|
260
|
-
peerConnection.off('added-inbound-rtp', this._onInboundRtpAdded);
|
|
261
|
-
peerConnection.off('removed-inbound-rtp', this._onInboundRtpRemoved);
|
|
262
|
-
peerConnection.off('updated-inbound-rtp', this._onInboundRtpUpdated);
|
|
263
|
-
|
|
264
|
-
peerConnection.off('added-outbound-rtp', this._onOutboundRtpAdded);
|
|
265
|
-
peerConnection.off('removed-outbound-rtp', this._onOutboundRtpRemoved);
|
|
266
|
-
peerConnection.off('updated-outbound-rtp', this._onOutboundRtpUpdated);
|
|
267
|
-
|
|
268
|
-
peerConnection.off('added-data-channel', this._onDataChannelAdded);
|
|
269
|
-
peerConnection.off('removed-data-channel', this._onDataChannelRemoved);
|
|
270
|
-
peerConnection.off('updated-data-channel', this._onDataChannelUpdated);
|
|
271
|
-
|
|
272
|
-
peerConnection.off('added-ice-transport', this._onAddedIceTransport);
|
|
273
|
-
peerConnection.off('removed-ice-transport', this._onRemovedIceTransport);
|
|
274
|
-
peerConnection.off('updated-ice-transport', this._onIceTransportUpdated);
|
|
275
|
-
|
|
276
|
-
peerConnection.off('added-ice-candidate', this._onIceCandidateAdded);
|
|
277
|
-
peerConnection.off('removed-ice-candidate', this._onIceCandidateRemoved);
|
|
278
|
-
peerConnection.off('updated-ice-candidate', this._onIceCandidateUpdated);
|
|
279
|
-
|
|
280
|
-
peerConnection.off('added-ice-candidate-pair', this._onAddedIceCandidatePair);
|
|
281
|
-
peerConnection.off('removed-ice-candidate-pair', this._onRemovedIceCandidatePair);
|
|
282
|
-
peerConnection.off('updated-ice-candidate-pair', this._onIceCandidatePairUpdated);
|
|
283
|
-
|
|
284
|
-
peerConnection.off('added-codec', this._onAddedMediaCodec);
|
|
285
|
-
peerConnection.off('removed-codec', this._onRemovedMediaCodec);
|
|
286
|
-
peerConnection.off('updated-codec', this._onMediaCodecUpdated);
|
|
287
|
-
|
|
288
|
-
peerConnection.off('added-media-playout', this._onAddedMediaPlayout);
|
|
289
|
-
peerConnection.off('removed-media-playout', this._onRemovedMediaPlayout);
|
|
290
|
-
peerConnection.off('updated-media-playout', this._onMediaPlayoutUpdated);
|
|
291
|
-
|
|
292
|
-
peerConnection.off('added-media-source', this._onMediaSourceAdded);
|
|
293
|
-
peerConnection.off('removed-media-source', this._onMediaSourceRemoved);
|
|
294
|
-
peerConnection.off('updated-media-source', this._onMediaSourceUpdated);
|
|
295
|
-
|
|
296
|
-
peerConnection.off('selectedcandidatepair', onSelectedCandidatePairChanged);
|
|
297
|
-
peerConnection.off('icegatheringstatechange', onIceGatheringStateChange);
|
|
298
|
-
peerConnection.off('iceconnectionstatechange', onIceConnectionStateChange);
|
|
299
|
-
peerConnection.off('connectionstatechange', onConnectionStateChange);
|
|
300
|
-
|
|
301
|
-
this.onPeerConnectionRemoved?.(peerConnection, this.context);
|
|
302
|
-
});
|
|
303
|
-
|
|
304
|
-
peerConnection.on('added-certificate', this._onCertificateAdded);
|
|
305
|
-
peerConnection.on('removed-certificate', this._onCertificateRemoved);
|
|
306
|
-
peerConnection.on('updated-certificate', this._onCertificateUpdated);
|
|
307
|
-
|
|
308
|
-
peerConnection.on('added-inbound-track', this._onInboundTrackAdded);
|
|
309
|
-
peerConnection.on('removed-inbound-track', this._onInboundTrackRemoved);
|
|
310
|
-
peerConnection.on('updated-inbound-track', this._onInboundTrackUpdated);
|
|
311
|
-
peerConnection.on('muted-inbound-track', this._onInboundTrackMuted);
|
|
312
|
-
peerConnection.on('unmuted-inbound-track', this._onInboundTrackUnmuted);
|
|
313
|
-
|
|
314
|
-
peerConnection.on('added-outbound-track', this._onOutboundTrackAdded);
|
|
315
|
-
peerConnection.on('removed-outbound-track', this._onOutboundTrackRemoved);
|
|
316
|
-
peerConnection.on('updated-outbound-track', this._onOutboundTrackUpdated);
|
|
317
|
-
peerConnection.on('muted-outbound-track', this._onOutboundTrackMuted);
|
|
318
|
-
peerConnection.on('unmuted-outbound-track', this._onOutboundTrackUnmuted);
|
|
319
|
-
|
|
320
|
-
peerConnection.on('added-inbound-rtp', this._onInboundRtpAdded);
|
|
321
|
-
peerConnection.on('removed-inbound-rtp', this._onInboundRtpRemoved);
|
|
322
|
-
peerConnection.on('updated-inbound-rtp', this._onInboundRtpUpdated);
|
|
323
|
-
|
|
324
|
-
peerConnection.on('added-outbound-rtp', this._onOutboundRtpAdded);
|
|
325
|
-
peerConnection.on('removed-outbound-rtp', this._onOutboundRtpRemoved);
|
|
326
|
-
peerConnection.on('updated-outbound-rtp', this._onOutboundRtpUpdated);
|
|
327
|
-
|
|
328
|
-
peerConnection.on('added-data-channel', this._onDataChannelAdded);
|
|
329
|
-
peerConnection.on('removed-data-channel', this._onDataChannelRemoved);
|
|
330
|
-
peerConnection.on('updated-data-channel', this._onDataChannelUpdated);
|
|
331
|
-
|
|
332
|
-
peerConnection.on('added-ice-transport', this._onAddedIceTransport);
|
|
333
|
-
peerConnection.on('removed-ice-transport', this._onRemovedIceTransport);
|
|
334
|
-
peerConnection.on('updated-ice-transport', this._onIceTransportUpdated);
|
|
335
|
-
|
|
336
|
-
peerConnection.on('added-ice-candidate', this._onIceCandidateAdded);
|
|
337
|
-
peerConnection.on('removed-ice-candidate', this._onIceCandidateRemoved);
|
|
338
|
-
peerConnection.on('updated-ice-candidate', this._onIceCandidateUpdated);
|
|
339
|
-
|
|
340
|
-
peerConnection.on('added-ice-candidate-pair', this._onAddedIceCandidatePair);
|
|
341
|
-
peerConnection.on('removed-ice-candidate-pair', this._onRemovedIceCandidatePair);
|
|
342
|
-
peerConnection.on('updated-ice-candidate-pair', this._onIceCandidatePairUpdated);
|
|
343
|
-
|
|
344
|
-
peerConnection.on('added-codec', this._onAddedMediaCodec);
|
|
345
|
-
peerConnection.on('removed-codec', this._onRemovedMediaCodec);
|
|
346
|
-
peerConnection.on('updated-codec', this._onMediaCodecUpdated);
|
|
347
|
-
|
|
348
|
-
peerConnection.on('added-media-playout', this._onAddedMediaPlayout);
|
|
349
|
-
peerConnection.on('removed-media-playout', this._onRemovedMediaPlayout);
|
|
350
|
-
peerConnection.on('updated-media-playout', this._onMediaPlayoutUpdated);
|
|
351
|
-
|
|
352
|
-
peerConnection.on('added-media-source', this._onMediaSourceAdded);
|
|
353
|
-
peerConnection.on('removed-media-source', this._onMediaSourceRemoved);
|
|
354
|
-
peerConnection.on('updated-media-source', this._onMediaSourceUpdated);
|
|
355
|
-
|
|
356
|
-
peerConnection.on('selectedcandidatepair', onSelectedCandidatePairChanged);
|
|
357
|
-
peerConnection.on('icegatheringstatechange', onIceGatheringStateChange);
|
|
358
|
-
peerConnection.on('iceconnectionstatechange', onIceConnectionStateChange);
|
|
359
|
-
peerConnection.on('connectionstatechange', onConnectionStateChange);
|
|
360
|
-
|
|
361
|
-
this.onPeerConnectionAdded?.(peerConnection, this.context);
|
|
362
|
-
|
|
363
|
-
}
|
|
364
|
-
|
|
365
|
-
private _onPeerConnectionRemoved(peerConnection: ObservedPeerConnection) {
|
|
366
|
-
this.onPeerConnectionRemoved?.(peerConnection, this.context);
|
|
367
|
-
|
|
368
|
-
}
|
|
369
|
-
|
|
370
|
-
private _onCertificateAdded(certificate: ObservedCertificate) {
|
|
371
|
-
this.onCertificateAdded?.(certificate, this.context);
|
|
372
|
-
}
|
|
373
|
-
|
|
374
|
-
private _onCertificateRemoved(certificate: ObservedCertificate) {
|
|
375
|
-
this.onCertificateRemoved?.(certificate, this.context);
|
|
376
|
-
}
|
|
377
|
-
|
|
378
|
-
private _onCertificateUpdated(certificate: ObservedCertificate) {
|
|
379
|
-
this.onCertificateUpdated?.(certificate, this.context);
|
|
380
|
-
}
|
|
381
|
-
|
|
382
|
-
private _onInboundTrackAdded(inboundTrack: ObservedInboundTrack) {
|
|
383
|
-
this.onInboundTrackAdded?.(inboundTrack, this.context);
|
|
384
|
-
}
|
|
385
|
-
|
|
386
|
-
private _onInboundTrackRemoved(inboundTrack: ObservedInboundTrack) {
|
|
387
|
-
this.onInboundTrackRemoved?.(inboundTrack, this.context);
|
|
388
|
-
}
|
|
389
|
-
|
|
390
|
-
private _onInboundTrackUpdated(inboundTrack: ObservedInboundTrack) {
|
|
391
|
-
this.onInboundTrackUpdated?.(inboundTrack, this.context);
|
|
392
|
-
}
|
|
393
|
-
|
|
394
|
-
private _onOutboundTrackMuted(outboundTrack: ObservedOutboundTrack) {
|
|
395
|
-
this.onOutboundTrackMuted?.(outboundTrack, this.context);
|
|
396
|
-
}
|
|
397
|
-
|
|
398
|
-
private _onOutboundTrackUnmuted(outboundTrack: ObservedOutboundTrack) {
|
|
399
|
-
this.onOutboundTrackUnmuted?.(outboundTrack, this.context);
|
|
400
|
-
}
|
|
401
|
-
|
|
402
|
-
private _onOutboundTrackAdded(outboundTrack: ObservedOutboundTrack) {
|
|
403
|
-
this.onOutboundTrackAdded?.(outboundTrack, this.context);
|
|
404
|
-
}
|
|
405
|
-
|
|
406
|
-
private _onOutboundTrackRemoved(outboundTrack: ObservedOutboundTrack) {
|
|
407
|
-
this.onOutboundTrackRemoved?.(outboundTrack, this.context);
|
|
408
|
-
}
|
|
409
|
-
|
|
410
|
-
private _onOutboundTrackUpdated(outboundTrack: ObservedOutboundTrack) {
|
|
411
|
-
this.onOutboundTrackUpdated?.(outboundTrack, this.context);
|
|
412
|
-
}
|
|
413
|
-
|
|
414
|
-
private _onInboundTrackMuted(inboundTrack: ObservedInboundTrack) {
|
|
415
|
-
this.onInboundTrackMuted?.(inboundTrack, this.context);
|
|
416
|
-
}
|
|
417
|
-
|
|
418
|
-
private _onInboundTrackUnmuted(inboundTrack: ObservedInboundTrack) {
|
|
419
|
-
this.onInboundTrackUnmuted?.(inboundTrack, this.context);
|
|
420
|
-
}
|
|
421
|
-
|
|
422
|
-
private _onInboundRtpAdded(inboundRtp: ObservedInboundRtp) {
|
|
423
|
-
this.onInboundRtpAdded?.(inboundRtp, this.context);
|
|
424
|
-
}
|
|
425
|
-
|
|
426
|
-
private _onInboundRtpRemoved(inboundRtp: ObservedInboundRtp) {
|
|
427
|
-
this.onInboundRtpRemoved?.(inboundRtp, this.context);
|
|
428
|
-
}
|
|
429
|
-
|
|
430
|
-
private _onInboundRtpUpdated(inboundRtp: ObservedInboundRtp) {
|
|
431
|
-
this.onInboundRtpUpdated?.(inboundRtp, this.context);
|
|
432
|
-
}
|
|
433
|
-
|
|
434
|
-
private _onOutboundRtpAdded(outboundRtp: ObservedOutboundRtp) {
|
|
435
|
-
this.onOutboundRtpAdded?.(outboundRtp, this.context);
|
|
436
|
-
}
|
|
437
|
-
|
|
438
|
-
private _onOutboundRtpRemoved(outboundRtp: ObservedOutboundRtp) {
|
|
439
|
-
this.onOutboundRtpRemoved?.(outboundRtp, this.context);
|
|
440
|
-
}
|
|
441
|
-
|
|
442
|
-
private _onOutboundRtpUpdated(outboundRtp: ObservedOutboundRtp) {
|
|
443
|
-
this.onOutboundRtpUpdated?.(outboundRtp, this.context);
|
|
444
|
-
}
|
|
445
|
-
|
|
446
|
-
private _onDataChannelAdded(dataChannel: ObservedDataChannel) {
|
|
447
|
-
this.onDataChannelAdded?.(dataChannel, this.context);
|
|
448
|
-
}
|
|
449
|
-
|
|
450
|
-
private _onDataChannelRemoved(dataChannel: ObservedDataChannel) {
|
|
451
|
-
this.onDataChannelRemoved?.(dataChannel, this.context);
|
|
452
|
-
}
|
|
453
|
-
|
|
454
|
-
private _onDataChannelUpdated(dataChannel: ObservedDataChannel) {
|
|
455
|
-
this.onDataChannelUpdated?.(dataChannel, this.context);
|
|
456
|
-
}
|
|
457
|
-
|
|
458
|
-
private _onAddedIceTransport(iceTransport: ObservedIceTransport) {
|
|
459
|
-
this.onAddedIceTransport?.(iceTransport, this.context);
|
|
460
|
-
}
|
|
461
|
-
|
|
462
|
-
private _onRemovedIceTransport(iceTransport: ObservedIceTransport) {
|
|
463
|
-
this.onRemovedIceTransport?.(iceTransport, this.context);
|
|
464
|
-
}
|
|
465
|
-
|
|
466
|
-
private _onIceTransportUpdated(iceTransport: ObservedIceTransport) {
|
|
467
|
-
this.onIceTransportUpdated?.(iceTransport, this.context);
|
|
468
|
-
}
|
|
469
|
-
|
|
470
|
-
private _onIceCandidateAdded(iceCandidate: ObservedIceCandidate) {
|
|
471
|
-
this.onIceCandidateAdded?.(iceCandidate, this.context);
|
|
472
|
-
}
|
|
473
|
-
|
|
474
|
-
private _onIceCandidateRemoved(iceCandidate: ObservedIceCandidate) {
|
|
475
|
-
this.onIceCandidateRemoved?.(iceCandidate, this.context);
|
|
476
|
-
}
|
|
477
|
-
|
|
478
|
-
private _onIceCandidateUpdated(iceCandidate: ObservedIceCandidate) {
|
|
479
|
-
this.onIceCandidateUpdated?.(iceCandidate, this.context);
|
|
480
|
-
}
|
|
481
|
-
|
|
482
|
-
private _onAddedIceCandidatePair(candidatePair: ObservedIceCandidatePair) {
|
|
483
|
-
this.onAddedIceCandidatePair?.(candidatePair, this.context);
|
|
484
|
-
}
|
|
485
|
-
|
|
486
|
-
private _onRemovedIceCandidatePair(candidatePair: ObservedIceCandidatePair) {
|
|
487
|
-
this.onRemovedIceCandidatePair?.(candidatePair, this.context);
|
|
488
|
-
}
|
|
489
|
-
|
|
490
|
-
private _onIceCandidatePairUpdated(candidatePair: ObservedIceCandidatePair) {
|
|
491
|
-
this.onIceCandidatePairUpdated?.(candidatePair, this.context);
|
|
492
|
-
}
|
|
493
|
-
|
|
494
|
-
private _onAddedMediaCodec(codec: ObservedCodec) {
|
|
495
|
-
this.onAddedMediaCodec?.(codec, this.context);
|
|
496
|
-
}
|
|
497
|
-
|
|
498
|
-
private _onRemovedMediaCodec(codec: ObservedCodec) {
|
|
499
|
-
this.onRemovedMediaCodec?.(codec, this.context);
|
|
500
|
-
}
|
|
501
|
-
|
|
502
|
-
private _onMediaCodecUpdated(codec: ObservedCodec) {
|
|
503
|
-
this.onMediaCodecUpdated?.(codec, this.context);
|
|
504
|
-
}
|
|
505
|
-
|
|
506
|
-
private _onAddedMediaPlayout(mediaPlayout: ObservedMediaPlayout) {
|
|
507
|
-
this.onAddedMediaPlayout?.(mediaPlayout, this.context);
|
|
508
|
-
}
|
|
509
|
-
|
|
510
|
-
private _onRemovedMediaPlayout(mediaPlayout: ObservedMediaPlayout) {
|
|
511
|
-
this.onRemovedMediaPlayout?.(mediaPlayout, this.context);
|
|
512
|
-
}
|
|
513
|
-
|
|
514
|
-
private _onMediaPlayoutUpdated(mediaPlayout: ObservedMediaPlayout) {
|
|
515
|
-
this.onMediaPlayoutUpdated?.(mediaPlayout, this.context);
|
|
516
|
-
}
|
|
517
|
-
|
|
518
|
-
private _onMediaSourceAdded(mediaSource: ObservedMediaSource) {
|
|
519
|
-
this.onMediaSourceAdded?.(mediaSource, this.context);
|
|
520
|
-
}
|
|
521
|
-
|
|
522
|
-
private _onMediaSourceRemoved(mediaSource: ObservedMediaSource) {
|
|
523
|
-
this.onMediaSourceRemoved?.(mediaSource, this.context);
|
|
524
|
-
}
|
|
525
|
-
|
|
526
|
-
private _onMediaSourceUpdated(mediaSource: ObservedMediaSource) {
|
|
527
|
-
this.onMediaSourceUpdated?.(mediaSource, this.context);
|
|
528
|
-
}
|
|
529
|
-
|
|
530
|
-
private _onClientIssue(observedClent: ObservedClient, issue: ClientIssue) {
|
|
531
|
-
this.onClientIssue?.(observedClent, issue, this.context);
|
|
532
|
-
}
|
|
533
|
-
|
|
534
|
-
private _onClientMetadata(observedClient: ObservedClient, metadata: ClientMetaData) {
|
|
535
|
-
this.onClientMetadata?.(observedClient, metadata, this.context);
|
|
536
|
-
}
|
|
537
|
-
|
|
538
|
-
private _onClientExtensionStats(observedClient: ObservedClient, extensionStats: ExtensionStat) {
|
|
539
|
-
this.onClientExtensionStats?.(observedClient, extensionStats, this.context);
|
|
540
|
-
}
|
|
541
|
-
|
|
542
|
-
private _onClientJoined(observedClient: ObservedClient) {
|
|
543
|
-
this.onClientJoined?.(observedClient, this.context);
|
|
544
|
-
}
|
|
545
|
-
|
|
546
|
-
private _onClientLeft(observedClient: ObservedClient) {
|
|
547
|
-
this.onClientLeft?.(observedClient, this.context);
|
|
548
|
-
}
|
|
549
|
-
|
|
550
|
-
private _onUserMediaError(observedClient: ObservedClient, error: string) {
|
|
551
|
-
this.onClientUserMediaError?.(observedClient, error, this.context);
|
|
552
|
-
}
|
|
553
|
-
|
|
554
|
-
private _onUsingTurn(observedClient: ObservedClient, usingTurn: boolean) {
|
|
555
|
-
this.onClientUsingTurn?.(observedClient, usingTurn, this.context);
|
|
556
|
-
}
|
|
557
|
-
|
|
558
|
-
private _onTrackReport(report: TrackReport, observedClient: ObservedClient) {
|
|
559
|
-
this.onTrackReport?.(report, observedClient, this.context);
|
|
560
|
-
}
|
|
561
|
-
}
|
package/src/ObserverSummary.ts
DELETED
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
export type ObserverSummary = {
|
|
2
|
-
currentActiveCalls: number;
|
|
3
|
-
currentNumberOfClientsUsingTURN: number;
|
|
4
|
-
currentNumberOfClients: number;
|
|
5
|
-
|
|
6
|
-
totalAddedCall: number;
|
|
7
|
-
totalRemovedCall: number;
|
|
8
|
-
|
|
9
|
-
totalRttLt50Measurements: number,
|
|
10
|
-
totalRttLt150Measurements: number,
|
|
11
|
-
totalRttLt300Measurements: number,
|
|
12
|
-
totalRttGtOrEq300Measurements: number,
|
|
13
|
-
|
|
14
|
-
totalClientIssues: number,
|
|
15
|
-
}
|
package/src/Reports.ts
DELETED
|
@@ -1,87 +0,0 @@
|
|
|
1
|
-
export type InboundAudioTrackReport = {
|
|
2
|
-
trackId: string,
|
|
3
|
-
fractionLostDistribution: {
|
|
4
|
-
lt001: number;
|
|
5
|
-
lt005: number;
|
|
6
|
-
lt010: number;
|
|
7
|
-
lt020: number;
|
|
8
|
-
lt050: number;
|
|
9
|
-
gtOrEq050: number;
|
|
10
|
-
count: number;
|
|
11
|
-
sum: number;
|
|
12
|
-
},
|
|
13
|
-
};
|
|
14
|
-
|
|
15
|
-
export type InboundVideoTrackReport = {
|
|
16
|
-
trackId: string,
|
|
17
|
-
fractionLostDistribution: {
|
|
18
|
-
lt001: number;
|
|
19
|
-
lt005: number;
|
|
20
|
-
lt010: number;
|
|
21
|
-
lt020: number;
|
|
22
|
-
lt050: number;
|
|
23
|
-
gtOrEq050: number;
|
|
24
|
-
count: number;
|
|
25
|
-
sum: number;
|
|
26
|
-
},
|
|
27
|
-
};
|
|
28
|
-
|
|
29
|
-
export type OutboundAudioTrackReport = {
|
|
30
|
-
trackId: string,
|
|
31
|
-
};
|
|
32
|
-
|
|
33
|
-
export type OutboundVideoTrackReport = {
|
|
34
|
-
trackId: string,
|
|
35
|
-
};
|
|
36
|
-
|
|
37
|
-
export type InboundTrackReport = ({ kind: 'audio' } & InboundAudioTrackReport)
|
|
38
|
-
| ({ kind: 'video' } & InboundVideoTrackReport);
|
|
39
|
-
|
|
40
|
-
export type OutboundTrackReport = ({ kind: 'audio' } & OutboundAudioTrackReport)
|
|
41
|
-
| ({ kind: 'video' } & OutboundVideoTrackReport);
|
|
42
|
-
|
|
43
|
-
export type TrackReport = ({ direction: 'inbound' } & InboundTrackReport)
|
|
44
|
-
| ({ direction: 'outbound' } & OutboundTrackReport);
|
|
45
|
-
|
|
46
|
-
export type ClientReport = {
|
|
47
|
-
callId: string;
|
|
48
|
-
clientId: string;
|
|
49
|
-
|
|
50
|
-
totalDataChannelBytesReceived: number;
|
|
51
|
-
totalDataChannelBytesSent: number;
|
|
52
|
-
totalDataChannelMessagesReceived: number;
|
|
53
|
-
totalDataChannelMessagesSent: number;
|
|
54
|
-
totalInboundRtpPacketsReceived: number;
|
|
55
|
-
totalInboundRtpPacketsLost: number;
|
|
56
|
-
totalInboundRtpBytesReceived: number;
|
|
57
|
-
totalOutboundRtpPacketsSent: number;
|
|
58
|
-
totalOutboundRtpBytesSent: number;
|
|
59
|
-
totalAudioBytesReceived: number;
|
|
60
|
-
totalVideoBytesReceived: number;
|
|
61
|
-
totalAudioBytesSent: number;
|
|
62
|
-
totalVideoBytesSent: number;
|
|
63
|
-
totalNumberOfIssues: number;
|
|
64
|
-
|
|
65
|
-
issues: Record<string, number>;
|
|
66
|
-
|
|
67
|
-
rttDistribution: {
|
|
68
|
-
lt50ms: number;
|
|
69
|
-
lt150ms: number;
|
|
70
|
-
lt300ms: number;
|
|
71
|
-
gtOrEq300ms: number;
|
|
72
|
-
count: number;
|
|
73
|
-
sum: number;
|
|
74
|
-
},
|
|
75
|
-
|
|
76
|
-
scoreDistribution: {
|
|
77
|
-
'0': number;
|
|
78
|
-
'1': number;
|
|
79
|
-
'2': number;
|
|
80
|
-
'3': number;
|
|
81
|
-
'4': number;
|
|
82
|
-
'5': number;
|
|
83
|
-
|
|
84
|
-
count: number;
|
|
85
|
-
sum: number;
|
|
86
|
-
}
|
|
87
|
-
}
|