@vkontakte/calls-sdk 2.8.11-dev.882b025a.0 → 2.8.11-dev.aeebd796.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/CallsSDK.d.ts +42 -12
- package/abstract/BaseApi.d.ts +1 -1
- package/abstract/BaseSignaling.d.ts +4 -3
- package/calls-sdk.cjs.js +16 -13
- package/calls-sdk.esm.js +11323 -13
- package/classes/Conversation.d.ts +7 -9
- package/classes/Logger.d.ts +4 -4
- package/classes/MediaSource.d.ts +0 -7
- package/classes/SignalingActor.d.ts +0 -5
- package/default/Signaling.d.ts +2 -1
- package/package.json +1 -1
- package/static/Debug.d.ts +4 -4
- package/static/External.d.ts +14 -38
- package/static/Params.d.ts +14 -22
- package/types/PerfStatReporter.d.ts +2 -1
- package/types/WebTransport.d.ts +1 -0
- package/utils/DebugStorage.d.ts +101 -1
- package/classes/CallRegistry.d.ts +0 -20
- package/static/Capabilities.d.ts +0 -5
- package/static/ConversationDebugLogger.d.ts +0 -13
- package/types/Capabilities.d.ts +0 -24
|
@@ -16,7 +16,7 @@ import { ConversationData, ConversationOnStartParams } from '../types/Conversati
|
|
|
16
16
|
import { ExternalId, ExternalParticipant, ExternalParticipantId, ExternalParticipantListChunk, ExternalUserId } from '../types/ExternalId';
|
|
17
17
|
import type { FastJoinHandler } from '../types/FastJoin';
|
|
18
18
|
import MediaModifiers from '../types/MediaModifiers';
|
|
19
|
-
import
|
|
19
|
+
import { IVideoDimentions } from '../types/MediaSettings';
|
|
20
20
|
import { IAddMovieParams, IUpdateMovieData } from '../types/MovieShare';
|
|
21
21
|
import MuteStates from '../types/MuteStates';
|
|
22
22
|
import { CompositeUserId, IGetParticipantsParameters, ParticipantId, ParticipantStateData } from '../types/Participant';
|
|
@@ -41,6 +41,7 @@ export default class Conversation extends EventEmitter {
|
|
|
41
41
|
private _pendingParticipants;
|
|
42
42
|
private _transport;
|
|
43
43
|
private _debugInfo;
|
|
44
|
+
private _debugSessionId;
|
|
44
45
|
private _volumesDetector;
|
|
45
46
|
private _speakerDetector;
|
|
46
47
|
private _localVolumeDetector;
|
|
@@ -49,8 +50,10 @@ export default class Conversation extends EventEmitter {
|
|
|
49
50
|
private _lastSignalledActiveSpeakerId;
|
|
50
51
|
private _isRealTimeAsrRequested;
|
|
51
52
|
private _serverSettings;
|
|
52
|
-
private
|
|
53
|
-
private
|
|
53
|
+
private static _current;
|
|
54
|
+
private static _activationMutex;
|
|
55
|
+
private static _delayedHangup;
|
|
56
|
+
private static _abortController;
|
|
54
57
|
private readonly _onUnload;
|
|
55
58
|
private readonly _audioOutput;
|
|
56
59
|
private _lastStalled;
|
|
@@ -67,10 +70,7 @@ export default class Conversation extends EventEmitter {
|
|
|
67
70
|
static current(): Conversation | null;
|
|
68
71
|
static hangupAfterInit(): void;
|
|
69
72
|
static id(): string | null;
|
|
70
|
-
get
|
|
71
|
-
get externalId(): ExternalParticipantId | undefined;
|
|
72
|
-
get mediaSettings(): MediaSettings | undefined;
|
|
73
|
-
get isCallHeld(): boolean;
|
|
73
|
+
get debugSessionId(): string | null;
|
|
74
74
|
onStart({ opponentIds, opponentType, mediaOptions, payload, joiningAllowed, requireAuthToJoin, onlyAdminCanShareMovie, externalIds, onFastStart, conversationId, }: ConversationOnStartParams): Promise<ConversationData>;
|
|
75
75
|
onJoin(joinArgs: {
|
|
76
76
|
conversationId?: string;
|
|
@@ -404,8 +404,6 @@ export default class Conversation extends EventEmitter {
|
|
|
404
404
|
private _getParticipants;
|
|
405
405
|
private _getParticipant;
|
|
406
406
|
}
|
|
407
|
-
declare function _resetPendingInstance(): void;
|
|
408
|
-
export { _resetPendingInstance };
|
|
409
407
|
export declare class UpdateDisplayLayoutError extends Error {
|
|
410
408
|
readonly participantErrors: {
|
|
411
409
|
externalId: ExternalParticipantId;
|
package/classes/Logger.d.ts
CHANGED
|
@@ -10,8 +10,8 @@ export default class Logger extends BaseLogger {
|
|
|
10
10
|
static setConversationIdProvider(provider: () => string | null): void;
|
|
11
11
|
static create(api: BaseApi, externalLogger: BaseLogger | null): void;
|
|
12
12
|
static log(name: StatLog, value?: string, immediately?: boolean): void;
|
|
13
|
-
static logClientStats(params: Record<string, string | number | undefined | null>, immediately?: boolean): void;
|
|
14
|
-
static logClientEvent(params: Record<string, string | number | undefined | null>, immediately?: boolean): void;
|
|
13
|
+
static logClientStats(params: Record<string, string | number | boolean | undefined | null>, immediately?: boolean): void;
|
|
14
|
+
static logClientEvent(params: Record<string, string | number | boolean | undefined | null>, immediately?: boolean): void;
|
|
15
15
|
static destroy(): void;
|
|
16
16
|
private readonly _externalLogger;
|
|
17
17
|
private readonly _api;
|
|
@@ -22,8 +22,8 @@ export default class Logger extends BaseLogger {
|
|
|
22
22
|
private _serverTimeDelta;
|
|
23
23
|
constructor(api: BaseApi, externalLogger: BaseLogger | null);
|
|
24
24
|
log(name: StatLog, value?: string, immediately?: boolean): void;
|
|
25
|
-
logClientStats(data: Record<string, string | number | undefined | null>, immediately?: boolean): void;
|
|
26
|
-
logClientEvent(data: Record<string, string | number | undefined | null>, immediately?: boolean): void;
|
|
25
|
+
logClientStats(data: Record<string, string | number | boolean | undefined | null>, immediately?: boolean): void;
|
|
26
|
+
logClientEvent(data: Record<string, string | number | boolean | undefined | null>, immediately?: boolean): void;
|
|
27
27
|
destroy(): void;
|
|
28
28
|
private _getConversationId;
|
|
29
29
|
private _sendBatch;
|
package/classes/MediaSource.d.ts
CHANGED
|
@@ -45,7 +45,6 @@ export declare class MediaSource extends EventEmitter {
|
|
|
45
45
|
/** Трек аудио эффектов. Не изменяется на протяжении всего времени */
|
|
46
46
|
private _audioEffectsTrack;
|
|
47
47
|
private _mediaSettings;
|
|
48
|
-
private _lastMediaSettings;
|
|
49
48
|
private _videoStatusOnScreenCapturingEnabled;
|
|
50
49
|
private _effect;
|
|
51
50
|
private _audioEffectParams;
|
|
@@ -64,11 +63,7 @@ export declare class MediaSource extends EventEmitter {
|
|
|
64
63
|
getSendAudioTrack(): MediaStreamTrack | null;
|
|
65
64
|
get isAnimojiRequested(): boolean;
|
|
66
65
|
addTrackToPeerConnection(pc: RTCPeerConnection, observer: boolean, noDataChannel: boolean): void;
|
|
67
|
-
/**
|
|
68
|
-
* @deprecated Используйте гетер mediaSettings
|
|
69
|
-
*/
|
|
70
66
|
getMediaSettings(): MediaSettings;
|
|
71
|
-
get mediaSettings(): MediaSettings;
|
|
72
67
|
changeDevice(kind: MediaDeviceKind): Promise<void>;
|
|
73
68
|
/**
|
|
74
69
|
* Установка кастомного стрима для видео, например внешний шаринг экрана
|
|
@@ -96,8 +91,6 @@ export declare class MediaSource extends EventEmitter {
|
|
|
96
91
|
private _setEffect;
|
|
97
92
|
private _stopEffect;
|
|
98
93
|
destroy(): void;
|
|
99
|
-
stopLocalMedia(): Promise<void>;
|
|
100
|
-
resumeLocalMedia(): Promise<void>;
|
|
101
94
|
toggleScreenCapturing(settings: ScreenCaptureSettings): Promise<void>;
|
|
102
95
|
disableScreenCapturing(): Promise<void>;
|
|
103
96
|
private videoTrackMuteHandler;
|
|
@@ -3,12 +3,7 @@ export declare class SignalingActor {
|
|
|
3
3
|
private processor;
|
|
4
4
|
private queue;
|
|
5
5
|
private isProcessing;
|
|
6
|
-
private isHeld;
|
|
7
|
-
private isDestroyed;
|
|
8
6
|
constructor(processor: (message: SignalingMessage) => Promise<unknown> | unknown);
|
|
9
7
|
add(message: SignalingMessage): void;
|
|
10
|
-
hold(): void;
|
|
11
|
-
unhold(): void;
|
|
12
|
-
destroy(): void;
|
|
13
8
|
private processQueue;
|
|
14
9
|
}
|
package/default/Signaling.d.ts
CHANGED
|
@@ -39,7 +39,6 @@ export default class Signaling extends BaseSignaling {
|
|
|
39
39
|
protected conversationReject: Function | null;
|
|
40
40
|
private connected;
|
|
41
41
|
private listenersReady;
|
|
42
|
-
private postfix;
|
|
43
42
|
protected peerId: number | null;
|
|
44
43
|
protected conversationId: string | null;
|
|
45
44
|
private reconnectTimer;
|
|
@@ -164,6 +163,7 @@ export default class Signaling extends BaseSignaling {
|
|
|
164
163
|
startAsr(params: IAsrStartParams): Promise<SignalingMessage>;
|
|
165
164
|
stopAsr(params?: IAsrStopParams): Promise<SignalingMessage>;
|
|
166
165
|
requestAsr(request: boolean): Promise<SignalingMessage>;
|
|
166
|
+
private _buildUrl;
|
|
167
167
|
protected _connect(connectionType: SignalingConnectionType, useWebTransport: boolean): void;
|
|
168
168
|
protected _disconnect(code?: number): void;
|
|
169
169
|
private _onOpen;
|
|
@@ -173,6 +173,7 @@ export default class Signaling extends BaseSignaling {
|
|
|
173
173
|
protected _handleCachedMessages(): void;
|
|
174
174
|
private _throwError;
|
|
175
175
|
private _onError;
|
|
176
|
+
private _serializeErrorEvent;
|
|
176
177
|
protected _onClose(event: CloseEvent): void;
|
|
177
178
|
protected _closeSocket(error?: Error | null): void;
|
|
178
179
|
protected _reconnect(): void;
|
package/package.json
CHANGED
package/static/Debug.d.ts
CHANGED
|
@@ -8,10 +8,10 @@ export declare enum DebugMessageType {
|
|
|
8
8
|
ERROR = "ERROR"
|
|
9
9
|
}
|
|
10
10
|
declare namespace Debug {
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
11
|
+
function debug(...args: any[]): void;
|
|
12
|
+
function log(...args: any[]): void;
|
|
13
|
+
function warn(...args: any[]): void;
|
|
14
|
+
function error(...args: any[]): void;
|
|
15
15
|
function enabled(): boolean;
|
|
16
16
|
function toggle(enable: boolean): void;
|
|
17
17
|
function send(type: DebugMessageType, ...args: any[]): void;
|
package/static/External.d.ts
CHANGED
|
@@ -47,9 +47,8 @@ declare namespace External {
|
|
|
47
47
|
*
|
|
48
48
|
* @param stream
|
|
49
49
|
* @param mediaSettings
|
|
50
|
-
* @param conversationId ID звонка
|
|
51
50
|
*/
|
|
52
|
-
function onLocalStream(stream: MediaStream | null, mediaSettings: MediaSettings
|
|
51
|
+
function onLocalStream(stream: MediaStream | null, mediaSettings: MediaSettings): void;
|
|
53
52
|
/**
|
|
54
53
|
* Локальный стрим с экрана добавлен/удалён
|
|
55
54
|
*
|
|
@@ -81,18 +80,16 @@ declare namespace External {
|
|
|
81
80
|
* Изменился статус локального соединения
|
|
82
81
|
*
|
|
83
82
|
* @param status
|
|
84
|
-
* @param conversationId ID звонка
|
|
85
83
|
*/
|
|
86
|
-
function onLocalStatus(status: ParticipantStatus
|
|
84
|
+
function onLocalStatus(status: ParticipantStatus): void;
|
|
87
85
|
/**
|
|
88
86
|
* Получен стрим собеседника.
|
|
89
87
|
* Если сервер закончил стримить собеседника, вместо стрима будет передан null
|
|
90
88
|
*
|
|
91
89
|
* @param userId
|
|
92
90
|
* @param stream
|
|
93
|
-
* @param conversationId ID звонка
|
|
94
91
|
*/
|
|
95
|
-
function onRemoteStream(userId: ExternalParticipantId, stream: MediaStream | null
|
|
92
|
+
function onRemoteStream(userId: ExternalParticipantId, stream: MediaStream | null): void;
|
|
96
93
|
/**
|
|
97
94
|
* Получен стрим лайв от собеседника.
|
|
98
95
|
* Если сервер закончил стримить собеседника, вместо стрима будет передан null
|
|
@@ -129,9 +126,8 @@ declare namespace External {
|
|
|
129
126
|
*
|
|
130
127
|
* @param userId
|
|
131
128
|
* @param stream
|
|
132
|
-
* @param conversationId ID звонка
|
|
133
129
|
*/
|
|
134
|
-
function onRemoteScreenStream(userId: ExternalParticipantId, stream: MediaStream | null
|
|
130
|
+
function onRemoteScreenStream(userId: ExternalParticipantId, stream: MediaStream | null): void;
|
|
135
131
|
/**
|
|
136
132
|
* Получен стрим вимоджи собеседника.
|
|
137
133
|
* Если сервер закончил стримить собеседника, вместо стрима будет передан null
|
|
@@ -156,9 +152,8 @@ declare namespace External {
|
|
|
156
152
|
* @param muteStates Состояние устройств при входе в звонок
|
|
157
153
|
* @param participants Список участников звонка
|
|
158
154
|
* @param rooms Список сессионных залов в звонке
|
|
159
|
-
* @param conversationId ID звонка
|
|
160
155
|
*/
|
|
161
|
-
function onConversation(userId: ExternalParticipantId, mediaModifiers: MediaModifiers, muteStates: MuteStates, participants: ExternalParticipant[], rooms?: Rooms
|
|
156
|
+
function onConversation(userId: ExternalParticipantId, mediaModifiers: MediaModifiers, muteStates: MuteStates, participants: ExternalParticipant[], rooms?: Rooms): void;
|
|
162
157
|
/**
|
|
163
158
|
* Постраничные данные про участников при начале звонка
|
|
164
159
|
* @param chunk
|
|
@@ -224,17 +219,15 @@ declare namespace External {
|
|
|
224
219
|
*
|
|
225
220
|
* @param userId
|
|
226
221
|
* @param markers
|
|
227
|
-
* @param conversationId ID звонка
|
|
228
222
|
*/
|
|
229
|
-
function onParticipantAdded(userId: ExternalId, markers: ExternalParticipantListMarkers | null
|
|
223
|
+
function onParticipantAdded(userId: ExternalId, markers: ExternalParticipantListMarkers | null): void;
|
|
230
224
|
/**
|
|
231
225
|
* Участник подключился
|
|
232
226
|
*
|
|
233
227
|
* @param userId
|
|
234
228
|
* @param markers
|
|
235
|
-
* @param conversationId ID звонка
|
|
236
229
|
*/
|
|
237
|
-
function onParticipantJoined(userId: ExternalId, markers: ExternalParticipantListMarkers | null
|
|
230
|
+
function onParticipantJoined(userId: ExternalId, markers: ExternalParticipantListMarkers | null): void;
|
|
238
231
|
function onLocalParticipantState(participantState: ParticipantStateMapped, global?: boolean): void;
|
|
239
232
|
/**
|
|
240
233
|
* Изменились данные состояний собеседника
|
|
@@ -257,9 +250,8 @@ declare namespace External {
|
|
|
257
250
|
* @param userIds
|
|
258
251
|
* @param status
|
|
259
252
|
* @param data
|
|
260
|
-
* @param conversationId ID звонка
|
|
261
253
|
*/
|
|
262
|
-
function onRemoteStatus(userIds: ExternalParticipantId[], status: ParticipantStatus, data?: any
|
|
254
|
+
function onRemoteStatus(userIds: ExternalParticipantId[], status: ParticipantStatus, data?: any): void;
|
|
263
255
|
/**
|
|
264
256
|
* Разрешения на доступы были запрошены в браузере
|
|
265
257
|
*/
|
|
@@ -276,26 +268,23 @@ declare namespace External {
|
|
|
276
268
|
*
|
|
277
269
|
* @param userId
|
|
278
270
|
* @param markers
|
|
279
|
-
* @param conversationId ID звонка
|
|
280
271
|
*/
|
|
281
|
-
function onRemoteRemoved(userId: ExternalParticipantId, markers: ExternalParticipantListMarkers | null
|
|
272
|
+
function onRemoteRemoved(userId: ExternalParticipantId, markers: ExternalParticipantListMarkers | null): void;
|
|
282
273
|
/**
|
|
283
274
|
* Изменилось состояние звонка
|
|
284
275
|
*
|
|
285
276
|
* @param isCallActive Активен ли сейчас звонок
|
|
286
277
|
* @param canAddParticipants Можно ли добавлять собеседников
|
|
287
278
|
* @param conversation Информация о звонке
|
|
288
|
-
* @param conversationId ID звонка
|
|
289
279
|
*/
|
|
290
|
-
function onCallState(isCallActive: boolean, canAddParticipants: boolean, conversation: ConversationData
|
|
280
|
+
function onCallState(isCallActive: boolean, canAddParticipants: boolean, conversation: ConversationData): void;
|
|
291
281
|
/**
|
|
292
282
|
* Изменилось состояние камеры или микрофона
|
|
293
283
|
*
|
|
294
284
|
* @param mediaOption Тип устройства
|
|
295
285
|
* @param enabled Включено или выключено
|
|
296
|
-
* @param conversationId ID звонка
|
|
297
286
|
*/
|
|
298
|
-
function onDeviceSwitched(mediaOption: MediaOption, enabled: boolean
|
|
287
|
+
function onDeviceSwitched(mediaOption: MediaOption, enabled: boolean): void;
|
|
299
288
|
/**
|
|
300
289
|
* Изменились состояния устройств пользователя или разрешения включать камеру/микрофон
|
|
301
290
|
*
|
|
@@ -350,34 +339,21 @@ declare namespace External {
|
|
|
350
339
|
function onOptionsChanged(options: ConversationOption[]): void;
|
|
351
340
|
/**
|
|
352
341
|
* Входящий звонок был принят мной
|
|
353
|
-
*
|
|
354
|
-
* @param conversationId ID звонка
|
|
355
|
-
*/
|
|
356
|
-
function onCallAccepted(conversationId?: string): void;
|
|
357
|
-
/**
|
|
358
|
-
* Входящий звонок получен во время активного звонка
|
|
359
|
-
*
|
|
360
|
-
* @param conversationId ID звонка
|
|
361
|
-
* @param externalId
|
|
362
|
-
* @param mediaSettings
|
|
363
342
|
*/
|
|
364
|
-
function
|
|
343
|
+
function onCallAccepted(): void;
|
|
365
344
|
/**
|
|
366
345
|
* Исходящий звонок был принят кем-то
|
|
367
|
-
*
|
|
368
346
|
* @param userId
|
|
369
347
|
* @param capabilities
|
|
370
|
-
* @param conversationId ID звонка
|
|
371
348
|
*/
|
|
372
|
-
function onAcceptedCall(userId: ExternalId, capabilities: ParticipantCapabilities
|
|
349
|
+
function onAcceptedCall(userId: ExternalId, capabilities: ParticipantCapabilities): void;
|
|
373
350
|
function onRateNeeded(): void;
|
|
374
351
|
/**
|
|
375
352
|
* Изменился говорящий в звонке
|
|
376
353
|
*
|
|
377
354
|
* @param userId
|
|
378
|
-
* @param conversationId ID звонка
|
|
379
355
|
*/
|
|
380
|
-
function onSpeakerChanged(userId: ExternalParticipantId
|
|
356
|
+
function onSpeakerChanged(userId: ExternalParticipantId): void;
|
|
381
357
|
/**
|
|
382
358
|
* Громкость собеседников
|
|
383
359
|
*
|
package/static/Params.d.ts
CHANGED
|
@@ -490,7 +490,7 @@ export type ParamsObject = {
|
|
|
490
490
|
/**
|
|
491
491
|
* Получен локальный стрим с камеры/микрофона
|
|
492
492
|
*/
|
|
493
|
-
onLocalStream?: (stream: MediaStream | null, mediaSettings: MediaSettings
|
|
493
|
+
onLocalStream?: (stream: MediaStream | null, mediaSettings: MediaSettings) => void;
|
|
494
494
|
/**
|
|
495
495
|
* Локальный стрим изменился
|
|
496
496
|
*/
|
|
@@ -510,12 +510,12 @@ export type ParamsObject = {
|
|
|
510
510
|
/**
|
|
511
511
|
* Изменился статус локального соединения
|
|
512
512
|
*/
|
|
513
|
-
onLocalStatus?: (status: ParticipantStatus
|
|
513
|
+
onLocalStatus?: (status: ParticipantStatus) => void;
|
|
514
514
|
/**
|
|
515
515
|
* Получен стрим собеседника.
|
|
516
516
|
* Если сервер закончил стримить собеседника, вместо стрима будет передан null
|
|
517
517
|
*/
|
|
518
|
-
onRemoteStream?: (userId: ExternalParticipantId, stream: MediaStream | null
|
|
518
|
+
onRemoteStream?: (userId: ExternalParticipantId, stream: MediaStream | null) => void;
|
|
519
519
|
/**
|
|
520
520
|
* Cтрим собеседника приостановлен/возобновлен.
|
|
521
521
|
*/
|
|
@@ -524,7 +524,7 @@ export type ParamsObject = {
|
|
|
524
524
|
* Получен стрим с экрана собеседника.
|
|
525
525
|
* Если сервер закончил стримить экран собеседника, вместо стрима будет передан null
|
|
526
526
|
*/
|
|
527
|
-
onRemoteScreenStream?: (userId: ExternalParticipantId, stream: MediaStream | null
|
|
527
|
+
onRemoteScreenStream?: (userId: ExternalParticipantId, stream: MediaStream | null) => void;
|
|
528
528
|
/**
|
|
529
529
|
* Получен стрим вимоджи собеседника.
|
|
530
530
|
* Если сервер закончил стримить вимоджи собеседника, вместо стрима будет передан null
|
|
@@ -551,7 +551,7 @@ export type ParamsObject = {
|
|
|
551
551
|
/**
|
|
552
552
|
* Начат звонок
|
|
553
553
|
*/
|
|
554
|
-
onConversation?: (userId: ExternalParticipantId, mediaModifiers: MediaModifiers, muteStates: MuteStates, participants: ExternalParticipant[], rooms?: Rooms
|
|
554
|
+
onConversation?: (userId: ExternalParticipantId, mediaModifiers: MediaModifiers, muteStates: MuteStates, participants: ExternalParticipant[], rooms?: Rooms) => void;
|
|
555
555
|
/**
|
|
556
556
|
* Начальный список участников для постраничного звонка
|
|
557
557
|
*/
|
|
@@ -583,11 +583,11 @@ export type ParamsObject = {
|
|
|
583
583
|
/**
|
|
584
584
|
* Добавили участника
|
|
585
585
|
*/
|
|
586
|
-
onParticipantAdded?: (userId: ExternalParticipantId, markers: ExternalParticipantListMarkers | null
|
|
586
|
+
onParticipantAdded?: (userId: ExternalParticipantId, markers: ExternalParticipantListMarkers | null) => void;
|
|
587
587
|
/**
|
|
588
588
|
* Участник присоединился к звонку
|
|
589
589
|
*/
|
|
590
|
-
onParticipantJoined?: (userId: ExternalParticipantId, markers: ExternalParticipantListMarkers
|
|
590
|
+
onParticipantJoined?: (userId: ExternalParticipantId, markers: ExternalParticipantListMarkers) => void;
|
|
591
591
|
/**
|
|
592
592
|
* Получены данные по изменению локальных состояний со стороны админа
|
|
593
593
|
* Например, принудительно опущена рука
|
|
@@ -607,7 +607,7 @@ export type ParamsObject = {
|
|
|
607
607
|
/**
|
|
608
608
|
* Изменился статус соединения собеседников
|
|
609
609
|
*/
|
|
610
|
-
onRemoteStatus?: (userIds: ExternalParticipantId[], status: ParticipantStatus, data: any
|
|
610
|
+
onRemoteStatus?: (userIds: ExternalParticipantId[], status: ParticipantStatus, data: any) => void;
|
|
611
611
|
/**
|
|
612
612
|
* Разрешения на доступы были запрошены в браузере
|
|
613
613
|
*/
|
|
@@ -619,15 +619,15 @@ export type ParamsObject = {
|
|
|
619
619
|
/**
|
|
620
620
|
* Пользователь отключился от звонка
|
|
621
621
|
*/
|
|
622
|
-
onRemoteRemoved?: (userId: ExternalParticipantId, markers: ExternalParticipantListMarkers | null
|
|
622
|
+
onRemoteRemoved?: (userId: ExternalParticipantId, markers: ExternalParticipantListMarkers | null) => void;
|
|
623
623
|
/**
|
|
624
624
|
* Изменилось состояние звонка
|
|
625
625
|
*/
|
|
626
|
-
onCallState?: (isCallActive: boolean, canAddParticipants: boolean, conversation: ConversationData
|
|
626
|
+
onCallState?: (isCallActive: boolean, canAddParticipants: boolean, conversation: ConversationData) => void;
|
|
627
627
|
/**
|
|
628
628
|
* Изменилось состояние камеры или микрофона
|
|
629
629
|
*/
|
|
630
|
-
onDeviceSwitched?: (mediaOption: MediaOption, enabled: boolean
|
|
630
|
+
onDeviceSwitched?: (mediaOption: MediaOption, enabled: boolean) => void;
|
|
631
631
|
/**
|
|
632
632
|
* Изменились состояния устройств пользователя или разрешения включать камеру/микрофон
|
|
633
633
|
*/
|
|
@@ -656,7 +656,7 @@ export type ParamsObject = {
|
|
|
656
656
|
/**
|
|
657
657
|
* Изменился говорящий в звонке
|
|
658
658
|
*/
|
|
659
|
-
onSpeakerChanged?: (userId: ExternalParticipantId
|
|
659
|
+
onSpeakerChanged?: (userId: ExternalParticipantId) => void;
|
|
660
660
|
/**
|
|
661
661
|
* Громкость собеседников
|
|
662
662
|
*/
|
|
@@ -676,12 +676,12 @@ export type ParamsObject = {
|
|
|
676
676
|
/**
|
|
677
677
|
* Входящий звонок был принят мной
|
|
678
678
|
*/
|
|
679
|
-
onCallAccepted?: (
|
|
679
|
+
onCallAccepted?: () => void;
|
|
680
680
|
/**
|
|
681
681
|
* Исходящий звонок был принят кем-то
|
|
682
682
|
* @param userId
|
|
683
683
|
*/
|
|
684
|
-
onAcceptedCall?: (userId: ExternalParticipantId, capabilities: ParticipantCapabilities
|
|
684
|
+
onAcceptedCall?: (userId: ExternalParticipantId, capabilities: ParticipantCapabilities) => void;
|
|
685
685
|
/**
|
|
686
686
|
* Список устройств изменился
|
|
687
687
|
*/
|
|
@@ -859,14 +859,6 @@ export type ParamsObject = {
|
|
|
859
859
|
* @param demoted участник разжалован
|
|
860
860
|
*/
|
|
861
861
|
onPromoted?: (demoted: boolean) => void;
|
|
862
|
-
/**
|
|
863
|
-
* Входящий звонок получен во время активного звонка
|
|
864
|
-
*
|
|
865
|
-
* @param conversationId ID звонка
|
|
866
|
-
* @param externalId Внешний ID вызывающего
|
|
867
|
-
* @param mediaSettings Настройки медиа
|
|
868
|
-
*/
|
|
869
|
-
onIncomingCall?: (conversationId: string, externalId: ExternalParticipantId | undefined, mediaSettings: MediaSettings | undefined) => void;
|
|
870
862
|
/**
|
|
871
863
|
* Собеседник подключился к сигналлингу
|
|
872
864
|
*/
|
|
@@ -41,10 +41,11 @@ export interface CallStatReport {
|
|
|
41
41
|
remote_connection_type?: RTCIceCandidateType;
|
|
42
42
|
}
|
|
43
43
|
export interface ICallStatLog extends Pick<CallStatReport, 'call_topology' | 'nack_sent' | 'nack_received' | 'pli_sent' | 'pli_received' | 'fir_sent' | 'fir_received' | 'frames_dropped' | 'stat_time_delta'>, Pick<Partial<CallStatReport>, 'rtt' | 'jitter_video' | 'jitter_audio' | 'interframe_delay_variance' | 'freeze_count' | 'total_freezes_duration' | 'ss_freeze_count' | 'ss_total_freezes_duration' | 'inserted_audio_samples_for_deceleration' | 'removed_audio_samples_for_acceleration' | 'concealed_audio_samples' | 'total_audio_energy' | 'local_address' | 'local_connection_type' | 'network_type' | 'transport' | 'remote_address' | 'remote_connection_type'> {
|
|
44
|
+
is_simulcast?: boolean;
|
|
44
45
|
concealed_silent_audio_samples?: number;
|
|
45
46
|
concealment_audio_avg_size?: number;
|
|
46
47
|
video_loss?: number;
|
|
47
48
|
audio_loss?: number;
|
|
48
49
|
cpu_hardware_concurrency?: number;
|
|
49
|
-
[k: string]: string | number | undefined;
|
|
50
|
+
[k: string]: string | number | boolean | undefined;
|
|
50
51
|
}
|
package/types/WebTransport.d.ts
CHANGED
package/utils/DebugStorage.d.ts
CHANGED
|
@@ -1,8 +1,108 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Запись отладочного лога SDK.
|
|
3
|
+
*/
|
|
1
4
|
export type CurrentLogItem = {
|
|
2
5
|
readonly t: number;
|
|
3
6
|
readonly l: string;
|
|
4
7
|
readonly d: any[];
|
|
5
8
|
readonly h: string;
|
|
6
9
|
};
|
|
7
|
-
|
|
10
|
+
/**
|
|
11
|
+
* Информация о сохраненной локальной сессии логирования.
|
|
12
|
+
*/
|
|
13
|
+
export type DebugLogSessionInfo = {
|
|
14
|
+
/**
|
|
15
|
+
* Внутренний id локальной сессии логирования.
|
|
16
|
+
*/
|
|
17
|
+
readonly sessionId: string;
|
|
18
|
+
/**
|
|
19
|
+
* Id звонка. Может быть null, если звонок не успел стартовать.
|
|
20
|
+
*/
|
|
21
|
+
readonly conversationId: string | null;
|
|
22
|
+
/**
|
|
23
|
+
* Время первой записи в ms.
|
|
24
|
+
*/
|
|
25
|
+
readonly startTime: number;
|
|
26
|
+
/**
|
|
27
|
+
* Время последней записи в ms.
|
|
28
|
+
*/
|
|
29
|
+
readonly endTime: number;
|
|
30
|
+
/**
|
|
31
|
+
* Время последнего обновления в ms.
|
|
32
|
+
*/
|
|
33
|
+
readonly updatedAt: number;
|
|
34
|
+
/**
|
|
35
|
+
* Размер сохраненных данных в байтах.
|
|
36
|
+
*/
|
|
37
|
+
readonly bytes: number;
|
|
38
|
+
/**
|
|
39
|
+
* Количество записей лога.
|
|
40
|
+
*/
|
|
41
|
+
readonly entriesCount: number;
|
|
42
|
+
};
|
|
43
|
+
/**
|
|
44
|
+
* Статистика локального хранилища отладочных логов.
|
|
45
|
+
*/
|
|
46
|
+
export type DebugLogStorageStats = {
|
|
47
|
+
/**
|
|
48
|
+
* Доступен ли IndexedDB для сохранения логов.
|
|
49
|
+
*/
|
|
50
|
+
readonly supported: boolean;
|
|
51
|
+
/**
|
|
52
|
+
* Количество сохраненных звонков.
|
|
53
|
+
*/
|
|
54
|
+
readonly callsCount: number;
|
|
55
|
+
/**
|
|
56
|
+
* Количество локальных сессий логирования.
|
|
57
|
+
*/
|
|
58
|
+
readonly sessionsCount: number;
|
|
59
|
+
/**
|
|
60
|
+
* Размер сохраненных логов SDK в байтах.
|
|
61
|
+
*/
|
|
62
|
+
readonly usedBytes: number;
|
|
63
|
+
/**
|
|
64
|
+
* Максимальный размер DebugStorage в байтах.
|
|
65
|
+
*/
|
|
66
|
+
readonly maxBytes: number;
|
|
67
|
+
/**
|
|
68
|
+
* Максимальное количество звонков в DebugStorage.
|
|
69
|
+
*/
|
|
70
|
+
readonly maxCalls: number;
|
|
71
|
+
/**
|
|
72
|
+
* Общая квота браузерного хранилища, если доступна.
|
|
73
|
+
*/
|
|
74
|
+
readonly quotaBytes?: number;
|
|
75
|
+
/**
|
|
76
|
+
* Использование браузерного хранилища, если доступно.
|
|
77
|
+
*/
|
|
78
|
+
readonly usageBytes?: number;
|
|
79
|
+
};
|
|
80
|
+
/**
|
|
81
|
+
* Параметры чтения или очистки локальных логов.
|
|
82
|
+
*/
|
|
83
|
+
export type DebugLogGetParams = {
|
|
84
|
+
/**
|
|
85
|
+
* Id звонка. Вернет все локальные сессии с этим conversationId.
|
|
86
|
+
*/
|
|
87
|
+
readonly conversationId: string;
|
|
88
|
+
readonly sessionId?: never;
|
|
89
|
+
} | {
|
|
90
|
+
/**
|
|
91
|
+
* Внутренний id локальной сессии из debugLogs.list().
|
|
92
|
+
*/
|
|
93
|
+
readonly sessionId: string;
|
|
94
|
+
readonly conversationId?: never;
|
|
95
|
+
};
|
|
96
|
+
export declare function add(level: string, args: any[], sessionId?: string): CurrentLogItem;
|
|
8
97
|
export declare function init(): void;
|
|
98
|
+
export declare function startSession(forceNew?: boolean): string;
|
|
99
|
+
export declare function setConversationId(conversationId: string | null, sessionId?: string): void;
|
|
100
|
+
export declare function list(): Promise<DebugLogSessionInfo[]>;
|
|
101
|
+
export declare function getCurrentSession(): Promise<DebugLogSessionInfo | null>;
|
|
102
|
+
export declare function get(params: DebugLogGetParams): Promise<CurrentLogItem[]>;
|
|
103
|
+
export declare function getJson(params: DebugLogGetParams): Promise<string>;
|
|
104
|
+
export declare function download(params: DebugLogGetParams): Promise<string>;
|
|
105
|
+
export declare function clear(params?: DebugLogGetParams): Promise<void>;
|
|
106
|
+
export declare function stats(): Promise<DebugLogStorageStats>;
|
|
107
|
+
export declare function getAllJson(): Promise<string>;
|
|
108
|
+
export declare function downloadAll(): Promise<string>;
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import Conversation from './Conversation';
|
|
2
|
-
export interface HoldableConversation extends Conversation {
|
|
3
|
-
id: string;
|
|
4
|
-
hold(hold: boolean): Promise<void>;
|
|
5
|
-
}
|
|
6
|
-
export declare class CallRegistry {
|
|
7
|
-
private _conversations;
|
|
8
|
-
private _activeId;
|
|
9
|
-
add(conversation: HoldableConversation): void;
|
|
10
|
-
remove(id: string | null): void;
|
|
11
|
-
get(id: string): HoldableConversation | undefined;
|
|
12
|
-
getActive(): HoldableConversation | null;
|
|
13
|
-
getActiveId(): string | null;
|
|
14
|
-
has(id: string): boolean;
|
|
15
|
-
getAll(): HoldableConversation[];
|
|
16
|
-
setActive(id: string): Promise<void>;
|
|
17
|
-
clear(): void;
|
|
18
|
-
}
|
|
19
|
-
declare const callRegistry: CallRegistry;
|
|
20
|
-
export { callRegistry };
|
package/static/Capabilities.d.ts
DELETED
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { CurrentLogItem } from '../utils/DebugStorage';
|
|
2
|
-
export declare class ConversationDebugLogger {
|
|
3
|
-
private static _list;
|
|
4
|
-
private static _conversationId;
|
|
5
|
-
static get startTime(): number;
|
|
6
|
-
static get endTime(): number;
|
|
7
|
-
static startSession(): void;
|
|
8
|
-
static get conversationId(): string | null;
|
|
9
|
-
static set conversationId(conversationId: string | null);
|
|
10
|
-
static add(item: CurrentLogItem): void;
|
|
11
|
-
private static _createContextLogs;
|
|
12
|
-
static collectLogs(): CurrentLogItem[];
|
|
13
|
-
}
|
package/types/Capabilities.d.ts
DELETED
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
export type TCapabilities = {
|
|
2
|
-
estimatedPerformanceIndex: number;
|
|
3
|
-
audioMix: boolean;
|
|
4
|
-
consumerUpdate: boolean;
|
|
5
|
-
producerNotificationDataChannelVersion: number;
|
|
6
|
-
producerCommandDataChannelVersion: number;
|
|
7
|
-
consumerScreenDataChannelVersion: number;
|
|
8
|
-
producerScreenDataChannelVersion: number;
|
|
9
|
-
asrDataChannelVersion: number;
|
|
10
|
-
animojiDataChannelVersion: number;
|
|
11
|
-
animojiBackendRender: boolean;
|
|
12
|
-
onDemandTracks: boolean;
|
|
13
|
-
unifiedPlan: boolean;
|
|
14
|
-
singleSession: boolean;
|
|
15
|
-
videoTracksCount: number;
|
|
16
|
-
red: boolean;
|
|
17
|
-
audioShare: boolean;
|
|
18
|
-
fastScreenShare: boolean;
|
|
19
|
-
videoSuspend: boolean;
|
|
20
|
-
simulcast: boolean;
|
|
21
|
-
consumerFastScreenShare: boolean;
|
|
22
|
-
consumerFastScreenShareQualityOnDemand: boolean;
|
|
23
|
-
transparentAudio: boolean;
|
|
24
|
-
};
|