@vkontakte/calls-sdk 2.6.2-dev.3e4fbdf.0 → 2.6.2-dev.459e12e.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 (46) hide show
  1. package/CallsSDK.d.ts +63 -9
  2. package/abstract/BaseApi.d.ts +1 -1
  3. package/abstract/BaseSignaling.d.ts +11 -3
  4. package/calls-sdk.cjs.js +8 -8
  5. package/calls-sdk.esm.js +8 -8
  6. package/classes/Conversation.d.ts +35 -7
  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 +1 -1
  21. package/default/Signaling.d.ts +11 -3
  22. package/enums/LiveStatus.d.ts +7 -0
  23. package/enums/MediaOption.d.ts +2 -1
  24. package/enums/RoomsEventType.d.ts +6 -0
  25. package/enums/SignalingCommandType.d.ts +10 -1
  26. package/enums/SignalingNotification.d.ts +7 -1
  27. package/package.json +1 -1
  28. package/static/External.d.ts +46 -5
  29. package/static/Params.d.ts +61 -10
  30. package/static/Polyfills.d.ts +7 -0
  31. package/static/Utils.d.ts +2 -1
  32. package/static/WebRTCUtils.d.ts +44 -11
  33. package/static/WebRTCUtils.test.d.ts +1 -0
  34. package/types/Asr.d.ts +5 -0
  35. package/types/Conversation.d.ts +1 -0
  36. package/types/ConversationFeature.d.ts +3 -0
  37. package/types/MediaSettings.d.ts +4 -0
  38. package/types/MovieShare.d.ts +4 -1
  39. package/types/Participant.d.ts +1 -0
  40. package/types/ParticipantListChunk.d.ts +2 -0
  41. package/types/ParticipantStreamDescription.d.ts +2 -1
  42. package/types/Room.d.ts +77 -0
  43. package/types/SignalingMessage.d.ts +53 -2
  44. package/utils/ArrayDequeue.d.ts +24 -0
  45. package/utils/ArrayDequeue.spec.d.ts +1 -0
  46. package/worker/LibVPxEncoderWorker.d.ts +1 -1
@@ -6,7 +6,9 @@ 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';
11
13
  import { IFeedbackExternal } from '../types/Feedback';
12
14
  import IceServer from '../types/IceServer';
@@ -15,6 +17,7 @@ import MediaSettings from '../types/MediaSettings';
15
17
  import { IOnRemoteMovieData, ISharedMovieInfo, ISharedMovieState, ISharedMovieStoppedInfo } from '../types/MovieShare';
16
18
  import MuteStates from '../types/MuteStates';
17
19
  import { ParticipantStateMapped } from '../types/Participant';
20
+ import { Room, RoomParticipantUpdate, Rooms, RoomsUpdate } from '../types/Room';
18
21
  import AuthData from './AuthData';
19
22
  import { DebugMessageType } from './Debug';
20
23
  import { ParticipantStatus } from './External';
@@ -172,9 +175,6 @@ export declare type ParamsObject = {
172
175
  };
173
176
  perfStatReportEnabled: boolean;
174
177
  callStatReportEnabled: boolean;
175
- unifiedPlanBrowsers: {
176
- [key: string]: number;
177
- };
178
178
  /**
179
179
  * Отдавать приоритет кодеку H264 для исходящего видео
180
180
  *
@@ -236,28 +236,44 @@ export declare type ParamsObject = {
236
236
  breakVideoPayloadTypes: boolean;
237
237
  /**
238
238
  * Включить постраничный вывод участников. Работает только если включено videoTracksCount (слоты)
239
+ *
240
+ * _По умолчанию: `false`_
239
241
  */
240
242
  useParticipantListChunk: boolean;
241
243
  /**
242
- * Индекс участника для первого chunk'а который придет при установки соединения с сервером
244
+ * Включить комнаты
245
+ *
246
+ * _По умолчанию: `false`_
247
+ */
248
+ useRooms: boolean;
249
+ /**
250
+ * Индекс участника для первого chunk'а который придет при установке соединения с сервером
251
+ *
252
+ * _По умолчанию: `0`_
243
253
  */
