sip-connector 20.4.1 → 20.6.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/README.md +18 -1264
- package/dist/@SipConnector-BVCkiu8l.cjs +1 -0
- package/dist/{@SipConnector-FYEV5h4G.js → @SipConnector-nmoTV9l_.js} +758 -719
- package/dist/ApiManager/events.d.ts +0 -1
- package/dist/ApiManager/index.d.ts +2 -2
- package/dist/AutoConnectorManager/index.d.ts +2 -1
- package/dist/CallManager/CallStateMachine.d.ts +0 -7
- package/dist/CallManager/events.d.ts +3 -3
- package/dist/CallManager/index.d.ts +2 -2
- package/dist/ConferenceStateManager/events.d.ts +0 -1
- package/dist/ConferenceStateManager/index.d.ts +2 -3
- package/dist/ConnectionManager/ConnectionStateMachine.d.ts +20 -17
- package/dist/ConnectionManager/events.d.ts +0 -1
- package/dist/ConnectionManager/index.d.ts +1 -1
- package/dist/IncomingCallManager/@IncomingCallManager.d.ts +1 -1
- package/dist/IncomingCallManager/events.d.ts +3 -4
- package/dist/IncomingCallManager/index.d.ts +2 -2
- package/dist/MainStreamHealthMonitor/index.d.ts +2 -0
- package/dist/PresentationManager/events.d.ts +0 -1
- package/dist/PresentationManager/index.d.ts +2 -1
- package/dist/SessionManager/@SessionManager.d.ts +30 -0
- package/dist/SessionManager/events.d.ts +14 -0
- package/dist/SessionManager/index.d.ts +6 -0
- package/dist/{session → SessionManager}/selectors.d.ts +2 -1
- package/dist/SessionManager/types.d.ts +40 -0
- package/dist/SipConnector/@SipConnector.d.ts +5 -4
- package/dist/SipConnector/events.d.ts +15 -13
- package/dist/SipConnector/index.d.ts +1 -1
- package/dist/SipConnectorFacade/@SipConnectorFacade.d.ts +3 -3
- package/dist/StatsManager/@StatsManager.d.ts +12 -8
- package/dist/StatsManager/constants.d.ts +1 -0
- package/dist/StatsManager/events.d.ts +2 -2
- package/dist/StatsManager/index.d.ts +2 -1
- package/dist/StatsPeerConnection/index.d.ts +2 -2
- package/dist/VideoSendingBalancerManager/events.d.ts +0 -1
- package/dist/VideoSendingBalancerManager/index.d.ts +2 -2
- package/dist/__fixtures__/eventNames.d.ts +1 -1
- package/dist/doMock.cjs +1 -1
- package/dist/doMock.js +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.d.ts +8 -8
- package/dist/index.js +213 -186
- package/package.json +1 -1
- package/dist/@SipConnector-DB4bLDI5.cjs +0 -1
- package/dist/session/createSession.d.ts +0 -26
- package/dist/session/index.d.ts +0 -5
- package/dist/session/types.d.ts +0 -20
|
@@ -33,7 +33,6 @@ export declare enum EEvent {
|
|
|
33
33
|
NEW_DTMF = "newDTMF"
|
|
34
34
|
}
|
|
35
35
|
export declare const EVENT_NAMES: readonly ["participation:accepting-word-request", "participation:cancelling-word-request", "participant:move-request-to-stream", "channels:notify", "conference:participant-token-issued", "account:changed", "account:deleted", "webcast:started", "webcast:stopped", "participant:added-to-list-moderators", "participant:removed-from-list-moderators", "participant:move-request-to-spectators", "participant:move-request-to-spectators-synthetic", "participant:move-request-to-spectators-with-audio-id", "participant:move-request-to-participants", "channels", "enterRoom", "shareState", "main-cam-control", "useLicense", "admin-start-main-cam", "admin-stop-main-cam", "admin-start-mic", "admin-stop-mic", "admin-force-sync-media-state", "availableSecondRemoteStream", "notAvailableSecondRemoteStream", "mustStopPresentation", "newDTMF"];
|
|
36
|
-
export type TEvent = (typeof EVENT_NAMES)[number];
|
|
37
36
|
export type TEventMap = {
|
|
38
37
|
'channels:notify': TChannels;
|
|
39
38
|
'participant:added-to-list-moderators': TParametersModeratorsList;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export { default as ApiManager } from './@ApiManager';
|
|
2
2
|
export { EContentTypeReceived, EContentTypeSent, EEventsMainCAM, EEventsMic, EEventsSyncMediaState, EHeader, EShareState, EUseLicense, } from './constants';
|
|
3
|
-
export {
|
|
4
|
-
export type { TEventMap
|
|
3
|
+
export { EVENT_NAMES as API_MANAGER_EVENT_NAMES } from './events';
|
|
4
|
+
export type { TEventMap as TApiManagerEventMap } from './events';
|
|
5
5
|
export type { TChannels } from './types';
|
|
@@ -1,3 +1,4 @@
|
|
|
1
1
|
export { default as AutoConnectorManager } from './@AutoConnectorManager';
|
|
2
|
-
export {
|
|
2
|
+
export { EVENT_NAMES as AUTO_CONNECTOR_MANAGER_EVENT_NAMES } from './events';
|
|
3
3
|
export type { IAutoConnectorOptions } from './types';
|
|
4
|
+
export type { TEventMap as TAutoConnectorManagerEventMap } from './events';
|
|
@@ -4,7 +4,6 @@ import { TEvents } from './events';
|
|
|
4
4
|
export declare enum EState {
|
|
5
5
|
IDLE = "call:idle",
|
|
6
6
|
CONNECTING = "call:connecting",
|
|
7
|
-
RINGING = "call:ringing",
|
|
8
7
|
ACCEPTED = "call:accepted",
|
|
9
8
|
IN_CALL = "call:inCall",
|
|
10
9
|
ENDED = "call:ended",
|
|
@@ -12,8 +11,6 @@ export declare enum EState {
|
|
|
12
11
|
}
|
|
13
12
|
type TCallEvent = {
|
|
14
13
|
type: 'CALL.CONNECTING';
|
|
15
|
-
} | {
|
|
16
|
-
type: 'CALL.RINGING';
|
|
17
14
|
} | {
|
|
18
15
|
type: 'CALL.ACCEPTED';
|
|
19
16
|
} | {
|
|
@@ -31,8 +28,6 @@ interface ICallContext {
|
|
|
31
28
|
}
|
|
32
29
|
declare const callMachine: import('xstate').StateMachine<ICallContext, {
|
|
33
30
|
type: "CALL.CONNECTING";
|
|
34
|
-
} | {
|
|
35
|
-
type: "CALL.RINGING";
|
|
36
31
|
} | {
|
|
37
32
|
type: "CALL.ACCEPTED";
|
|
38
33
|
} | {
|
|
@@ -55,7 +50,6 @@ declare const callMachine: import('xstate').StateMachine<ICallContext, {
|
|
|
55
50
|
states: {
|
|
56
51
|
readonly "call:idle": {};
|
|
57
52
|
readonly "call:connecting": {};
|
|
58
|
-
readonly "call:ringing": {};
|
|
59
53
|
readonly "call:accepted": {};
|
|
60
54
|
readonly "call:inCall": {};
|
|
61
55
|
readonly "call:ended": {};
|
|
@@ -68,7 +62,6 @@ export declare class CallStateMachine extends BaseStateMachine<typeof callMachin
|
|
|
68
62
|
constructor(events: TEvents);
|
|
69
63
|
get isIdle(): boolean;
|
|
70
64
|
get isConnecting(): boolean;
|
|
71
|
-
get isRinging(): boolean;
|
|
72
65
|
get isAccepted(): boolean;
|
|
73
66
|
get isInCall(): boolean;
|
|
74
67
|
get isEnded(): boolean;
|
|
@@ -42,9 +42,9 @@ export declare enum Originator {
|
|
|
42
42
|
REMOTE = "remote",
|
|
43
43
|
SYSTEM = "system"
|
|
44
44
|
}
|
|
45
|
-
export declare const SESSION_JSSIP_EVENT_NAMES: readonly ["peerconnection", "connecting", "sending", "progress", "accepted", "confirmed", "ended", "failed", "newInfo", "newDTMF", "presentation:start", "presentation:started", "presentation:end", "presentation:ended", "presentation:failed", "reinvite", "update", "refer", "replaces", "sdp", "icecandidate", "getusermediafailed", "peerconnection:createofferfailed", "peerconnection:createanswerfailed", "peerconnection:setlocaldescriptionfailed", "peerconnection:setremotedescriptionfailed"];
|
|
46
|
-
export declare const EVENT_NAMES: readonly ["peerconnection", "connecting", "sending", "progress", "accepted", "confirmed", "ended", "failed", "newInfo", "newDTMF", "presentation:start", "presentation:started", "presentation:end", "presentation:ended", "presentation:failed", "reinvite", "update", "refer", "replaces", "sdp", "icecandidate", "getusermediafailed", "peerconnection:createofferfailed", "peerconnection:createanswerfailed", "peerconnection:setlocaldescriptionfailed", "peerconnection:setremotedescriptionfailed", "peerconnection:confirmed", "peerconnection:ontrack", "ended:fromserver", "call-status-changed", "remote-streams-changed"];
|
|
47
|
-
export type
|
|
45
|
+
export declare const SESSION_JSSIP_EVENT_NAMES: readonly ["peerconnection", "connecting", "sending", "progress", "accepted", "confirmed", "ended", "failed", "hold", "unhold", "muted", "unmuted", "newInfo", "newDTMF", "presentation:start", "presentation:started", "presentation:end", "presentation:ended", "presentation:failed", "reinvite", "update", "refer", "replaces", "sdp", "icecandidate", "getusermediafailed", "peerconnection:createofferfailed", "peerconnection:createanswerfailed", "peerconnection:setlocaldescriptionfailed", "peerconnection:setremotedescriptionfailed"];
|
|
46
|
+
export declare const EVENT_NAMES: readonly ["peerconnection", "connecting", "sending", "progress", "accepted", "confirmed", "ended", "failed", "hold", "unhold", "muted", "unmuted", "newInfo", "newDTMF", "presentation:start", "presentation:started", "presentation:end", "presentation:ended", "presentation:failed", "reinvite", "update", "refer", "replaces", "sdp", "icecandidate", "getusermediafailed", "peerconnection:createofferfailed", "peerconnection:createanswerfailed", "peerconnection:setlocaldescriptionfailed", "peerconnection:setremotedescriptionfailed", "peerconnection:confirmed", "peerconnection:ontrack", "ended:fromserver", "call-status-changed", "remote-streams-changed"];
|
|
47
|
+
export type TEventName = (typeof EVENT_NAMES)[number];
|
|
48
48
|
export type TEventMap = {
|
|
49
49
|
peerconnection: {
|
|
50
50
|
peerconnection: RTCPeerConnection;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export { default as CallManager } from './@CallManager';
|
|
2
2
|
export { ECallCause } from './causes';
|
|
3
|
-
export { EEvent as ECallEvent, createEvents } from './events';
|
|
3
|
+
export { EEvent as ECallEvent, createEvents, EVENT_NAMES as CALL_MANAGER_EVENT_NAMES, } from './events';
|
|
4
4
|
export { default as hasCanceledCallError } from './hasCanceledCallError';
|
|
5
5
|
export type { TCustomError, TGetUri } from './types';
|
|
6
|
-
export type { TEventMap
|
|
6
|
+
export type { TEventMap as TCallManagerEventMap, TEvents as TCallEvents } from './events';
|
|
@@ -5,7 +5,6 @@ export declare enum EEvent {
|
|
|
5
5
|
STATE_RESET = "state-reset"
|
|
6
6
|
}
|
|
7
7
|
export declare const EVENT_NAMES: readonly ["state-changed", "state-reset"];
|
|
8
|
-
export type TEvent = (typeof EVENT_NAMES)[number];
|
|
9
8
|
export type TEventMap = {
|
|
10
9
|
'state-changed': {
|
|
11
10
|
previous: TConferenceState;
|
|
@@ -1,4 +1,3 @@
|
|
|
1
1
|
export { default as ConferenceStateManager } from './@ConferenceStateManager';
|
|
2
|
-
export {
|
|
3
|
-
export type {
|
|
4
|
-
export type { TEventMap, TEvents } from './events';
|
|
2
|
+
export { EVENT_NAMES as CONFERENCE_STATE_MANAGER_EVENT_NAMES } from './events';
|
|
3
|
+
export type { TEventMap as TConferenceStateManagerEventMap } from './events';
|
|
@@ -1,6 +1,22 @@
|
|
|
1
1
|
import { BaseStateMachine } from '../tools/BaseStateMachine';
|
|
2
2
|
import { ActorRefFrom, SnapshotFrom } from 'xstate';
|
|
3
3
|
import { TEvents } from './events';
|
|
4
|
+
export declare enum EState {
|
|
5
|
+
IDLE = "connection:idle",
|
|
6
|
+
PREPARING = "connection:preparing",
|
|
7
|
+
CONNECTING = "connection:connecting",
|
|
8
|
+
CONNECTED = "connection:connected",
|
|
9
|
+
REGISTERED = "connection:registered",
|
|
10
|
+
ESTABLISHED = "connection:established",
|
|
11
|
+
DISCONNECTED = "connection:disconnected",
|
|
12
|
+
FAILED = "connection:failed"
|
|
13
|
+
}
|
|
14
|
+
declare enum EAction {
|
|
15
|
+
LOG_TRANSITION = "logTransition",
|
|
16
|
+
LOG_STATE_CHANGE = "logStateChange",
|
|
17
|
+
SET_ERROR = "setError",
|
|
18
|
+
CLEAR_ERROR = "clearError"
|
|
19
|
+
}
|
|
4
20
|
export declare enum EEvents {
|
|
5
21
|
START_CONNECT = "START_CONNECT",
|
|
6
22
|
START_INIT_UA = "START_INIT_UA",
|
|
@@ -19,21 +35,6 @@ type TConnectionFailedEvent = {
|
|
|
19
35
|
interface IConnectionMachineContext {
|
|
20
36
|
error?: Error;
|
|
21
37
|
}
|
|
22
|
-
export declare enum EState {
|
|
23
|
-
IDLE = "connection:idle",
|
|
24
|
-
CONNECTING = "connection:connecting",
|
|
25
|
-
INITIALIZING = "connection:initializing",
|
|
26
|
-
CONNECTED = "connection:connected",
|
|
27
|
-
REGISTERED = "connection:registered",
|
|
28
|
-
DISCONNECTED = "connection:disconnected",
|
|
29
|
-
FAILED = "connection:failed"
|
|
30
|
-
}
|
|
31
|
-
declare enum EAction {
|
|
32
|
-
LOG_TRANSITION = "logTransition",
|
|
33
|
-
LOG_STATE_CHANGE = "logStateChange",
|
|
34
|
-
SET_ERROR = "setError",
|
|
35
|
-
CLEAR_ERROR = "clearError"
|
|
36
|
-
}
|
|
37
38
|
declare const connectionMachine: import('xstate').StateMachine<IConnectionMachineContext, TConnectionFailedEvent | {
|
|
38
39
|
type: TConnectionMachineEvent;
|
|
39
40
|
}, {}, never, {
|
|
@@ -58,10 +59,11 @@ declare const connectionMachine: import('xstate').StateMachine<IConnectionMachin
|
|
|
58
59
|
id: "connection";
|
|
59
60
|
states: {
|
|
60
61
|
readonly "connection:idle": {};
|
|
62
|
+
readonly "connection:preparing": {};
|
|
61
63
|
readonly "connection:connecting": {};
|
|
62
|
-
readonly "connection:initializing": {};
|
|
63
64
|
readonly "connection:connected": {};
|
|
64
65
|
readonly "connection:registered": {};
|
|
66
|
+
readonly "connection:established": {};
|
|
65
67
|
readonly "connection:disconnected": {};
|
|
66
68
|
readonly "connection:failed": {};
|
|
67
69
|
};
|
|
@@ -74,10 +76,11 @@ export default class ConnectionStateMachine extends BaseStateMachine<typeof conn
|
|
|
74
76
|
private unsubscribeFromEvents?;
|
|
75
77
|
constructor(events: TEvents);
|
|
76
78
|
get isIdle(): boolean;
|
|
79
|
+
get isPreparing(): boolean;
|
|
77
80
|
get isConnecting(): boolean;
|
|
78
|
-
get isInitializing(): boolean;
|
|
79
81
|
get isConnected(): boolean;
|
|
80
82
|
get isRegistered(): boolean;
|
|
83
|
+
get isEstablished(): boolean;
|
|
81
84
|
get isDisconnected(): boolean;
|
|
82
85
|
get isFailed(): boolean;
|
|
83
86
|
get error(): Error | undefined;
|
|
@@ -21,7 +21,6 @@ export declare enum EEvent {
|
|
|
21
21
|
}
|
|
22
22
|
export declare const UA_EVENT_NAMES: readonly ["connecting", "connected", "disconnected", "newRTCSession", "registered", "unregistered", "registrationFailed", "newMessage", "sipEvent"];
|
|
23
23
|
export declare const EVENT_NAMES: readonly ["connecting", "connected", "disconnected", "newRTCSession", "registered", "unregistered", "registrationFailed", "newMessage", "sipEvent", "disconnecting", "connect-started", "connect-succeeded", "connect-failed", "connect-parameters-resolve-success", "connect-parameters-resolve-failed", "connected-with-configuration"];
|
|
24
|
-
export type TEvent = (typeof EVENT_NAMES)[number];
|
|
25
24
|
export type TEventMap = {
|
|
26
25
|
connecting: ConnectingEventUA;
|
|
27
26
|
connected: ConnectedEvent;
|
|
@@ -2,4 +2,4 @@ export { default as ConnectionManager } from './@ConnectionManager';
|
|
|
2
2
|
export { hasNotReadyForConnectionError, createNotReadyForConnectionError } from './utils';
|
|
3
3
|
export { EVENT_NAMES as CONNECTION_MANAGER_EVENT_NAMES, EEvent as EConnectionManagerEvent, createEvents, } from './events';
|
|
4
4
|
export type { TParametersConnection, TConnectionConfigurationWithUa } from './ConnectionFlow';
|
|
5
|
-
export type {
|
|
5
|
+
export type { TEvents as TConnectionManagerEvents, TEventMap as TConnectionManagerEventMap, } from './events';
|
|
@@ -9,7 +9,7 @@ export default class IncomingCallManager {
|
|
|
9
9
|
private readonly connectionManager;
|
|
10
10
|
constructor(connectionManager: ConnectionManager);
|
|
11
11
|
get incomingActor(): TIncomingActor;
|
|
12
|
-
get remoteCallerData(): TEventMap['
|
|
12
|
+
get remoteCallerData(): TEventMap['ringing'];
|
|
13
13
|
get isAvailableIncomingCall(): boolean;
|
|
14
14
|
start(): void;
|
|
15
15
|
stop(): void;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { TypedEvents } from 'events-constructor';
|
|
2
2
|
import { RTCSession } from '@krivega/jssip';
|
|
3
3
|
export declare enum EEvent {
|
|
4
|
-
|
|
4
|
+
RINGING = "ringing",
|
|
5
5
|
DECLINED_INCOMING_CALL = "declinedIncomingCall",
|
|
6
6
|
TERMINATED_INCOMING_CALL = "terminatedIncomingCall",
|
|
7
7
|
FAILED_INCOMING_CALL = "failedIncomingCall"
|
|
@@ -11,8 +11,7 @@ export declare enum Originator {
|
|
|
11
11
|
REMOTE = "remote",
|
|
12
12
|
SYSTEM = "system"
|
|
13
13
|
}
|
|
14
|
-
export declare const EVENT_NAMES: readonly ["
|
|
15
|
-
export type TEvent = (typeof EVENT_NAMES)[number];
|
|
14
|
+
export declare const EVENT_NAMES: readonly ["ringing", "declinedIncomingCall", "terminatedIncomingCall", "failedIncomingCall"];
|
|
16
15
|
export type TRemoteCallerData = {
|
|
17
16
|
displayName?: string;
|
|
18
17
|
host?: string;
|
|
@@ -20,7 +19,7 @@ export type TRemoteCallerData = {
|
|
|
20
19
|
rtcSession?: RTCSession;
|
|
21
20
|
};
|
|
22
21
|
export type TEventMap = {
|
|
23
|
-
|
|
22
|
+
ringing: TRemoteCallerData;
|
|
24
23
|
declinedIncomingCall: TRemoteCallerData;
|
|
25
24
|
terminatedIncomingCall: TRemoteCallerData;
|
|
26
25
|
failedIncomingCall: TRemoteCallerData;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
export { default as IncomingCallManager } from './@IncomingCallManager';
|
|
2
|
-
export { createEvents } from './events';
|
|
3
|
-
export type {
|
|
2
|
+
export { createEvents, EVENT_NAMES as INCOMING_CALL_MANAGER_EVENT_NAMES } from './events';
|
|
3
|
+
export type { TRemoteCallerData, TEventMap as TIncomingCallManagerEventMap } from './events';
|
|
@@ -7,7 +7,6 @@ export declare enum EEvent {
|
|
|
7
7
|
FAILED_PRESENTATION = "presentation:failed"
|
|
8
8
|
}
|
|
9
9
|
export declare const EVENT_NAMES: readonly ["presentation:start", "presentation:started", "presentation:end", "presentation:ended", "presentation:failed"];
|
|
10
|
-
export type TEvent = (typeof EVENT_NAMES)[number];
|
|
11
10
|
export type TEventMap = {
|
|
12
11
|
'presentation:start': MediaStream;
|
|
13
12
|
'presentation:started': MediaStream;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
1
|
export { hasCanceledStartPresentationError, default as PresentationManager, } from './@PresentationManager';
|
|
2
|
-
export {
|
|
2
|
+
export { EVENT_NAMES as PRESENTATION_MANAGER_EVENT_NAMES } from './events';
|
|
3
|
+
export type { TEventMap as TPresentationManagerEventMap } from './events';
|
|
3
4
|
export type { TContentHint, TOnAddedTransceiver } from './types';
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { CallManager } from '../CallManager';
|
|
2
|
+
import { ConnectionManager } from '../ConnectionManager';
|
|
3
|
+
import { IncomingCallManager } from '../IncomingCallManager';
|
|
4
|
+
import { PresentationManager } from '../PresentationManager';
|
|
5
|
+
import { TEventMap, TEvents } from './events';
|
|
6
|
+
import { TSessionActors, TSessionSnapshot } from './types';
|
|
7
|
+
type TEqualityFunction<T> = (previous: T, next: T) => boolean;
|
|
8
|
+
type TSelector<T> = (snapshot: TSessionSnapshot) => T;
|
|
9
|
+
type TSessionManagerDeps = {
|
|
10
|
+
connectionManager: Pick<ConnectionManager, 'connectionActor'>;
|
|
11
|
+
callManager: Pick<CallManager, 'callActor'>;
|
|
12
|
+
incomingCallManager: Pick<IncomingCallManager, 'incomingActor'>;
|
|
13
|
+
presentationManager: Pick<PresentationManager, 'presentationActor'>;
|
|
14
|
+
};
|
|
15
|
+
declare class SessionManager {
|
|
16
|
+
readonly events: TEvents;
|
|
17
|
+
readonly actors: TSessionActors;
|
|
18
|
+
private currentSnapshot;
|
|
19
|
+
private readonly subscribers;
|
|
20
|
+
private readonly actorSubscriptions;
|
|
21
|
+
constructor(deps: TSessionManagerDeps);
|
|
22
|
+
getSnapshot(): TSessionSnapshot;
|
|
23
|
+
subscribe(listener: (snapshot: TSessionSnapshot) => void): () => void;
|
|
24
|
+
subscribe<T>(selector: TSelector<T>, listener: (value: T) => void, equals?: TEqualityFunction<T>): () => void;
|
|
25
|
+
stop(): void;
|
|
26
|
+
on<T extends keyof TEventMap>(eventName: T, handler: (data: TEventMap[T]) => void): () => void;
|
|
27
|
+
off<T extends keyof TEventMap>(eventName: T, handler: (data: TEventMap[T]) => void): void;
|
|
28
|
+
private readonly notifySubscribers;
|
|
29
|
+
}
|
|
30
|
+
export default SessionManager;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { TypedEvents } from 'events-constructor';
|
|
2
|
+
import { TSessionSnapshot } from './types';
|
|
3
|
+
export declare enum EEvent {
|
|
4
|
+
SNAPSHOT_CHANGED = "snapshot-changed"
|
|
5
|
+
}
|
|
6
|
+
export declare const EVENT_NAMES: readonly ["snapshot-changed"];
|
|
7
|
+
export type TEventMap = {
|
|
8
|
+
'snapshot-changed': {
|
|
9
|
+
previous: TSessionSnapshot;
|
|
10
|
+
current: TSessionSnapshot;
|
|
11
|
+
};
|
|
12
|
+
};
|
|
13
|
+
export type TEvents = TypedEvents<TEventMap>;
|
|
14
|
+
export declare const createEvents: () => TypedEvents<TEventMap, readonly "snapshot-changed"[]>;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export { default as SessionManager } from './@SessionManager';
|
|
2
|
+
export { EVENT_NAMES as SESSION_MANAGER_EVENT_NAMES } from './events';
|
|
3
|
+
export { sessionSelectors } from './selectors';
|
|
4
|
+
export { ECallStatus, EConnectionStatus, EIncomingStatus, EPresentationStatus, ESystemStatus, } from './types';
|
|
5
|
+
export type { TEventMap as TSessionManagerEventMap } from './events';
|
|
6
|
+
export type { TSessionActors, TSessionSnapshot } from './types';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { EIncomingStatus, ECallStatus, EConnectionStatus, EPresentationStatus, TSessionSnapshot } from './types';
|
|
1
|
+
import { EIncomingStatus, ECallStatus, ESystemStatus, EConnectionStatus, EPresentationStatus, TSessionSnapshot } from './types';
|
|
2
2
|
import { TRemoteCallerData } from '../IncomingCallManager';
|
|
3
3
|
export declare const sessionSelectors: {
|
|
4
4
|
selectConnectionStatus: (snapshot: TSessionSnapshot) => EConnectionStatus;
|
|
@@ -7,4 +7,5 @@ export declare const sessionSelectors: {
|
|
|
7
7
|
selectIncomingRemoteCaller: (snapshot: TSessionSnapshot) => TRemoteCallerData | undefined;
|
|
8
8
|
selectPresentationStatus: (snapshot: TSessionSnapshot) => EPresentationStatus;
|
|
9
9
|
selectIsInCall: (snapshot: TSessionSnapshot) => boolean;
|
|
10
|
+
selectSystemStatus: (snapshot: TSessionSnapshot) => ESystemStatus;
|
|
10
11
|
};
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { TCallActor, TCallSnapshot } from '../CallManager/CallStateMachine';
|
|
2
|
+
import { TConnectionActor, TConnectionSnapshot } from '../ConnectionManager/ConnectionStateMachine';
|
|
3
|
+
import { TIncomingActor, TIncomingSnapshot } from '../IncomingCallManager/IncomingCallStateMachine';
|
|
4
|
+
import { TPresentationActor, TPresentationSnapshot } from '../PresentationManager/PresentationStateMachine';
|
|
5
|
+
export type TSessionSnapshot = {
|
|
6
|
+
connection: TConnectionSnapshot;
|
|
7
|
+
call: TCallSnapshot;
|
|
8
|
+
incoming: TIncomingSnapshot;
|
|
9
|
+
presentation: TPresentationSnapshot;
|
|
10
|
+
};
|
|
11
|
+
export type TSessionActors = {
|
|
12
|
+
connection: TConnectionActor;
|
|
13
|
+
call: TCallActor;
|
|
14
|
+
incoming: TIncomingActor;
|
|
15
|
+
presentation: TPresentationActor;
|
|
16
|
+
};
|
|
17
|
+
export { EState as ECallStatus } from '../CallManager/CallStateMachine';
|
|
18
|
+
export { EState as EIncomingStatus } from '../IncomingCallManager/IncomingCallStateMachine';
|
|
19
|
+
export { EState as EPresentationStatus } from '../PresentationManager/PresentationStateMachine';
|
|
20
|
+
export { EState as EConnectionStatus } from '../ConnectionManager/ConnectionStateMachine';
|
|
21
|
+
/**
|
|
22
|
+
* Комбинированное состояние системы, объединяющее состояния Connection и Call
|
|
23
|
+
* для однозначного определения текущего состояния системы клиентом
|
|
24
|
+
*/
|
|
25
|
+
export declare enum ESystemStatus {
|
|
26
|
+
/** Система не инициализирована, соединение не установлено */
|
|
27
|
+
DISCONNECTED = "system:disconnected",
|
|
28
|
+
/** Идет процесс подключения (preparing, connecting, connected, registered) */
|
|
29
|
+
CONNECTING = "system:connecting",
|
|
30
|
+
/** Соединение установлено, готово к звонкам, но звонок не активен */
|
|
31
|
+
READY_TO_CALL = "system:readyToCall",
|
|
32
|
+
/** Идет установка звонка (connection established, call connecting) */
|
|
33
|
+
CALL_CONNECTING = "system:callConnecting",
|
|
34
|
+
/** Звонок активен (connection established, call accepted/inCall) */
|
|
35
|
+
CALL_ACTIVE = "system:callActive",
|
|
36
|
+
/** Ошибка соединения (connection failed) */
|
|
37
|
+
CONNECTION_FAILED = "system:connectionFailed",
|
|
38
|
+
/** Ошибка звонка (connection established, call failed) */
|
|
39
|
+
CALL_FAILED = "system:callFailed"
|
|
40
|
+
}
|
|
@@ -6,9 +6,10 @@ import { ConnectionManager } from '../ConnectionManager';
|
|
|
6
6
|
import { ConnectionQueueManager } from '../ConnectionQueueManager';
|
|
7
7
|
import { IncomingCallManager } from '../IncomingCallManager';
|
|
8
8
|
import { PresentationManager, TContentHint, TOnAddedTransceiver } from '../PresentationManager';
|
|
9
|
+
import { SessionManager } from '../SessionManager';
|
|
9
10
|
import { StatsManager } from '../StatsManager';
|
|
10
11
|
import { VideoSendingBalancerManager } from '../VideoSendingBalancerManager';
|
|
11
|
-
import {
|
|
12
|
+
import { MainStreamHealthMonitor } from '../MainStreamHealthMonitor';
|
|
12
13
|
import { TJsSIP } from '../types';
|
|
13
14
|
import { IBalancerOptions } from '../VideoSendingBalancer';
|
|
14
15
|
import { TEventMap, TEvents } from './events';
|
|
@@ -24,8 +25,8 @@ declare class SipConnector {
|
|
|
24
25
|
readonly presentationManager: PresentationManager;
|
|
25
26
|
readonly statsManager: StatsManager;
|
|
26
27
|
readonly videoSendingBalancerManager: VideoSendingBalancerManager;
|
|
27
|
-
readonly
|
|
28
|
-
|
|
28
|
+
readonly sessionManager: SessionManager;
|
|
29
|
+
readonly mainStreamHealthMonitor: MainStreamHealthMonitor;
|
|
29
30
|
private readonly mainStreamRecovery;
|
|
30
31
|
private readonly preferredMimeTypesVideoCodecs?;
|
|
31
32
|
private readonly excludeMimeTypesVideoCodecs?;
|
|
@@ -40,7 +41,7 @@ declare class SipConnector {
|
|
|
40
41
|
get requestedConnection(): boolean;
|
|
41
42
|
get isPendingConnect(): boolean;
|
|
42
43
|
get isPendingInitUa(): boolean;
|
|
43
|
-
get connectionState(): import('../
|
|
44
|
+
get connectionState(): import('../SessionManager').EConnectionStatus;
|
|
44
45
|
get isRegistered(): boolean;
|
|
45
46
|
get isRegisterConfig(): boolean;
|
|
46
47
|
get socket(): import('@krivega/jssip').WebSocketInterface | undefined;
|
|
@@ -1,15 +1,17 @@
|
|
|
1
1
|
import { TypedEvents } from 'events-constructor';
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
|
|
12
|
-
|
|
2
|
+
import { TApiManagerEventMap } from '../ApiManager';
|
|
3
|
+
import { TAutoConnectorManagerEventMap } from '../AutoConnectorManager';
|
|
4
|
+
import { TCallManagerEventMap } from '../CallManager';
|
|
5
|
+
import { TConferenceStateManagerEventMap } from '../ConferenceStateManager';
|
|
6
|
+
import { TConnectionConfigurationWithUa, TConnectionManagerEventMap } from '../ConnectionManager';
|
|
7
|
+
import { TIncomingCallManagerEventMap } from '../IncomingCallManager';
|
|
8
|
+
import { TMainStreamHealthMonitorEventMap } from '../MainStreamHealthMonitor';
|
|
9
|
+
import { TPresentationManagerEventMap } from '../PresentationManager';
|
|
10
|
+
import { TSessionManagerEventMap } from '../SessionManager';
|
|
11
|
+
import { TStatsManagerEventMap } from '../StatsManager';
|
|
12
|
+
import { TVideoSendingBalancerManagerEventMap } from '../VideoSendingBalancerManager';
|
|
13
|
+
export declare const EVENT_NAMES: readonly [...("call:connecting" | "call:accepted" | "call:ended" | "call:failed" | "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:sending" | "call:progress" | "call:confirmed" | "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" | "conference-state:state-changed" | "conference-state:state-reset" | "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:ringing" | "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" | "main-stream-health:no-inbound-frames" | "session:snapshot-changed")[], "disconnected-from-out-of-call", "connected-with-configuration-from-out-of-call", "stopped-presentation-by-server-command"];
|
|
14
|
+
export type TEventName = (typeof EVENT_NAMES)[number];
|
|
13
15
|
type PrefixedEventMap<T extends Record<string, unknown>, Prefix extends string> = {
|
|
14
16
|
[K in keyof T as `${Prefix}:${string & K}`]: T[K];
|
|
15
17
|
};
|
|
@@ -18,7 +20,7 @@ type TSipConnectorEventMap = {
|
|
|
18
20
|
'connected-with-configuration-from-out-of-call': TConnectionConfigurationWithUa;
|
|
19
21
|
'stopped-presentation-by-server-command': Record<string, never>;
|
|
20
22
|
};
|
|
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<
|
|
23
|
+
export type TEventMap = PrefixedEventMap<TAutoConnectorManagerEventMap, 'auto-connect'> & PrefixedEventMap<TConnectionManagerEventMap, 'connection'> & PrefixedEventMap<TCallManagerEventMap, 'call'> & PrefixedEventMap<TConferenceStateManagerEventMap, 'conference-state'> & PrefixedEventMap<TApiManagerEventMap, 'api'> & PrefixedEventMap<TIncomingCallManagerEventMap, 'incoming-call'> & PrefixedEventMap<TPresentationManagerEventMap, 'presentation'> & PrefixedEventMap<TStatsManagerEventMap, 'stats'> & PrefixedEventMap<TVideoSendingBalancerManagerEventMap, 'video-balancer'> & PrefixedEventMap<TMainStreamHealthMonitorEventMap, 'main-stream-health'> & PrefixedEventMap<TSessionManagerEventMap, 'session'> & TSipConnectorEventMap;
|
|
22
24
|
export type TEvents = TypedEvents<TEventMap>;
|
|
23
|
-
export declare const createEvents: () => TypedEvents<TEventMap, readonly ("call:connecting" | "call:accepted" | "call:ended" | "call:failed" | "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:sending" | "call:progress" | "call:confirmed" | "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:
|
|
25
|
+
export declare const createEvents: () => TypedEvents<TEventMap, readonly ("call:connecting" | "call:accepted" | "call:ended" | "call:failed" | "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:sending" | "call:progress" | "call:confirmed" | "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" | "conference-state:state-changed" | "conference-state:state-reset" | "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:ringing" | "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" | "main-stream-health:no-inbound-frames" | "session:snapshot-changed" | keyof TSipConnectorEventMap)[]>;
|
|
24
26
|
export {};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export { default as SipConnector } from './@SipConnector';
|
|
2
|
-
export type {
|
|
2
|
+
export type { TEvents } from './events';
|
|
@@ -3,7 +3,7 @@ import { TOnAddedTransceiver } from '../CallManager/types';
|
|
|
3
3
|
import { TParametersConnection, TConnectionConfigurationWithUa } from '../ConnectionManager';
|
|
4
4
|
import { TContentHint } from '../PresentationManager';
|
|
5
5
|
import { SipConnector } from '../SipConnector';
|
|
6
|
-
import {
|
|
6
|
+
import { TStatsManagerEventMap } from '../StatsManager';
|
|
7
7
|
type TEnterRoomHandlers = {
|
|
8
8
|
onEnterPurgatory?: () => void;
|
|
9
9
|
onEnterConference?: (parameters_: {
|
|
@@ -167,7 +167,7 @@ declare class SipConnectorFacade implements IProxyMethods {
|
|
|
167
167
|
onMustStopPresentation: (handler: () => void) => (() => void);
|
|
168
168
|
onMoveToSpectators: (handler: () => void) => (() => void);
|
|
169
169
|
onMoveToParticipants: (handler: () => void) => (() => void);
|
|
170
|
-
onStats: (handler: (data:
|
|
171
|
-
offStats: (handler: (data:
|
|
170
|
+
onStats: (handler: (data: TStatsManagerEventMap["collected"]) => void) => (() => void);
|
|
171
|
+
offStats: (handler: (data: TStatsManagerEventMap["collected"]) => void) => void;
|
|
172
172
|
}
|
|
173
173
|
export default SipConnectorFacade;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { StatsPeerConnection,
|
|
1
|
+
import { StatsPeerConnection, TStatsPeerConnectionEventMap } from '../StatsPeerConnection';
|
|
2
2
|
import { ApiManager } from '../ApiManager';
|
|
3
3
|
import { CallManager } from '../CallManager';
|
|
4
4
|
declare class StatsManager {
|
|
@@ -11,9 +11,10 @@ declare class StatsManager {
|
|
|
11
11
|
callManager: CallManager;
|
|
12
12
|
apiManager: ApiManager;
|
|
13
13
|
});
|
|
14
|
-
get events(): import('../StatsPeerConnection').
|
|
14
|
+
get events(): import('../StatsPeerConnection').TStatsPeerConnectionEvents;
|
|
15
15
|
get availableIncomingBitrate(): number | undefined;
|
|
16
|
-
get
|
|
16
|
+
get isInvalidInboundFrames(): boolean;
|
|
17
|
+
private get isEmptyInboundFrames();
|
|
17
18
|
private get previousAvailableIncomingBitrate();
|
|
18
19
|
private get previousInboundRtp();
|
|
19
20
|
private get previousFramesReceived();
|
|
@@ -23,11 +24,14 @@ declare class StatsManager {
|
|
|
23
24
|
private get framesDecoded();
|
|
24
25
|
private get isFramesReceived();
|
|
25
26
|
private get isFramesDecoded();
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
27
|
+
private get packetsReceived();
|
|
28
|
+
private get previousPacketsReceived();
|
|
29
|
+
private get isReceivingPackets();
|
|
30
|
+
on<T extends keyof TStatsPeerConnectionEventMap>(eventName: T, handler: (data: TStatsPeerConnectionEventMap[T]) => void): () => void;
|
|
31
|
+
once<T extends keyof TStatsPeerConnectionEventMap>(eventName: T, handler: (data: TStatsPeerConnectionEventMap[T]) => void): () => void;
|
|
32
|
+
onceRace<T extends keyof TStatsPeerConnectionEventMap>(eventNames: T[], handler: (data: TStatsPeerConnectionEventMap[T], eventName: string) => void): () => void;
|
|
33
|
+
wait<T extends keyof TStatsPeerConnectionEventMap>(eventName: T): Promise<TStatsPeerConnectionEventMap[T]>;
|
|
34
|
+
off<T extends keyof TStatsPeerConnectionEventMap>(eventName: T, handler: (data: TStatsPeerConnectionEventMap[T]) => void): void;
|
|
31
35
|
hasAvailableIncomingBitrateChangedQuarter(): boolean;
|
|
32
36
|
private subscribe;
|
|
33
37
|
private readonly handleStatsCollected;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const MIN_RECEIVED_MAIN_STREAM_PACKETS = 500;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export
|
|
2
|
-
export {
|
|
1
|
+
export { STATS_PEER_CONNECTION_EVENT_NAMES as EVENT_NAMES } from '../StatsPeerConnection';
|
|
2
|
+
export type { TStatsPeerConnectionEventMap as TEventMap } from '../StatsPeerConnection';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export { default as StatsPeerConnection } from './@StatsPeerConnection';
|
|
2
2
|
export { EStatsTypes } from './constants';
|
|
3
|
-
export { createEvents } from './events';
|
|
3
|
+
export { createEvents, EVENT_NAMES as STATS_PEER_CONNECTION_EVENT_NAMES } from './events';
|
|
4
4
|
export { default as hasAvailableStats } from './utils/hasAvailableStats';
|
|
5
|
-
export type { TEventMap, TEvents } from './events';
|
|
5
|
+
export type { TEventMap as TStatsPeerConnectionEventMap, TEvents as TStatsPeerConnectionEvents, } from './events';
|
|
6
6
|
export type { TInboundStats, TOutboundStats, TStats } from './types';
|
|
@@ -6,7 +6,6 @@ export declare enum EEvent {
|
|
|
6
6
|
PARAMETERS_UPDATED = "parameters-updated"
|
|
7
7
|
}
|
|
8
8
|
export declare const EVENT_NAMES: readonly ["balancing-scheduled", "balancing-started", "balancing-stopped", "parameters-updated"];
|
|
9
|
-
export type TEvent = (typeof EVENT_NAMES)[number];
|
|
10
9
|
export type TEventMap = {
|
|
11
10
|
'balancing-scheduled': {
|
|
12
11
|
delay: number;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
export { default as VideoSendingBalancerManager } from './@VideoSendingBalancerManager';
|
|
2
|
-
export { EEvent, EVENT_NAMES } from './events';
|
|
3
|
-
export type {
|
|
2
|
+
export { EEvent, createEvents, EVENT_NAMES as VIDEO_SENDING_BALANCER_MANAGER_EVENT_NAMES, } from './events';
|
|
3
|
+
export type { TEventMap as TVideoSendingBalancerManagerEventMap, TEvents as TVideoSendingBalancerManagerEvents, } from './events';
|