sip-connector 14.1.0-alpha.9 → 14.1.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/SipConnector-DRjfFGAZ.js +1339 -0
- package/dist/SipConnector-EXAO9Z-2.cjs +1 -0
- package/dist/doMock.cjs +1 -1
- package/dist/doMock.js +162 -267
- package/dist/index.cjs +1 -1
- package/dist/index.js +526 -577
- package/dist/src/SipConnector.d.ts +235 -0
- package/dist/{SipConnectorFacade → src/SipConnectorFacade}/SipConnectorFacade.d.ts +16 -7
- package/dist/{__fixtures__ → src/__fixtures__}/BaseSession.mock.d.ts +5 -5
- package/dist/{__fixtures__ → src/__fixtures__}/RTCSessionMock.d.ts +4 -9
- package/dist/{__fixtures__ → src/__fixtures__}/UA.mock.d.ts +14 -12
- package/dist/{__fixtures__ → src/__fixtures__}/index.d.ts +4 -4
- package/dist/{__fixtures__ → src/__fixtures__}/jssip.mock.d.ts +3 -3
- package/dist/src/causes.d.ts +23 -0
- package/dist/{doMock.d.ts → src/doMock.d.ts} +1 -2
- package/dist/{__fixtures__ → src}/eventNames.d.ts +1 -1
- package/dist/src/headers.d.ts +37 -0
- package/dist/src/index.d.ts +11 -0
- package/dist/{tools → src/tools}/__fixtures__/connectToServer.d.ts +2 -2
- package/dist/{tools → src/tools}/__fixtures__/processRequest.d.ts +1 -1
- package/dist/{tools → src/tools}/error/getLinkError.d.ts +1 -1
- package/dist/{tools → src/tools}/error/getTypeFromError.d.ts +1 -1
- package/dist/{tools → src/tools}/error/getValuesFromError.d.ts +1 -1
- package/dist/{tools → src/tools}/index.d.ts +1 -1
- package/dist/{tools → src/tools}/prepareMediaStream.d.ts +1 -1
- package/dist/{tools → src/tools}/setVideoTrackContentHints.d.ts +1 -1
- package/dist/{tools → src/tools}/syncMediaState/index.d.ts +1 -1
- package/dist/{tools → src/tools}/syncMediaState/resolveOnStartMainCam.d.ts +1 -1
- package/dist/{tools → src/tools}/syncMediaState/resolveOnStartMic.d.ts +1 -1
- package/dist/{tools → src/tools}/syncMediaState/resolveOnStopMainCam.d.ts +1 -1
- package/dist/{tools → src/tools}/syncMediaState/resolveOnStopMic.d.ts +1 -1
- package/dist/src/types.d.ts +69 -0
- package/dist/{videoSendingBalancer → src/videoSendingBalancer}/balance.d.ts +1 -1
- package/dist/{videoSendingBalancer → src/videoSendingBalancer}/index.d.ts +1 -1
- package/dist/{videoSendingBalancer → src/videoSendingBalancer}/processSender.d.ts +1 -1
- package/dist/src/videoSendingBalancer/scaleBitrate.d.ts +2 -0
- package/package.json +32 -26
- package/dist/@SipConnector-BOHJ000Z.cjs +0 -1
- package/dist/@SipConnector-BxitfweK.js +0 -2267
- package/dist/ApiManager/@ApiManager.d.ts +0 -58
- package/dist/ApiManager/constants.d.ts +0 -71
- package/dist/ApiManager/eventNames.d.ts +0 -33
- package/dist/ApiManager/index.d.ts +0 -3
- package/dist/ApiManager/types.d.ts +0 -99
- package/dist/CallManager/@CallManager.d.ts +0 -26
- package/dist/CallManager/AbstractCallStrategy.d.ts +0 -47
- package/dist/CallManager/MCUCallStrategy.d.ts +0 -30
- package/dist/CallManager/RemoteStreamsManager.d.ts +0 -8
- package/dist/CallManager/causes.d.ts +0 -13
- package/dist/CallManager/eventNames.d.ts +0 -45
- package/dist/CallManager/hasCanceledCallError.d.ts +0 -2
- package/dist/CallManager/index.d.ts +0 -7
- package/dist/CallManager/types.d.ts +0 -59
- package/dist/ConnectionManager/@ConnectionManager.d.ts +0 -48
- package/dist/ConnectionManager/ConfigurationManager.d.ts +0 -60
- package/dist/ConnectionManager/ConnectionFlow.d.ts +0 -84
- package/dist/ConnectionManager/ConnectionStateMachine.d.ts +0 -61
- package/dist/ConnectionManager/RegistrationManager.d.ts +0 -17
- package/dist/ConnectionManager/SipOperations.d.ts +0 -32
- package/dist/ConnectionManager/UAFactory.d.ts +0 -50
- package/dist/ConnectionManager/eventNames.d.ts +0 -16
- package/dist/ConnectionManager/index.d.ts +0 -3
- package/dist/IncomingCallManager/@IncomingCallManager.d.ts +0 -37
- package/dist/IncomingCallManager/eventNames.d.ts +0 -13
- package/dist/IncomingCallManager/index.d.ts +0 -2
- package/dist/PresentationManager/@PresentationManager.d.ts +0 -47
- package/dist/PresentationManager/constants.d.ts +0 -1
- package/dist/PresentationManager/eventNames.d.ts +0 -11
- package/dist/PresentationManager/index.d.ts +0 -2
- package/dist/PresentationManager/types.d.ts +0 -2
- package/dist/SipConnector/@SipConnector.d.ts +0 -96
- package/dist/SipConnector/eventNames.d.ts +0 -4
- package/dist/SipConnector/index.d.ts +0 -2
- package/dist/index.d.ts +0 -14
- package/dist/types.d.ts +0 -23
- package/dist/videoSendingBalancer/scaleBitrate.d.ts +0 -2
- /package/dist/{SipConnectorFacade → src/SipConnectorFacade}/index.d.ts +0 -0
- /package/dist/{__fixtures__ → src/__fixtures__}/RTCPeerConnectionMock.d.ts +0 -0
- /package/dist/{__fixtures__ → src/__fixtures__}/RTCRtpSenderMock.d.ts +0 -0
- /package/dist/{__fixtures__ → src/__fixtures__}/Registrator.mock.d.ts +0 -0
- /package/dist/{__fixtures__ → src/__fixtures__}/Request.mock.d.ts +0 -0
- /package/dist/{__fixtures__ → src/__fixtures__}/WebSocketInterface.mock.d.ts +0 -0
- /package/dist/{__fixtures__ → src/__fixtures__}/accountNotify.d.ts +0 -0
- /package/dist/{__fixtures__ → src/__fixtures__}/channels.d.ts +0 -0
- /package/dist/{__fixtures__ → src/__fixtures__}/channelsNotify.d.ts +0 -0
- /package/dist/{__fixtures__ → src/__fixtures__}/conferenceParticipantTokenIssuedNotify.d.ts +0 -0
- /package/dist/{__fixtures__ → src/__fixtures__}/delayPromise.d.ts +0 -0
- /package/dist/{__fixtures__ → src/__fixtures__}/enterRoom.d.ts +0 -0
- /package/dist/{__fixtures__ → src/__fixtures__}/mediaState.d.ts +0 -0
- /package/dist/{__fixtures__ → src/__fixtures__}/participantMoveRequests.d.ts +0 -0
- /package/dist/{__fixtures__ → src/__fixtures__}/participantNotify.d.ts +0 -0
- /package/dist/{__fixtures__ → src/__fixtures__}/remoteCallerData.d.ts +0 -0
- /package/dist/{__fixtures__ → src/__fixtures__}/utils.d.ts +0 -0
- /package/dist/{__fixtures__ → src/__fixtures__}/webcastNotify.d.ts +0 -0
- /package/dist/{__fixtures__ → src}/constants.d.ts +0 -0
- /package/dist/{ConnectionManager → src}/getExtraHeadersRemoteAddress.d.ts +0 -0
- /package/dist/{logger.d.ts → src/logger.d.ts} +0 -0
- /package/dist/{setParametersToSender → src/setParametersToSender}/configureDegradationPreference.d.ts +0 -0
- /package/dist/{setParametersToSender → src/setParametersToSender}/configureEmptyEncodings.d.ts +0 -0
- /package/dist/{setParametersToSender → src/setParametersToSender}/configureEncodings.d.ts +0 -0
- /package/dist/{setParametersToSender → src/setParametersToSender}/configureMaxBitrate.d.ts +0 -0
- /package/dist/{setParametersToSender → src/setParametersToSender}/configureScaleResolutionDownBy.d.ts +0 -0
- /package/dist/{setParametersToSender → src/setParametersToSender}/hasChangedRTCRtpSendParameters.d.ts +0 -0
- /package/dist/{setParametersToSender → src/setParametersToSender}/index.d.ts +0 -0
- /package/dist/{setParametersToSender → src/setParametersToSender}/resolveHasNeedToUpdateItemEncoding.d.ts +0 -0
- /package/dist/{setParametersToSender → src/setParametersToSender}/setParametersToSender.d.ts +0 -0
- /package/dist/{tools → src/tools}/__fixtures__/call.d.ts +0 -0
- /package/dist/{tools → src/tools}/__fixtures__/hasValidUri.d.ts +0 -0
- /package/dist/{tools → src/tools}/__fixtures__/permissions.d.ts +0 -0
- /package/dist/{tools → src/tools}/__tests-utils__/parseObject.d.ts +0 -0
- /package/dist/{tools → src/tools}/__tests-utils__/resolveParseArray.d.ts +0 -0
- /package/dist/{tools → src/tools}/error/index.d.ts +0 -0
- /package/dist/{tools → src/tools}/error/stringifyMessage.d.ts +0 -0
- /package/dist/{tools → src/tools}/generateSimulcastEncodings.d.ts +0 -0
- /package/dist/{tools → src/tools}/getExtraHeaders.d.ts +0 -0
- /package/dist/{tools → src/tools}/getUserAgent.d.ts +0 -0
- /package/dist/{tools → src/tools}/hasPurgatory.d.ts +0 -0
- /package/dist/{tools → src/tools}/resolveUpdateTransceiver.d.ts +0 -0
- /package/dist/{tools/sendDtmfFAccumulated.d.ts → src/tools/sendDTMFAccumulated.d.ts} +0 -0
- /package/dist/{utils → src/utils}/errors.d.ts +0 -0
- /package/dist/{utils → src/utils}/findSenderByStream.d.ts +0 -0
- /package/dist/{utils → src/utils}/findVideoSender.d.ts +0 -0
- /package/dist/{utils → src/utils}/findVideoTrack.d.ts +0 -0
- /package/dist/{utils → src/utils}/getCodecFromSender.d.ts +0 -0
- /package/dist/{utils → src/utils}/replaceForbiddenSymbolsWithUnderscore.d.ts +0 -0
- /package/dist/{videoSendingBalancer → src/videoSendingBalancer}/getMaxBitrateByWidth.d.ts +0 -0
- /package/dist/{videoSendingBalancer → src/videoSendingBalancer}/getMaxBitrateByWidthAndCodec.d.ts +0 -0
- /package/dist/{videoSendingBalancer → src/videoSendingBalancer}/hasAv1Codec.d.ts +0 -0
- /package/dist/{videoSendingBalancer → src/videoSendingBalancer}/hasIncludesString.d.ts +0 -0
- /package/dist/{videoSendingBalancer → src/videoSendingBalancer}/scaleBitrateByCodec.d.ts +0 -0
- /package/dist/{videoSendingBalancer → src/videoSendingBalancer}/scaleResolutionAndBitrate.d.ts +0 -0
- /package/dist/{videoSendingBalancer → src/videoSendingBalancer}/setEncodingsToSender.d.ts +0 -0
|
@@ -0,0 +1,235 @@
|
|
|
1
|
+
import { RTCSession, RegisteredEvent, UA, URI, UnRegisteredEvent, WebSocketInterface } from '@krivega/jssip';
|
|
2
|
+
import { TEventSession, TEventUA } from './eventNames';
|
|
3
|
+
import { TContentHint, TJsSIP, TOnAddedTransceiver } from './types';
|
|
4
|
+
export declare const hasCanceledCallError: (error: unknown) => boolean;
|
|
5
|
+
export declare const hasCanceledStartPresentationError: (error: unknown) => error is import('node_modules/repeated-calls/dist/utils').TCanceledError<unknown>;
|
|
6
|
+
type TChannels = {
|
|
7
|
+
inputChannels: string;
|
|
8
|
+
outputChannels: string;
|
|
9
|
+
};
|
|
10
|
+
type TMediaState = {
|
|
11
|
+
cam: boolean;
|
|
12
|
+
mic: boolean;
|
|
13
|
+
};
|
|
14
|
+
type TOptionsInfoMediaState = {
|
|
15
|
+
noTerminateWhenError?: boolean;
|
|
16
|
+
};
|
|
17
|
+
type TOptionsExtraHeaders = {
|
|
18
|
+
extraHeaders?: string[];
|
|
19
|
+
};
|
|
20
|
+
type TOntrack = (track: RTCTrackEvent) => void;
|
|
21
|
+
type TParametersConnection = TOptionsExtraHeaders & {
|
|
22
|
+
displayName?: string;
|
|
23
|
+
user?: string;
|
|
24
|
+
password?: string;
|
|
25
|
+
register?: boolean;
|
|
26
|
+
sipServerUrl: string;
|
|
27
|
+
sipWebSocketServerURL: string;
|
|
28
|
+
remoteAddress?: string;
|
|
29
|
+
sessionTimers?: boolean;
|
|
30
|
+
registerExpires?: number;
|
|
31
|
+
connectionRecoveryMinInterval?: number;
|
|
32
|
+
connectionRecoveryMaxInterval?: number;
|
|
33
|
+
userAgent?: string;
|
|
34
|
+
};
|
|
35
|
+
type TParametersCheckTelephony = {
|
|
36
|
+
displayName: string;
|
|
37
|
+
sipServerUrl: string;
|
|
38
|
+
sipWebSocketServerURL: string;
|
|
39
|
+
userAgent?: string;
|
|
40
|
+
remoteAddress?: string;
|
|
41
|
+
extraHeaders?: string[];
|
|
42
|
+
};
|
|
43
|
+
type TConnect = (parameters: TParametersConnection, options?: {
|
|
44
|
+
callLimit?: number;
|
|
45
|
+
}) => Promise<UA>;
|
|
46
|
+
type TSet = ({ displayName, password, }: {
|
|
47
|
+
displayName?: string;
|
|
48
|
+
password?: string;
|
|
49
|
+
}) => Promise<boolean>;
|
|
50
|
+
type TParametersAnswerToIncomingCall = {
|
|
51
|
+
mediaStream: MediaStream;
|
|
52
|
+
extraHeaders?: TOptionsExtraHeaders['extraHeaders'];
|
|
53
|
+
ontrack?: TOntrack;
|
|
54
|
+
iceServers?: RTCIceServer[];
|
|
55
|
+
directionVideo?: RTCRtpTransceiverDirection;
|
|
56
|
+
directionAudio?: RTCRtpTransceiverDirection;
|
|
57
|
+
contentHint?: TContentHint;
|
|
58
|
+
sendEncodings?: RTCRtpEncodingParameters[];
|
|
59
|
+
offerToReceiveAudio?: boolean;
|
|
60
|
+
offerToReceiveVideo?: boolean;
|
|
61
|
+
onAddedTransceiver?: TOnAddedTransceiver;
|
|
62
|
+
};
|
|
63
|
+
type TParametersCall = TParametersAnswerToIncomingCall & {
|
|
64
|
+
number: string;
|
|
65
|
+
};
|
|
66
|
+
type TCall = (parameters: TParametersCall) => Promise<RTCPeerConnection>;
|
|
67
|
+
type TAnswerToIncomingCall = (parameters: TParametersAnswerToIncomingCall) => Promise<RTCPeerConnection>;
|
|
68
|
+
type TSendDTMF = (tone: number | string) => Promise<void>;
|
|
69
|
+
type THangUp = () => Promise<void>;
|
|
70
|
+
export default class SipConnector {
|
|
71
|
+
promisePendingStartPresentation?: Promise<MediaStream>;
|
|
72
|
+
promisePendingStopPresentation?: Promise<MediaStream | undefined>;
|
|
73
|
+
ua?: UA;
|
|
74
|
+
rtcSession?: RTCSession;
|
|
75
|
+
incomingRTCSession?: RTCSession;
|
|
76
|
+
streamPresentationCurrent?: MediaStream;
|
|
77
|
+
socket?: WebSocketInterface;
|
|
78
|
+
private isRegisterConfigInner;
|
|
79
|
+
private connectionConfiguration;
|
|
80
|
+
private remoteStreams;
|
|
81
|
+
private readonly JsSIP;
|
|
82
|
+
private readonly sessionEvents;
|
|
83
|
+
private readonly uaEvents;
|
|
84
|
+
private cancelableConnectWithRepeatedCalls;
|
|
85
|
+
private cancelableSendPresentationWithRepeatedCalls;
|
|
86
|
+
private isPendingConnect;
|
|
87
|
+
private isPendingInitUa;
|
|
88
|
+
private isPendingCall;
|
|
89
|
+
private isPendingAnswer;
|
|
90
|
+
constructor({ JsSIP }: {
|
|
91
|
+
JsSIP: TJsSIP;
|
|
92
|
+
});
|
|
93
|
+
get connection(): RTCPeerConnection | undefined;
|
|
94
|
+
get remoteCallerData(): {
|
|
95
|
+
displayName: string | undefined;
|
|
96
|
+
host: string | undefined;
|
|
97
|
+
incomingNumber: string | undefined;
|
|
98
|
+
rtcSession: RTCSession | undefined;
|
|
99
|
+
};
|
|
100
|
+
get requested(): boolean;
|
|
101
|
+
get establishedRTCSession(): RTCSession | undefined;
|
|
102
|
+
get isRegistered(): boolean;
|
|
103
|
+
get isRegisterConfig(): boolean;
|
|
104
|
+
get isCallActive(): boolean;
|
|
105
|
+
get isAvailableIncomingCall(): boolean;
|
|
106
|
+
get isPendingPresentation(): boolean;
|
|
107
|
+
connect: TConnect;
|
|
108
|
+
hangUp: THangUp;
|
|
109
|
+
register(): Promise<RegisteredEvent>;
|
|
110
|
+
unregister(): Promise<UnRegisteredEvent>;
|
|
111
|
+
readonly tryRegister: () => Promise<RegisteredEvent>;
|
|
112
|
+
sendOptions(target: URI | string, body?: string, extraHeaders?: string[]): Promise<void>;
|
|
113
|
+
ping(body?: string, extraHeaders?: string[]): Promise<void>;
|
|
114
|
+
checkTelephony({ userAgent, displayName, sipServerUrl, sipWebSocketServerURL, remoteAddress, extraHeaders, }: TParametersCheckTelephony): Promise<void>;
|
|
115
|
+
replaceMediaStream(mediaStream: MediaStream, options?: {
|
|
116
|
+
deleteExisting?: boolean;
|
|
117
|
+
addMissing?: boolean;
|
|
118
|
+
forceRenegotiation?: boolean;
|
|
119
|
+
contentHint?: TContentHint;
|
|
120
|
+
sendEncodings?: RTCRtpEncodingParameters[];
|
|
121
|
+
onAddedTransceiver?: TOnAddedTransceiver;
|
|
122
|
+
}): Promise<void>;
|
|
123
|
+
declineToIncomingCall: ({ statusCode, }?: {
|
|
124
|
+
statusCode?: number;
|
|
125
|
+
}) => Promise<void>;
|
|
126
|
+
busyIncomingCall: () => Promise<void>;
|
|
127
|
+
askPermissionToEnableCam(options?: TOptionsInfoMediaState): Promise<void>;
|
|
128
|
+
startPresentation(stream: MediaStream, { isNeedReinvite, isP2P, maxBitrate, contentHint, sendEncodings, onAddedTransceiver, }?: {
|
|
129
|
+
isNeedReinvite?: boolean;
|
|
130
|
+
isP2P?: boolean;
|
|
131
|
+
maxBitrate?: number;
|
|
132
|
+
contentHint?: TContentHint;
|
|
133
|
+
sendEncodings?: RTCRtpEncodingParameters[];
|
|
134
|
+
onAddedTransceiver?: TOnAddedTransceiver;
|
|
135
|
+
}, options?: {
|
|
136
|
+
callLimit: number;
|
|
137
|
+
}): Promise<MediaStream>;
|
|
138
|
+
stopPresentation({ isP2P, }?: {
|
|
139
|
+
isP2P?: boolean;
|
|
140
|
+
}): Promise<MediaStream | undefined>;
|
|
141
|
+
updatePresentation(stream: MediaStream, { isP2P, maxBitrate, contentHint, sendEncodings, onAddedTransceiver, }?: {
|
|
142
|
+
isP2P?: boolean;
|
|
143
|
+
maxBitrate?: number;
|
|
144
|
+
contentHint?: TContentHint;
|
|
145
|
+
sendEncodings?: RTCRtpEncodingParameters[];
|
|
146
|
+
onAddedTransceiver?: TOnAddedTransceiver;
|
|
147
|
+
}): Promise<MediaStream | undefined>;
|
|
148
|
+
on<T>(eventName: TEventUA, handler: (data: T) => void): () => void;
|
|
149
|
+
once<T>(eventName: TEventUA, handler: (data: T) => void): () => void;
|
|
150
|
+
onceRace<T>(eventNames: TEventUA[], handler: (data: T, eventName: string) => void): () => void;
|
|
151
|
+
wait<T>(eventName: TEventUA): Promise<T>;
|
|
152
|
+
off<T>(eventName: TEventUA, handler: (data: T) => void): void;
|
|
153
|
+
onSession<T>(eventName: TEventSession, handler: (data: T) => void): () => void;
|
|
154
|
+
onceSession<T>(eventName: TEventSession, handler: (data: T) => void): () => void;
|
|
155
|
+
onceRaceSession<T>(eventNames: TEventSession[], handler: (data: T, eventName: string) => void): () => void;
|
|
156
|
+
waitSession<T>(eventName: TEventSession): Promise<T>;
|
|
157
|
+
offSession<T>(eventName: TEventSession, handler: (data: T) => void): void;
|
|
158
|
+
isConfigured(): boolean;
|
|
159
|
+
getConnectionConfiguration(): {
|
|
160
|
+
sipServerUrl?: string;
|
|
161
|
+
displayName?: string;
|
|
162
|
+
register?: boolean;
|
|
163
|
+
user?: string;
|
|
164
|
+
password?: string;
|
|
165
|
+
number?: string;
|
|
166
|
+
answer?: boolean;
|
|
167
|
+
};
|
|
168
|
+
getRemoteStreams(): MediaStream[] | undefined;
|
|
169
|
+
getIncomingRTCSession(): RTCSession;
|
|
170
|
+
set: TSet;
|
|
171
|
+
disconnect: () => Promise<void>;
|
|
172
|
+
call: TCall;
|
|
173
|
+
answerToIncomingCall: TAnswerToIncomingCall;
|
|
174
|
+
sendDTMF: TSendDTMF;
|
|
175
|
+
cancelSendPresentationWithRepeatedCalls(): void;
|
|
176
|
+
waitChannels(): Promise<TChannels>;
|
|
177
|
+
waitSyncMediaState(): Promise<{
|
|
178
|
+
isSyncForced: boolean;
|
|
179
|
+
}>;
|
|
180
|
+
sendChannels({ inputChannels, outputChannels }: TChannels): Promise<void>;
|
|
181
|
+
sendMediaState({ cam, mic }: TMediaState, options?: TOptionsInfoMediaState): Promise<void>;
|
|
182
|
+
sendRefusalToTurnOn(type: 'cam' | 'mic', options?: TOptionsInfoMediaState): Promise<void>;
|
|
183
|
+
sendRefusalToTurnOnMic(options?: TOptionsInfoMediaState): Promise<void>;
|
|
184
|
+
sendRefusalToTurnOnCam(options?: TOptionsInfoMediaState): Promise<void>;
|
|
185
|
+
private readonly removeIncomingSession;
|
|
186
|
+
private getSipServerUrl;
|
|
187
|
+
private sendMustStopPresentation;
|
|
188
|
+
private readonly connectWithDuplicatedCalls;
|
|
189
|
+
private sendPresentationWithDuplicatedCalls;
|
|
190
|
+
private hasEqualConnectionConfiguration;
|
|
191
|
+
private createUaConfiguration;
|
|
192
|
+
private sendPresentation;
|
|
193
|
+
private removeStreamPresentationCurrent;
|
|
194
|
+
private resetPresentation;
|
|
195
|
+
private cancelRequestsAndResetPresentation;
|
|
196
|
+
private readonly handleNewRTCSession;
|
|
197
|
+
private readonly connectInner;
|
|
198
|
+
private readonly initUa;
|
|
199
|
+
private readonly createUa;
|
|
200
|
+
private readonly start;
|
|
201
|
+
private readonly handleCall;
|
|
202
|
+
private readonly restoreSession;
|
|
203
|
+
private generateStream;
|
|
204
|
+
private generateAudioStream;
|
|
205
|
+
private generateStreams;
|
|
206
|
+
private generateAudioStreams;
|
|
207
|
+
private readonly hangUpWithoutCancelRequests;
|
|
208
|
+
private cancelRequests;
|
|
209
|
+
private cancelConnectWithRepeatedCalls;
|
|
210
|
+
private readonly handleShareState;
|
|
211
|
+
private readonly maybeTriggerChannels;
|
|
212
|
+
private readonly handleNotify;
|
|
213
|
+
private readonly triggerRemovedFromListModeratorsNotify;
|
|
214
|
+
private readonly triggerAddedToListModeratorsNotify;
|
|
215
|
+
private readonly triggerWebcastStartedNotify;
|
|
216
|
+
private readonly triggerWebcastStoppedNotify;
|
|
217
|
+
private readonly triggerAccountChangedNotify;
|
|
218
|
+
private readonly triggerAccountDeletedNotify;
|
|
219
|
+
private readonly triggerConferenceParticipantTokenIssued;
|
|
220
|
+
private readonly triggerChannelsNotify;
|
|
221
|
+
private readonly triggerParticipationAcceptingWordRequest;
|
|
222
|
+
private readonly triggerParticipationCancellingWordRequest;
|
|
223
|
+
private readonly triggerParticipantMoveRequestToStream;
|
|
224
|
+
private readonly triggerEnterRoom;
|
|
225
|
+
private readonly triggerShareState;
|
|
226
|
+
private readonly maybeTriggerParticipantMoveRequest;
|
|
227
|
+
private readonly triggerMainCamControl;
|
|
228
|
+
private readonly triggerMicControl;
|
|
229
|
+
private readonly triggerUseLicense;
|
|
230
|
+
private readonly handleNewInfo;
|
|
231
|
+
private readonly handleSipEvent;
|
|
232
|
+
private readonly maybeHandleNotify;
|
|
233
|
+
private readonly handleEnded;
|
|
234
|
+
}
|
|
235
|
+
export {};
|
|
@@ -1,14 +1,17 @@
|
|
|
1
1
|
import { UA } from '@krivega/jssip';
|
|
2
|
-
import {
|
|
3
|
-
import { TContentHint } from '../
|
|
4
|
-
import { SipConnector } from '../SipConnector';
|
|
5
|
-
import { TSimulcastEncoding } from '../types';
|
|
2
|
+
import { default as SipConnector } from '../SipConnector';
|
|
3
|
+
import { EUseLicense, TContentHint, TSimulcastEncoding } from '../types';
|
|
6
4
|
interface IProxyMethods {
|
|
7
5
|
on: SipConnector['on'];
|
|
8
6
|
once: SipConnector['once'];
|
|
9
7
|
onceRace: SipConnector['onceRace'];
|
|
10
8
|
wait: SipConnector['wait'];
|
|
11
9
|
off: SipConnector['off'];
|
|
10
|
+
onSession: SipConnector['onSession'];
|
|
11
|
+
onceSession: SipConnector['onceSession'];
|
|
12
|
+
onceRaceSession: SipConnector['onceRaceSession'];
|
|
13
|
+
waitSession: SipConnector['waitSession'];
|
|
14
|
+
offSession: SipConnector['offSession'];
|
|
12
15
|
sendDTMF: SipConnector['sendDTMF'];
|
|
13
16
|
hangUp: SipConnector['hangUp'];
|
|
14
17
|
declineToIncomingCall: SipConnector['declineToIncomingCall'];
|
|
@@ -26,6 +29,11 @@ declare class SipConnectorFacade implements IProxyMethods {
|
|
|
26
29
|
onceRace: IProxyMethods['onceRace'];
|
|
27
30
|
wait: IProxyMethods['wait'];
|
|
28
31
|
off: IProxyMethods['off'];
|
|
32
|
+
onSession: IProxyMethods['onSession'];
|
|
33
|
+
onceSession: IProxyMethods['onceSession'];
|
|
34
|
+
onceRaceSession: IProxyMethods['onceRaceSession'];
|
|
35
|
+
waitSession: IProxyMethods['waitSession'];
|
|
36
|
+
offSession: IProxyMethods['offSession'];
|
|
29
37
|
sendDTMF: IProxyMethods['sendDTMF'];
|
|
30
38
|
hangUp: IProxyMethods['hangUp'];
|
|
31
39
|
declineToIncomingCall: IProxyMethods['declineToIncomingCall'];
|
|
@@ -86,7 +94,7 @@ declare class SipConnectorFacade implements IProxyMethods {
|
|
|
86
94
|
disconnectFromServer: () => Promise<{
|
|
87
95
|
isSuccessful: boolean;
|
|
88
96
|
}>;
|
|
89
|
-
|
|
97
|
+
answerIncomingCall: (parameters: {
|
|
90
98
|
mediaStream: MediaStream;
|
|
91
99
|
extraHeaders?: string[] | undefined;
|
|
92
100
|
iceServers?: RTCIceServer[];
|
|
@@ -122,7 +130,7 @@ declare class SipConnectorFacade implements IProxyMethods {
|
|
|
122
130
|
preferredMimeTypesVideoCodecs?: string[];
|
|
123
131
|
excludeMimeTypesVideoCodecs?: string[];
|
|
124
132
|
}) => Promise<MediaStream | undefined>;
|
|
125
|
-
startPresentation: ({ mediaStream, isP2P, maxBitrate, contentHint, simulcastEncodings, degradationPreference, sendEncodings, preferredMimeTypesVideoCodecs, excludeMimeTypesVideoCodecs,
|
|
133
|
+
startPresentation: ({ mediaStream, isP2P, maxBitrate, contentHint, simulcastEncodings, degradationPreference, sendEncodings, preferredMimeTypesVideoCodecs, excludeMimeTypesVideoCodecs, }: {
|
|
126
134
|
mediaStream: MediaStream;
|
|
127
135
|
isP2P: boolean;
|
|
128
136
|
maxBitrate?: number;
|
|
@@ -132,7 +140,8 @@ declare class SipConnectorFacade implements IProxyMethods {
|
|
|
132
140
|
sendEncodings?: RTCRtpEncodingParameters[];
|
|
133
141
|
preferredMimeTypesVideoCodecs?: string[];
|
|
134
142
|
excludeMimeTypesVideoCodecs?: string[];
|
|
135
|
-
|
|
143
|
+
}, options?: {
|
|
144
|
+
callLimit: number;
|
|
136
145
|
}) => Promise<MediaStream | undefined>;
|
|
137
146
|
stopShareSipConnector: ({ isP2P }?: {
|
|
138
147
|
isP2P?: boolean;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { AnswerOptions, ExtraHeaders, HoldOptions, MediaStreamTypes, NameAddrHeader, OnHoldResult, RTCPeerConnectionDeprecated, RTCSession, ReferOptions, RenegotiateOptions, SessionDirection, SessionStatus, TerminateOptions, URI, C as constants } from '@krivega/jssip';
|
|
2
2
|
import { default as Events } from 'events-constructor';
|
|
3
|
-
import { TEventSession, SESSION_EVENT_NAMES } from '
|
|
3
|
+
import { TEventSession, SESSION_EVENT_NAMES } from '../eventNames';
|
|
4
4
|
export type TEventHandlers = Record<string, (data: unknown) => void>;
|
|
5
5
|
declare class BaseSession implements RTCSession {
|
|
6
6
|
originator: string;
|
|
@@ -11,10 +11,9 @@ declare class BaseSession implements RTCSession {
|
|
|
11
11
|
audio: boolean;
|
|
12
12
|
video: boolean;
|
|
13
13
|
};
|
|
14
|
-
constructor({ originator, eventHandlers,
|
|
14
|
+
constructor({ originator, eventHandlers, }: {
|
|
15
15
|
originator?: string;
|
|
16
16
|
eventHandlers: TEventHandlers;
|
|
17
|
-
remoteIdentity: NameAddrHeader;
|
|
18
17
|
});
|
|
19
18
|
get contact(): string;
|
|
20
19
|
get direction(): SessionDirection;
|
|
@@ -49,7 +48,7 @@ declare class BaseSession implements RTCSession {
|
|
|
49
48
|
addListener(_event: string | symbol, _listener: (...arguments_: unknown[]) => void): this;
|
|
50
49
|
once(_event: string | symbol, _listener: (...arguments_: unknown[]) => void): this;
|
|
51
50
|
removeListener(_event: string | symbol, _listener: (...arguments_: unknown[]) => void): this;
|
|
52
|
-
off(
|
|
51
|
+
off(_event: string | symbol, _listener: (...arguments_: unknown[]) => void): this;
|
|
53
52
|
removeAllListeners(_event?: string | symbol): this;
|
|
54
53
|
setMaxListeners(_n: number): this;
|
|
55
54
|
getMaxListeners(): number;
|
|
@@ -60,7 +59,7 @@ declare class BaseSession implements RTCSession {
|
|
|
60
59
|
prependListener(_event: string | symbol, _listener: (...arguments_: unknown[]) => void): this;
|
|
61
60
|
prependOnceListener(_event: string | symbol, _listener: (...arguments_: unknown[]) => void): this;
|
|
62
61
|
eventNames(): (string | symbol)[];
|
|
63
|
-
initEvents(eventHandlers
|
|
62
|
+
initEvents(eventHandlers: TEventHandlers): void;
|
|
64
63
|
on<T>(eventName: string, handler: (data: T) => void): this;
|
|
65
64
|
trigger(eventName: TEventSession, data?: unknown): void;
|
|
66
65
|
/**
|
|
@@ -72,6 +71,7 @@ declare class BaseSession implements RTCSession {
|
|
|
72
71
|
*/
|
|
73
72
|
sendDTMF(): void;
|
|
74
73
|
startPresentation(stream: MediaStream): Promise<MediaStream>;
|
|
74
|
+
updatePresentation(stream: MediaStream): Promise<MediaStream>;
|
|
75
75
|
stopPresentation(stream: MediaStream): Promise<MediaStream>;
|
|
76
76
|
isEstablished(): boolean;
|
|
77
77
|
}
|
|
@@ -1,9 +1,8 @@
|
|
|
1
|
-
import { IncomingInfoEvent
|
|
1
|
+
import { IncomingInfoEvent } from '@krivega/jssip';
|
|
2
2
|
import { TEventHandlers, default as BaseSession } from './BaseSession.mock';
|
|
3
3
|
export declare const FAILED_CONFERENCE_NUMBER = "777";
|
|
4
4
|
export declare const createDeclineStartPresentationError: () => Error;
|
|
5
5
|
declare class RTCSessionMock extends BaseSession {
|
|
6
|
-
private static presentationError?;
|
|
7
6
|
private static startPresentationError?;
|
|
8
7
|
private static countStartPresentationError;
|
|
9
8
|
private static countStartsPresentation;
|
|
@@ -21,23 +20,18 @@ declare class RTCSessionMock extends BaseSession {
|
|
|
21
20
|
answer: jest.Mock<void, [{
|
|
22
21
|
mediaStream: MediaStream;
|
|
23
22
|
}], any>;
|
|
24
|
-
replaceMediaStream: jest.Mock<Promise<void>, [_mediaStream: MediaStream], any>;
|
|
25
23
|
private isEndedInner;
|
|
26
|
-
constructor({ url, mediaStream, eventHandlers, originator,
|
|
24
|
+
constructor({ url, mediaStream, eventHandlers, originator, }: {
|
|
27
25
|
url?: string;
|
|
28
26
|
mediaStream?: MediaStream;
|
|
29
27
|
eventHandlers: TEventHandlers;
|
|
30
28
|
originator: string;
|
|
31
|
-
remoteIdentity?: NameAddrHeader;
|
|
32
29
|
});
|
|
33
|
-
static setPresentationError(presentationError: Error): void;
|
|
34
|
-
static resetPresentationError(): void;
|
|
35
30
|
static setStartPresentationError(startPresentationError: Error, { count }?: {
|
|
36
31
|
count?: number;
|
|
37
32
|
}): void;
|
|
38
33
|
static resetStartPresentationError(): void;
|
|
39
|
-
startPresentation
|
|
40
|
-
stopPresentation: (stream: MediaStream) => Promise<MediaStream>;
|
|
34
|
+
startPresentation(stream: MediaStream): Promise<MediaStream>;
|
|
41
35
|
initPeerconnection(mediaStream: MediaStream | undefined): boolean;
|
|
42
36
|
createPeerconnection(sendedStream: MediaStream): void;
|
|
43
37
|
connect(target: string): void;
|
|
@@ -68,6 +62,7 @@ declare class RTCSessionMock extends BaseSession {
|
|
|
68
62
|
audio: boolean;
|
|
69
63
|
video: boolean;
|
|
70
64
|
};
|
|
65
|
+
replaceMediaStream(_mediaStream: MediaStream): Promise<void>;
|
|
71
66
|
onmute({ audio, video }: {
|
|
72
67
|
audio: boolean;
|
|
73
68
|
video: boolean;
|
|
@@ -18,17 +18,6 @@ declare class UA implements IUA {
|
|
|
18
18
|
mediaStream: MediaStream;
|
|
19
19
|
eventHandlers: TEventHandlers;
|
|
20
20
|
}], any>;
|
|
21
|
-
sendOptions: jest.Mock<void, [target: string, body?: string | undefined, options?: Record<string, unknown> | undefined], any>;
|
|
22
|
-
/**
|
|
23
|
-
* start – имитирует запуск UA.
|
|
24
|
-
*/
|
|
25
|
-
start: jest.Mock<void, [], any>;
|
|
26
|
-
/**
|
|
27
|
-
* stop – имитирует остановку UA.
|
|
28
|
-
*/
|
|
29
|
-
stop: jest.Mock<void, [], any>;
|
|
30
|
-
removeAllListeners: jest.Mock<this, [], any>;
|
|
31
|
-
once: jest.Mock<this, [eventName: string, handler: () => void], any>;
|
|
32
21
|
private startedTimeout?;
|
|
33
22
|
private stopedTimeout?;
|
|
34
23
|
private session?;
|
|
@@ -42,9 +31,22 @@ declare class UA implements IUA {
|
|
|
42
31
|
static resetStartError(): void;
|
|
43
32
|
static setAvailableTelephony(): void;
|
|
44
33
|
static setNotAvailableTelephony(): void;
|
|
45
|
-
|
|
34
|
+
/**
|
|
35
|
+
* start
|
|
36
|
+
*
|
|
37
|
+
* @returns {undefined}
|
|
38
|
+
*/
|
|
39
|
+
start(): void;
|
|
40
|
+
/**
|
|
41
|
+
* stop
|
|
42
|
+
*
|
|
43
|
+
* @returns {undefined}
|
|
44
|
+
*/
|
|
45
|
+
stop(): void;
|
|
46
46
|
on<T extends keyof UAEventMap>(eventName: T, handler: UAEventMap[T]): this;
|
|
47
|
+
once<T extends keyof UAEventMap>(eventName: T, handler: UAEventMap[T]): this;
|
|
47
48
|
off<T extends keyof UAEventMap>(eventName: T, handler: UAEventMap[T]): this;
|
|
49
|
+
removeAllListeners(): this;
|
|
48
50
|
trigger<T extends keyof UAEventMap>(eventName: T, data: Parameters<UAEventMap[T]>[0]): void;
|
|
49
51
|
/**
|
|
50
52
|
* terminateSessions
|
|
@@ -40,7 +40,7 @@ export declare const uaConfigurationWithAuthorization: {
|
|
|
40
40
|
session_timers: boolean;
|
|
41
41
|
sockets: import('./WebSocketInterface.mock').default[];
|
|
42
42
|
user_agent: string;
|
|
43
|
-
|
|
43
|
+
sdp_semantics: string;
|
|
44
44
|
register_expires: number;
|
|
45
45
|
connection_recovery_max_interval: number;
|
|
46
46
|
connection_recovery_min_interval: number;
|
|
@@ -53,7 +53,7 @@ export declare const uaConfigurationWithAuthorizationWithDisplayName: {
|
|
|
53
53
|
session_timers: boolean;
|
|
54
54
|
sockets: import('./WebSocketInterface.mock').default[];
|
|
55
55
|
user_agent: string;
|
|
56
|
-
|
|
56
|
+
sdp_semantics: string;
|
|
57
57
|
register_expires: number;
|
|
58
58
|
connection_recovery_max_interval: number;
|
|
59
59
|
connection_recovery_min_interval: number;
|
|
@@ -64,7 +64,7 @@ export declare const uaConfigurationWithoutAuthorization: {
|
|
|
64
64
|
session_timers: boolean;
|
|
65
65
|
sockets: import('./WebSocketInterface.mock').default[];
|
|
66
66
|
user_agent: string;
|
|
67
|
-
|
|
67
|
+
sdp_semantics: string;
|
|
68
68
|
register_expires: number;
|
|
69
69
|
connection_recovery_max_interval: number;
|
|
70
70
|
connection_recovery_min_interval: number;
|
|
@@ -75,7 +75,7 @@ export declare const uaConfigurationWithoutAuthorizationWithoutDisplayName: {
|
|
|
75
75
|
session_timers: boolean;
|
|
76
76
|
sockets: import('./WebSocketInterface.mock').default[];
|
|
77
77
|
user_agent: string;
|
|
78
|
-
|
|
78
|
+
sdp_semantics: string;
|
|
79
79
|
register_expires: number;
|
|
80
80
|
connection_recovery_max_interval: number;
|
|
81
81
|
connection_recovery_min_interval: number;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { RTCSession, UA } from '@krivega/jssip';
|
|
2
|
-
import { default as
|
|
2
|
+
import { default as UAmock } from './UA.mock';
|
|
3
3
|
import { default as WebSocketInterfaceMock } from './WebSocketInterface.mock';
|
|
4
4
|
declare const jssip: {
|
|
5
5
|
triggerNewInfo: (rtcSession: RTCSession, extraHeaders: [string, string][]) => void;
|
|
6
6
|
triggerNewSipEvent: (ua: UA, extraHeaders: [string, string][]) => void;
|
|
7
|
-
triggerIncomingSession: (ua:
|
|
7
|
+
triggerIncomingSession: (ua: UAmock, { incomingNumber, displayName, host, }: {
|
|
8
8
|
incomingNumber?: string;
|
|
9
9
|
displayName: string;
|
|
10
10
|
host: string;
|
|
@@ -13,7 +13,7 @@ declare const jssip: {
|
|
|
13
13
|
originator: "local" | "remote";
|
|
14
14
|
}) => void;
|
|
15
15
|
WebSocketInterface: typeof WebSocketInterfaceMock;
|
|
16
|
-
UA: typeof
|
|
16
|
+
UA: typeof UAmock;
|
|
17
17
|
C: {
|
|
18
18
|
INVITE: string;
|
|
19
19
|
};
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
export declare const CONNECTION_ERROR = "Connection Error";
|
|
2
|
+
export declare const REQUEST_TIMEOUT = "Request Timeout";
|
|
3
|
+
export declare const SIP_FAILURE_CODE = "SIP Failure Code";
|
|
4
|
+
export declare const INTERNAL_ERROR = "Internal Error";
|
|
5
|
+
export declare const BUSY = "Busy";
|
|
6
|
+
export declare const REJECTED = "Rejected";
|
|
7
|
+
export declare const REDIRECTED = "Redirected";
|
|
8
|
+
export declare const UNAVAILABLE = "Unavailable";
|
|
9
|
+
export declare const NOT_FOUND = "Not Found";
|
|
10
|
+
export declare const ADDRESS_INCOMPLETE = "Address Incomplete";
|
|
11
|
+
export declare const INCOMPATIBLE_SDP = "Incompatible SDP";
|
|
12
|
+
export declare const MISSING_SDP = "Missing SDP";
|
|
13
|
+
export declare const AUTHENTICATION_ERROR = "Authentication Error";
|
|
14
|
+
export declare const BYE = "Terminated";
|
|
15
|
+
export declare const WEBRTC_ERROR = "WebRTC Error";
|
|
16
|
+
export declare const CANCELED = "Canceled";
|
|
17
|
+
export declare const NO_ANSWER = "No Answer";
|
|
18
|
+
export declare const EXPIRES = "Expires";
|
|
19
|
+
export declare const NO_ACK = "No ACK";
|
|
20
|
+
export declare const DIALOG_ERROR = "Dialog Error";
|
|
21
|
+
export declare const USER_DENIED_MEDIA_ACCESS = "User Denied Media Access";
|
|
22
|
+
export declare const BAD_MEDIA_DESCRIPTION = "Bad Media Description";
|
|
23
|
+
export declare const RTP_TIMEOUT = "RTP Timeout";
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import { SipConnector } from './SipConnector';
|
|
1
|
+
import { default as SipConnector } from './SipConnector';
|
|
2
2
|
export { FAILED_CONFERENCE_NUMBER } from './__fixtures__/RTCSessionMock';
|
|
3
3
|
export { NAME_INCORRECT, PASSWORD_CORRECT, PASSWORD_CORRECT_2 } from './__fixtures__/UA.mock';
|
|
4
4
|
export * from './__fixtures__/index';
|
|
5
5
|
export declare const doMockSipConnector: () => SipConnector;
|
|
6
|
-
export { default as JsSIP } from './__fixtures__/jssip.mock';
|
|
@@ -2,7 +2,7 @@ export declare const UA_SYNTHETICS_EVENT_NAMES: readonly ["incomingCall", "decli
|
|
|
2
2
|
export declare const UA_JSSIP_EVENT_NAMES: readonly ["connecting", "connected", "disconnected", "newRTCSession", "registered", "unregistered", "registrationFailed", "newMessage", "sipEvent"];
|
|
3
3
|
export declare const SESSION_SYNTHETICS_EVENT_NAMES: readonly ["availableSecondRemoteStream", "notAvailableSecondRemoteStream", "mustStopPresentation", "shareState", "enterRoom", "useLicense", "peerconnection:confirmed", "peerconnection:ontrack", "channels", "ended:fromserver", "main-cam-control", "admin-start-main-cam", "admin-stop-main-cam", "admin-stop-mic", "admin-start-mic", "admin-force-sync-media-state", "participant:move-request-to-spectators", "participant:move-request-to-participants"];
|
|
4
4
|
export declare const SESSION_JSSIP_EVENT_NAMES: readonly ["ended", "connecting", "sending", "reinvite", "replaces", "refer", "progress", "accepted", "confirmed", "peerconnection", "failed", "muted", "unmuted", "newDTMF", "newInfo", "hold", "unhold", "update", "sdp", "icecandidate", "getusermediafailed", "peerconnection:createofferfailed", "peerconnection:createanswerfailed", "peerconnection:setlocaldescriptionfailed", "peerconnection:setremotedescriptionfailed", "presentation:start", "presentation:started", "presentation:end", "presentation:ended", "presentation:failed"];
|
|
5
|
-
export declare const UA_EVENT_NAMES: ("connecting" | "connected" | "disconnected" | "newRTCSession" | "registered" | "unregistered" | "registrationFailed" | "newMessage" | "sipEvent" | "channels:notify" | "participant:added-to-list-moderators" | "participant:removed-from-list-moderators" | "participant:move-request-to-stream" | "participation:accepting-word-request" | "participation:cancelling-word-request" | "webcast:started" | "webcast:stopped" | "account:changed" | "account:deleted" | "conference:participant-token-issued"
|
|
5
|
+
export declare const UA_EVENT_NAMES: ("incomingCall" | "declinedIncomingCall" | "failedIncomingCall" | "terminatedIncomingCall" | "connecting" | "connected" | "disconnected" | "newRTCSession" | "registered" | "unregistered" | "registrationFailed" | "newMessage" | "sipEvent" | "channels:notify" | "participant:added-to-list-moderators" | "participant:removed-from-list-moderators" | "participant:move-request-to-stream" | "participation:accepting-word-request" | "participation:cancelling-word-request" | "webcast:started" | "webcast:stopped" | "account:changed" | "account:deleted" | "conference:participant-token-issued")[];
|
|
6
6
|
export declare const SESSION_EVENT_NAMES: readonly ["ended", "connecting", "sending", "reinvite", "replaces", "refer", "progress", "accepted", "confirmed", "peerconnection", "failed", "muted", "unmuted", "newDTMF", "newInfo", "hold", "unhold", "update", "sdp", "icecandidate", "getusermediafailed", "peerconnection:createofferfailed", "peerconnection:createanswerfailed", "peerconnection:setlocaldescriptionfailed", "peerconnection:setremotedescriptionfailed", "presentation:start", "presentation:started", "presentation:end", "presentation:ended", "presentation:failed", "availableSecondRemoteStream", "notAvailableSecondRemoteStream", "mustStopPresentation", "shareState", "enterRoom", "useLicense", "peerconnection:confirmed", "peerconnection:ontrack", "channels", "ended:fromserver", "main-cam-control", "admin-start-main-cam", "admin-stop-main-cam", "admin-stop-mic", "admin-start-mic", "admin-force-sync-media-state", "participant:move-request-to-spectators", "participant:move-request-to-participants"];
|
|
7
7
|
export type TEventUA = (typeof UA_EVENT_NAMES)[number];
|
|
8
8
|
export type TEventSession = (typeof SESSION_EVENT_NAMES)[number];
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
export declare const HEADER_CONTENT_TYPE_NAME = "content-type";
|
|
2
|
+
export declare const HEADER_CONTENT_ENTER_ROOM = "x-webrtc-enter-room";
|
|
3
|
+
export declare const CONTENT_TYPE_SHARE_STATE = "application/vinteo.webrtc.sharedesktop";
|
|
4
|
+
export declare const CONTENT_TYPE_ENTER_ROOM = "application/vinteo.webrtc.roomname";
|
|
5
|
+
export declare const CONTENT_TYPE_CHANNELS = "application/vinteo.webrtc.channels";
|
|
6
|
+
export declare const CONTENT_TYPE_MEDIA_STATE = "application/vinteo.webrtc.mediastate";
|
|
7
|
+
export declare const CONTENT_TYPE_REFUSAL = "application/vinteo.webrtc.refusal";
|
|
8
|
+
export declare const CONTENT_TYPE_MAIN_CAM = "application/vinteo.webrtc.maincam";
|
|
9
|
+
export declare const CONTENT_TYPE_MIC = "application/vinteo.webrtc.mic";
|
|
10
|
+
export declare const CONTENT_TYPE_USE_LICENSE = "application/vinteo.webrtc.uselic";
|
|
11
|
+
export declare const HEADER_CONTENT_USE_LICENSE = "X-WEBRTC-USE-LICENSE";
|
|
12
|
+
export declare const HEADER_PARTICIPANT_NAME = "X-WEBRTC-PARTICIPANT-NAME";
|
|
13
|
+
export declare const HEADER_INPUT_CHANNELS = "X-WEBRTC-INPUT-CHANNELS";
|
|
14
|
+
export declare const HEADER_OUTPUT_CHANNELS = "X-WEBRTC-OUTPUT-CHANNELS";
|
|
15
|
+
export declare const HEADER_MAIN_CAM = "X-WEBRTC-MAINCAM";
|
|
16
|
+
export declare const HEADER_MIC = "X-WEBRTC-MIC";
|
|
17
|
+
export declare const HEADER_MEDIA_SYNC = "X-WEBRTC-SYNC";
|
|
18
|
+
export declare const HEADER_MAIN_CAM_RESOLUTION = "X-WEBRTC-MAINCAM-RESOLUTION";
|
|
19
|
+
export declare const HEADER_MEDIA_STATE = "X-WEBRTC-MEDIA-STATE";
|
|
20
|
+
export declare const HEADER_MEDIA_TYPE = "X-Vinteo-Media-Type";
|
|
21
|
+
export declare const HEADER_MAIN_CAM_STATE = "X-Vinteo-MainCam-State";
|
|
22
|
+
export declare const HEADER_MIC_STATE = "X-Vinteo-Mic-State";
|
|
23
|
+
export declare const CONTENT_TYPE_PARTICIPANT_STATE = "application/vinteo.webrtc.partstate";
|
|
24
|
+
export declare const HEADER_CONTENT_PARTICIPANT_STATE = "X-WEBRTC-PARTSTATE";
|
|
25
|
+
export declare const CONTENT_TYPE_NOTIFY = "application/vinteo.webrtc.notify";
|
|
26
|
+
export declare const HEADER_NOTIFY = "X-VINTEO-NOTIFY";
|
|
27
|
+
export declare const HEADER_CONTENT_SHARE_STATE = "x-webrtc-share-state";
|
|
28
|
+
export declare const HEADER_START_PRESENTATION = "x-webrtc-share-state: LETMESTARTPRESENTATION";
|
|
29
|
+
export declare const HEADER_STOP_PRESENTATION = "x-webrtc-share-state: STOPPRESENTATION";
|
|
30
|
+
export declare const AVAILABLE_SECOND_REMOTE_STREAM = "YOUCANRECEIVECONTENT";
|
|
31
|
+
export declare const NOT_AVAILABLE_SECOND_REMOTE_STREAM = "CONTENTEND";
|
|
32
|
+
export declare const MUST_STOP_PRESENTATION = "YOUMUSTSTOPSENDCONTENT";
|
|
33
|
+
export declare const HEADER_MUST_STOP_PRESENTATION_P2P = "x-webrtc-share-state: YOUMUSTSTOPSENDCONTENT";
|
|
34
|
+
export declare const HEADER_START_PRESENTATION_P2P = "x-webrtc-share-state: YOUCANRECEIVECONTENT";
|
|
35
|
+
export declare const HEADER_STOP_PRESENTATION_P2P = "x-webrtc-share-state: CONTENTEND";
|
|
36
|
+
export declare const HEADER_CONTENT_ENABLE_MEDIA_DEVICE = "X-WEBRTC-REQUEST-ENABLE-MEDIA-DEVICE";
|
|
37
|
+
export declare const HEADER_ENABLE_MAIN_CAM = "X-WEBRTC-REQUEST-ENABLE-MEDIA-DEVICE: LETMESTARTMAINCAM";
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export * as causes from './causes';
|
|
2
|
+
export * as constants from './constants';
|
|
3
|
+
export * as eventNames from './eventNames';
|
|
4
|
+
export { debug, disableDebug, enableDebug } from './logger';
|
|
5
|
+
export { default as setParametersToSender } from './setParametersToSender';
|
|
6
|
+
export * as tools from './tools';
|
|
7
|
+
export * from './types';
|
|
8
|
+
export { default as getCodecFromSender } from './utils/getCodecFromSender';
|
|
9
|
+
export { default as resolveVideoSendingBalancer } from './videoSendingBalancer';
|
|
10
|
+
export { hasCanceledCallError, hasCanceledStartPresentationError, default as SipConnector, } from './SipConnector';
|
|
11
|
+
export { SipConnectorFacade } from './SipConnectorFacade';
|
|
@@ -95,7 +95,7 @@ export declare const uaConfigurationWithAuthorization: {
|
|
|
95
95
|
session_timers: boolean;
|
|
96
96
|
sockets: import('../../__fixtures__/WebSocketInterface.mock').default[];
|
|
97
97
|
user_agent: string;
|
|
98
|
-
|
|
98
|
+
sdp_semantics: string;
|
|
99
99
|
register_expires: number;
|
|
100
100
|
connection_recovery_max_interval: number;
|
|
101
101
|
connection_recovery_min_interval: number;
|
|
@@ -108,7 +108,7 @@ export declare const uaConfigurationWithAuthorizationPasswordChanged: {
|
|
|
108
108
|
session_timers: boolean;
|
|
109
109
|
sockets: import('../../__fixtures__/WebSocketInterface.mock').default[];
|
|
110
110
|
user_agent: string;
|
|
111
|
-
|
|
111
|
+
sdp_semantics: string;
|
|
112
112
|
register_expires: number;
|
|
113
113
|
connection_recovery_max_interval: number;
|
|
114
114
|
connection_recovery_min_interval: number;
|
|
@@ -2,5 +2,5 @@ export * as error from './error';
|
|
|
2
2
|
export { default as getExtraHeaders } from './getExtraHeaders';
|
|
3
3
|
export { default as getUserAgent } from './getUserAgent';
|
|
4
4
|
export { default as hasPurgatory, PURGATORY_CONFERENCE_NUMBER } from './hasPurgatory';
|
|
5
|
-
export { default as sendDtmfAccumulated } from './
|
|
5
|
+
export { default as sendDtmfAccumulated } from './sendDTMFAccumulated';
|
|
6
6
|
export { default as createSyncMediaState } from './syncMediaState';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { TContentHint } from '../
|
|
1
|
+
import { TContentHint } from '../types';
|
|
2
2
|
declare const prepareMediaStream: (mediaStream?: MediaStream, { directionVideo, directionAudio, contentHint, }?: {
|
|
3
3
|
directionVideo?: RTCRtpTransceiverDirection;
|
|
4
4
|
directionAudio?: RTCRtpTransceiverDirection;
|