244
254
  participantListChunkInitIndex: number;
245
255
  /**
246
- * Количество участников которые придут в первом chunk'е при установки соединения с сервером
256
+ * Количество участников которые придут в первом chunk'е при установке соединения с сервером
247
257
  * если параметр не проставлен то будет использоваться значение по умолчанию установленное на сервере
248
258
  */
249
259
  participantListChunkInitCount: number | null;
250
260
  /**
251
261
  * Включать RED-extension (redundancy) для групповых звонков
262
+ *
263
+ * _По умолчанию: `false`_
252
264
  */
253
265
  serverAudioRed: boolean;
254
266
  /**
255
267
  * Включать RED-extension (redundancy) для p2p звонков
268
+ *
269
+ * _По умолчанию: `false`_
256
270
  */
257
271
  p2pAudioRed: boolean;
258
272
  /**
259
273
  * Добавлять флаг spsPpsIdrInKeyframe для h264 кодека. В результате ключевые фреймы без sps и pps
260
274
  * не используются как ключевые. Решает проблему с артефактами на видео в случае потерь пакетов.
275
+ *
276
+ * _По умолчанию: `false`_
261
277
  */
262
278
  h264spsPpsIdrInKeyframe: boolean;
263
279
  /**
@@ -283,6 +299,11 @@ export declare type ParamsObject = {
283
299
  * @hidden
284
300
  */
285
301
  preserveAudioTracks: boolean;
302
+ /**
303
+ * Использовать congestion control для шаринга
304
+ * @hidden
305
+ */
306
+ screenShareCongestionControl: boolean;
286
307
  /**
287
308
  * Получен локальный стрим с камеры/микрофона
288
309
  */
@@ -330,7 +351,7 @@ export declare type ParamsObject = {
330
351
  /**
331
352
  * Начат звонок
332
353
  */
333
- onConversation?: (userId: ExternalParticipantId, mediaModifiers: MediaModifiers, muteStates: MuteStates, participants?: ExternalParticipant[]) => void;
354
+ onConversation?: (userId: ExternalParticipantId, mediaModifiers: MediaModifiers, muteStates: MuteStates, participants?: ExternalParticipant[], rooms?: Rooms) => void;
334
355
  /**
335
356
  * Начальный список участников для постраничного звонка
336
357
  */
@@ -403,7 +424,7 @@ export declare type ParamsObject = {
403
424
  /**
404
425
  * Изменились состояния устройств пользователя или разрешения включать камеру/микрофон
405
426
  */
406
- 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 | null) => void;
407
428
  /**
408
429
  * Изменились роли собеседника в звонке
409
430
  */
@@ -473,11 +494,11 @@ export declare type ParamsObject = {
473
494
  /**
474
495
  * Начата трансляция/запись звонка
475
496
  */
476
- 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 | null) => void;
477
498
  /**
478
499
  * Закончена трансляция/запись звонка
479
500
  */
480
- onRecordStopped?: () => void;
501
+ onRecordStopped?: (roomId: number | null) => void;
481
502
  /**
482
503
  * Состояние своей сети
483
504
  *
@@ -524,11 +545,39 @@ export declare type ParamsObject = {
524
545
  * @param joinLink токен присоединения к звонку
525
546
  */
526
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;
527
565
  /**
528
566
  * Получены новые реакции в звонке
529
567
  * @param feedback массив с реакциями
530
568
  */
531
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;
532
581
  };
