@vkontakte/calls-sdk 2.6.2-dev.abf49ca.0 → 2.6.2-dev.ac5839e.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.
Files changed (50) hide show
  1. package/CallsSDK.d.ts +77 -18
  2. package/abstract/BaseApi.d.ts +7 -3
  3. package/abstract/BaseSignaling.d.ts +16 -5
  4. package/calls-sdk.cjs.js +8 -8
  5. package/calls-sdk.esm.js +8 -8
  6. package/classes/Conversation.d.ts +43 -9
  7. package/classes/MediaSource.d.ts +7 -2
  8. package/classes/ProducerCommandSerializationService.d.ts +2 -0
  9. package/classes/codec/IEncoder.d.ts +3 -0
  10. package/classes/codec/LibVPxEncoder.d.ts +4 -1
  11. package/classes/codec/Types.d.ts +6 -1
  12. package/classes/codec/WebCodecsEncoder.d.ts +4 -1
  13. package/classes/screenshare/PacketHistory.d.ts +30 -0
  14. package/classes/screenshare/PacketHistory.test.d.ts +1 -0
  15. package/classes/screenshare/ScreenCaptureSender.d.ts +15 -1
  16. package/classes/screenshare/ScreenCongestionControl.d.ts +25 -0
  17. package/classes/screenshare/SharingStatReport.d.ts +6 -0
  18. package/classes/screenshare/Utils.d.ts +5 -0
  19. package/classes/transport/ServerTransport.d.ts +2 -1
  20. package/default/Api.d.ts +7 -3
  21. package/default/Signaling.d.ts +16 -5
  22. package/enums/ConversationFeature.d.ts +2 -1
  23. package/enums/ConversationOption.d.ts +2 -1
  24. package/enums/LiveStatus.d.ts +7 -0
  25. package/enums/MediaOption.d.ts +3 -1
  26. package/enums/RoomsEventType.d.ts +6 -0
  27. package/enums/SignalingCommandType.d.ts +12 -1
  28. package/enums/SignalingNotification.d.ts +8 -1
  29. package/package.json +1 -1
  30. package/static/External.d.ts +42 -5
  31. package/static/Params.d.ts +67 -10
  32. package/static/Polyfills.d.ts +7 -0
  33. package/static/Utils.d.ts +2 -1
  34. package/static/WebRTCUtils.d.ts +44 -11
  35. package/static/WebRTCUtils.test.d.ts +1 -0
  36. package/types/Asr.d.ts +5 -0
  37. package/types/Conversation.d.ts +1 -0
  38. package/types/ConversationFeature.d.ts +3 -0
  39. package/types/Feedback.d.ts +22 -0
  40. package/types/MediaSettings.d.ts +4 -0
  41. package/types/MovieShare.d.ts +18 -2
  42. package/types/Participant.d.ts +1 -0
  43. package/types/ParticipantListChunk.d.ts +2 -0
  44. package/types/ParticipantStreamDescription.d.ts +2 -1
  45. package/types/Room.d.ts +77 -0
  46. package/types/SignalingMessage.d.ts +57 -0
  47. package/types/WaitingHall.d.ts +2 -8
  48. package/utils/ArrayDequeue.d.ts +24 -0
  49. package/utils/ArrayDequeue.spec.d.ts +1 -0
  50. package/worker/LibVPxEncoderWorker.d.ts +1 -1
@@ -6,13 +6,17 @@ import ChatRoomEventType from '../enums/ChatRoomEventType';
6
6
  import ConversationOption from '../enums/ConversationOption';
7
7
  import FatalError from '../enums/FatalError';
8
8
  import MediaOption from '../enums/MediaOption';
9
+ import RoomsEventType from '../enums/RoomsEventType';
9
10
  import UserRole from '../enums/UserRole';
11
+ import { IFeaturesPerRole } from '../types/ConversationFeature';
10
12
  import { ExternalId, ExternalParticipant, ExternalParticipantId, ExternalParticipantListChunk, ExternalParticipantListMarkers } from '../types/ExternalId';
