@vkontakte/calls-sdk 2.8.11-dev.882b025a.0 → 2.8.11-dev.c08ac4e9.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 +16 -14
- 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 +11298 -13
- package/classes/Conversation.d.ts +8 -10
- package/classes/DisplayLayoutRequester.d.ts +32 -0
- 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 +22 -22
- package/types/ParticipantLayout.d.ts +33 -0
- package/types/PerfStatReporter.d.ts +2 -1
- package/types/WebTransport.d.ts +1 -0
- package/classes/CallRegistry.d.ts +0 -20
- package/static/Capabilities.d.ts +0 -5
- package/types/Capabilities.d.ts +0 -24
|
@@ -16,11 +16,11 @@ 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';
|
|
23
|
-
import { ParticipantLayout } from '../types/ParticipantLayout';
|
|
23
|
+
import { DisplayLayoutRequest, ParticipantLayout } from '../types/ParticipantLayout';
|
|
24
24
|
import { ParticipantListChunkParameters } from '../types/ParticipantListChunk';
|
|
25
25
|
import ParticipantPriority from '../types/ParticipantPriority';
|
|
26
26
|
import { ParticipantStreamDescription } from '../types/ParticipantStreamDescription';
|
|
@@ -32,6 +32,7 @@ export default class Conversation extends EventEmitter {
|
|
|
32
32
|
private readonly _api;
|
|
33
33
|
private readonly _signaling;
|
|
34
34
|
private readonly _signalingActor;
|
|
35
|
+
private readonly _displayLayoutRequester;
|
|
35
36
|
private _mediaSource;
|
|
36
37
|
private _conversation;
|
|
37
38
|
private _myLastRequestedLayouts;
|
|
@@ -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,6 @@ 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 id(): string;
|
|
71
|
-
get externalId(): ExternalParticipantId | undefined;
|
|
72
|
-
get mediaSettings(): MediaSettings | undefined;
|
|
73
|
-
get isCallHeld(): boolean;
|
|
74
73
|
onStart({ opponentIds, opponentType, mediaOptions, payload, joiningAllowed, requireAuthToJoin, onlyAdminCanShareMovie, externalIds, onFastStart, conversationId, }: ConversationOnStartParams): Promise<ConversationData>;
|
|
75
74
|
onJoin(joinArgs: {
|
|
76
75
|
conversationId?: string;
|
|
@@ -206,6 +205,7 @@ export default class Conversation extends EventEmitter {
|
|
|
206
205
|
requestKeyFrame(participantStreamDescription: ParticipantStreamDescription): Promise<void | SignalingMessage>;
|
|
207
206
|
requestTestMode(consumerCommand: string, producerCommand: string): Promise<void>;
|
|
208
207
|
updateDisplayLayout(layouts: ParticipantLayout[]): Promise<void>;
|
|
208
|
+
requestDisplayLayout(requests: DisplayLayoutRequest[]): Promise<void>;
|
|
209
209
|
feedback(key: string): Promise<SignalingMessage>;
|
|
210
210
|
userFeedbackStats(userResponse: number, reason?: string, groupCallUsersCount?: number): void;
|
|
211
211
|
sendClientEvent(eventType: string, eventData?: Record<string, string | number | boolean>, immediately?: boolean): void;
|
|
@@ -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;
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import BaseApi from '../abstract/BaseApi';
|
|
2
|
+
import { DisplayLayoutRequest, ParticipantLayout } from '../types/ParticipantLayout';
|
|
3
|
+
import { Participant, ParticipantId } from '../types/Participant';
|
|
4
|
+
type DisplayLayoutRequesterParams = {
|
|
5
|
+
api: BaseApi;
|
|
6
|
+
getParticipants: () => Promise<Record<ParticipantId, Participant>>;
|
|
7
|
+
isMe: (participantId: ParticipantId) => boolean;
|
|
8
|
+
updateDisplayLayout: (layouts: ParticipantLayout[]) => Promise<void>;
|
|
9
|
+
};
|
|
10
|
+
export default class DisplayLayoutRequester {
|
|
11
|
+
private readonly _api;
|
|
12
|
+
private readonly _getParticipants;
|
|
13
|
+
private readonly _isMe;
|
|
14
|
+
private readonly _updateDisplayLayout;
|
|
15
|
+
private _requestedLayouts;
|
|
16
|
+
private _pendingRequests;
|
|
17
|
+
private _pendingPromises;
|
|
18
|
+
private _timer;
|
|
19
|
+
private _inFlight;
|
|
20
|
+
private _lastFlushAt;
|
|
21
|
+
private _generation;
|
|
22
|
+
constructor({ api, getParticipants, isMe, updateDisplayLayout }: DisplayLayoutRequesterParams);
|
|
23
|
+
request(requests: DisplayLayoutRequest[]): Promise<void>;
|
|
24
|
+
cleanupParticipant(participantId: ParticipantId): void;
|
|
25
|
+
clear(): void;
|
|
26
|
+
private _schedule;
|
|
27
|
+
private _flush;
|
|
28
|
+
private _getRequestLayouts;
|
|
29
|
+
private _getDiff;
|
|
30
|
+
private _isChanged;
|
|
31
|
+
}
|
|
32
|
+
export {};
|
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
|
@@ -306,6 +306,12 @@ export type ParamsObject = {
|
|
|
306
306
|
* _По умолчанию: `30`_
|
|
307
307
|
*/
|
|
308
308
|
videoTracksCount: number;
|
|
309
|
+
/**
|
|
310
|
+
* Минимальный интервал отправки diff для requestDisplayLayout в миллисекундах.
|
|
311
|
+
*
|
|
312
|
+
* _По умолчанию: `250`_
|
|
313
|
+
*/
|
|
314
|
+
requestDisplayLayoutThrottleMs: number;
|
|
309
315
|
/** @hidden */
|
|
310
316
|
movieShare: boolean;
|
|
311
317
|
/** @hidden */
|
|
@@ -490,7 +496,7 @@ export type ParamsObject = {
|
|
|
490
496
|
/**
|
|
491
497
|
* Получен локальный стрим с камеры/микрофона
|
|
492
498
|
*/
|
|
493
|
-
onLocalStream?: (stream: MediaStream | null, mediaSettings: MediaSettings
|
|
499
|
+
onLocalStream?: (stream: MediaStream | null, mediaSettings: MediaSettings) => void;
|
|
494
500
|
/**
|
|
495
501
|
* Локальный стрим изменился
|
|
496
502
|
*/
|
|
@@ -510,12 +516,12 @@ export type ParamsObject = {
|
|
|
510
516
|
/**
|
|
511
517
|
* Изменился статус локального соединения
|
|
512
518
|
*/
|
|
513
|
-
onLocalStatus?: (status: ParticipantStatus
|
|
519
|
+
onLocalStatus?: (status: ParticipantStatus) => void;
|
|
514
520
|
/**
|
|
515
521
|
* Получен стрим собеседника.
|
|
516
522
|
* Если сервер закончил стримить собеседника, вместо стрима будет передан null
|
|
517
523
|
*/
|
|
518
|
-
onRemoteStream?: (userId: ExternalParticipantId, stream: MediaStream | null
|
|
524
|
+
onRemoteStream?: (userId: ExternalParticipantId, stream: MediaStream | null) => void;
|
|
519
525
|
/**
|
|
520
526
|
* Cтрим собеседника приостановлен/возобновлен.
|
|
521
527
|
*/
|
|
@@ -524,7 +530,7 @@ export type ParamsObject = {
|
|
|
524
530
|
* Получен стрим с экрана собеседника.
|
|
525
531
|
* Если сервер закончил стримить экран собеседника, вместо стрима будет передан null
|
|
526
532
|
*/
|
|
527
|
-
onRemoteScreenStream?: (userId: ExternalParticipantId, stream: MediaStream | null
|
|
533
|
+
onRemoteScreenStream?: (userId: ExternalParticipantId, stream: MediaStream | null) => void;
|
|
528
534
|
/**
|
|
529
535
|
* Получен стрим вимоджи собеседника.
|
|
530
536
|
* Если сервер закончил стримить вимоджи собеседника, вместо стрима будет передан null
|
|
@@ -551,7 +557,7 @@ export type ParamsObject = {
|
|
|
551
557
|
/**
|
|
552
558
|
* Начат звонок
|
|
553
559
|
*/
|
|
554
|
-
onConversation?: (userId: ExternalParticipantId, mediaModifiers: MediaModifiers, muteStates: MuteStates, participants: ExternalParticipant[], rooms?: Rooms
|
|
560
|
+
onConversation?: (userId: ExternalParticipantId, mediaModifiers: MediaModifiers, muteStates: MuteStates, participants: ExternalParticipant[], rooms?: Rooms) => void;
|
|
555
561
|
/**
|
|
556
562
|
* Начальный список участников для постраничного звонка
|
|
557
563
|
*/
|
|
@@ -583,11 +589,11 @@ export type ParamsObject = {
|
|
|
583
589
|
/**
|
|
584
590
|
* Добавили участника
|
|
585
591
|
*/
|
|
586
|
-
onParticipantAdded?: (userId: ExternalParticipantId, markers: ExternalParticipantListMarkers | null
|
|
592
|
+
onParticipantAdded?: (userId: ExternalParticipantId, markers: ExternalParticipantListMarkers | null) => void;
|
|
587
593
|
/**
|
|
588
594
|
* Участник присоединился к звонку
|
|
589
595
|
*/
|
|
590
|
-
onParticipantJoined?: (userId: ExternalParticipantId, markers: ExternalParticipantListMarkers
|
|
596
|
+
onParticipantJoined?: (userId: ExternalParticipantId, markers: ExternalParticipantListMarkers) => void;
|
|
591
597
|
/**
|
|
592
598
|
* Получены данные по изменению локальных состояний со стороны админа
|
|
593
599
|
* Например, принудительно опущена рука
|
|
@@ -607,7 +613,7 @@ export type ParamsObject = {
|
|
|
607
613
|
/**
|
|
608
614
|
* Изменился статус соединения собеседников
|
|
609
615
|
*/
|
|
610
|
-
onRemoteStatus?: (userIds: ExternalParticipantId[], status: ParticipantStatus, data: any
|
|
616
|
+
onRemoteStatus?: (userIds: ExternalParticipantId[], status: ParticipantStatus, data: any) => void;
|
|
611
617
|
/**
|
|
612
618
|
* Разрешения на доступы были запрошены в браузере
|
|
613
619
|
*/
|
|
@@ -619,15 +625,15 @@ export type ParamsObject = {
|
|
|
619
625
|
/**
|
|
620
626
|
* Пользователь отключился от звонка
|
|
621
627
|
*/
|
|
622
|
-
onRemoteRemoved?: (userId: ExternalParticipantId, markers: ExternalParticipantListMarkers | null
|
|
628
|
+
onRemoteRemoved?: (userId: ExternalParticipantId, markers: ExternalParticipantListMarkers | null) => void;
|
|
623
629
|
/**
|
|
624
630
|
* Изменилось состояние звонка
|
|
625
631
|
*/
|
|
626
|
-
onCallState?: (isCallActive: boolean, canAddParticipants: boolean, conversation: ConversationData
|
|
632
|
+
onCallState?: (isCallActive: boolean, canAddParticipants: boolean, conversation: ConversationData) => void;
|
|
627
633
|
/**
|
|
628
634
|
* Изменилось состояние камеры или микрофона
|
|
629
635
|
*/
|
|
630
|
-
onDeviceSwitched?: (mediaOption: MediaOption, enabled: boolean
|
|
636
|
+
onDeviceSwitched?: (mediaOption: MediaOption, enabled: boolean) => void;
|
|
631
637
|
/**
|
|
632
638
|
* Изменились состояния устройств пользователя или разрешения включать камеру/микрофон
|
|
633
639
|
*/
|
|
@@ -656,7 +662,7 @@ export type ParamsObject = {
|
|
|
656
662
|
/**
|
|
657
663
|
* Изменился говорящий в звонке
|
|
658
664
|
*/
|
|
659
|
-
onSpeakerChanged?: (userId: ExternalParticipantId
|
|
665
|
+
onSpeakerChanged?: (userId: ExternalParticipantId) => void;
|
|
660
666
|
/**
|
|
661
667
|
* Громкость собеседников
|
|
662
668
|
*/
|
|
@@ -676,12 +682,12 @@ export type ParamsObject = {
|
|
|
676
682
|
/**
|
|
677
683
|
* Входящий звонок был принят мной
|
|
678
684
|
*/
|
|
679
|
-
onCallAccepted?: (
|
|
685
|
+
onCallAccepted?: () => void;
|
|
680
686
|
/**
|
|
681
687
|
* Исходящий звонок был принят кем-то
|
|
682
688
|
* @param userId
|
|
683
689
|
*/
|
|
684
|
-
onAcceptedCall?: (userId: ExternalParticipantId, capabilities: ParticipantCapabilities
|
|
690
|
+
onAcceptedCall?: (userId: ExternalParticipantId, capabilities: ParticipantCapabilities) => void;
|
|
685
691
|
/**
|
|
686
692
|
* Список устройств изменился
|
|
687
693
|
*/
|
|
@@ -859,14 +865,6 @@ export type ParamsObject = {
|
|
|
859
865
|
* @param demoted участник разжалован
|
|
860
866
|
*/
|
|
861
867
|
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
868
|
/**
|
|
871
869
|
* Собеседник подключился к сигналлингу
|
|
872
870
|
*/
|
|
@@ -971,6 +969,7 @@ export default abstract class Params {
|
|
|
971
969
|
static get audioNack(): boolean;
|
|
972
970
|
static get movieShare(): boolean;
|
|
973
971
|
static get videoTracksCount(): number;
|
|
972
|
+
static get requestDisplayLayoutThrottleMs(): number;
|
|
974
973
|
static get breakVideoPayloadTypes(): boolean;
|
|
975
974
|
static get useCallsToContacts(): boolean;
|
|
976
975
|
static get useParticipantListChunk(): boolean;
|
|
@@ -1018,6 +1017,7 @@ export default abstract class Params {
|
|
|
1018
1017
|
screenShareCongestionControl: boolean;
|
|
1019
1018
|
screenShareCongestionControlThreshold: number;
|
|
1020
1019
|
videoTracksCount: number;
|
|
1020
|
+
requestDisplayLayoutThrottleMs: number;
|
|
1021
1021
|
asrDataChannel: boolean;
|
|
1022
1022
|
videoMaxHeight: number;
|
|
1023
1023
|
videoMaxWidth: number;
|
|
@@ -54,4 +54,37 @@ export type ParticipantLayout = (Layout | StopStream | RequestKeyFrame) & {
|
|
|
54
54
|
*/
|
|
55
55
|
streamName?: string;
|
|
56
56
|
};
|
|
57
|
+
/**
|
|
58
|
+
* Запрос стрима, который клиент хочет получать для отображения.
|
|
59
|
+
*/
|
|
60
|
+
export type DisplayLayoutRequest = {
|
|
61
|
+
/**
|
|
62
|
+
* Внешний ID пользователя
|
|
63
|
+
*/
|
|
64
|
+
uid: ExternalParticipantId | string;
|
|
65
|
+
/**
|
|
66
|
+
* Тип медиа (видео с камеры, картинка с экрана, лайв или мувик)
|
|
67
|
+
*/
|
|
68
|
+
mediaType: MediaType;
|
|
69
|
+
/**
|
|
70
|
+
* Ширина окошка в котором отображается видео, в пикселях
|
|
71
|
+
*/
|
|
72
|
+
width: number;
|
|
73
|
+
/**
|
|
74
|
+
* Высота окошка в котором отображается видео, в пикселях
|
|
75
|
+
*/
|
|
76
|
+
height: number;
|
|
77
|
+
/**
|
|
78
|
+
* Отображать видео как CSS object-fit: cover. По умолчанию используется contain.
|
|
79
|
+
*/
|
|
80
|
+
cover?: boolean;
|
|
81
|
+
/**
|
|
82
|
+
* Приоритет
|
|
83
|
+
*/
|
|
84
|
+
priority?: number;
|
|
85
|
+
/**
|
|
86
|
+
* ID лайва или мувика. null для камеры или скрин-шары.
|
|
87
|
+
*/
|
|
88
|
+
streamName?: string;
|
|
89
|
+
};
|
|
57
90
|
export default ParticipantLayout;
|
|
@@ -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
|
@@ -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
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
|
-
};
|