@vkontakte/calls-sdk 2.6.2-dev.aa1b4e2.0 → 2.6.2-dev.abaf7cc.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 (51) hide show
  1. package/CallsSDK.d.ts +68 -11
  2. package/abstract/BaseApi.d.ts +7 -3
  3. package/abstract/BaseSignaling.d.ts +14 -2
  4. package/calls-sdk.cjs.js +8 -8
  5. package/calls-sdk.esm.js +8 -8
  6. package/classes/Conversation.d.ts +36 -5
  7. package/classes/MediaSource.d.ts +7 -2
  8. package/classes/ProducerCommandSerializationService.d.ts +3 -1
  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 -0
  20. package/default/Api.d.ts +8 -3
  21. package/default/Api.test.d.ts +1 -0
  22. package/default/Signaling.d.ts +14 -2
  23. package/enums/ConversationFeature.d.ts +2 -1
  24. package/enums/ConversationOption.d.ts +3 -1
  25. package/enums/HangupType.d.ts +3 -1
  26. package/enums/LiveStatus.d.ts +7 -0
  27. package/enums/MediaOption.d.ts +3 -1
  28. package/enums/RoomsEventType.d.ts +6 -0
  29. package/enums/SignalingCommandType.d.ts +12 -1
  30. package/enums/SignalingNotification.d.ts +12 -1
  31. package/package.json +1 -1
  32. package/static/External.d.ts +95 -4
  33. package/static/Params.d.ts +100 -2
  34. package/static/Utils.d.ts +1 -1
  35. package/static/WebRTCUtils.d.ts +2 -1
  36. package/types/Asr.d.ts +5 -0
  37. package/types/ConversationFeature.d.ts +3 -0
  38. package/types/ConversationParams.d.ts +1 -0
  39. package/types/ExternalId.d.ts +2 -0
  40. package/types/Feedback.d.ts +22 -0
  41. package/types/MediaSettings.d.ts +5 -1
  42. package/types/MovieShare.d.ts +58 -0
  43. package/types/Participant.d.ts +3 -0
  44. package/types/ParticipantListChunk.d.ts +2 -0
  45. package/types/ParticipantStreamDescription.d.ts +2 -1
  46. package/types/Room.d.ts +72 -0
  47. package/types/SignalingMessage.d.ts +64 -0
  48. package/types/WaitingHall.d.ts +2 -8
  49. package/utils/ArrayDequeue.d.ts +24 -0
  50. package/utils/ArrayDequeue.spec.d.ts +1 -0
  51. package/worker/LibVPxEncoderWorker.d.ts +1 -1
@@ -6,12 +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';
16
+ import { IOnRemoteMovieData, ISharedMovieInfo, ISharedMovieState, ISharedMovieStoppedInfo } from '../types/MovieShare';
13
17
  import MuteStates from '../types/MuteStates';
14
18
  import { ParticipantStateMapped } from '../types/Participant';
19
+ import { Room, RoomParticipantUpdate, Rooms, RoomsUpdate } from '../types/Room';
15
20
  import { DebugMessageType } from './Debug';
16
21
  import { JSONObject } from './Json';
17
22
  /**
@@ -72,10 +77,31 @@ declare namespace External {
72
77
  * Если сервер закончил стримить собеседника, вместо стрима будет передан null
73
78
  *
74
79
  * @param userId
75
- * @param streamName
76
- * @param stream
80
+ * @param data
81
+ */
82
+ function onRemoteLive(userId: ExternalParticipantId, data: IOnRemoteMovieData): void;
83
+ /**
84
+ * Получен собственный стрим лайв.
85
+ * Если сервер закончил стримить собеседника, вместо стрима будет передан null
86
+ *
87
+ * @param userId
88
+ * @param data
77
89
  */
78
- function onRemoteLive(userId: ExternalParticipantId, streamName: string, stream: MediaStream | null): void;
90
+ function onLocalLive(userId: ExternalParticipantId, data: IOnRemoteMovieData): void;
91
+ /**
92
+ * Получено обновление стрима или лайва от собеседника.
93
+ *
94
+ * @param userId
95
+ * @param data
96
+ */
97
+ function onRemoteLiveUpdate(userId: ExternalParticipantId, data: ISharedMovieState): void;
98
+ /**
99
+ * Получено обновление собственного стрима или лайва.
100
+ *
101
+ * @param userId
102
+ * @param data
103
+ */
104
+ function onLocalLiveUpdate(userId: ExternalParticipantId, data: ISharedMovieState): void;
79
105
  /**
80
106
  * Получен стрим с экрана собеседника.
81
107
  * Если сервер закончил стримить экран собеседника, вместо стрима будет передан null
@@ -91,8 +117,9 @@ declare namespace External {
91
117
  * @param mediaModifiers Текущие настройки пользовательского медиа
92
118
  * @param muteStates Состояние устройств при входе в звонок
93
119
  * @param participants Список участников звонка (при `Params.batchParticipantsOnStart = true`)
120
+ * @param rooms Список комнат в звонке
94
121
  */