13
+ import { IFeedbackExternal } from '../types/Feedback';
11
14
  import MediaModifiers from '../types/MediaModifiers';
12
15
  import MediaSettings from '../types/MediaSettings';
13
16
  import { IOnRemoteMovieData, ISharedMovieInfo, ISharedMovieState, ISharedMovieStoppedInfo } from '../types/MovieShare';
14
17
  import MuteStates from '../types/MuteStates';
15
18
  import { ParticipantStateMapped } from '../types/Participant';
19
+ import { Room, RoomParticipantUpdate, Rooms, RoomsUpdate } from '../types/Room';
16
20
  import { DebugMessageType } from './Debug';
17
21
  import { JSONObject } from './Json';
18
22
  /**
@@ -113,8 +117,9 @@ declare namespace External {
113
117
  * @param mediaModifiers Текущие настройки пользовательского медиа
114
118
  * @param muteStates Состояние устройств при входе в звонок
115
119
  * @param participants Список участников звонка (при `Params.batchParticipantsOnStart = true`)
120
+ * @param rooms Список комнат в звонке
116
121
  */
117
- function onConversation(userId: ExternalParticipantId, mediaModifiers: MediaModifiers, muteStates: MuteStates, participants?: ExternalParticipant[]): void;
122
+ function onConversation(userId: ExternalParticipantId, mediaModifiers: MediaModifiers, muteStates: MuteStates, participants?: ExternalParticipant[], rooms?: Rooms): void;
118
123
  /**
119
124
  * Постраничные данные про участников при начале звонка
120
125
  * @param chunk
@@ -245,9 +250,10 @@ declare namespace External {
245
250
  * @param userId Пользователь, для которого изменились разрешения или `null` для текущего пользователя
246
251
  * @param adminId Пользователь, который изменил разрешения
247
252
  * @param stateUpdated Если `true`, значит глобальное/персональное состояние изменилось и поля `muteStates`/`unmuteOptions` содержат обновления, если `false`, значит, эти поля не имеют значения
248
- * @param requestedMedia Какие устройства попросили влючить участника
253
+ * @param requestedMedia Какие устройства попросили включить участника
254
+ * @param roomId ID сессионного зала или ничего в случае основного зала
249
255
  */
250
- function onMuteStates(muteStates: MuteStates, unmuteOptions: MediaOption[], mediaOptions: MediaOption[], muteAll?: boolean, unmute?: boolean, userId?: ExternalParticipantId | null, adminId?: ExternalParticipantId | null, stateUpdated?: boolean, requestedMedia?: MediaOption[]): void;
256
+ function onMuteStates(muteStates: MuteStates, unmuteOptions: MediaOption[], mediaOptions: MediaOption[], muteAll?: boolean, unmute?: boolean, userId?: ExternalParticipantId | null, adminId?: ExternalParticipantId | null, stateUpdated?: boolean, requestedMedia?: MediaOption[], roomId?: number): void;
251
257
  /**
252
258
  * Изменились роли собеседника в звонке
253
259
  *
@@ -354,12 +360,14 @@ declare namespace External {
354
360
  * @param type Тип записи
355
361
  * @param externalMovieId Внешний ID ролика
356
362
  * @param externalOwnerId Внешний ID пользователя/группы от которого ведётся трансляция
363
+ * @param roomId ID зала в котором стартанула запись
357
364
  */
358
- function onRecordStarted(initiator: ExternalParticipantId, movieId: number, startTime: number, type: 'STREAM' | 'RECORD', externalMovieId?: string, externalOwnerId?: string): void;
365
+ function onRecordStarted(initiator: ExternalParticipantId, movieId: number, startTime: number, type: 'STREAM' | 'RECORD', externalMovieId?: string, externalOwnerId?: string, roomId?: number): void;
359
366
  /**
360
367
  * Закончена запись звонка
368
+ * @param roomId ID зала в котором остановлена запись
361
369
  */
362
- function onRecordStopped(): void;
370
+ function onRecordStopped(roomId?: number): void;
363
371
  /**
364
372
  * Состояние своей сети
365
373
  *
@@ -412,5 +420,34 @@ declare namespace External {
412
420
  * @param joinLink токен присоединения к звонку
413
421
  */
