@vkontakte/calls-sdk 2.8.11-dev.273c92c2.0 → 2.8.11-dev.3630109f.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.
@@ -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 MediaSettings, { IVideoDimentions } from '../types/MediaSettings';
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;
@@ -41,6 +42,7 @@ export default class Conversation extends EventEmitter {
41
42
  private _pendingParticipants;
42
43
  private _transport;
43
44
  private _debugInfo;
45
+ private _debugSessionId;
44
46
  private _volumesDetector;
45
47
  private _speakerDetector;
46
48
  private _localVolumeDetector;
@@ -49,8 +51,11 @@ export default class Conversation extends EventEmitter {
49
51
  private _lastSignalledActiveSpeakerId;
50
52
  private _isRealTimeAsrRequested;
51
53
  private _serverSettings;
52
- private _delayedHangup;
53
- private _abortController;
54
+ private _serverTimeOffset;
55
+ private static _current;
56
+ private static _activationMutex;
57
+ private static _delayedHangup;
58
+ private static _abortController;
54
59
  private readonly _onUnload;
55
60
  private readonly _audioOutput;
56
61
  private _lastStalled;
@@ -67,10 +72,8 @@ export default class Conversation extends EventEmitter {
67
72
  static current(): Conversation | null;
68
73
  static hangupAfterInit(): void;
69
74
  static id(): string | null;
70
- get id(): string;
71
- get externalId(): ExternalParticipantId | undefined;
72
- get mediaSettings(): MediaSettings | undefined;
73
- get isCallHeld(): boolean;
75
+ static getSyncedTime(): number;
76
+ get debugSessionId(): string | null;
74
77
  onStart({ opponentIds, opponentType, mediaOptions, payload, joiningAllowed, requireAuthToJoin, onlyAdminCanShareMovie, externalIds, onFastStart, conversationId, }: ConversationOnStartParams): Promise<ConversationData>;
75
78
  onJoin(joinArgs: {
76
79
  conversationId?: string;
@@ -206,6 +209,7 @@ export default class Conversation extends EventEmitter {
206
209
  requestKeyFrame(participantStreamDescription: ParticipantStreamDescription): Promise<void | SignalingMessage>;
207
210
  requestTestMode(consumerCommand: string, producerCommand: string): Promise<void>;
208
211
  updateDisplayLayout(layouts: ParticipantLayout[]): Promise<void>;
212
+ requestDisplayLayout(requests: DisplayLayoutRequest[]): Promise<void>;
209
213
  feedback(key: string): Promise<SignalingMessage>;
210
214
  userFeedbackStats(userResponse: number, reason?: string, groupCallUsersCount?: number): void;
211
215
  sendClientEvent(eventType: string, eventData?: Record<string, string | number | boolean>, immediately?: boolean): void;
@@ -395,7 +399,6 @@ export default class Conversation extends EventEmitter {
395
399
  private _onFeedback;
396
400
  private _onDecorativeParticipantIdChanged;
397
401
  private _onVideoSuspendSuggest;
398
- private _onParticipantHold;
399
402
  private _isMe;
400
403
  private _getMuteStatesForRoomId;
401
404
  private _getMuteStatesForCurrentRoom;
@@ -405,8 +408,6 @@ export default class Conversation extends EventEmitter {
405
408
  private _getParticipants;
406
409
  private _getParticipant;
407
410
  }
408
- declare function _resetPendingInstance(): void;
409
- export { _resetPendingInstance };
410
411
  export declare class UpdateDisplayLayoutError extends Error {
411
412
  readonly participantErrors: {
412
413
  externalId: ExternalParticipantId;
@@ -0,0 +1,36 @@
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 _uncertainLayouts;
17
+ private _pendingRequests;
18
+ private _pendingPromises;
19
+ private _lastRequests;
20
+ private _timer;
21
+ private _inFlight;
22
+ private _lastFlushAt;
23
+ private _generation;
24
+ private _forceNextFlush;
25
+ constructor({ api, getParticipants, isMe, updateDisplayLayout }: DisplayLayoutRequesterParams);
26
+ request(requests: DisplayLayoutRequest[]): Promise<void>;
27
+ resend(): void;
28
+ cleanupParticipant(participantId: ParticipantId): void;
29
+ clear(): void;
30
+ private _schedule;
31
+ private _flush;
32
+ private _getRequestLayouts;
33
+ private _getDiff;
34
+ private _isChanged;
35
+ }
36
+ export {};
@@ -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
  }
@@ -59,8 +59,6 @@ export declare class Transport extends EventEmitter {
59
59
  close(participantId: ParticipantId): void;
60
60
  destroy(): void;
61
61
  getTopology(): TransportTopology;
62
- preventRestart(): void;
63
- allowRestart(): void;
64
62
  isAllocated(participantId: ParticipantId): boolean;
65
63
  allocated(): string[];
66
64
  opened(): string[];
@@ -53,6 +53,7 @@ declare enum HangupType {
53
53
  * - Приложение вызываемого не запущено или упало
54
54
  * - Брандмауэр или сетевые ограничения блокируют подключение
55
55
  */
56
- CALL_TIMEOUT = "CALL_TIMEOUT"
56
+ CALL_TIMEOUT = "CALL_TIMEOUT",
57
+ OBSOLETE_CLIENT = "OBSOLETE_CLIENT"
57
58
  }
58
59
  export default HangupType;
@@ -50,7 +50,6 @@ declare enum SignalingNotification {
50
50
  ASR_STARTED = "asr-started",
51
51
  ASR_STOPPED = "asr-stopped",
52
52
  DECORATIVE_PARTICIPANT_ID_CHANGED = "decorative-participant-id-changed",
53
- VIDEO_SUSPEND_SUGGEST = "video-suspend-suggest",
54
- HOLD = "hold"
53
+ VIDEO_SUSPEND_SUGGEST = "video-suspend-suggest"
55
54
  }
56
55
  export default SignalingNotification;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vkontakte/calls-sdk",
3
- "version": "2.8.11-dev.273c92c2.0",
3
+ "version": "2.8.11-dev.3630109f.0",
4
4
  "author": "vk.com",
5
5
  "description": "Library for video calls based on the vk.com platform",
6
6
  "homepage": "https://vk.com",
@@ -35,8 +35,7 @@ export declare enum ParticipantStatus {
35
35
  RECONNECT = "RECONNECT",
36
36
  ERROR = "ERROR",
37
37
  HANGUP = "HANGUP",
38
- PERMISSIONS = "PERMISSIONS",
39
- ONHOLD = "ONHOLD"
38
+ PERMISSIONS = "PERMISSIONS"
40
39
  }
41
40
  /**
42
41
  * Функции обратного вызова для передачи в параметрах инициализации
@@ -48,9 +47,8 @@ declare namespace External {
48
47
  *
49
48
  * @param stream
50
49
  * @param mediaSettings
51
- * @param conversationId ID звонка
52
50
  */
53
- function onLocalStream(stream: MediaStream | null, mediaSettings: MediaSettings, conversationId?: string): void;
51
+ function onLocalStream(stream: MediaStream | null, mediaSettings: MediaSettings): void;
54
52
  /**
55
53
  * Локальный стрим с экрана добавлен/удалён
56
54
  *
@@ -82,18 +80,16 @@ declare namespace External {
82
80
  * Изменился статус локального соединения
83
81
  *
84
82
  * @param status
85
- * @param conversationId ID звонка
86
83
  */
87
- function onLocalStatus(status: ParticipantStatus, conversationId?: string): void;
84
+ function onLocalStatus(status: ParticipantStatus): void;
88
85
  /**
89
86
  * Получен стрим собеседника.
90
87
  * Если сервер закончил стримить собеседника, вместо стрима будет передан null
91
88
  *
92
89
  * @param userId
93
90
  * @param stream
94
- * @param conversationId ID звонка
95
91
  */
96
- function onRemoteStream(userId: ExternalParticipantId, stream: MediaStream | null, conversationId?: string): void;
92
+ function onRemoteStream(userId: ExternalParticipantId, stream: MediaStream | null): void;
97
93
  /**
98
94
  * Получен стрим лайв от собеседника.
99
95
  * Если сервер закончил стримить собеседника, вместо стрима будет передан null
@@ -130,9 +126,8 @@ declare namespace External {
130
126
  *
131
127
  * @param userId
132
128
  * @param stream
133
- * @param conversationId ID звонка
134
129
  */
135
- function onRemoteScreenStream(userId: ExternalParticipantId, stream: MediaStream | null, conversationId?: string): void;
130
+ function onRemoteScreenStream(userId: ExternalParticipantId, stream: MediaStream | null): void;
136
131
  /**
137
132
  * Получен стрим вимоджи собеседника.
138
133
  * Если сервер закончил стримить собеседника, вместо стрима будет передан null
@@ -157,9 +152,8 @@ declare namespace External {
157
152
  * @param muteStates Состояние устройств при входе в звонок
158
153
  * @param participants Список участников звонка
159
154
  * @param rooms Список сессионных залов в звонке
160
- * @param conversationId ID звонка
161
155
  */
162
- function onConversation(userId: ExternalParticipantId, mediaModifiers: MediaModifiers, muteStates: MuteStates, participants: ExternalParticipant[], rooms?: Rooms, conversationId?: string): void;
156
+ function onConversation(userId: ExternalParticipantId, mediaModifiers: MediaModifiers, muteStates: MuteStates, participants: ExternalParticipant[], rooms?: Rooms): void;
163
157
  /**
164
158
  * Постраничные данные про участников при начале звонка
165
159
  * @param chunk
@@ -225,17 +219,15 @@ declare namespace External {
225
219
  *
226
220
  * @param userId
227
221
  * @param markers
228
- * @param conversationId ID звонка
229
222
  */
230
- function onParticipantAdded(userId: ExternalId, markers: ExternalParticipantListMarkers | null, conversationId?: string): void;
223
+ function onParticipantAdded(userId: ExternalId, markers: ExternalParticipantListMarkers | null): void;
231
224
  /**
232
225
  * Участник подключился
233
226
  *
234
227
  * @param userId
235
228
  * @param markers
236
- * @param conversationId ID звонка
237
229
  */
238
- function onParticipantJoined(userId: ExternalId, markers: ExternalParticipantListMarkers | null, conversationId?: string): void;
230
+ function onParticipantJoined(userId: ExternalId, markers: ExternalParticipantListMarkers | null): void;
239
231
  function onLocalParticipantState(participantState: ParticipantStateMapped, global?: boolean): void;
240
232
  /**
241
233
  * Изменились данные состояний собеседника
@@ -258,9 +250,8 @@ declare namespace External {
258
250
  * @param userIds
259
251
  * @param status
260
252
  * @param data
261
- * @param conversationId ID звонка
262
253
  */
263
- function onRemoteStatus(userIds: ExternalParticipantId[], status: ParticipantStatus, data?: any, conversationId?: string): void;
254
+ function onRemoteStatus(userIds: ExternalParticipantId[], status: ParticipantStatus, data?: any): void;
264
255
  /**
265
256
  * Разрешения на доступы были запрошены в браузере
266
257
  */
@@ -277,26 +268,23 @@ declare namespace External {
277
268
  *
278
269
  * @param userId
279
270
  * @param markers
280
- * @param conversationId ID звонка
281
271
  */
282
- function onRemoteRemoved(userId: ExternalParticipantId, markers: ExternalParticipantListMarkers | null, conversationId?: string): void;
272
+ function onRemoteRemoved(userId: ExternalParticipantId, markers: ExternalParticipantListMarkers | null): void;
283
273
  /**
284
274
  * Изменилось состояние звонка
285
275
  *
286
276
  * @param isCallActive Активен ли сейчас звонок
287
277
  * @param canAddParticipants Можно ли добавлять собеседников
288
278
  * @param conversation Информация о звонке
289
- * @param conversationId ID звонка
290
279
  */
291
- function onCallState(isCallActive: boolean, canAddParticipants: boolean, conversation: ConversationData, conversationId?: string): void;
280
+ function onCallState(isCallActive: boolean, canAddParticipants: boolean, conversation: ConversationData): void;
292
281
  /**
293
282
  * Изменилось состояние камеры или микрофона
294
283
  *
295
284
  * @param mediaOption Тип устройства
296
285
  * @param enabled Включено или выключено
297
- * @param conversationId ID звонка
298
286
  */
299
- function onDeviceSwitched(mediaOption: MediaOption, enabled: boolean, conversationId?: string): void;
287
+ function onDeviceSwitched(mediaOption: MediaOption, enabled: boolean): void;
300
288
  /**
301
289
  * Изменились состояния устройств пользователя или разрешения включать камеру/микрофон
302
290
  *
@@ -351,32 +339,21 @@ declare namespace External {
351
339
  function onOptionsChanged(options: ConversationOption[]): void;
352
340
  /**
353
341
  * Входящий звонок был принят мной
354
- *
355
- * @param conversationId ID звонка
356
- */
357
- function onCallAccepted(conversationId?: string): void;
358
- /**
359
- * Установление определенного звонка как активного
360
- *
361
- * @param conversationId ID звонка
362
342
  */
363
- function onCallActive(conversationId: string): void;
343
+ function onCallAccepted(): void;
364
344
  /**
365
345
  * Исходящий звонок был принят кем-то
366
- *
367
346
  * @param userId
368
347
  * @param capabilities
369
- * @param conversationId ID звонка
370
348
  */
371
- function onAcceptedCall(userId: ExternalId, capabilities: ParticipantCapabilities, conversationId?: string): void;
349
+ function onAcceptedCall(userId: ExternalId, capabilities: ParticipantCapabilities): void;
372
350
  function onRateNeeded(): void;
373
351
  /**
374
352
  * Изменился говорящий в звонке
375
353
  *
376
354
  * @param userId
377
- * @param conversationId ID звонка
378
355
  */
379
- function onSpeakerChanged(userId: ExternalParticipantId, conversationId?: string): void;
356
+ function onSpeakerChanged(userId: ExternalParticipantId): void;
380
357
  /**
381
358
  * Громкость собеседников
382
359
  *
@@ -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 */
@@ -343,14 +349,7 @@ export type ParamsObject = {
343
349
  * Включает поддержку режима WAIT_FOR_ADMIN в звонках.
344
350
  */
345
351
  waitForAdminInGroupCalls: boolean;
346
- /**
347
- * Включает поддержку удержания звонка
348
- */
349
352
  hold: boolean;
350
- /**
351
- * Максимальное количество параллельных звонков
352
- */
353
- maxParallelCalls: number;
354
353
  /**
355
354
  * Индекс участника для первого chunk'а который придет при установке соединения с сервером
356
355
  *
@@ -497,7 +496,7 @@ export type ParamsObject = {
497
496
  /**
498
497
  * Получен локальный стрим с камеры/микрофона
499
498
  */
500
- onLocalStream?: (stream: MediaStream | null, mediaSettings: MediaSettings, conversationId?: string) => void;
499
+ onLocalStream?: (stream: MediaStream | null, mediaSettings: MediaSettings) => void;
501
500
  /**
502
501
  * Локальный стрим изменился
503
502
  */
@@ -517,12 +516,12 @@ export type ParamsObject = {
517
516
  /**
518
517
  * Изменился статус локального соединения
519
518
  */
520
- onLocalStatus?: (status: ParticipantStatus, conversationId?: string) => void;
519
+ onLocalStatus?: (status: ParticipantStatus) => void;
521
520
  /**
522
521
  * Получен стрим собеседника.
523
522
  * Если сервер закончил стримить собеседника, вместо стрима будет передан null
524
523
  */
525
- onRemoteStream?: (userId: ExternalParticipantId, stream: MediaStream | null, conversationId?: string) => void;
524
+ onRemoteStream?: (userId: ExternalParticipantId, stream: MediaStream | null) => void;
526
525
  /**
527
526
  * Cтрим собеседника приостановлен/возобновлен.
528
527
  */
@@ -531,7 +530,7 @@ export type ParamsObject = {
531
530
  * Получен стрим с экрана собеседника.
532
531
  * Если сервер закончил стримить экран собеседника, вместо стрима будет передан null
533
532
  */
534
- onRemoteScreenStream?: (userId: ExternalParticipantId, stream: MediaStream | null, conversationId?: string) => void;
533
+ onRemoteScreenStream?: (userId: ExternalParticipantId, stream: MediaStream | null) => void;
535
534
  /**
536
535
  * Получен стрим вимоджи собеседника.
537
536
  * Если сервер закончил стримить вимоджи собеседника, вместо стрима будет передан null
@@ -558,7 +557,7 @@ export type ParamsObject = {
558
557
  /**
559
558
  * Начат звонок
560
559
  */
561
- onConversation?: (userId: ExternalParticipantId, mediaModifiers: MediaModifiers, muteStates: MuteStates, participants: ExternalParticipant[], rooms?: Rooms, conversationId?: string) => void;
560
+ onConversation?: (userId: ExternalParticipantId, mediaModifiers: MediaModifiers, muteStates: MuteStates, participants: ExternalParticipant[], rooms?: Rooms) => void;
562
561
  /**
563
562
  * Начальный список участников для постраничного звонка
564
563
  */
@@ -590,11 +589,11 @@ export type ParamsObject = {
590
589
  /**
591
590
  * Добавили участника
592
591
  */
593
- onParticipantAdded?: (userId: ExternalParticipantId, markers: ExternalParticipantListMarkers | null, conversationId?: string) => void;
592
+ onParticipantAdded?: (userId: ExternalParticipantId, markers: ExternalParticipantListMarkers | null) => void;
594
593
  /**
595
594
  * Участник присоединился к звонку
596
595
  */
597
- onParticipantJoined?: (userId: ExternalParticipantId, markers: ExternalParticipantListMarkers, conversationId?: string) => void;
596
+ onParticipantJoined?: (userId: ExternalParticipantId, markers: ExternalParticipantListMarkers) => void;
598
597
  /**
599
598
  * Получены данные по изменению локальных состояний со стороны админа
600
599
  * Например, принудительно опущена рука
@@ -614,7 +613,7 @@ export type ParamsObject = {
614
613
  /**
615
614
  * Изменился статус соединения собеседников
616
615
  */
617
- onRemoteStatus?: (userIds: ExternalParticipantId[], status: ParticipantStatus, data: any, conversationId?: string) => void;
616
+ onRemoteStatus?: (userIds: ExternalParticipantId[], status: ParticipantStatus, data: any) => void;
618
617
  /**
619
618
  * Разрешения на доступы были запрошены в браузере
620
619
  */
@@ -626,15 +625,15 @@ export type ParamsObject = {
626
625
  /**
627
626
  * Пользователь отключился от звонка
628
627
  */
629
- onRemoteRemoved?: (userId: ExternalParticipantId, markers: ExternalParticipantListMarkers | null, conversationId?: string) => void;
628
+ onRemoteRemoved?: (userId: ExternalParticipantId, markers: ExternalParticipantListMarkers | null) => void;
630
629
  /**
631
630
  * Изменилось состояние звонка
632
631
  */
633
- onCallState?: (isCallActive: boolean, canAddParticipants: boolean, conversation: ConversationData, conversationId?: string) => void;
632
+ onCallState?: (isCallActive: boolean, canAddParticipants: boolean, conversation: ConversationData) => void;
634
633
  /**
635
634
  * Изменилось состояние камеры или микрофона
636
635
  */
637
- onDeviceSwitched?: (mediaOption: MediaOption, enabled: boolean, conversationId?: string) => void;
636
+ onDeviceSwitched?: (mediaOption: MediaOption, enabled: boolean) => void;
638
637
  /**
639
638
  * Изменились состояния устройств пользователя или разрешения включать камеру/микрофон
640
639
  */
@@ -663,7 +662,7 @@ export type ParamsObject = {
663
662
  /**
664
663
  * Изменился говорящий в звонке
665
664
  */
666
- onSpeakerChanged?: (userId: ExternalParticipantId, conversationId?: string) => void;
665
+ onSpeakerChanged?: (userId: ExternalParticipantId) => void;
667
666
  /**
668
667
  * Громкость собеседников
669
668
  */
@@ -683,12 +682,12 @@ export type ParamsObject = {
683
682
  /**
684
683
  * Входящий звонок был принят мной
685
684
  */
686
- onCallAccepted?: (conversationId?: string) => void;
685
+ onCallAccepted?: () => void;
687
686
  /**
688
687
  * Исходящий звонок был принят кем-то
689
688
  * @param userId
690
689
  */
691
- onAcceptedCall?: (userId: ExternalParticipantId, capabilities: ParticipantCapabilities, conversationId?: string) => void;
690
+ onAcceptedCall?: (userId: ExternalParticipantId, capabilities: ParticipantCapabilities) => void;
692
691
  /**
693
692
  * Список устройств изменился
694
693
  */
@@ -866,12 +865,6 @@ export type ParamsObject = {
866
865
  * @param demoted участник разжалован
867
866
  */
868
867
  onPromoted?: (demoted: boolean) => void;
869
- /**
870
- * Активным установлен определенный звонок
871
- *
872
- * @param conversationId ID звонка
873
- */
874
- onCallActive?: (conversationId: string) => void;
875
868
  /**
876
869
  * Собеседник подключился к сигналлингу
877
870
  */
@@ -976,6 +969,7 @@ export default abstract class Params {
976
969
  static get audioNack(): boolean;
977
970
  static get movieShare(): boolean;
978
971
  static get videoTracksCount(): number;
972
+ static get requestDisplayLayoutThrottleMs(): number;
979
973
  static get breakVideoPayloadTypes(): boolean;
980
974
  static get useCallsToContacts(): boolean;
981
975
  static get useParticipantListChunk(): boolean;
@@ -984,7 +978,6 @@ export default abstract class Params {
984
978
  static get addParticipant(): boolean;
985
979
  static get waitForAdminInGroupCalls(): boolean;
986
980
  static get hold(): boolean;
987
- static get maxParallelCalls(): number;
988
981
  static get participantListChunkInitIndex(): number;
989
982
  static get participantListChunkInitCount(): number | null;
990
983
  static get filterObservers(): boolean;
@@ -1024,6 +1017,7 @@ export default abstract class Params {
1024
1017
  screenShareCongestionControl: boolean;
1025
1018
  screenShareCongestionControlThreshold: number;
1026
1019
  videoTracksCount: number;
1020
+ requestDisplayLayoutThrottleMs: number;
1027
1021
  asrDataChannel: boolean;
1028
1022
  videoMaxHeight: number;
1029
1023
  videoMaxWidth: number;
@@ -31,6 +31,7 @@ export interface FastStartParams {
31
31
  conversationId: string;
32
32
  internalParams: string;
33
33
  externalIds?: ExternalId[];
34
+ payload: string;
34
35
  opponentType: CallType;
35
36
  mediaOptions: MediaOption[];
36
37
  joiningAllowed?: boolean;
@@ -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;
@@ -190,6 +190,7 @@ declare namespace SignalingMessage {
190
190
  deviceIdx?: number;
191
191
  peerId: PeerId;
192
192
  reason: HangupType;
193
+ errorCode?: string;
193
194
  markers?: ParticipantListMarkers;
194
195
  }
195
196
  export interface ClosedConversation extends Notification {
@@ -366,6 +367,9 @@ declare namespace SignalingMessage {
366
367
  export interface Connection extends Notification {
367
368
  endpoint: string;
368
369
  conversation: Conversation;
370
+ conversationParams: {
371
+ serverTime: number;
372
+ };
369
373
  isConcurrent: boolean;
370
374
  peerId: PeerId;
371
375
  mediaModifiers: MediaModifiers;
@@ -452,10 +456,6 @@ declare namespace SignalingMessage {
452
456
  export interface VideoSuspendSuggest extends Notification {
453
457
  bandwidth: number;
454
458
  }
455
- export interface Hold extends Notification {
456
- participantId: ParticipantId;
457
- hold: boolean;
458
- }
459
459
  export {};
460
460
  }
461
461
  export default SignalingMessage;