533
582
  export default abstract class Params {
534
583
  private static _params;
@@ -615,12 +664,12 @@ export default abstract class Params {
615
664
  static get audioNack(): boolean;
616
665
  static get consumerScreenTrack(): boolean;
617
666
  static get producerScreenTrack(): boolean;
618
- static isUnifiedPlanSupported(name: string, version: number): boolean;
619
667
  static get movieShare(): boolean;
620
668
  static get videoTracksCount(): number;
621
669
  static get breakVideoPayloadTypes(): boolean;
622
670
  static get filteredMessages(): boolean;
623
671
  static get useParticipantListChunk(): boolean;
672
+ static get useRooms(): boolean;
624
673
  static get participantListChunkInitIndex(): number;
625
674
  static get participantListChunkInitCount(): number;
626
675
  static get serverAudioRed(): boolean;
@@ -630,4 +679,6 @@ export default abstract class Params {
630
679
  static get filterObservers(): boolean;
631
680
  static get muteMode(): boolean;
632
681
  static get preserveAudioTracks(): boolean;
682
+ static get audioShareCapabilityEnabled(): boolean;
683
+ static get screenShareCongestionControl(): boolean;
633
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 | null;
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[]>>;
@@ -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 {
@@ -18,7 +19,8 @@ export declare type ISharedMovieStateResponse = [
18
19
  number,
19
20
  boolean,
20
21
  number,
21
- boolean
22
+ boolean,
23
+ number
22
24
  ];
23
25
  export interface ISharedMovieState {
24
26
  participantId: CompositeUserId;
@@ -26,6 +28,7 @@ export interface ISharedMovieState {
26
28
  pause?: boolean;
27
29
  offset?: number;
28
30
  mute?: boolean;
31
+ liveStatus?: LiveStatus;
29
32
  }
30
33
  export interface IUpdateMovieData {
31
34
  movieId: string;
@@ -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 | null;
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 | null;
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
+ }
@@ -5,9 +5,12 @@ import ConversationOption from '../enums/ConversationOption';
5
5
  import HangupType from '../enums/HangupType';
6
6
  import MediaOption from '../enums/MediaOption';
7
7
  import ParticipantState from '../enums/ParticipantState';
8
+ import RoomsEventType from '../enums/RoomsEventType';
8
9
  import UserRole from '../enums/UserRole';
9
10
  import UserType from '../enums/UserType';
11
+ import { IFeaturesPerRole } from './ConversationFeature';
10
12
  import { IFeedback } from './Feedback';
13
+ import { AsrInfo } from './Asr';
11
14
  import MediaModifiers from './MediaModifiers';
12
15
  import MediaSettings from './MediaSettings';
13
16
  import { ISharedMovieInfo, ISharedMovieState, ISharedMovieStoppedInfo } from './MovieShare';
@@ -75,11 +78,25 @@ declare namespace SignalingMessage {
75
78
  multichatId: string | null;
76
79
  tamtamMultichatId: string | null;
77
80
  recordInfo: RecordInfo | null;
78
- featuresPerRole?: Partial<Record<ConversationFeature, UserRole[]>> | null;
81
+ featuresPerRole?: IFeaturesPerRole | null;
79
82
  pinnedParticipantId: ParticipantId | null;
80
83
  options: ConversationOption[];
81
84
  muteStates?: MuteStates;
82
85
  }
86
+ export interface Room extends SignalingMessage {
87
+ id?: number;
88
+ name?: string;
89
+ participantCount?: number;
90
+ participantIds?: CompositeUserId[];
91
+ addParticipantIds?: CompositeUserId[];
92
+ removeParticipantIds?: CompositeUserId[];
93
+ participants?: ParticipantListChunk;
94
+ active?: boolean;
95
+ countdownSec?: number;
96
+ timeoutMs?: number;
97
+ muteStates?: MuteStates;
98
+ recordInfo?: RecordInfo;
99
+ }
83
100
  interface Notification extends SignalingMessage {
84
101
  type?: string;
85
102
  notification?: string;
@@ -156,6 +173,7 @@ declare namespace SignalingMessage {
156
173
  stateUpdated?: boolean;
157
174
  unmute?: boolean;
158
175
  muteAll?: boolean;
176
+ roomId?: number;
159
177
  }
160
178
  export interface PinParticipant extends Notification {
161
179
  participantId: ParticipantId;
@@ -190,7 +208,7 @@ declare namespace SignalingMessage {
190
208
  }
191
209
  export interface FeatureSetChanged extends Notification {
192
210
  features: ConversationFeature[];
193
- featuresPerRole?: Partial<Record<ConversationFeature, UserRole[]>> | null;
211
+ featuresPerRole?: IFeaturesPerRole | null;
194
212
  }
195
213
  export interface MultipartyChatCreated extends Notification {
196
214
  chatId: string;
@@ -280,6 +298,10 @@ declare namespace SignalingMessage {
280
298
  mediaModifiers: MediaModifiers;
281
299
  participants?: ParticipantListChunk;
282
300
  chatRoom?: ChatRoom;
301
+ rooms?: {
302
+ rooms: Room[];
303
+ roomId?: number;
304
+ };
283
305
  }
284
306
  export interface JoinLinkChanged extends Notification {
285
307
  joinLink: string;
@@ -295,6 +317,35 @@ declare namespace SignalingMessage {
295
317
  }
296
318
  export interface SharedMovieStoppedInfo extends Notification, ISharedMovieStoppedInfo {
297
319
  }
320
+ export interface RoomsUpdated extends Notification {
321
+ updates: Partial<Record<RoomsEventType, {
322
+ rooms?: Room;
323
+ roomIds?: number[];
324
+ deactivated?: boolean;
325
+ }>>;
326
+ }
327
+ export interface RoomUpdated extends Notification {
328
+ events: RoomsEventType[];
329
+ room?: Room;
330
+ roomId: number;
331
+ deactivate?: boolean;
332
+ }
333
+ export interface RoomParticipantsUpdated extends Notification {
334
+ roomId?: number;
335
+ participantCount: number;
336
+ addedParticipantIds?: CompositeUserId[];
337
+ addedParticipants?: Participant[];
338
+ removedParticipantMarkers?: ParticipantListMarkers[];
339
+ }
340
+ export interface FeaturesPerRoleChanged extends Notification {
341
+ featuresPerRole?: IFeaturesPerRole | null;
342
+ }
343
+ export interface AsrStarted extends Notification {
344
+ asrInfo: AsrInfo;
345
+ }
346
+ export interface AsrStopped extends Notification {
347
+ movieId: number;
348
+ }
298
349
  export {};
299
350
  }
300
351
  export default SignalingMessage;
@@ -0,0 +1,24 @@
1
+ export declare class ArrayDequeue<T = any> {
2
+ /** очередь */
3
+ private readonly _queue;
4
+ /** курсор для чтения */
5
+ private _readCursor;
6
+ /** курсор для записи */
7
+ private _writeCursor;
8
+ /** подвинуть курсор чтения */
9
+ private _moveReadCursor;
10
+ /** сколько осталось в очереди элементов */
11
+ private _left;
12
+ constructor(length: number);
13
+ /** возвращает длину, переданную в конструктор */
14
+ get length(): number;
15
+ /** возвращает текущую длину очереди */
16
+ get left(): number;
17
+ toArray(): T[];
18
+ /** добавить элемент в очередь */
19
+ add(element: T): void;
20
+ /** вычисляет значение след курсора по кругу */
21
+ private nextCursor;
22
+ /** получить следующий элемент */
23
+ next(): T | null;
24
+ }
@@ -0,0 +1 @@
1
+ export {};
@@ -1,4 +1,4 @@
1
1
  /// <reference lib="webworker" />
2
2
  import type libvpx from '@vkontakte/libvpx';
3
- declare const _default: (vpx: typeof libvpx, urlResolver: (url: string) => string) => void;
3
+ declare const _default: (vpx: typeof libvpx, urlResolver: (url: string) => string, useCongestionControl: boolean, maxBitrate: number) => void;
4
4
  export default _default;