414
422
  function onJoinLinkChanged(joinLink: string): void;
423
+ /**
424
+ */
425
+ function onRoomsUpdated(updates: Partial<Record<RoomsEventType, RoomsUpdate>>): void;
426
+ /**
427
+ */
428
+ function onRoomUpdated(eventTypes: RoomsEventType[], roomId: number, room: Room | null, deactivate: boolean | null): void;
429
+ /**
430
+ */
431
+ function onRoomParticipantsUpdated(update: RoomParticipantUpdate): void;
432
+ /**
433
+ * Получена новая реакция
434
+ */
435
+ function onFeedback(feedback: IFeedbackExternal[]): void;
436
+ /**
437
+ * Изменилось состояние пермиссий фич в звонке
438
+ *
439
+ * @param featuresPerRole Информация о доступных фичах по ролям
440
+ */
441
+ function onFeaturesPerRoleChanged(featuresPerRole: IFeaturesPerRole): void;
442
+ /**
443
+ * Начата текстовая расшифровка звонка
444
+ * @param initiatorId Id пользователя, запустившего расшифровку звонка
445
+ * @param movieId Id расшифровки
446
+ */
447
+ function onAsrStarted(initiatorId: ExternalParticipantId, movieId: number): void;
448
+ /**
449
+ * Закончена текстовая расшифровка звонка
450
+ */
451
+ function onAsrStopped(): void;
415
452
  }
416
453
  export default External;
@@ -6,14 +6,18 @@ import ChatRoomEventType from '../enums/ChatRoomEventType';
6
6
  import ConversationOption from '../enums/ConversationOption';
7
7
  import FatalError from '../enums/FatalError';
8
8
  import MediaOption from '../enums/MediaOption';
9
+ import RoomsEventType from '../enums/RoomsEventType';
9
10
  import UserRole from '../enums/UserRole';
11
+ import { IFeaturesPerRole } from '../types/ConversationFeature';
10
12
  import { ExternalId, ExternalParticipant, ExternalParticipantId, ExternalParticipantListChunk, ExternalParticipantListMarkers } from '../types/ExternalId';
13
+ import { IFeedbackExternal } from '../types/Feedback';
11
14
  import IceServer from '../types/IceServer';
12
15
  import MediaModifiers from '../types/MediaModifiers';
13
16
  import MediaSettings from '../types/MediaSettings';
14
17
  import { IOnRemoteMovieData, ISharedMovieInfo, ISharedMovieState, ISharedMovieStoppedInfo } from '../types/MovieShare';
15
18
  import MuteStates from '../types/MuteStates';
16
19
  import { ParticipantStateMapped } from '../types/Participant';
20
+ import { Room, RoomParticipantUpdate, Rooms, RoomsUpdate } from '../types/Room';
17
21
  import AuthData from './AuthData';
18
22
  import { DebugMessageType } from './Debug';
19
23
  import { ParticipantStatus } from './External';
@@ -171,9 +175,6 @@ export declare type ParamsObject = {
171
175
  };
172
176
  perfStatReportEnabled: boolean;
173
177
  callStatReportEnabled: boolean;
174
- unifiedPlanBrowsers: {
175
- [key: string]: number;
176
- };
177
178
  /**
178
179
  * Отдавать приоритет кодеку H264 для исходящего видео
179
180
  *
@@ -235,28 +236,44 @@ export declare type ParamsObject = {
235
236
  breakVideoPayloadTypes: boolean;
236
237
  /**
237
238
  * Включить постраничный вывод участников. Работает только если включено videoTracksCount (слоты)
239
+ *
240
+ * _По умолчанию: `false`_
238
241
  */
239
242
  useParticipantListChunk: boolean;
240
243
  /**
241
- * Индекс участника для первого chunk'а который придет при установки соединения с сервером
244
+ * Включить комнаты
245
+ *
246
+ * _По умолчанию: `false`_
247
+ */
248
+ useRooms: boolean;
249
+ /**
250
+ * Индекс участника для первого chunk'а который придет при установке соединения с сервером
251
+ *
252
+ * _По умолчанию: `0`_
242
253
  */