95
- 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;
96
123
  /**
97
124
  * Постраничные данные про участников при начале звонка
98
125
  * @param chunk
@@ -106,6 +133,41 @@ declare namespace External {
106
133
  * @param markers
107
134
  */
108
135
  function onRemoteMediaSettings(userId: ExternalParticipantId, mediaSettings: MediaSettings, markers?: ExternalParticipantListMarkers): void;
136
+ /**
137
+ * Изменились данные собственного стрима
138
+ *
139
+ * @param userId
140
+ * @param mediaSettings
141
+ */
142
+ function onLocalMediaSettings(userId: ExternalParticipantId, mediaSettings: MediaSettings): void;
143
+ /**
144
+ * Полученны данные по стримам (лайв/мувик) от собеседника
145
+ *
146
+ * @param userId
147
+ * @param sharedMovieInfo
148
+ */
149
+ function onRemoteSharedMovieInfo(userId: ExternalParticipantId, sharedMovieInfo: ISharedMovieInfo): void;
150
+ /**
151
+ * Полученны данные по остановленным стримам (лайв/мувик) от собеседника
152
+ *
153
+ * @param userId
154
+ * @param sharedMovieStoppedInfo
155
+ */
156
+ function onRemoteSharedMovieStoppedInfo(userId: ExternalParticipantId, sharedMovieStoppedInfo: ISharedMovieStoppedInfo): void;
157
+ /**
158
+ * Полученны данные по собственным стримам (лайв/мувик)
159
+ *
160
+ * @param userId
161
+ * @param sharedMovieInfo
162
+ */
163
+ function onLocalSharedMovieInfo(userId: ExternalParticipantId, sharedMovieInfo: ISharedMovieInfo): void;
164
+ /**
165
+ * Полученны данные по собственным остановленным стримам (лайв/мувик)
166
+ *
167
+ * @param userId
168
+ * @param sharedMovieStoppedInfo
169
+ */
170
+ function onLocalSharedMovieStoppedInfo(userId: ExternalParticipantId, sharedMovieStoppedInfo: ISharedMovieStoppedInfo): void;
109
171
  /**
110
172
  * Добавили участника
111
173
  *
@@ -355,5 +417,34 @@ declare namespace External {
355
417
  * @param joinLink токен присоединения к звонку
356
418
  */
357
419
  function onJoinLinkChanged(joinLink: string): void;
420
+ /**
421
+ */
422
+ function onRoomsUpdated(updates: Partial<Record<RoomsEventType, RoomsUpdate>>): void;
423
+ /**
424
+ */
425
+ function onRoomUpdated(eventTypes: RoomsEventType[], roomId: number, room: Room | null, deactivate: boolean | null): void;
426
+ /**
427
+ */
428
+ function onRoomParticipantsUpdated(update: RoomParticipantUpdate): void;
429
+ /**
430
+ * Получена новая реакция
431
+ */
432
+ function onFeedback(feedback: IFeedbackExternal[]): void;
433
+ /**
434
+ * Изменилось состояние пермиссий фич в звонке
435
+ *
436
+ * @param featuresPerRole Информация о доступных фичах по ролям
437
+ */
438
+ function onFeaturesPerRoleChanged(featuresPerRole: IFeaturesPerRole): void;
439
+ /**
440
+ * Начата текстовая расшифровка звонка
441
+ * @param initiatorId Id пользователя, запустившего расшифровку звонка
442
+ * @param movieId Id расшифровки
443
+ */
444
+ function onAsrStarted(initiatorId: ExternalParticipantId, movieId: number): void;
445
+ /**
446
+ * Закончена текстовая расшифровка звонка
447
+ */
448
+ function onAsrStopped(): void;
358
449
  }
359
450
  export default External;
@@ -6,13 +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';
17
+ import { IOnRemoteMovieData, ISharedMovieInfo, ISharedMovieState, ISharedMovieStoppedInfo } from '../types/MovieShare';
14
18
  import MuteStates from '../types/MuteStates';
