sip-connector 29.2.1 → 30.0.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/dist/CallManager/events.d.ts +2 -7
- package/dist/CallManager/types.d.ts +1 -1
- package/dist/PresentationManager/@PresentationManager.d.ts +14 -8
- package/dist/PresentationManager/PresentationSenders.d.ts +9 -0
- package/dist/PresentationManager/PresentationStateMachine/PresentationStateMachine.d.ts +8 -6
- package/dist/PresentationManager/PresentationStateMachine/constants.d.ts +5 -5
- package/dist/PresentationManager/PresentationStateMachine/createPresentationMachine.d.ts +5 -5
- package/dist/PresentationManager/events.d.ts +6 -6
- package/dist/PresentationManager/index.d.ts +1 -1
- package/dist/PresentationManager/presentationSession.d.ts +11 -0
- package/dist/PresentationManager/resolveSendEncodings.d.ts +2 -2
- package/dist/PresentationManager/types.d.ts +1 -1
- package/dist/SipConnector/@SipConnector.d.ts +5 -5
- package/dist/SipConnector/events.d.ts +2 -2
- package/dist/{SipConnector-BkHJMvEE.js → SipConnector-CfalmMr_.js} +621 -515
- package/dist/SipConnector-DZCNPWr4.cjs +1 -0
- package/dist/SipConnectorFacade/@SipConnectorFacade.d.ts +7 -7
- package/dist/__fixtures__/BaseSession.mock.d.ts +1 -3
- package/dist/__fixtures__/RTCPeerConnectionMock.d.ts +2 -1
- package/dist/__fixtures__/RTCSessionMock.d.ts +4 -16
- package/dist/__fixtures__/constants.d.ts +0 -5
- package/dist/__fixtures__/eventNames.d.ts +2 -2
- package/dist/doMock.cjs +1 -1
- package/dist/doMock.js +3 -3
- package/dist/index.cjs +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +61 -61
- package/dist/tools/createUaParser/compareBrowserVersion/hasLessOrEqual.d.ts +6 -0
- package/dist/tools/createUaParser/compareBrowserVersion/index.d.ts +1 -0
- package/dist/tools/createUaParser/compareBrowserVersion/resolveHasLessOrEqual.d.ts +11 -0
- package/dist/tools/createUaParser/createUaParser.d.ts +2 -0
- package/package.json +3 -3
- package/dist/SipConnector-B22u1blB.cjs +0 -1
|
@@ -7,8 +7,8 @@ export declare enum Originator {
|
|
|
7
7
|
REMOTE = "remote",
|
|
8
8
|
SYSTEM = "system"
|
|
9
9
|
}
|
|
10
|
-
export declare const SESSION_JSSIP_EVENT_NAMES: readonly ["peerconnection", "connecting", "sending", "progress", "accepted", "confirmed", "ended", "failed", "hold", "unhold", "muted", "unmuted", "newInfo", "newDTMF", "
|
|
11
|
-
export declare const EVENT_NAMES: readonly ["peerconnection", "connecting", "sending", "progress", "accepted", "confirmed", "ended", "failed", "hold", "unhold", "muted", "unmuted", "newInfo", "newDTMF", "
|
|
10
|
+
export declare const SESSION_JSSIP_EVENT_NAMES: readonly ["peerconnection", "connecting", "sending", "progress", "accepted", "confirmed", "ended", "failed", "hold", "unhold", "muted", "unmuted", "newInfo", "newDTMF", "reinvite", "update", "refer", "replaces", "sdp", "icecandidate", "getusermediafailed", "peerconnection:createofferfailed", "peerconnection:createanswerfailed", "peerconnection:setlocaldescriptionfailed", "peerconnection:setremotedescriptionfailed"];
|
|
11
|
+
export declare const EVENT_NAMES: readonly ["peerconnection", "connecting", "sending", "progress", "accepted", "confirmed", "ended", "failed", "hold", "unhold", "muted", "unmuted", "newInfo", "newDTMF", "reinvite", "update", "refer", "replaces", "sdp", "icecandidate", "getusermediafailed", "peerconnection:createofferfailed", "peerconnection:createanswerfailed", "peerconnection:setlocaldescriptionfailed", "peerconnection:setremotedescriptionfailed", "start-call", "end-call", "peerconnection:confirmed", "peerconnection:ontrack", "ended:fromserver", "call-status-changed", "remote-tracks-changed", "remote-streams-changed", "recv-session-started", "recv-session-ended", "recv-quality-changed"];
|
|
12
12
|
export type TEventName = (typeof EVENT_NAMES)[number];
|
|
13
13
|
export type TEventMap = {
|
|
14
14
|
peerconnection: {
|
|
@@ -40,11 +40,6 @@ export type TEventMap = {
|
|
|
40
40
|
'peerconnection:createanswerfailed': unknown;
|
|
41
41
|
'peerconnection:setlocaldescriptionfailed': unknown;
|
|
42
42
|
'peerconnection:setremotedescriptionfailed': unknown;
|
|
43
|
-
'presentation:start': MediaStream;
|
|
44
|
-
'presentation:started': MediaStream;
|
|
45
|
-
'presentation:end': MediaStream;
|
|
46
|
-
'presentation:ended': MediaStream;
|
|
47
|
-
'presentation:failed': Error;
|
|
48
43
|
'start-call': {
|
|
49
44
|
number: string;
|
|
50
45
|
answer: boolean;
|
|
@@ -2,7 +2,7 @@ import { RTCSession, UA } from '@krivega/jssip';
|
|
|
2
2
|
import { TContentHint } from '../PresentationManager';
|
|
3
3
|
import { Originator } from './events';
|
|
4
4
|
import { RemoteStreamsManager } from './RemoteStreamsManager';
|
|
5
|
-
export type TOnAddedTransceiver = (transceiver: RTCRtpTransceiver, track: MediaStreamTrack
|
|
5
|
+
export type TOnAddedTransceiver = (transceiver: RTCRtpTransceiver, track: MediaStreamTrack) => Promise<void>;
|
|
6
6
|
export type TGetUri = (id: string) => string;
|
|
7
7
|
type TOptionsExtraHeaders = {
|
|
8
8
|
extraHeaders?: string[];
|
|
@@ -13,10 +13,11 @@ type TPresentationOptions = {
|
|
|
13
13
|
export declare const hasCanceledStartPresentationError: (error: unknown) => error is import('repeated-calls').TCanceledError<unknown>;
|
|
14
14
|
declare class PresentationManager extends EventEmitterProxy<TEventMap> {
|
|
15
15
|
readonly stateMachine: PresentationStateMachine;
|
|
16
|
-
promisePendingStartPresentation?: Promise<
|
|
17
|
-
promisePendingStopPresentation?: Promise<
|
|
18
|
-
|
|
16
|
+
promisePendingStartPresentation?: Promise<MediaStreamVideoTrack>;
|
|
17
|
+
promisePendingStopPresentation?: Promise<MediaStreamVideoTrack | undefined>;
|
|
18
|
+
videoTrackPresentationCurrent?: MediaStreamVideoTrack;
|
|
19
19
|
private readonly maxBitrate?;
|
|
20
|
+
private readonly presentationSenders;
|
|
20
21
|
private cancelableSendPresentationWithRepeatedCalls;
|
|
21
22
|
private readonly callManager;
|
|
22
23
|
constructor({ callManager, maxBitrate, }: {
|
|
@@ -25,21 +26,26 @@ declare class PresentationManager extends EventEmitterProxy<TEventMap> {
|
|
|
25
26
|
});
|
|
26
27
|
get isPendingPresentation(): boolean;
|
|
27
28
|
get isPresentationInProcess(): boolean;
|
|
28
|
-
startPresentation(beforeStartPresentation: () => Promise<void>,
|
|
29
|
+
startPresentation(beforeStartPresentation: () => Promise<void>, videoTrack: MediaStreamVideoTrack, { isNeedReinvite, contentHint, sendEncodings, maxResolution, onAddedTransceiver, }?: TPresentationOptions, options?: {
|
|
29
30
|
callLimit: number;
|
|
30
|
-
}): Promise<
|
|
31
|
-
stopPresentation(beforeStopPresentation: () => Promise<void>): Promise<
|
|
32
|
-
updatePresentation(beforeStartPresentation: () => Promise<void>,
|
|
31
|
+
}): Promise<MediaStreamVideoTrack>;
|
|
32
|
+
stopPresentation(beforeStopPresentation: () => Promise<void>): Promise<MediaStreamVideoTrack | undefined>;
|
|
33
|
+
updatePresentation(beforeStartPresentation: () => Promise<void>, videoTrack: MediaStreamVideoTrack, { contentHint, sendEncodings, maxResolution, onAddedTransceiver }?: TPresentationOptions): Promise<MediaStreamVideoTrack | undefined>;
|
|
33
34
|
cancelSendPresentationWithRepeatedCalls(): void;
|
|
34
35
|
private subscribe;
|
|
35
36
|
private sendPresentationWithDuplicatedCalls;
|
|
36
37
|
private sendPresentation;
|
|
38
|
+
private executeStartPresentation;
|
|
39
|
+
private executeStopPresentation;
|
|
37
40
|
private readonly setMaxBitrate;
|
|
38
41
|
private readonly getRtcSessionProtected;
|
|
42
|
+
private readonly getConnectionProtected;
|
|
39
43
|
private readonly handleEnded;
|
|
40
44
|
private reset;
|
|
45
|
+
private resetPresentationState;
|
|
41
46
|
private resetPresentation;
|
|
42
|
-
private
|
|
47
|
+
private removeVideoTrackPresentationCurrent;
|
|
48
|
+
private emitPresentationEvent;
|
|
43
49
|
private notifyPresentationFailed;
|
|
44
50
|
}
|
|
45
51
|
export default PresentationManager;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
declare class PresentationSenders {
|
|
2
|
+
private readonly senders;
|
|
3
|
+
has(sender: RTCRtpSender): boolean;
|
|
4
|
+
clear(): void;
|
|
5
|
+
getFromConnection(connection: RTCPeerConnection): RTCRtpSender[];
|
|
6
|
+
markTrack(connection: RTCPeerConnection, videoTrack: MediaStreamVideoTrack): void;
|
|
7
|
+
stopTracks(connection: RTCPeerConnection): void;
|
|
8
|
+
}
|
|
9
|
+
export default PresentationSenders;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { BaseStateMachine } from '../../tools/BaseStateMachine';
|
|
2
2
|
import { EEvents, EState } from './constants';
|
|
3
3
|
import { TCallEvents } from '../../CallManager';
|
|
4
|
+
import { TEvents as TPresentationEvents } from '../events';
|
|
4
5
|
import { TContext, TContextMap, TPresentationMachineEvents } from './types';
|
|
5
6
|
declare const presentationMachine: import('xstate').StateMachine<{
|
|
6
7
|
lastError: undefined;
|
|
@@ -51,11 +52,11 @@ declare const presentationMachine: import('xstate').StateMachine<{
|
|
|
51
52
|
}, never, never, EState, string, import('xstate').NonReducibleUnknown, import('xstate').NonReducibleUnknown, import('xstate').EventObject, import('xstate').MetaObject, {
|
|
52
53
|
id: "presentation";
|
|
53
54
|
states: {
|
|
54
|
-
readonly
|
|
55
|
-
readonly
|
|
56
|
-
readonly
|
|
57
|
-
readonly
|
|
58
|
-
readonly
|
|
55
|
+
readonly idle: {};
|
|
56
|
+
readonly starting: {};
|
|
57
|
+
readonly active: {};
|
|
58
|
+
readonly stopping: {};
|
|
59
|
+
readonly failed: {};
|
|
59
60
|
};
|
|
60
61
|
}>;
|
|
61
62
|
export type TSnapshot = {
|
|
@@ -75,7 +76,7 @@ export type TSnapshot = {
|
|
|
75
76
|
context: TContextMap[EState.FAILED];
|
|
76
77
|
};
|
|
77
78
|
export declare class PresentationStateMachine extends BaseStateMachine<typeof presentationMachine, EState, TContext, TSnapshot> {
|
|
78
|
-
constructor(callEvents: TCallEvents);
|
|
79
|
+
constructor(presentationEvents: TPresentationEvents, callEvents: TCallEvents);
|
|
79
80
|
get isIdle(): boolean;
|
|
80
81
|
get isStarting(): boolean;
|
|
81
82
|
get isActive(): boolean;
|
|
@@ -88,6 +89,7 @@ export declare class PresentationStateMachine extends BaseStateMachine<typeof pr
|
|
|
88
89
|
send(event: TPresentationMachineEvents): void;
|
|
89
90
|
private hasState;
|
|
90
91
|
private sendEvent;
|
|
92
|
+
private subscribePresentationEvents;
|
|
91
93
|
private subscribeCallEvents;
|
|
92
94
|
}
|
|
93
95
|
export {};
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
export declare enum EState {
|
|
2
|
-
IDLE = "
|
|
3
|
-
STARTING = "
|
|
4
|
-
ACTIVE = "
|
|
5
|
-
STOPPING = "
|
|
6
|
-
FAILED = "
|
|
2
|
+
IDLE = "idle",
|
|
3
|
+
STARTING = "starting",
|
|
4
|
+
ACTIVE = "active",
|
|
5
|
+
STOPPING = "stopping",
|
|
6
|
+
FAILED = "failed"
|
|
7
7
|
}
|
|
8
8
|
export declare enum EAction {
|
|
9
9
|
LOG_TRANSITION = "logTransition",
|
|
@@ -48,10 +48,10 @@ export declare const createPresentationMachine: () => import('xstate').StateMach
|
|
|
48
48
|
}, never, never, EState, string, import('xstate').NonReducibleUnknown, import('xstate').NonReducibleUnknown, import('xstate').EventObject, import('xstate').MetaObject, {
|
|
49
49
|
id: "presentation";
|
|
50
50
|
states: {
|
|
51
|
-
readonly
|
|
52
|
-
readonly
|
|
53
|
-
readonly
|
|
54
|
-
readonly
|
|
55
|
-
readonly
|
|
51
|
+
readonly idle: {};
|
|
52
|
+
readonly starting: {};
|
|
53
|
+
readonly active: {};
|
|
54
|
+
readonly stopping: {};
|
|
55
|
+
readonly failed: {};
|
|
56
56
|
};
|
|
57
57
|
}>;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { TypedEvents } from 'events-constructor';
|
|
2
|
-
export declare const EVENT_NAMES: readonly ["
|
|
2
|
+
export declare const EVENT_NAMES: readonly ["start", "started", "end", "ended", "failed"];
|
|
3
3
|
export type TEventMap = {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
4
|
+
start: MediaStreamVideoTrack;
|
|
5
|
+
started: MediaStreamVideoTrack;
|
|
6
|
+
end: MediaStreamVideoTrack;
|
|
7
|
+
ended: MediaStreamVideoTrack;
|
|
8
|
+
failed: Error;
|
|
9
9
|
};
|
|
10
10
|
export type TEvents = TypedEvents<TEventMap>;
|
|
11
11
|
export declare const createEvents: () => TypedEvents<TEventMap, readonly (keyof TEventMap)[]>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export { hasCanceledStartPresentationError, default as PresentationManager, } from './@PresentationManager';
|
|
2
2
|
export { EPresentationStatus, PresentationStateMachine, EPresentationStateMachineEvents, } from './PresentationStateMachine';
|
|
3
|
-
export { EVENT_NAMES as PRESENTATION_MANAGER_EVENT_NAMES } from './events';
|
|
3
|
+
export { EVENT_NAMES as PRESENTATION_MANAGER_EVENT_NAMES, createEvents } from './events';
|
|
4
4
|
export type { TPresentationSnapshot, TPresentationContextMap } from './PresentationStateMachine';
|
|
5
5
|
export type { TEventMap as TPresentationManagerEventMap } from './events';
|
|
6
6
|
export type { TContentHint, TOnAddedTransceiver } from './types';
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { default as PresentationSenders } from './PresentationSenders';
|
|
2
|
+
import { TOnAddedTransceiver } from './types';
|
|
3
|
+
export type TPresentationSessionOptions = {
|
|
4
|
+
direction?: RTCRtpTransceiverDirection;
|
|
5
|
+
directionVideo?: RTCRtpTransceiverDirection;
|
|
6
|
+
sendEncodings?: RTCRtpEncodingParameters[];
|
|
7
|
+
degradationPreference?: RTCDegradationPreference;
|
|
8
|
+
onAddedTransceiver?: TOnAddedTransceiver;
|
|
9
|
+
};
|
|
10
|
+
export declare const isFirefoxOrLower: (version: number) => boolean;
|
|
11
|
+
export declare const addOrReplacePresentationVideoTrack: (connection: RTCPeerConnection, presentationSenders: PresentationSenders, videoTrack: MediaStreamVideoTrack, { direction, directionVideo, sendEncodings, degradationPreference, onAddedTransceiver, }?: TPresentationSessionOptions) => Promise<void>;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { TMaxResolution } from './types';
|
|
2
2
|
type TParameters = {
|
|
3
|
-
|
|
3
|
+
videoTrack: MediaStreamVideoTrack;
|
|
4
4
|
sendEncodings?: RTCRtpEncodingParameters[];
|
|
5
5
|
maxResolution?: TMaxResolution;
|
|
6
6
|
};
|
|
7
|
-
declare const resolveSendEncodings: ({
|
|
7
|
+
declare const resolveSendEncodings: ({ videoTrack, sendEncodings, maxResolution, }: TParameters) => RTCRtpEncodingParameters[] | undefined;
|
|
8
8
|
export default resolveSendEncodings;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export type TOnAddedTransceiver = (transceiver: RTCRtpTransceiver, track: MediaStreamTrack
|
|
1
|
+
export type TOnAddedTransceiver = (transceiver: RTCRtpTransceiver, track: MediaStreamTrack) => Promise<void>;
|
|
2
2
|
export type TContentHint = 'motion' | 'detail' | 'text' | 'none';
|
|
3
3
|
export type TMaxResolution = {
|
|
4
4
|
width: number;
|
|
@@ -110,22 +110,22 @@ declare class SipConnector extends EventEmitterProxy<TEventMap> {
|
|
|
110
110
|
waitForOutboundVideoPacketsTimeout?: number;
|
|
111
111
|
waitForOutboundVideoPacketsStrictness?: TOutboundVideoVerificationStrictness;
|
|
112
112
|
}) => Promise<void>;
|
|
113
|
-
startPresentation(
|
|
113
|
+
startPresentation(videoTrack: MediaStreamVideoTrack, options?: {
|
|
114
114
|
isNeedReinvite?: boolean;
|
|
115
115
|
contentHint?: TContentHint;
|
|
116
116
|
degradationPreference?: RTCDegradationPreference;
|
|
117
117
|
sendEncodings?: RTCRtpEncodingParameters[];
|
|
118
118
|
onAddedTransceiver?: TOnAddedTransceiver;
|
|
119
119
|
callLimit?: number;
|
|
120
|
-
}): Promise<
|
|
121
|
-
stopPresentation(): Promise<
|
|
122
|
-
updatePresentation(
|
|
120
|
+
}): Promise<MediaStreamVideoTrack>;
|
|
121
|
+
stopPresentation(): Promise<MediaStreamVideoTrack | undefined>;
|
|
122
|
+
updatePresentation(videoTrack: MediaStreamVideoTrack, options?: {
|
|
123
123
|
isNeedReinvite?: boolean;
|
|
124
124
|
contentHint?: TContentHint;
|
|
125
125
|
degradationPreference?: RTCDegradationPreference;
|
|
126
126
|
sendEncodings?: RTCRtpEncodingParameters[];
|
|
127
127
|
onAddedTransceiver?: TOnAddedTransceiver;
|
|
128
|
-
}): Promise<
|
|
128
|
+
}): Promise<MediaStreamVideoTrack | undefined>;
|
|
129
129
|
waitChannels(...args: Parameters<ApiManager['waitChannels']>): Promise<import('../ApiManager').TChannels>;
|
|
130
130
|
waitSyncMediaState(...args: Parameters<ApiManager['waitSyncMediaState']>): Promise<{
|
|
131
131
|
isSyncForced: boolean;
|
|
@@ -10,7 +10,7 @@ import { TPresentationManagerEventMap } from '../PresentationManager';
|
|
|
10
10
|
import { TSessionManagerEventMap } from '../SessionManager';
|
|
11
11
|
import { TStatsManagerEventMap } from '../StatsManager';
|
|
12
12
|
import { TVideoSendingBalancerManagerEventMap } from '../VideoSendingBalancerManager';
|
|
13
|
-
export declare const EVENT_NAMES: readonly [...("connection:connecting" | "connection:connected" | "connection:registered" | "connection:disconnecting" | "connection:disconnected" | "auto-connect:failed-all-attempts" | "auto-connect:stop-attempts-by-error" | "auto-connect:limit-reached-attempts" | "auto-connect:before-attempt" | "auto-connect:success" | "auto-connect:cancelled-attempts" | "auto-connect:changed-attempt-status" | "auto-connect:telephony-check-failure" | "auto-connect:telephony-check-escalated" | "call-reconnect:cancelled" | "call-reconnect:armed" | "call-reconnect:limit-reached" | "call-reconnect:disarmed" | "call-reconnect:failure-detected" | "call-reconnect:attempt-scheduled" | "call-reconnect:attempt-started" | "call-reconnect:attempt-succeeded" | "call-reconnect:attempt-failed" | "call-reconnect:waiting-signaling" | "call-reconnect:status-changed" | "call-reconnect:termination-classified" | "call-reconnect:terminal" | "connection:newRTCSession" | "connection:unregistered" | "connection:registrationFailed" | "connection:newMessage" | "connection:sipEvent" | "connection:connect-started" | "connection:connect-succeeded" | "connection:connect-failed" | "connection:connect-parameters-resolve-success" | "connection:connect-parameters-resolve-failed" | "connection:connected-with-configuration" | "call:
|
|
13
|
+
export declare const EVENT_NAMES: readonly [...("connection:connecting" | "connection:connected" | "connection:registered" | "connection:disconnecting" | "connection:disconnected" | "auto-connect:failed-all-attempts" | "auto-connect:stop-attempts-by-error" | "auto-connect:limit-reached-attempts" | "auto-connect:before-attempt" | "auto-connect:success" | "auto-connect:cancelled-attempts" | "auto-connect:changed-attempt-status" | "auto-connect:telephony-check-failure" | "auto-connect:telephony-check-escalated" | "call-reconnect:cancelled" | "call-reconnect:armed" | "call-reconnect:limit-reached" | "call-reconnect:disarmed" | "call-reconnect:failure-detected" | "call-reconnect:attempt-scheduled" | "call-reconnect:attempt-started" | "call-reconnect:attempt-succeeded" | "call-reconnect:attempt-failed" | "call-reconnect:waiting-signaling" | "call-reconnect:status-changed" | "call-reconnect:termination-classified" | "call-reconnect:terminal" | "connection:newRTCSession" | "connection:unregistered" | "connection:registrationFailed" | "connection:newMessage" | "connection:sipEvent" | "connection:connect-started" | "connection:connect-succeeded" | "connection:connect-failed" | "connection:connect-parameters-resolve-success" | "connection:connect-parameters-resolve-failed" | "connection:connected-with-configuration" | "call:ended" | "call:failed" | "call:peerconnection" | "call:connecting" | "call:sending" | "call:progress" | "call:accepted" | "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:start-call" | "call:end-call" | "call:peerconnection:confirmed" | "call:peerconnection:ontrack" | "call:ended:fromserver" | "call:call-status-changed" | "call:remote-tracks-changed" | "call:remote-streams-changed" | "call:recv-session-started" | "call:recv-session-ended" | "call:recv-quality-changed" | "api:enter-room" | "api:main-cam-control" | "api:use-license" | "api:new-dtmf" | "api:conference:participant-token-issued" | "api:contented-stream:available" | "api:contented-stream:not-available" | "api:presentation:must-stop" | "api:channels:all" | "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-spectators" | "api:participant:move-request-to-spectators-synthetic" | "api:participant:move-request-to-spectators-with-audio-id" | "api:participant:move-request-to-participants" | "api:participation:accepting-word-request" | "api:participation:cancelling-word-request" | "api:webcast:started" | "api:webcast:stopped" | "api:account:changed" | "api:account:deleted" | "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:failed-send-room-direct-p2p" | "incoming-call:ringing" | "incoming-call:declinedIncomingCall" | "incoming-call:terminatedIncomingCall" | "incoming-call:failedIncomingCall" | "presentation:start" | "presentation:started" | "presentation:end" | "presentation:ended" | "presentation:failed" | "stats:stopped" | "stats:collected" | "video-balancer:balancing-scheduled" | "video-balancer:balancing-started" | "video-balancer:balancing-stopped" | "video-balancer:parameters-updated" | "main-stream-health:health-snapshot" | "main-stream-health:inbound-video-problem-detected" | "main-stream-health:inbound-video-problem-resolved" | "main-stream-health:inbound-video-problem-reset" | "session:snapshot-changed")[], "disconnected-from-out-of-call", "connected-with-configuration-from-out-of-call", "stopped-presentation-by-server-command"];
|
|
14
14
|
export type TEventName = (typeof EVENT_NAMES)[number];
|
|
15
15
|
type PrefixedEventMap<T extends Record<string, unknown>, Prefix extends string> = {
|
|
16
16
|
[K in keyof T as `${Prefix}:${string & K}`]: T[K];
|
|
@@ -22,5 +22,5 @@ type TSipConnectorEventMap = {
|
|
|
22
22
|
};
|
|
23
23
|
export type TEventMap = PrefixedEventMap<TAutoConnectorManagerEventMap, 'auto-connect'> & PrefixedEventMap<TCallReconnectManagerEventMap, 'call-reconnect'> & PrefixedEventMap<TConnectionManagerEventMap, 'connection'> & PrefixedEventMap<TCallManagerEventMap, 'call'> & 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;
|
|
24
24
|
export type TEvents = TypedEvents<TEventMap>;
|
|
25
|
-
export declare const createEvents: () => TypedEvents<TEventMap, readonly ("connection:connecting" | "connection:connected" | "connection:registered" | "connection:disconnecting" | "connection:disconnected" | "auto-connect:failed-all-attempts" | "auto-connect:stop-attempts-by-error" | "auto-connect:limit-reached-attempts" | "auto-connect:before-attempt" | "auto-connect:success" | "auto-connect:cancelled-attempts" | "auto-connect:changed-attempt-status" | "auto-connect:telephony-check-failure" | "auto-connect:telephony-check-escalated" | "call-reconnect:cancelled" | "call-reconnect:armed" | "call-reconnect:limit-reached" | "call-reconnect:disarmed" | "call-reconnect:failure-detected" | "call-reconnect:attempt-scheduled" | "call-reconnect:attempt-started" | "call-reconnect:attempt-succeeded" | "call-reconnect:attempt-failed" | "call-reconnect:waiting-signaling" | "call-reconnect:status-changed" | "call-reconnect:termination-classified" | "call-reconnect:terminal" | "connection:newRTCSession" | "connection:unregistered" | "connection:registrationFailed" | "connection:newMessage" | "connection:sipEvent" | "connection:connect-started" | "connection:connect-succeeded" | "connection:connect-failed" | "connection:connect-parameters-resolve-success" | "connection:connect-parameters-resolve-failed" | "connection:connected-with-configuration" | "call:
|
|
25
|
+
export declare const createEvents: () => TypedEvents<TEventMap, readonly ("connection:connecting" | "connection:connected" | "connection:registered" | "connection:disconnecting" | "connection:disconnected" | "auto-connect:failed-all-attempts" | "auto-connect:stop-attempts-by-error" | "auto-connect:limit-reached-attempts" | "auto-connect:before-attempt" | "auto-connect:success" | "auto-connect:cancelled-attempts" | "auto-connect:changed-attempt-status" | "auto-connect:telephony-check-failure" | "auto-connect:telephony-check-escalated" | "call-reconnect:cancelled" | "call-reconnect:armed" | "call-reconnect:limit-reached" | "call-reconnect:disarmed" | "call-reconnect:failure-detected" | "call-reconnect:attempt-scheduled" | "call-reconnect:attempt-started" | "call-reconnect:attempt-succeeded" | "call-reconnect:attempt-failed" | "call-reconnect:waiting-signaling" | "call-reconnect:status-changed" | "call-reconnect:termination-classified" | "call-reconnect:terminal" | "connection:newRTCSession" | "connection:unregistered" | "connection:registrationFailed" | "connection:newMessage" | "connection:sipEvent" | "connection:connect-started" | "connection:connect-succeeded" | "connection:connect-failed" | "connection:connect-parameters-resolve-success" | "connection:connect-parameters-resolve-failed" | "connection:connected-with-configuration" | "call:ended" | "call:failed" | "call:peerconnection" | "call:connecting" | "call:sending" | "call:progress" | "call:accepted" | "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:start-call" | "call:end-call" | "call:peerconnection:confirmed" | "call:peerconnection:ontrack" | "call:ended:fromserver" | "call:call-status-changed" | "call:remote-tracks-changed" | "call:remote-streams-changed" | "call:recv-session-started" | "call:recv-session-ended" | "call:recv-quality-changed" | "api:enter-room" | "api:main-cam-control" | "api:use-license" | "api:new-dtmf" | "api:conference:participant-token-issued" | "api:contented-stream:available" | "api:contented-stream:not-available" | "api:presentation:must-stop" | "api:channels:all" | "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-spectators" | "api:participant:move-request-to-spectators-synthetic" | "api:participant:move-request-to-spectators-with-audio-id" | "api:participant:move-request-to-participants" | "api:participation:accepting-word-request" | "api:participation:cancelling-word-request" | "api:webcast:started" | "api:webcast:stopped" | "api:account:changed" | "api:account:deleted" | "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:failed-send-room-direct-p2p" | "incoming-call:ringing" | "incoming-call:declinedIncomingCall" | "incoming-call:terminatedIncomingCall" | "incoming-call:failedIncomingCall" | "presentation:start" | "presentation:started" | "presentation:end" | "presentation:ended" | "presentation:failed" | "stats:stopped" | "stats:collected" | "video-balancer:balancing-scheduled" | "video-balancer:balancing-started" | "video-balancer:balancing-stopped" | "video-balancer:parameters-updated" | "main-stream-health:health-snapshot" | "main-stream-health:inbound-video-problem-detected" | "main-stream-health:inbound-video-problem-resolved" | "main-stream-health:inbound-video-problem-reset" | "session:snapshot-changed" | keyof TSipConnectorEventMap)[]>;
|
|
26
26
|
export {};
|