sip-connector 20.2.0 → 20.2.1
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 +1 -1
- package/dist/@SipConnector-BTqBRDjY.cjs +1 -0
- package/dist/{@SipConnector-BDiunWqH.js → @SipConnector-OO78fz6E.js} +484 -366
- package/dist/ApiManager/@ApiManager.d.ts +1 -1
- package/dist/ApiManager/{eventNames.d.ts → events.d.ts} +1 -0
- package/dist/ApiManager/index.d.ts +2 -1
- package/dist/AutoConnectorManager/@AutoConnectorManager.d.ts +1 -1
- package/dist/AutoConnectorManager/{eventNames.d.ts → events.d.ts} +1 -0
- package/dist/AutoConnectorManager/index.d.ts +1 -0
- package/dist/CallManager/@CallManager.d.ts +4 -2
- package/dist/CallManager/MCUSession.d.ts +2 -1
- package/dist/CallManager/RemoteStreamsManager.d.ts +1 -0
- package/dist/CallManager/{eventNames.d.ts → events.d.ts} +2 -1
- package/dist/CallManager/index.d.ts +2 -3
- package/dist/CallManager/types.d.ts +2 -1
- package/dist/ConnectionManager/@ConnectionManager.d.ts +1 -1
- package/dist/ConnectionManager/ConnectionFlow.d.ts +1 -1
- package/dist/ConnectionManager/ConnectionStateMachine.d.ts +8 -8
- package/dist/ConnectionManager/RegistrationManager.d.ts +1 -1
- package/dist/ConnectionManager/{eventNames.d.ts → events.d.ts} +2 -1
- package/dist/ConnectionManager/index.d.ts +3 -3
- package/dist/IncomingCallManager/@IncomingCallManager.d.ts +1 -1
- package/dist/IncomingCallManager/{eventNames.d.ts → events.d.ts} +2 -1
- package/dist/IncomingCallManager/index.d.ts +2 -1
- package/dist/MainStreamHealthMonitor/@MainStreamHealthMonitor.d.ts +16 -0
- package/dist/MainStreamHealthMonitor/events.d.ts +8 -0
- package/dist/MainStreamHealthMonitor/index.d.ts +1 -0
- package/dist/MainStreamRecovery/@MainStreamRecovery.d.ts +12 -0
- package/dist/MainStreamRecovery/index.d.ts +1 -0
- package/dist/PresentationManager/@PresentationManager.d.ts +1 -1
- package/dist/PresentationManager/{eventNames.d.ts → events.d.ts} +1 -0
- package/dist/PresentationManager/index.d.ts +1 -0
- package/dist/SipConnector/@SipConnector.d.ts +4 -1
- package/dist/SipConnector/{eventNames.d.ts → events.d.ts} +10 -9
- package/dist/SipConnector/index.d.ts +1 -1
- package/dist/StatsManager/@StatsManager.d.ts +14 -3
- package/dist/StatsManager/events.d.ts +2 -0
- package/dist/StatsManager/index.d.ts +1 -1
- package/dist/StatsPeerConnection/@StatsPeerConnection.d.ts +1 -1
- package/dist/StatsPeerConnection/{eventNames.d.ts → events.d.ts} +1 -0
- package/dist/StatsPeerConnection/index.d.ts +4 -3
- package/dist/StatsPeerConnection/types.d.ts +2 -0
- package/dist/VideoSendingBalancerManager/@VideoSendingBalancerManager.d.ts +1 -1
- package/dist/VideoSendingBalancerManager/{eventNames.d.ts → events.d.ts} +1 -0
- package/dist/VideoSendingBalancerManager/index.d.ts +2 -2
- package/dist/__fixtures__/RTCSessionMock.d.ts +1 -0
- package/dist/doMock.cjs +1 -1
- package/dist/doMock.js +10 -9
- package/dist/index.cjs +1 -1
- package/dist/index.js +2 -2
- package/dist/tools/index.d.ts +1 -1
- package/package.json +12 -9
- package/dist/@SipConnector-YhZPG7vq.cjs +0 -1
- package/dist/StatsManager/eventNames.d.ts +0 -2
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { CallManager } from '../CallManager';
|
|
2
2
|
import { ConnectionManager } from '../ConnectionManager';
|
|
3
|
-
import { TEventMap, TEvents } from './
|
|
3
|
+
import { TEventMap, TEvents } from './events';
|
|
4
4
|
import { TChannels, TMediaState, TOptionsInfoMediaState } from './types';
|
|
5
5
|
declare class ApiManager {
|
|
6
6
|
readonly events: TEvents;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
1
|
export { default as ApiManager } from './@ApiManager';
|
|
2
2
|
export { EContentTypeReceived, EContentTypeSent, EEventsMainCAM, EEventsMic, EEventsSyncMediaState, EHeader, EShareState, EUseLicense, } from './constants';
|
|
3
|
-
export
|
|
3
|
+
export { createEvents } from './events';
|
|
4
|
+
export type { TEventMap, TEvent as TApiEvent, TEvents as TApiEvents } from './events';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { CallManager } from '../CallManager';
|
|
2
2
|
import { ConnectionManager } from '../ConnectionManager';
|
|
3
3
|
import { ConnectionQueueManager } from '../ConnectionQueueManager';
|
|
4
|
-
import { TEventMap, TEvents } from './
|
|
4
|
+
import { TEventMap, TEvents } from './events';
|
|
5
5
|
import { IAutoConnectorOptions, TParametersAutoConnect } from './types';
|
|
6
6
|
declare class AutoConnectorManager {
|
|
7
7
|
readonly events: TEvents;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { RTCSession } from '@krivega/jssip';
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
2
|
+
import { TEventMap, TEvents } from './events';
|
|
3
|
+
import { TAnswerToIncomingCall, TCallConfiguration, TCallRoleSpectator, TReplaceMediaStream, TStartCall } from './types';
|
|
4
4
|
declare class CallManager {
|
|
5
5
|
readonly events: TEvents;
|
|
6
6
|
protected isPendingCall: boolean;
|
|
@@ -26,11 +26,13 @@ declare class CallManager {
|
|
|
26
26
|
off<T extends keyof TEventMap>(eventName: T, handler: (data: TEventMap[T]) => void): void;
|
|
27
27
|
startCall: TStartCall;
|
|
28
28
|
endCall(): Promise<void>;
|
|
29
|
+
renegotiate(): Promise<boolean>;
|
|
29
30
|
answerToIncomingCall: TAnswerToIncomingCall;
|
|
30
31
|
getCallConfiguration(): {
|
|
31
32
|
answer?: boolean;
|
|
32
33
|
number?: string;
|
|
33
34
|
};
|
|
35
|
+
getMainStream(): MediaStream | undefined;
|
|
34
36
|
getRemoteStreams(): MediaStream[];
|
|
35
37
|
setCallRoleParticipant(): void;
|
|
36
38
|
setCallRoleSpectatorSynthetic(): void;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { RTCSession } from '@krivega/jssip';
|
|
2
|
-
import { TEvents } from './
|
|
2
|
+
import { TEvents } from './events';
|
|
3
3
|
import { IMCUSession } from './types';
|
|
4
4
|
export declare class MCUSession implements IMCUSession {
|
|
5
5
|
protected readonly events: TEvents;
|
|
@@ -12,6 +12,7 @@ export declare class MCUSession implements IMCUSession {
|
|
|
12
12
|
get connection(): RTCPeerConnection | undefined;
|
|
13
13
|
get isCallActive(): boolean;
|
|
14
14
|
getEstablishedRTCSession: () => RTCSession | undefined;
|
|
15
|
+
renegotiate(): Promise<boolean>;
|
|
15
16
|
startCall: IMCUSession['startCall'];
|
|
16
17
|
endCall(): Promise<void>;
|
|
17
18
|
answerToIncomingCall: IMCUSession['answerToIncomingCall'];
|
|
@@ -2,6 +2,7 @@ export declare class RemoteStreamsManager {
|
|
|
2
2
|
private readonly participantGroups;
|
|
3
3
|
private readonly trackToGroup;
|
|
4
4
|
private readonly trackDisposers;
|
|
5
|
+
get mainStream(): MediaStream | undefined;
|
|
5
6
|
reset(): void;
|
|
6
7
|
addTrack(track: MediaStreamTrack, { onRemoved, streamHint, }?: {
|
|
7
8
|
streamHint?: string;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { IncomingInfoEvent, OutgoingInfoEvent, EndEvent } from '@krivega/jssip';
|
|
2
1
|
import { TypedEvents } from 'events-constructor';
|
|
2
|
+
import { IncomingInfoEvent, OutgoingInfoEvent, EndEvent } from '@krivega/jssip';
|
|
3
3
|
export declare enum EEvent {
|
|
4
4
|
PEER_CONNECTION = "peerconnection",
|
|
5
5
|
CONNECTING = "connecting",
|
|
@@ -94,3 +94,4 @@ export type TEventMap = {
|
|
|
94
94
|
};
|
|
95
95
|
};
|
|
96
96
|
export type TEvents = TypedEvents<TEventMap>;
|
|
97
|
+
export declare const createEvents: () => TypedEvents<TEventMap, readonly (keyof TEventMap)[]>;
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
export { default as CallManager } from './@CallManager';
|
|
2
2
|
export { ECallCause } from './causes';
|
|
3
|
-
export
|
|
4
|
-
export { EEvent as ECallEvent } from './eventNames';
|
|
5
|
-
export type { TEvent as TCallEvent, TEvents as TCallEvents } from './eventNames';
|
|
3
|
+
export { EEvent as ECallEvent, createEvents } from './events';
|
|
6
4
|
export { default as hasCanceledCallError } from './hasCanceledCallError';
|
|
7
5
|
export type { TCustomError, TGetUri } from './types';
|
|
6
|
+
export type { TEventMap, TEvent as TCallEvent, TEvents as TCallEvents } from './events';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { RTCSession, UA } from '@krivega/jssip';
|
|
2
2
|
import { TContentHint } from '../PresentationManager';
|
|
3
|
-
import { Originator } from './
|
|
3
|
+
import { Originator } from './events';
|
|
4
4
|
import { TTools } from './RecvSession';
|
|
5
5
|
export type TOnAddedTransceiver = (transceiver: RTCRtpTransceiver, track: MediaStreamTrack, streams: MediaStream[]) => Promise<void>;
|
|
6
6
|
export type TGetUri = (id: string) => string;
|
|
@@ -67,6 +67,7 @@ export interface IMCUSession {
|
|
|
67
67
|
getEstablishedRTCSession: () => RTCSession | undefined;
|
|
68
68
|
startCall: TStartCall;
|
|
69
69
|
endCall: () => Promise<void>;
|
|
70
|
+
renegotiate: () => Promise<boolean>;
|
|
70
71
|
answerToIncomingCall: (incomingRTCSession: RTCSession, params: TParamsAnswerToIncomingCall) => Promise<RTCPeerConnection>;
|
|
71
72
|
replaceMediaStream: TReplaceMediaStream;
|
|
72
73
|
restartIce: (options?: {
|
|
@@ -3,7 +3,7 @@ import { RegisteredEvent, UA, UnRegisteredEvent, WebSocketInterface } from '@kri
|
|
|
3
3
|
import { TGetUri } from '../CallManager';
|
|
4
4
|
import { TJsSIP } from '../types';
|
|
5
5
|
import { TConnect, TConnectionConfigurationWithUa, TParametersConnection, TSet } from './ConnectionFlow';
|
|
6
|
-
import { TEventMap, TEvents } from './
|
|
6
|
+
import { TEventMap, TEvents } from './events';
|
|
7
7
|
type TConnectParameters = (() => Promise<TParametersConnection>) | TParametersConnection;
|
|
8
8
|
type TConnectOptions = Parameters<TConnect>[1] & {
|
|
9
9
|
hasReadyForConnection?: () => boolean;
|
|
@@ -2,7 +2,7 @@ import { UA, WebSocketInterface } from '@krivega/jssip';
|
|
|
2
2
|
import { TGetUri } from '../CallManager';
|
|
3
3
|
import { TJsSIP } from '../types';
|
|
4
4
|
import { default as ConnectionStateMachine } from './ConnectionStateMachine';
|
|
5
|
-
import { TEvents } from './
|
|
5
|
+
import { TEvents } from './events';
|
|
6
6
|
import { default as RegistrationManager } from './RegistrationManager';
|
|
7
7
|
import { default as UAFactory } from './UAFactory';
|
|
8
8
|
export type TOptionsExtraHeaders = {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { TEvents } from './
|
|
1
|
+
import { TEvents } from './events';
|
|
2
2
|
export declare enum EEvents {
|
|
3
3
|
START_CONNECT = "START_CONNECT",
|
|
4
4
|
START_INIT_UA = "START_INIT_UA",
|
|
@@ -11,13 +11,13 @@ export declare enum EEvents {
|
|
|
11
11
|
}
|
|
12
12
|
type TConnectionMachineEvent = `${EEvents}`;
|
|
13
13
|
export declare enum EState {
|
|
14
|
-
IDLE = "idle",
|
|
15
|
-
CONNECTING = "connecting",
|
|
16
|
-
INITIALIZING = "initializing",
|
|
17
|
-
CONNECTED = "connected",
|
|
18
|
-
REGISTERED = "registered",
|
|
19
|
-
DISCONNECTED = "disconnected",
|
|
20
|
-
FAILED = "failed"
|
|
14
|
+
IDLE = "connection:idle",
|
|
15
|
+
CONNECTING = "connection:connecting",
|
|
16
|
+
INITIALIZING = "connection:initializing",
|
|
17
|
+
CONNECTED = "connection:connected",
|
|
18
|
+
REGISTERED = "connection:registered",
|
|
19
|
+
DISCONNECTED = "connection:disconnected",
|
|
20
|
+
FAILED = "connection:failed"
|
|
21
21
|
}
|
|
22
22
|
export default class ConnectionStateMachine {
|
|
23
23
|
private readonly actor;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { ConnectedEvent, ConnectingEventUA, DisconnectEvent, IncomingMessageEvent, IncomingRequest, OutgoingMessageEvent, RegisteredEvent, RTCSessionEvent, UnRegisteredEvent } from '@krivega/jssip';
|
|
2
1
|
import { TypedEvents } from 'events-constructor';
|
|
2
|
+
import { ConnectedEvent, ConnectingEventUA, DisconnectEvent, IncomingMessageEvent, IncomingRequest, OutgoingMessageEvent, RegisteredEvent, RTCSessionEvent, UnRegisteredEvent } from '@krivega/jssip';
|
|
3
3
|
import { TConnectionConfigurationWithUa, TParametersConnection } from './ConnectionFlow';
|
|
4
4
|
export declare enum EEvent {
|
|
5
5
|
CONNECTING = "connecting",
|
|
@@ -44,3 +44,4 @@ export type TEventMap = {
|
|
|
44
44
|
'connect-parameters-resolve-failed': unknown;
|
|
45
45
|
};
|
|
46
46
|
export type TEvents = TypedEvents<TEventMap>;
|
|
47
|
+
export declare const createEvents: () => TypedEvents<TEventMap, readonly (keyof TEventMap)[]>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export { default as ConnectionManager } from './@ConnectionManager';
|
|
2
|
-
export type { TParametersConnection, TConnectionConfigurationWithUa } from './ConnectionFlow';
|
|
3
|
-
export { EVENT_NAMES as CONNECTION_MANAGER_EVENT_NAMES, EEvent as EConnectionManagerEvent, } from './eventNames';
|
|
4
|
-
export type { TEvent as TConnectionManagerEvent, TEvents as TConnectionManagerEvents, } from './eventNames';
|
|
5
2
|
export { hasNotReadyForConnectionError, createNotReadyForConnectionError } from './utils';
|
|
3
|
+
export { EVENT_NAMES as CONNECTION_MANAGER_EVENT_NAMES, EEvent as EConnectionManagerEvent, createEvents, } from './events';
|
|
4
|
+
export type { TParametersConnection, TConnectionConfigurationWithUa } from './ConnectionFlow';
|
|
5
|
+
export type { TEvent as TConnectionManagerEvent, TEvents as TConnectionManagerEvents, } from './events';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { RTCSession } from '@krivega/jssip';
|
|
2
2
|
import { ConnectionManager } from '../ConnectionManager';
|
|
3
|
-
import { TEventMap, TEvents } from './
|
|
3
|
+
import { TEventMap, TEvents } from './events';
|
|
4
4
|
export default class IncomingCallManager {
|
|
5
5
|
readonly events: TEvents;
|
|
6
6
|
private incomingRTCSession?;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { RTCSession } from '@krivega/jssip';
|
|
2
1
|
import { TypedEvents } from 'events-constructor';
|
|
2
|
+
import { RTCSession } from '@krivega/jssip';
|
|
3
3
|
export declare enum EEvent {
|
|
4
4
|
INCOMING_CALL = "incomingCall",
|
|
5
5
|
DECLINED_INCOMING_CALL = "declinedIncomingCall",
|
|
@@ -26,3 +26,4 @@ export type TEventMap = {
|
|
|
26
26
|
failedIncomingCall: TRemoteCallerData;
|
|
27
27
|
};
|
|
28
28
|
export type TEvents = TypedEvents<TEventMap>;
|
|
29
|
+
export declare const createEvents: () => TypedEvents<TEventMap, readonly (keyof TEventMap)[]>;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { CallManager } from '../CallManager';
|
|
2
|
+
import { StatsManager } from '../StatsManager';
|
|
3
|
+
import { TEventMap, TEvents } from './events';
|
|
4
|
+
declare class MainStreamHealthMonitor {
|
|
5
|
+
readonly events: TEvents;
|
|
6
|
+
private readonly statsManager;
|
|
7
|
+
private readonly callManager;
|
|
8
|
+
constructor(statsManager: StatsManager, callManager: CallManager);
|
|
9
|
+
private get mainVideoTrack();
|
|
10
|
+
private get isMutedMainVideoTrack();
|
|
11
|
+
on<T extends keyof TEventMap>(eventName: T, handler: (data: TEventMap[T]) => void): () => void;
|
|
12
|
+
private readonly handleStatsCollected;
|
|
13
|
+
private readonly hasNoIncomingFrames;
|
|
14
|
+
private subscribe;
|
|
15
|
+
}
|
|
16
|
+
export default MainStreamHealthMonitor;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { TypedEvents } from 'events-constructor';
|
|
2
|
+
export declare const NO_INBOUND_FRAMES_EVENT_NAME: "no-inbound-frames";
|
|
3
|
+
export declare const EVENT_NAMES: readonly ["no-inbound-frames"];
|
|
4
|
+
export type TEventMap = {
|
|
5
|
+
[NO_INBOUND_FRAMES_EVENT_NAME]: Record<string, never>;
|
|
6
|
+
};
|
|
7
|
+
export type TEvents = TypedEvents<TEventMap>;
|
|
8
|
+
export declare const createEvents: () => TypedEvents<TEventMap, readonly "no-inbound-frames"[]>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as MainStreamHealthMonitor } from './@MainStreamHealthMonitor';
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { CallManager } from '../CallManager';
|
|
2
|
+
declare class MainStreamRecovery {
|
|
3
|
+
private readonly renegotiateRequester;
|
|
4
|
+
private readonly renegotiateThrottled;
|
|
5
|
+
private readonly callManager;
|
|
6
|
+
constructor(callManager: CallManager, throttleRecoveryTimeout?: number);
|
|
7
|
+
recover(): void;
|
|
8
|
+
private readonly requestRenegotiate;
|
|
9
|
+
private subscribe;
|
|
10
|
+
private cancel;
|
|
11
|
+
}
|
|
12
|
+
export default MainStreamRecovery;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as MainStreamRecovery } from './@MainStreamRecovery';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { CallManager } from '../CallManager';
|
|
2
|
-
import { TEventMap, TEvents } from './
|
|
2
|
+
import { TEventMap, TEvents } from './events';
|
|
3
3
|
import { TContentHint, TOnAddedTransceiver } from './types';
|
|
4
4
|
export declare const hasCanceledStartPresentationError: (error: unknown) => error is import('repeated-calls').TCanceledError<unknown>;
|
|
5
5
|
declare class PresentationManager {
|
|
@@ -9,7 +9,7 @@ import { StatsManager } from '../StatsManager';
|
|
|
9
9
|
import { VideoSendingBalancerManager } from '../VideoSendingBalancerManager';
|
|
10
10
|
import { TJsSIP } from '../types';
|
|
11
11
|
import { IBalancerOptions } from '../VideoSendingBalancer';
|
|
12
|
-
import { TEventMap, TEvents } from './
|
|
12
|
+
import { TEventMap, TEvents } from './events';
|
|
13
13
|
declare class SipConnector {
|
|
14
14
|
readonly events: TEvents;
|
|
15
15
|
readonly connectionManager: ConnectionManager;
|
|
@@ -21,6 +21,8 @@ declare class SipConnector {
|
|
|
21
21
|
readonly presentationManager: PresentationManager;
|
|
22
22
|
readonly statsManager: StatsManager;
|
|
23
23
|
readonly videoSendingBalancerManager: VideoSendingBalancerManager;
|
|
24
|
+
private readonly mainStreamHealthMonitor;
|
|
25
|
+
private readonly mainStreamRecovery;
|
|
24
26
|
private readonly preferredMimeTypesVideoCodecs?;
|
|
25
27
|
private readonly excludeMimeTypesVideoCodecs?;
|
|
26
28
|
constructor({ JsSIP }: {
|
|
@@ -112,6 +114,7 @@ declare class SipConnector {
|
|
|
112
114
|
private readonly sendOffer;
|
|
113
115
|
private setCodecPreferences;
|
|
114
116
|
private subscribe;
|
|
117
|
+
private subscribeToMainStreamHealthMonitorEvents;
|
|
115
118
|
private readonly bridgeEvents;
|
|
116
119
|
private readonly resolveHandleAddTransceiver;
|
|
117
120
|
}
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import { TypedEvents } from 'events-constructor';
|
|
2
|
-
import { TEventMap as TApiManagerEventMap } from '../ApiManager/
|
|
3
|
-
import { TEventMap as TAutoConnectorManagerEventMap } from '../AutoConnectorManager/
|
|
4
|
-
import { TEventMap as TCallManagerEventMap } from '../CallManager/
|
|
2
|
+
import { TEventMap as TApiManagerEventMap } from '../ApiManager/events';
|
|
3
|
+
import { TEventMap as TAutoConnectorManagerEventMap } from '../AutoConnectorManager/events';
|
|
4
|
+
import { TEventMap as TCallManagerEventMap } from '../CallManager/events';
|
|
5
5
|
import { TConnectionConfigurationWithUa } from '../ConnectionManager';
|
|
6
|
-
import { TEventMap as TConnectionManagerEventMap } from '../ConnectionManager/
|
|
7
|
-
import { TEventMap as TIncomingCallManagerEventMap } from '../IncomingCallManager/
|
|
8
|
-
import { TEventMap as TPresentationManagerEventMap } from '../PresentationManager/
|
|
9
|
-
import { TEventMap as TStatsManagerEventMap } from '../StatsPeerConnection/
|
|
10
|
-
import { TEventMap as TVideoBalancerManagerEventMap } from '../VideoSendingBalancerManager/
|
|
11
|
-
export declare const EVENT_NAMES: readonly [...("auto-connect:before-attempt" | "auto-connect:success" | "auto-connect:failed-all-attempts" | "auto-connect:cancelled-attempts" | "auto-connect:changed-attempt-status" | "auto-connect:stop-attempts-by-error" | "auto-connect:limit-reached-attempts" | "connection:
|
|
6
|
+
import { TEventMap as TConnectionManagerEventMap } from '../ConnectionManager/events';
|
|
7
|
+
import { TEventMap as TIncomingCallManagerEventMap } from '../IncomingCallManager/events';
|
|
8
|
+
import { TEventMap as TPresentationManagerEventMap } from '../PresentationManager/events';
|
|
9
|
+
import { TEventMap as TStatsManagerEventMap } from '../StatsPeerConnection/events';
|
|
10
|
+
import { TEventMap as TVideoBalancerManagerEventMap } from '../VideoSendingBalancerManager/events';
|
|
11
|
+
export declare const EVENT_NAMES: readonly [...("connection:connecting" | "connection:connected" | "connection:registered" | "connection:disconnected" | "auto-connect:before-attempt" | "auto-connect:success" | "auto-connect:failed-all-attempts" | "auto-connect:cancelled-attempts" | "auto-connect:changed-attempt-status" | "auto-connect:stop-attempts-by-error" | "auto-connect:limit-reached-attempts" | "connection:disconnecting" | "connection:newRTCSession" | "connection:unregistered" | "connection:registrationFailed" | "connection:newMessage" | "connection:sipEvent" | "connection:connect-started" | "connection:connect-succeeded" | "connection:connected-with-configuration" | "connection:connect-failed" | "connection:connect-parameters-resolve-success" | "connection:connect-parameters-resolve-failed" | "call:peerconnection" | "call:connecting" | "call:sending" | "call:progress" | "call:accepted" | "call:confirmed" | "call:ended" | "call:failed" | "call:newDTMF" | "call:newInfo" | "call:reinvite" | "call:update" | "call:refer" | "call:replaces" | "call:sdp" | "call:icecandidate" | "call:getusermediafailed" | "call:peerconnection:createofferfailed" | "call:peerconnection:createanswerfailed" | "call:peerconnection:setlocaldescriptionfailed" | "call:peerconnection:setremotedescriptionfailed" | "call:presentation:start" | "call:presentation:started" | "call:presentation:end" | "call:presentation:ended" | "call:presentation:failed" | "call:peerconnection:confirmed" | "call:peerconnection:ontrack" | "call:ended:fromserver" | "call:call-status-changed" | "call:remote-streams-changed" | "api:channels:notify" | "api:participant:added-to-list-moderators" | "api:participant:removed-from-list-moderators" | "api:participant:move-request-to-stream" | "api:participant:move-request-to-participants" | "api:participant:move-request-to-spectators" | "api:participant:move-request-to-spectators-synthetic" | "api:participant:move-request-to-spectators-with-audio-id" | "api:participation:accepting-word-request" | "api:participation:cancelling-word-request" | "api:webcast:started" | "api:webcast:stopped" | "api:account:changed" | "api:account:deleted" | "api:conference:participant-token-issued" | "api:channels" | "api:enterRoom" | "api:shareState" | "api:main-cam-control" | "api:useLicense" | "api:admin-start-main-cam" | "api:admin-stop-main-cam" | "api:admin-start-mic" | "api:admin-stop-mic" | "api:admin-force-sync-media-state" | "api:availableSecondRemoteStream" | "api:notAvailableSecondRemoteStream" | "api:mustStopPresentation" | "api:newDTMF" | "incoming-call:incomingCall" | "incoming-call:declinedIncomingCall" | "incoming-call:terminatedIncomingCall" | "incoming-call:failedIncomingCall" | "presentation:presentation:start" | "presentation:presentation:started" | "presentation:presentation:end" | "presentation:presentation:ended" | "presentation:presentation:failed" | "stats:collected" | "video-balancer:balancing-scheduled" | "video-balancer:balancing-started" | "video-balancer:balancing-stopped" | "video-balancer:parameters-updated")[], "disconnected-from-out-of-call", "connected-with-configuration-from-out-of-call", "stopped-presentation-by-server-command"];
|
|
12
12
|
export type TEvent = (typeof EVENT_NAMES)[number];
|
|
13
13
|
type PrefixedEventMap<T extends Record<string, unknown>, Prefix extends string> = {
|
|
14
14
|
[K in keyof T as `${Prefix}:${string & K}`]: T[K];
|
|
@@ -20,4 +20,5 @@ type TSipConnectorEventMap = {
|
|
|
20
20
|
};
|
|
21
21
|
export type TEventMap = PrefixedEventMap<TAutoConnectorManagerEventMap, 'auto-connect'> & PrefixedEventMap<TConnectionManagerEventMap, 'connection'> & PrefixedEventMap<TCallManagerEventMap, 'call'> & PrefixedEventMap<TApiManagerEventMap, 'api'> & PrefixedEventMap<TIncomingCallManagerEventMap, 'incoming-call'> & PrefixedEventMap<TPresentationManagerEventMap, 'presentation'> & PrefixedEventMap<TStatsManagerEventMap, 'stats'> & PrefixedEventMap<TVideoBalancerManagerEventMap, 'video-balancer'> & TSipConnectorEventMap;
|
|
22
22
|
export type TEvents = TypedEvents<TEventMap>;
|
|
23
|
+
export declare const createEvents: () => TypedEvents<TEventMap, readonly ("connection:connecting" | "connection:connected" | "connection:registered" | "connection:disconnected" | "auto-connect:before-attempt" | "auto-connect:success" | "auto-connect:failed-all-attempts" | "auto-connect:cancelled-attempts" | "auto-connect:changed-attempt-status" | "auto-connect:stop-attempts-by-error" | "auto-connect:limit-reached-attempts" | "connection:disconnecting" | "connection:newRTCSession" | "connection:unregistered" | "connection:registrationFailed" | "connection:newMessage" | "connection:sipEvent" | "connection:connect-started" | "connection:connect-succeeded" | "connection:connected-with-configuration" | "connection:connect-failed" | "connection:connect-parameters-resolve-success" | "connection:connect-parameters-resolve-failed" | "call:peerconnection" | "call:connecting" | "call:sending" | "call:progress" | "call:accepted" | "call:confirmed" | "call:ended" | "call:failed" | "call:newDTMF" | "call:newInfo" | "call:hold" | "call:unhold" | "call:muted" | "call:unmuted" | "call:reinvite" | "call:update" | "call:refer" | "call:replaces" | "call:sdp" | "call:icecandidate" | "call:getusermediafailed" | "call:peerconnection:createofferfailed" | "call:peerconnection:createanswerfailed" | "call:peerconnection:setlocaldescriptionfailed" | "call:peerconnection:setremotedescriptionfailed" | "call:presentation:start" | "call:presentation:started" | "call:presentation:end" | "call:presentation:ended" | "call:presentation:failed" | "call:peerconnection:confirmed" | "call:peerconnection:ontrack" | "call:ended:fromserver" | "call:call-status-changed" | "call:remote-streams-changed" | "api:channels:notify" | "api:participant:added-to-list-moderators" | "api:participant:removed-from-list-moderators" | "api:participant:move-request-to-stream" | "api:participant:move-request-to-participants" | "api:participant:move-request-to-spectators" | "api:participant:move-request-to-spectators-synthetic" | "api:participant:move-request-to-spectators-with-audio-id" | "api:participation:accepting-word-request" | "api:participation:cancelling-word-request" | "api:webcast:started" | "api:webcast:stopped" | "api:account:changed" | "api:account:deleted" | "api:conference:participant-token-issued" | "api:channels" | "api:enterRoom" | "api:shareState" | "api:main-cam-control" | "api:useLicense" | "api:admin-start-main-cam" | "api:admin-stop-main-cam" | "api:admin-start-mic" | "api:admin-stop-mic" | "api:admin-force-sync-media-state" | "api:availableSecondRemoteStream" | "api:notAvailableSecondRemoteStream" | "api:mustStopPresentation" | "api:newDTMF" | "incoming-call:incomingCall" | "incoming-call:declinedIncomingCall" | "incoming-call:terminatedIncomingCall" | "incoming-call:failedIncomingCall" | "presentation:presentation:start" | "presentation:presentation:started" | "presentation:presentation:end" | "presentation:presentation:ended" | "presentation:presentation:failed" | "stats:collected" | "video-balancer:balancing-scheduled" | "video-balancer:balancing-started" | "video-balancer:balancing-stopped" | "video-balancer:parameters-updated" | keyof TSipConnectorEventMap)[]>;
|
|
23
24
|
export {};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export { default as SipConnector } from './@SipConnector';
|
|
2
|
-
export type { TEvent, TEvents } from './
|
|
2
|
+
export type { TEvent, TEvents } from './events';
|
|
@@ -2,16 +2,27 @@ import { StatsPeerConnection, TEventMap } from '../StatsPeerConnection';
|
|
|
2
2
|
import { ApiManager } from '../ApiManager';
|
|
3
3
|
import { CallManager } from '../CallManager';
|
|
4
4
|
declare class StatsManager {
|
|
5
|
-
availableIncomingBitrate: number | undefined;
|
|
6
5
|
readonly statsPeerConnection: StatsPeerConnection;
|
|
6
|
+
private availableStats;
|
|
7
|
+
private previousAvailableStats;
|
|
7
8
|
private readonly callManager;
|
|
8
9
|
private readonly apiManager;
|
|
9
|
-
private previousAvailableIncomingBitrate;
|
|
10
10
|
constructor({ callManager, apiManager, }: {
|
|
11
11
|
callManager: CallManager;
|
|
12
12
|
apiManager: ApiManager;
|
|
13
13
|
});
|
|
14
|
-
get events(): import('../StatsPeerConnection
|
|
14
|
+
get events(): import('../StatsPeerConnection').TEvents;
|
|
15
|
+
get availableIncomingBitrate(): number | undefined;
|
|
16
|
+
get isNotValidFramesStats(): boolean;
|
|
17
|
+
private get previousAvailableIncomingBitrate();
|
|
18
|
+
private get previousInboundRtp();
|
|
19
|
+
private get previousFramesReceived();
|
|
20
|
+
private get previousFramesDecoded();
|
|
21
|
+
private get inboundRtp();
|
|
22
|
+
private get framesReceived();
|
|
23
|
+
private get framesDecoded();
|
|
24
|
+
private get isFramesReceived();
|
|
25
|
+
private get isFramesDecoded();
|
|
15
26
|
on<T extends keyof TEventMap>(eventName: T, handler: (data: TEventMap[T]) => void): () => void;
|
|
16
27
|
once<T extends keyof TEventMap>(eventName: T, handler: (data: TEventMap[T]) => void): () => void;
|
|
17
28
|
onceRace<T extends keyof TEventMap>(eventNames: T[], handler: (data: TEventMap[T], eventName: string) => void): () => void;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export { default as StatsManager } from './@StatsManager';
|
|
2
|
-
export type { TEventMap } from './
|
|
2
|
+
export type { TEventMap } from './events';
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
export { EStatsTypes } from './constants';
|
|
2
|
-
export type { TEventMap } from './eventNames';
|
|
3
1
|
export { default as StatsPeerConnection } from './@StatsPeerConnection';
|
|
4
|
-
export
|
|
2
|
+
export { EStatsTypes } from './constants';
|
|
3
|
+
export { createEvents } from './events';
|
|
5
4
|
export { default as hasAvailableStats } from './utils/hasAvailableStats';
|
|
5
|
+
export type { TEventMap, TEvents } from './events';
|
|
6
|
+
export type { TInboundStats, TOutboundStats, TStats } from './types';
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { EStatsTypes } from './constants';
|
|
2
|
+
import { TEventMap } from './events';
|
|
2
3
|
export type TMedia = {
|
|
3
4
|
trackIdentifier?: string;
|
|
4
5
|
item?: RTCRtpSynchronizationSource;
|
|
@@ -166,3 +167,4 @@ export type TParsedStatistics = {
|
|
|
166
167
|
[EStatsTypes.REMOTE_CANDIDATE]?: TCandidate;
|
|
167
168
|
[EStatsTypes.TRANSPORT]?: RTCTransportStats;
|
|
168
169
|
};
|
|
170
|
+
export type TStats = TEventMap['collected'];
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { ApiManager } from '../ApiManager';
|
|
2
2
|
import { CallManager } from '../CallManager';
|
|
3
3
|
import { IBalancerOptions } from '../VideoSendingBalancer/types';
|
|
4
|
-
import { TEventMap, TEvents } from './
|
|
4
|
+
import { TEventMap, TEvents } from './events';
|
|
5
5
|
type TOptions = IBalancerOptions & {
|
|
6
6
|
balancingStartDelay?: number;
|
|
7
7
|
};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
export { default as VideoSendingBalancerManager } from './@VideoSendingBalancerManager';
|
|
2
|
-
export { EEvent, EVENT_NAMES } from './
|
|
3
|
-
export type { TEvent, TEventMap, TEvents } from './
|
|
2
|
+
export { EEvent, EVENT_NAMES } from './events';
|
|
3
|
+
export type { TEvent, TEventMap, TEvents } from './events';
|