15
19
  import { ParticipantStateMapped } from '../types/Participant';
20
+ import { Room, RoomParticipantUpdate, Rooms, RoomsUpdate } from '../types/Room';
16
21
  import AuthData from './AuthData';
17
22
  import { DebugMessageType } from './Debug';
18
23
  import { ParticipantStatus } from './External';
@@ -24,6 +29,7 @@ import { FacingMode } from './WebRTCUtils';
24
29
  export declare type ParamsObject = {
25
30
  platform: string;
26
31
  clientType: string;
32
+ externalUserType: string;
27
33
  device: string;
28
34
  /**
29
35
  * API ключ приложения
@@ -43,6 +49,11 @@ export declare type ParamsObject = {
43
49
  * Домен, чтобы попасть в тестовую группу. Для тестирования экспериментальных улучшений существуют отдельные сервера, чтобы собирать фидбек и уже потом раскатывать на всех юзеров. Если передать сюда специальный ключ, то конверсейшн будет обрабатываться на таком сервере.
44
50
  */
45
51
  domain: string;
52
+ /**
53
+ * Домен, куда будет ходить Ok api за данными
54
+ * @hidden
55
+ */
56
+ externalDomain: string;
46
57
  iceServers: IceServer[];
47
58
  wssBase: string;
48
59
  wssToken: string;
@@ -230,6 +241,10 @@ export declare type ParamsObject = {
230
241
  * Включить постраничный вывод участников. Работает только если включено videoTracksCount (слоты)
231
242
  */
232
243
  useParticipantListChunk: boolean;
244
+ /**
245
+ * Включить комнаты
246
+ */
247
+ useRooms: boolean;
233
248
  /**
234
249
  * Индекс участника для первого chunk'а который придет при установки соединения с сервером
235
250
  */
@@ -247,6 +262,11 @@ export declare type ParamsObject = {
247
262
  * Включать RED-extension (redundancy) для p2p звонков
248
263
  */
249
264
  p2pAudioRed: boolean;
265
+ /**
266
+ * Добавлять флаг spsPpsIdrInKeyframe для h264 кодека. В результате ключевые фреймы без sps и pps
267
+ * не используются как ключевые. Решает проблему с артефактами на видео в случае потерь пакетов.
268
+ */
269
+ h264spsPpsIdrInKeyframe: boolean;
250
270
  /**
251
271
  * Получать список участников звонка третьим аргументом в `onConversation`
252
272
  * @hidden
@@ -270,6 +290,11 @@ export declare type ParamsObject = {
270
290
  * @hidden
271
291
  */
272
292
  preserveAudioTracks: boolean;
293
+ /**
294
+ * Использовать congestion control для шаринга
295
+ * @hidden
296
+ */
297
+ screenShareCongestionControl: boolean;
273
298
  /**
274
299
  * Получен локальный стрим с камеры/микрофона
275
300
  */
@@ -300,11 +325,24 @@ export declare type ParamsObject = {
300
325
  * Получен стрим трансляция или мувик от собеседника.
301
326
  * Если сервер закончил стримить экран собеседника, вместо стрима будет передан null
302
327
  */
303
- onRemoteLive?: (userId: ExternalParticipantId, streamId: string, stream: MediaStream | null) => void;
328
+ onRemoteLive?: (userId: ExternalParticipantId, data: IOnRemoteMovieData) => void;
329
+ /**
330
+ * Получен собственный стрим трансляция или мувик.
331
+ * Если сервер закончил стримить экран собеседника, вместо стрима будет передан null
332
+ */
333
+ onLocalLive?: (userId: ExternalParticipantId, data: IOnRemoteMovieData) => void;
334
+ /**
335
+ * Получено обновление стрима или лайва от собеседника.
336
+ */
337
+ onRemoteLiveUpdate?: (userId: ExternalParticipantId, data: ISharedMovieState) => void;
338
+ /**
339
+ * Получено обновление собственного стрима или лайва.
340
+ */
341
+ onLocalLiveUpdate?: (userId: ExternalParticipantId, data: ISharedMovieState) => void;
304
342
  /**
305
343
  * Начат звонок
306
344
  */
307
- onConversation?: (userId: ExternalParticipantId, mediaModifiers: MediaModifiers, muteStates: MuteStates, participants?: ExternalParticipant[]) => void;
345
+ onConversation?: (userId: ExternalParticipantId, mediaModifiers: MediaModifiers, muteStates: MuteStates, participants?: ExternalParticipant[], rooms?: Rooms) => void;
308
346
  /**
309
347
  * Начальный список участников для постраничного звонка
310
348
  */
@@ -313,6 +351,26 @@ export declare type ParamsObject = {
313
351
  * Изменились данные стрима собеседника
314
352
  */
315
353
  onRemoteMediaSettings?: (userId: ExternalParticipantId, mediaSettings: MediaSettings, markers?: ExternalParticipantListMarkers) => void;
354
+ /**
355
+ * Изменились данные стрима собеседника
356
+ */
357
+ onLocalMediaSettings?: (userId: ExternalParticipantId, mediaSettings: MediaSettings) => void;
358
+ /**
359
+ * Полученны данные по стримам (лайв/мувик) от собеседника
360
+ */
361
+ onRemoteSharedMovieInfo?: (userId: ExternalParticipantId, sharedMovieInfo: ISharedMovieInfo) => void;
362
+ /**
363
+ * Полученны данные по остановленным стримам (лайв/мувик) от собеседника
364
+ */
365
+ onRemoteSharedMovieStoppedInfo?: (userId: ExternalParticipantId, sharedMovieStoppedInfo: ISharedMovieStoppedInfo) => void;
366
+ /**
367
+ * Полученны данные по собственным стримам (лайв/мувик)
368
+ */
369
+ onLocalSharedMovieInfo?: (userId: ExternalParticipantId, sharedMovieInfo: ISharedMovieInfo) => void;
370
+ /**
371
+ * Полученны данные по собственным остановленным стримам (лайв/мувик)
372
+ */
373
+ onLocalSharedMovieStoppedInfo?: (userId: ExternalParticipantId, sharedMovieStoppedInfo: ISharedMovieStoppedInfo) => void;
316
374
  /**
317
375
  * Добавили участника
318
376
  */
@@ -478,6 +536,39 @@ export declare type ParamsObject = {
478
536
  * @param joinLink токен присоединения к звонку
479
537
  */
480
538
  onJoinLinkChanged?: (joinLink: string) => void;
539
+ /**
540
+ * Получено обновление списка комнат
541
+ * @param updates список обновлений по комнатам
542
+ */
543
+ onRoomsUpdated?: (updates: Partial<Record<RoomsEventType, RoomsUpdate>>) => void;
544
+ /**
545
+ * Получено обновление комнаты
546
+ * @param eventTypes список событий
547
+ * @param roomId номер комнаты
548
+ * @param room комната
549
+ */
550
+ onRoomUpdated?: (eventTypes: RoomsEventType[], roomId: number, room: Room | null, deactivate: boolean | null) => void;
551
+ /**
552
+ * Получение обновление списка участников в комнате
553
+ * @param update обновление списка участников
554
+ */
555
+ onRoomParticipantsUpdated?: (update: RoomParticipantUpdate) => void;
556
+ /**
557
+ * Получены новые реакции в звонке
558
+ * @param feedback массив с реакциями
559
+ */
560
+ onFeedback?: (feedback: IFeedbackExternal[]) => void;
561
+ /**
562
+ * Включать capability c аудио шарой
563
+ */
564
+ audioShareCapabilityEnabled: boolean;
565
+ /**
566
+ * Изменился список ролей, которым доступны ConversationFeatures
567
+ *
568
+ * @param featuresPerRole Объект вида ключ: ConversationFeature = значение: UserRole[]
569
+ * (если ключ фичи отсутствует, или в ролях пустой массив, считаем фичу доступной для всех пользователей)
570
+ */
571
+ onFeaturesPerRoleChanged?: (featuresPerRole: IFeaturesPerRole) => void;
481
572
  };
482
573
  export default abstract class Params {
483
574
  private static _params;
@@ -494,6 +585,8 @@ export default abstract class Params {
494
585
  static set platform(value: string);
495
586
  static get clientType(): string;
496
587
  static set clientType(value: string);
588
+ static get externalUserType(): string;
589
+ static set externalUserType(value: string);
497
590
  static get device(): string;
498
591
  static get apiKey(): string;
499
592
  static get apiEnv(): string;
@@ -503,6 +596,7 @@ export default abstract class Params {
503
596
  static get anonymToken(): string;
504
597
  static set anonymToken(value: string);
505
598
  static get domain(): string;
599
+ static get externalDomain(): string;
506
600
  static get iceServers(): IceServer[];
507
601
  static set iceServers(value: IceServer[]);
508
602
  static get wssBase(): string;
@@ -567,12 +661,16 @@ export default abstract class Params {
567
661
  static get breakVideoPayloadTypes(): boolean;
568
662
  static get filteredMessages(): boolean;
569
663
  static get useParticipantListChunk(): boolean;
664
+ static get useRooms(): boolean;
570
665
  static get participantListChunkInitIndex(): number;
571
666
  static get participantListChunkInitCount(): number;
572
667
  static get serverAudioRed(): boolean;
573
668
  static get p2pAudioRed(): boolean;
669
+ static get h264spsPpsIdrInKeyframe(): boolean;
574
670
  static get batchParticipantsOnStart(): boolean;
575
671
  static get filterObservers(): boolean;
576
672
  static get muteMode(): boolean;
577
673
  static get preserveAudioTracks(): boolean;
674
+ static get audioShareCapabilityEnabled(): boolean;
675
+ static get screenShareCongestionControl(): boolean;
578
676
  }
package/static/Utils.d.ts CHANGED
@@ -6,7 +6,7 @@ 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, isAudioNack?: boolean, preferRed?: boolean): string;
9
+ function patchSDP(sdp: string, preferH264: boolean, brokenH264: boolean, preferVP9: boolean, h264spsPpsIdrInKeyframe: boolean, isAudioNack?: boolean, preferRed?: boolean): string;
10
10
  function getPeerIdString(peerId: SignalingMessage.PeerId): string;
11
11
  function comparePeerId(peerId1: SignalingMessage.PeerId, peerId2: SignalingMessage.PeerId): boolean;
12
12
  function getPeerConnectionHostInfo(pc: RTCPeerConnection): Promise<any>;
@@ -66,7 +66,7 @@ declare namespace WebRTCUtils {
66
66
  /**
67
67
  * Запрашивает трансляцию экрана пользователя
68
68
  */
69
- function getScreenMedia(): Promise<MediaStream>;
69
+ function getScreenMedia(withAudioShare: boolean): Promise<MediaStream>;
70
70
  /**
71
71
  * Запрашивает камеру пользователя
72
72
  *
@@ -146,5 +146,6 @@ declare namespace WebRTCUtils {
146
146
  * Возвращает подверсию браузера (если она есть)
147
147
  */
148
148
  function browserSubVersion(): string;
149
+ function isAudioShareSupported(): boolean;
149
150
  }
150
151
  export default WebRTCUtils;
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
+ }
@@ -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[]>>;
@@ -10,5 +10,6 @@ declare type ConversationParams = {
10
10
  isp_as_org?: string;
11
11
  loc_cc?: string;
12
12
  loc_reg?: string;
13
+ external_user_type: string;
13
14
  };
14
15
  export default ConversationParams;
@@ -1,6 +1,7 @@
1
1
  import MediaOption from '../enums/MediaOption';
2
2
  import { ParticipantStatus } from '../static/External';
3
3
  import MediaSettings from './MediaSettings';
4
+ import { ISharedMovieInfo } from './MovieShare';
4
5
  import MuteStates from './MuteStates';
5
6
  import { ParticipantListMarker, ParticipantListType, ParticipantStateMapped } from './Participant';
6
7
  import SignalingMessage from './SignalingMessage';
@@ -94,6 +95,7 @@ export interface ExternalParticipant {
94
95
  */
95
96
  unmuteOptions: MediaOption[];
96
97
  markers?: ExternalParticipantListMarkers;
98
+ movieShareInfos?: ISharedMovieInfo[];
97
99
  }
98
100
  export interface ExternalParticipantListChunk {
99
101
  participants: ExternalParticipant[];
@@ -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,12 +14,16 @@ 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 = {
20
24
  id: string;
21
25
  source: string;
22
- vkMovieId?: string;
26
+ externalMovieId?: string;
23
27
  };
24
28
  export default MediaSettings;
25
29
  export declare function compareMediaSettings(ms1: MediaSettings, ms2: MediaSettings): boolean;
@@ -0,0 +1,58 @@
1
+ import LiveStatus from '../enums/LiveStatus';
2
+ import { OkUserId, CompositeUserId } from './Participant';
3
+ import { MediaType } from './ParticipantStreamDescription';
4
+ export interface IMoviePreview {
5
+ url: string;
6
+ width: number;
7
+ height: number;
8
+ }
9
+ export interface IAddMovieParams {
10
+ movieId: string;
11
+ gain?: number;
12
+ metadata?: {
13
+ title?: string;
14
+ thumbnails?: IMoviePreview[];
15
+ };
16
+ }
17
+ export declare type ISharedMovieStateResponse = [
18
+ number,
19
+ number,
20
+ boolean,
21
+ number,
22
+ boolean,
23
+ number
24
+ ];
25
+ export interface ISharedMovieState {
26
+ participantId: CompositeUserId;
27
+ gain?: number;
28
+ pause?: boolean;
29
+ offset?: 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;
39
+ }
40
+ export interface ISharedMovieInfo {
41
+ movieId: OkUserId;
42
+ initiatorId: CompositeUserId;
43
+ title: string;
44
+ source: MediaType;
45
+ externalMovieId: string;
46
+ duration: number;
47
+ thumbnails: IMoviePreview[];
48
+ }
49
+ export interface ISharedMovieStoppedInfo {
50
+ movieId: OkUserId;
51
+ initiatorId: CompositeUserId;
52
+ source: MediaType;
53
+ }
54
+ export interface IOnRemoteMovieData {
55
+ streamName: string;
56
+ stream: MediaStream | null;
57
+ mediaType: MediaType;
58
+ }
@@ -4,6 +4,7 @@ import UserRole from '../enums/UserRole';
4
4
  import { ParticipantStatus } from '../static/External';
5
5
  import MediaSettings from '../types/MediaSettings';
6
6
  import { ExternalId, ExternalParticipantId, ExternalParticipantListMarkers } from './ExternalId';
7
+ import { ISharedMovieInfo } from './MovieShare';
7
8
  import MuteStates from './MuteStates';
8
9
  import ParticipantLayout from './ParticipantLayout';
9
10
  /**
@@ -55,6 +56,8 @@ export interface Participant {
55
56
  unmuteOptions: MediaOption[];
56
57
  observedIds: CompositeUserId[];
57
58
  markers?: ExternalParticipantListMarkers;
59
+ movieShareInfos?: ISharedMovieInfo[];
60
+ isInRoom?: boolean;
58
61
  }
59
62
  export interface IGetParticipantsParameters {
60
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,72 @@
1
+ import { ExternalParticipant, ExternalParticipantId, ExternalParticipantListChunk } from './ExternalId';
2
+ import { ParticipantListMarkers } from './Participant';
3
+ export interface Room {
4
+ id: number;
5
+ /**
6
+ * name of this room
7
+ */
8
+ name: string;
9
+ /**
10
+ * count of participants (read/write, optional)
11
+ */
12
+ participantCount: number;
13
+ /**
14
+ * ids of all participants (read/write, optional)
15
+ */
16
+ participantIds: ExternalParticipantId[];
17
+ /**
18
+ * ids of participants to be added to this room (read/write, optional)
19
+ */
20
+ addParticipantIds?: ExternalParticipantId[];
21
+ /**
22
+ * ids of participants to be removed from this room (read/write, optional)
23
+ */
24
+ removeParticipantIds?: ExternalParticipantId[];
25
+ /**
26
+ * if participant requested then contains first chunk of participants in this rooms
27
+ * (if client fails to support chunks, then contains all participant in this room)
28
+ * (read, optional)
29
+ */
30
+ participants?: ExternalParticipantListChunk;
31
+ /**
32
+ * if this room is active (read/write, optional)
33
+ */
34
+ active?: boolean;
35
+ }
36
+ /**
37
+ * Initial rooms state
38
+ */
39
+ export interface Rooms {
40
+ rooms: Room[];
41
+ /**
42
+ * current room id of participant. if null then the partipant is in the main call
43
+ */
44
+ roomId?: number;
45
+ }
46
+ export interface RoomsUpdate {
47
+ rooms?: Room[];
48
+ roomIds?: number[];
49
+ deactivated?: boolean;
50
+ }
51
+ export interface RoomParticipantUpdate {
52
+ roomId: number;
53
+ /**
54
+ * total number of participants in the room
55
+ */
56
+ participantCount: number;
57
+ /**
58
+ * ids of added participants, always present (if any) so participants would be able
59
+ * to identify their presence in particular room
60
+ */
61
+ addedParticipantIds?: ExternalParticipantId[];
62
+ /**
63
+ * optional, data for added participants
64
+ */
65
+ addedParticipants?: ExternalParticipant[];
66
+ /**
67
+ * optional, depending on the context may contain either markers
68
+ * for all (sorted) lists available or be empty (if client fails to support chunked participants)
69
+ */
70
+ removedParticipantMarkers?: ParticipantListMarkers[];
71
+ removedParticipantIds?: ExternalParticipantId[];
72
+ }