243
254
  participantListChunkInitIndex: number;
244
255
  /**
245
- * Количество участников которые придут в первом chunk'е при установки соединения с сервером
256
+ * Количество участников которые придут в первом chunk'е при установке соединения с сервером
246
257
  * если параметр не проставлен то будет использоваться значение по умолчанию установленное на сервере
247
258
  */
248
259
  participantListChunkInitCount: number | null;
249
260
  /**
250
261
  * Включать RED-extension (redundancy) для групповых звонков
262
+ *
263
+ * _По умолчанию: `false`_
251
264
  */
252
265
  serverAudioRed: boolean;
253
266
  /**
254
267
  * Включать RED-extension (redundancy) для p2p звонков
268
+ *
269
+ * _По умолчанию: `false`_
255
270
  */
256
271
  p2pAudioRed: boolean;
257
272
  /**
258
273
  * Добавлять флаг spsPpsIdrInKeyframe для h264 кодека. В результате ключевые фреймы без sps и pps
259
274
  * не используются как ключевые. Решает проблему с артефактами на видео в случае потерь пакетов.
275
+ *
276
+ * _По умолчанию: `false`_
260
277
  */
261
278
  h264spsPpsIdrInKeyframe: boolean;
262
279
  /**
@@ -282,6 +299,11 @@ export declare type ParamsObject = {
282
299
  * @hidden
283
300
  */
284
301
  preserveAudioTracks: boolean;
302
+ /**
303
+ * Использовать congestion control для шаринга
304
+ * @hidden
305
+ */
306
+ screenShareCongestionControl: boolean;
285
307
  /**
286
308
  * Получен локальный стрим с камеры/микрофона
287
309
  */
@@ -329,7 +351,7 @@ export declare type ParamsObject = {
329
351
  /**
330
352
  * Начат звонок
331
353
  */
332
- onConversation?: (userId: ExternalParticipantId, mediaModifiers: MediaModifiers, muteStates: MuteStates, participants?: ExternalParticipant[]) => void;
354
+ onConversation?: (userId: ExternalParticipantId, mediaModifiers: MediaModifiers, muteStates: MuteStates, participants?: ExternalParticipant[], rooms?: Rooms) => void;
333
355
  /**
334
356
  * Начальный список участников для постраничного звонка
335
357
  */
@@ -402,7 +424,7 @@ export declare type ParamsObject = {
402
424
  /**
403
425
  * Изменились состояния устройств пользователя или разрешения включать камеру/микрофон
404
426
  */
405
- onMuteStates?: (muteStates: MuteStates, unmuteOptions: MediaOption[], mediaOptions: MediaOption[], muteAll: boolean, unmute: boolean, userId: ExternalParticipantId | null, adminId: ExternalParticipantId | null, stateUpdated?: boolean, requestedMedia?: MediaOption[]) => void;
427
+ onMuteStates?: (muteStates: MuteStates, unmuteOptions: MediaOption[], mediaOptions: MediaOption[], muteAll: boolean, unmute: boolean, userId: ExternalParticipantId | null, adminId: ExternalParticipantId | null, stateUpdated?: boolean, requestedMedia?: MediaOption[], roomId?: number) => void;
406
428
  /**
407
429
  * Изменились роли собеседника в звонке
408
430
  */
@@ -472,11 +494,11 @@ export declare type ParamsObject = {
472
494
  /**
473
495
  * Начата трансляция/запись звонка
474
496
  */
475
- onRecordStarted?: (initiator: ExternalParticipantId, movieId: number, startTime: number, type: 'STREAM' | 'RECORD', externalMovieId?: string, externalOwnerId?: string) => void;
497
+ onRecordStarted?: (initiator: ExternalParticipantId, movieId: number, startTime: number, type: 'STREAM' | 'RECORD', externalMovieId?: string, externalOwnerId?: string, roomId?: number) => void;
476
498
  /**
477
499
  * Закончена трансляция/запись звонка
478
500
  */
479
- onRecordStopped?: () => void;
501
+ onRecordStopped?: (roomId?: number) => void;
480
502
  /**
481
503
  * Состояние своей сети
482
504
  *
@@ -523,6 +545,39 @@ export declare type ParamsObject = {
523
545
  * @param joinLink токен присоединения к звонку
524
546
  */
525
547
  onJoinLinkChanged?: (joinLink: string) => void;
548
+ /**
549
+ * Получено обновление списка комнат
550
+ * @param updates список обновлений по комнатам
551
+ */
552
+ onRoomsUpdated?: (updates: Partial<Record<RoomsEventType, RoomsUpdate>>) => void;
553
+ /**
554
+ * Получено обновление комнаты
555
+ * @param eventTypes список событий
556
+ * @param roomId номер комнаты
557
+ * @param room комната
558
+ */
559
+ onRoomUpdated?: (eventTypes: RoomsEventType[], roomId: number, room: Room | null, deactivate: boolean | null) => void;
560
+ /**
561
+ * Получение обновление списка участников в комнате
562
+ * @param update обновление списка участников
563
+ */
564
+ onRoomParticipantsUpdated?: (update: RoomParticipantUpdate) => void;
565
+ /**
566
+ * Получены новые реакции в звонке
567
+ * @param feedback массив с реакциями
568
+ */
569
+ onFeedback?: (feedback: IFeedbackExternal[]) => void;
570
+ /**
571
+ * Включать capability c аудио шарой
572
+ */
573
+ audioShareCapabilityEnabled: boolean;
574
+ /**
575
+ * Изменился список ролей, которым доступны ConversationFeatures
576
+ *
577
+ * @param featuresPerRole Объект вида ключ: ConversationFeature = значение: UserRole[]
578
+ * (если ключ фичи отсутствует, или в ролях пустой массив, считаем фичу доступной для всех пользователей)
579
+ */
580
+ onFeaturesPerRoleChanged?: (featuresPerRole: IFeaturesPerRole) => void;
526
581
  };
527
582
  export default abstract class Params {
528
583
  private static _params;
@@ -609,12 +664,12 @@ export default abstract class Params {
609
664
  static get audioNack(): boolean;
610
665
  static get consumerScreenTrack(): boolean;
611
666
  static get producerScreenTrack(): boolean;
612
- static isUnifiedPlanSupported(name: string, version: number): boolean;
613
667
  static get movieShare(): boolean;
614
668
  static get videoTracksCount(): number;
615
669
  static get breakVideoPayloadTypes(): boolean;
616
670
  static get filteredMessages(): boolean;
617
671
  static get useParticipantListChunk(): boolean;
672
+ static get useRooms(): boolean;
618
673
  static get participantListChunkInitIndex(): number;
619
674
  static get participantListChunkInitCount(): number;
620
675
  static get serverAudioRed(): boolean;
@@ -624,4 +679,6 @@ export default abstract class Params {
624
679
  static get filterObservers(): boolean;
625
680
  static get muteMode(): boolean;
626
681
  static get preserveAudioTracks(): boolean;
682
+ static get audioShareCapabilityEnabled(): boolean;
683
+ static get screenShareCongestionControl(): boolean;
627
684
  }
@@ -0,0 +1,7 @@
1
+ export declare const fromEntries: {
2
+ <T = any>(entries: Iterable<readonly [PropertyKey, T]>): {
3
+ [k: string]: T;
4
+ };
5
+ (entries: Iterable<readonly any[]>): any;
6
+ };
7
+ export declare function blobToArrayBuffer(data: Blob): Promise<ArrayBuffer>;
package/static/Utils.d.ts CHANGED
@@ -6,7 +6,8 @@ import VideoSettings from '../types/VideoSettings';
6
6
  export declare const PARAMETERS_SEPARATOR = ":";
7
7
  export declare const DEVICE_IDX_PARAMETER = "d";
8
8
  declare namespace Utils {
9
- function patchSDP(sdp: string, preferH264: boolean, brokenH264: boolean, preferVP9: boolean, h264spsPpsIdrInKeyframe: boolean, isAudioNack?: boolean, preferRed?: boolean): string;
9
+ function patchLocalSDP(sdp: string, preferH264: boolean, brokenH264: boolean, preferVP9: boolean, h264spsPpsIdrInKeyframe: boolean, isAudioNack?: boolean, preferRed?: boolean): string;
10
+ function patchRemoteSDP(sdp: string): string;
10
11
  function getPeerIdString(peerId: SignalingMessage.PeerId): string;
11
12
  function comparePeerId(peerId1: SignalingMessage.PeerId, peerId2: SignalingMessage.PeerId): boolean;
12
13
  function getPeerConnectionHostInfo(pc: RTCPeerConnection): Promise<any>;
@@ -10,6 +10,47 @@ export declare enum FacingMode {
10
10
  LEFT = "left",
11
11
  RIGHT = "right"
12
12
  }
13
+ /********************* MediaConstraints *********************/
14
+ /**
15
+ * Вспомогательный класс для формирования параметров, которые нужны для запроса камеры и микрофона.
16
+ * @hidden
17
+ */
18
+ declare class MediaConstraints {
19
+ protected audio: MediaTrackConstraints | boolean;
20
+ protected video: MediaTrackConstraints | boolean;
21
+ private readonly needVideo;
22
+ constructor(audioDeviceId: boolean | string, videoDeviceId?: boolean | string, videoMaxWidth?: number, videoMaxHeight?: number);
23
+ /**
24
+ * Возвращает нативные параметры для передачи в getUserMedia.
25
+ */
26
+ getNative(): object;
27
+ /**
28
+ * Метод упрощает параметры, чтобы попробовать сделать getUserMedia еще раз при ошибке.
29
+ * Сначала убираются размеры, потом соотношения сторон.
30
+ */
31
+ simplify(): MediaConstraints;
32
+ /**
33
+ * Проверяет, можно ли упростить параметры.
34
+ */
35
+ canSimplify(): boolean;
36
+ /**
37
+ * Проверяет, есть ли параметры видео.
38
+ */
39
+ isVideo(): boolean;
40
+ /**
41
+ * Проверяет, есть ли параметры аудио.
42
+ */
43
+ isAudio(): boolean;
44
+ }
45
+ /********************* /MediaConstraints *********************/
46
+ /********************* ScreenConstraints *********************/
47
+ /**
48
+ * Вспомогательный класс для формирования параметров, которые нужны для запроса трансляции экрана.
49
+ * @hidden
50
+ */
51
+ export declare class ScreenConstraints extends MediaConstraints {
52
+ constructor(width: number, height: number, withAudioShare: boolean);
53
+ }
13
54
  declare namespace WebRTCUtils {
14
55
  /**
15
56
  * Инициализирует устройства. До вызова этого метода бесполезно опрашивать другие публичные методы
@@ -64,9 +105,9 @@ declare namespace WebRTCUtils {
64
105
  */
65
106
  function getUserMedia(needVideo?: boolean, needAudio?: boolean, needEmptyTracks?: boolean): Promise<MediaStream>;
66
107
  /**
67
- * Запрашивает трансляцию экрана пользователя
108
+ * Запрашивает трансляцию экрана пользователя с опциональным захватом звука
68
109
  */
69
- function getScreenMedia(): Promise<MediaStream>;
110
+ function getScreenMedia(withAudioShare: boolean): Promise<MediaStream>;
70
111
  /**
71
112
  * Запрашивает камеру пользователя
72
113
  *
@@ -100,15 +141,6 @@ declare namespace WebRTCUtils {
100
141
  * Проверяет поддержку шаринга экрана браузером
101
142
  */
102
143
  function isScreenCapturingSupported(): boolean;
103
- /**
104
- * Проверяет доступность кодека VP8 при использовании WebRTC.
105
- * Кодек может быть доступен, даже если видео VP8 в браузере не поддерживается.
106
- */
107
- function canVP8(): boolean;
108
- /**
109
- * Проверяет используемый план (unified-plan или plan-b)
110
- */
111
- function isUnifiedPlan(): boolean;
112
144
  /**
113
145
  * В некоторых браузерах H264 сломан
114
146
  */
@@ -146,5 +178,6 @@ declare namespace WebRTCUtils {
146
178
  * Возвращает подверсию браузера (если она есть)
147
179
  */
148
180
  function browserSubVersion(): string;
181
+ function isAudioShareSupported(): boolean;
149
182
  }
150
183
  export default WebRTCUtils;
@@ -0,0 +1 @@
1
+ export {};
package/types/Asr.d.ts ADDED
@@ -0,0 +1,5 @@
1
+ import { ParticipantId } from './Participant';
2
+ export interface AsrInfo {
3
+ movieId: number;
4
+ initiatorId: ParticipantId;
5
+ }
@@ -9,4 +9,5 @@ export interface IProcessMuteStateParams {
9
9
  admin?: Participant | null;
10
10
  stateUpdated?: boolean;
11
11
  requestedMedia?: MediaOption[];
12
+ roomId?: number;
12
13
  }
@@ -0,0 +1,3 @@
1
+ import ConversationFeature from '../enums/ConversationFeature';
2
+ import UserRole from '../enums/UserRole';
3
+ export declare type IFeaturesPerRole = Partial<Record<ConversationFeature, UserRole[]>>;
@@ -0,0 +1,22 @@
1
+ import { CompositeUserId } from './Participant';
2
+ import { ExternalParticipantId } from './ExternalId';
3
+ interface IFeedbackItem {
4
+ participantId: CompositeUserId;
5
+ /** event timestamps for this participant, chronologically */
6
+ times: number[];
7
+ }
8
+ export interface IFeedbackItemExternal extends Omit<IFeedbackItem, 'participantId'> {
9
+ participantId: ExternalParticipantId;
10
+ }
11
+ export interface IFeedback {
12
+ /** feedback ID; key values should be negotiated by clients themselves, like in ParticipantState, and have just the same restrictions; on backend the values of these keys are not bound in any way to those in ParticipantState */
13
+ key: string;
14
+ /** total amount of reactions of this type from the start of this call */
15
+ totalCount: number;
16
+ /** list of items containing initiator & all related data, if any */
17
+ items: IFeedbackItem[];
18
+ }
19
+ export interface IFeedbackExternal extends Omit<IFeedback, 'items'> {
20
+ items: IFeedbackItemExternal[];
21
+ }
22
+ export {};
@@ -14,6 +14,10 @@ export declare type MediaSettings = {
14
14
  * Включена ли трансляция экрана
15
15
  */
16
16
  isScreenSharingEnabled: boolean;
17
+ /**
18
+ * Включена ли трансляция звука
19
+ */
20
+ isAudioSharingEnabled: boolean;
17
21
  videoStreams: VideoStreamInfo[];
18
22
  };
19
23
  export declare type VideoStreamInfo = {
@@ -1,3 +1,4 @@
1
+ import LiveStatus from '../enums/LiveStatus';
1
2
  import { OkUserId, CompositeUserId } from './Participant';
2
3
  import { MediaType } from './ParticipantStreamDescription';
3
4
  export interface IMoviePreview {
@@ -13,13 +14,28 @@ export interface IAddMovieParams {
13
14
  thumbnails?: IMoviePreview[];
14
15
  };
15
16
  }
16
- export declare type ISharedMovieStateResponse = [number, number, boolean, number, number];
17
+ export declare type ISharedMovieStateResponse = [
18
+ number,
19
+ number,
20
+ boolean,
21
+ number,
22
+ boolean,
23
+ number
24
+ ];
17
25
  export interface ISharedMovieState {
18
26
  participantId: CompositeUserId;
19
27
  gain?: number;
20
28
  pause?: boolean;
21
29
  offset?: number;
22
- duration?: number;
30
+ mute?: boolean;
31
+ liveStatus?: LiveStatus;
32
+ }
33
+ export interface IUpdateMovieData {
34
+ movieId: string;
35
+ gain?: number;
36
+ pause?: boolean;
37
+ offset?: number;
38
+ mute?: boolean;
23
39
  }
24
40
  export interface ISharedMovieInfo {
25
41
  movieId: OkUserId;
@@ -57,6 +57,7 @@ export interface Participant {
57
57
  observedIds: CompositeUserId[];
58
58
  markers?: ExternalParticipantListMarkers;
59
59
  movieShareInfos?: ISharedMovieInfo[];
60
+ isInRoom?: boolean;
60
61
  }
61
62
  export interface IGetParticipantsParameters {
62
63
  externalIds: ExternalId[];
@@ -10,4 +10,6 @@ export interface ParticipantListChunkParameters {
10
10
  backward?: boolean;
11
11
  /** If true then resulting chunk will start from Participant with specified marker, if such Participant (still) exists */
12
12
  includeMarker?: boolean;
13
+ /** optional, id of the room to get chunk for, main call if unspecified */
14
+ roomId?: number;
13
15
  }
@@ -6,7 +6,8 @@ export declare enum MediaType {
6
6
  CAMERA = "CAMERA",
7
7
  SCREEN = "SCREEN",
8
8
  STREAM = "STREAM",
9
- MOVIE = "MOVIE"
9
+ MOVIE = "MOVIE",
10
+ AUDIOSHARE = "AUDIOSHARE"
10
11
  }
11
12
  export declare function serializeParticipantStreamDescription(description: ParticipantStreamDescription): string;
12
13
  export declare function parseParticipantStreamDescription(descriptionString: string): ParticipantStreamDescription;
@@ -0,0 +1,77 @@
1
+ import { ExternalParticipant, ExternalParticipantId, ExternalParticipantListChunk } from './ExternalId';
2
+ import MuteStates from './MuteStates';
3
+ import { ParticipantListMarkers } from './Participant';
4
+ export interface Room {
5
+ id: number;
6
+ /**
7
+ * name of this room
8
+ */
9
+ name: string;
10
+ /**
11
+ * count of participants (read/write, optional)
12
+ */
13
+ participantCount: number;
14
+ /**
15
+ * ids of all participants (read/write, optional)
16
+ */
17
+ participantIds: ExternalParticipantId[];
18
+ /**
19
+ * ids of participants to be added to this room (read/write, optional)
20
+ */
21
+ addParticipantIds?: ExternalParticipantId[];
22
+ /**
23
+ * ids of participants to be removed from this room (read/write, optional)
24
+ */
25
+ removeParticipantIds?: ExternalParticipantId[];
26
+ /**
27
+ * if participant requested then contains first chunk of participants in this rooms
28
+ * (if client fails to support chunks, then contains all participant in this room)
29
+ * (read, optional)
30
+ */
31
+ participants?: ExternalParticipantListChunk;
32
+ /**
33
+ * if this room is active (read/write, optional)
34
+ */
35
+ active?: boolean;
36
+ /**
37
+ * global (room-wide) mute state, if any
38
+ */
39
+ muteStates?: MuteStates;
40
+ }
41
+ /**
42
+ * Initial rooms state
43
+ */
44
+ export interface Rooms {
45
+ rooms: Room[];
46
+ /**
47
+ * current room id of participant. if null then the partipant is in the main call
48
+ */
49
+ roomId?: number;
50
+ }
51
+ export interface RoomsUpdate {
52
+ rooms?: Room[];
53
+ roomIds?: number[];
54
+ deactivated?: boolean;
55
+ }
56
+ export interface RoomParticipantUpdate {
57
+ roomId: number;
58
+ /**
59
+ * total number of participants in the room
60
+ */
61
+ participantCount: number;
62
+ /**
63
+ * ids of added participants, always present (if any) so participants would be able
64
+ * to identify their presence in particular room
65
+ */
66
+ addedParticipantIds?: ExternalParticipantId[];
67
+ /**
68
+ * optional, data for added participants
69
+ */
70
+ addedParticipants?: ExternalParticipant[];
71
+ /**
72
+ * optional, depending on the context may contain either markers
73
+ * for all (sorted) lists available or be empty (if client fails to support chunked participants)
74
+ */
75
+ removedParticipantMarkers?: ParticipantListMarkers[];
76
+ removedParticipantIds?: ExternalParticipantId[];
77
+ }