@vkontakte/calls-sdk 2.6.2-beta.25 → 2.6.2-beta.27

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.
@@ -13,6 +13,7 @@ import UserRole from '../enums/UserRole';
13
13
  import UserType from '../enums/UserType';
14
14
  import { JSONObject } from '../static/Json';
15
15
  import { IFeaturesPerRole } from '../types/ConversationFeature';
16
+ import { AsrInfo } from '../types/Asr';
16
17
  import { ExternalParticipant, ExternalParticipantId, ExternalParticipantListChunk, ExternalUserId } from '../types/ExternalId';
17
18
  import MediaModifiers from '../types/MediaModifiers';
18
19
  import { IVideoDimentions } from '../types/MediaSettings';
@@ -51,6 +52,7 @@ export declare type ConversationData = {
51
52
  needRate: boolean;
52
53
  recordInfo: RecordInfo | null;
53
54
  chatId: string | null;
55
+ asrInfo: AsrInfo | null;
54
56
  /**
55
57
  * Роли пользователя
56
58
  */
@@ -217,6 +219,7 @@ export default class Conversation extends EventEmitter {
217
219
  private _onChatRoomUpdated;
218
220
  private _onSharedMovieUpdate;
219
221
  private _onSharedMovieInfoStarted;
222
+ private _processSharedMovieInfos;
220
223
  private _processSharedMovieInfo;
221
224
  private _processConnectionSharedMovieInfo;
222
225
  private _onSharedMovieInfoStopped;
@@ -227,6 +230,8 @@ export default class Conversation extends EventEmitter {
227
230
  private _isCallAdmin;
228
231
  private _checkAdminRole;
229
232
  grantRoles(participantId: CompositeUserId, roles: UserRole[], revoke: boolean): Promise<void>;
233
+ startAsr(): Promise<void>;
234
+ stopAsr(): Promise<void>;
230
235
  muteParticipant(participantId: ParticipantId | null, muteStates: MuteStates, requestedMedia?: MediaOption[]): Promise<void>;
231
236
  enableFeatureForRoles(feature: ConversationFeature, roles: UserRole[]): Promise<void>;
232
237
  pinParticipant(participantId: ParticipantId, unpin: boolean): Promise<void>;
@@ -251,6 +256,10 @@ export default class Conversation extends EventEmitter {
251
256
  }>;
252
257
  updateMovie(params: IUpdateMovieData): Promise<void>;
253
258
  removeMovie(movieId: string): Promise<void>;
259
+ updateRooms(rooms: SignalingMessage.Room[], assignRandomly: boolean): Promise<void>;
260
+ activateRooms(roomIds: number[], deactivate: boolean): Promise<void>;
261
+ switchRoom(toRoomId?: number, participantId?: ParticipantId): Promise<void>;
262
+ removeRooms(roomIds: number[]): Promise<void>;
254
263
  startStream(isRecord?: boolean, name?: string | null, movieId?: string | null, privacy?: 'PUBLIC' | 'FRIENDS' | 'DIRECT_LINK', groupId?: string | null): Promise<SignalingMessage>;
255
264
  stopStream(): Promise<SignalingMessage>;
256
265
  recordSetRole(participantId: ParticipantId, role: RecordRole | null): Promise<void>;
@@ -291,6 +300,7 @@ export default class Conversation extends EventEmitter {
291
300
  private _onChatMessage;
292
301
  private _onCustomData;
293
302
  private _onRecordInfo;
303
+ private _onAsrInfo;
294
304
  private _onRolesChanged;
295
305
  /**
296
306
  * Клиент должен немедленно выключить микрофон и/или камеру
@@ -321,6 +331,10 @@ export default class Conversation extends EventEmitter {
321
331
  private _updateDisplayLayoutFromCache;
322
332
  private _setParticipantsStatus;
323
333
  private _onJoinLinkChanged;
334
+ private _onRoomsUpdated;
335
+ private _onRoomUpdated;
336
+ private _convertRoomToExternal;
337
+ private _onRoomParticipantsUpdated;
324
338
  /** получили из сингналинга сообщение о реакции пользователей */
325
339
  private _onFeedback;
326
340
  private _isMe;
@@ -4,6 +4,7 @@ export default interface IEncoder {
4
4
  requestFrame(keyFrame: boolean): void;
5
5
  isVP9(): boolean;
6
6
  destroy(): void;
7
+ setBitrate(bitrate: number): void;
7
8
  }
8
9
  export interface FrameMessage {
9
10
  type: MessageType;
@@ -12,4 +13,6 @@ export interface FrameMessage {
12
13
  duration?: number;
13
14
  data?: ArrayBuffer;
14
15
  error?: string;
16
+ width?: number;
17
+ height?: number;
15
18
  }
@@ -4,6 +4,8 @@ import WorkerBase from './WorkerBase';
4
4
  export default class LibVPxEncoder extends WorkerBase implements IEncoder {
5
5
  private readonly _sourceTrack;
6
6
  private readonly _onFrame;
7
+ private readonly _useCongestionControl;
8
+ private readonly _maxBitrate;
7
9
  private readonly _useImageCapture;
8
10
  private _video;
9
11
  private _imageCapture;
@@ -13,7 +15,7 @@ export default class LibVPxEncoder extends WorkerBase implements IEncoder {
13
15
  private _track;
14
16
  private _frameReadTimeout;
15
17
  private _lastFrame;
16
- constructor(sourceTrack: MediaStreamTrack, onFrame: OnFrameCallback);
18
+ constructor(sourceTrack: MediaStreamTrack, onFrame: OnFrameCallback, useCongestionControl: boolean, maxBitrate: number);
17
19
  private _createDom;
18
20
  private _removeDom;
19
21
  private _createStream;
@@ -27,6 +29,7 @@ export default class LibVPxEncoder extends WorkerBase implements IEncoder {
27
29
  private _requestFrameVideo;
28
30
  private _requestFrameBitmap;
29
31
  requestFrame(keyFrame?: boolean): void;
32
+ setBitrate(bitrate: number): void;
30
33
  isVP9(): boolean;
31
34
  destroy(): void;
32
35
  static isBrowserSupported(): boolean;
@@ -6,9 +6,14 @@ export declare const enum MessageType {
6
6
  INIT = "init",
7
7
  READY = "ready",
8
8
  FRAME = "frame",
9
+ SET_BITRATE = "set_bitrate",
9
10
  ERROR = "error",
10
11
  DEBUG = "debug",
11
12
  LOG_ERROR = "log_error"
12
13
  }
13
- export declare type EncodedVideoFrame = Pick<EncodedVideoChunk, 'type' | 'timestamp' | 'duration' | 'byteLength' | 'data'>;
14
+ export declare type EncodedVideoFrame = Pick<EncodedVideoChunk, 'type' | 'timestamp' | 'duration' | 'byteLength' | 'data'> & {
15
+ width: number;
16
+ height: number;
17
+ };
14
18
  export declare type OnFrameCallback = (chunk: EncodedVideoFrame | null, error?: string) => void;
19
+ export declare type OnCongestionCallback = (bitrate: number) => void;
@@ -5,9 +5,12 @@ export default class WebCodecsEncoder extends WorkerBase implements IEncoder {
5
5
  private readonly _sourceTrack;
6
6
  private readonly _trackProcessor;
7
7
  private readonly _onFrame;
8
- constructor(sourceTrack: MediaStreamTrack, onFrame: OnFrameCallback);
8
+ private readonly _useCongestionControl;
9
+ private readonly _maxBitrate;
10
+ constructor(sourceTrack: MediaStreamTrack, onFrame: OnFrameCallback, useCongestionControl: boolean, maxBitrate: number);
9
11
  init(): Promise<void>;
10
12
  requestFrame(keyFrame?: boolean): void;
13
+ setBitrate(bitrate: number): void;
11
14
  isVP9(): boolean;
12
15
  destroy(): void;
13
16
  static isBrowserSupported(): boolean;
@@ -4,6 +4,10 @@ export default class ScreenCaptureSender {
4
4
  private _destroyed;
5
5
  private _needKeyframe;
6
6
  private readonly DATA_SIZE;
7
+ private _congestionControl;
8
+ private _frameNum;
9
+ private _width;
10
+ private _height;
7
11
  constructor(track: MediaStreamTrack, datachannel: RTCDataChannel);
8
12
  private _requestFrame;
9
13
  private _wrapHeader;
@@ -12,4 +16,7 @@ export default class ScreenCaptureSender {
12
16
  private _sendChunk;
13
17
  destroy(): void;
14
18
  static isBrowserSupported(): boolean;
19
+ private _onCongestionCallback;
20
+ private _onResize;
21
+ private _calcMinMaxBitrate;
15
22
  }
@@ -0,0 +1,16 @@
1
+ import { OnCongestionCallback } from '../codec/Types';
2
+ export default class ScreenCongestionControl {
3
+ private _bitrateCalculator;
4
+ private _onCongestion;
5
+ private _minBitrate;
6
+ private _maxBitrate;
7
+ private _targetBitrate;
8
+ private _lastDown;
9
+ private _lastUp;
10
+ private _lastSwitch;
11
+ private _framesDelayed;
12
+ private _upPenalty;
13
+ constructor(onCongestion: OnCongestionCallback, minBitrate: number, maxBitrate: number);
14
+ checkFrame(frameNum: number, frameElapsed: number, frameSize: number): void;
15
+ reconfigure(minBitrate: number, maxBitrate: number): void;
16
+ }
@@ -101,6 +101,10 @@ export default class Signaling extends BaseSignaling {
101
101
  addMovie(data: IAddMovieParams): Promise<SignalingMessage>;
102
102
  updateMovie(data: IUpdateMovieData): Promise<SignalingMessage>;
103
103
  removeMovie(data: any): Promise<SignalingMessage>;
104
+ updateRooms(rooms: SignalingMessage.Room[], assignRandomly: boolean): Promise<SignalingMessage>;
105
+ activateRooms(roomIds: number[], deactivate: boolean): Promise<SignalingMessage>;
106
+ switchRoom(toRoomId?: number, participantId?: ParticipantId): Promise<SignalingMessage>;
107
+ removeRooms(roomIds: number[]): Promise<SignalingMessage>;
104
108
  startStream(data: any): Promise<SignalingMessage>;
105
109
  stopStream(): Promise<SignalingMessage>;
106
110
  recordSetRole(participantId: ParticipantId, role: RecordRole | null): Promise<SignalingMessage>;
@@ -135,6 +139,8 @@ export default class Signaling extends BaseSignaling {
135
139
  readyToSend(): void;
136
140
  getParticipantListChunk(participantListChunkParameters: ParticipantListChunkParameters): Promise<SignalingMessage>;
137
141
  getParticipants(externalIds: SignalingMessage.ExternalId[]): Promise<SignalingMessage>;
142
+ startAsr(): Promise<SignalingMessage>;
143
+ stopAsr(): Promise<SignalingMessage>;
138
144
  protected _connect(connectionType: SignalingConnectionType): void;
139
145
  protected _disconnect(): void;
140
146
  private _onOpen;
@@ -0,0 +1,6 @@
1
+ declare enum RoomsEventType {
2
+ UPDATE = "UPDATE",
3
+ REMOVE = "REMOVE",
4
+ ACTIVATE = "ACTIVATE"
5
+ }
6
+ export default RoomsEventType;
@@ -36,6 +36,14 @@ declare enum SignalingCommandType {
36
36
  ADD_MOVIE = "add-movie",
37
37
  UPDATE_MOVIE = "update-movie",
38
38
  REMOVE_MOVIE = "remove-movie",
39
- FEEDBACK = "feedback"
39
+ GET_ROOMS = "get_rooms",
40
+ GET_ROOM = "get_room",
41
+ UPDATE_ROOMS = "update-rooms",
42
+ ACTIVATE_ROOMS = "activate-rooms",
43
+ REMOVE_ROOMS = "remove-rooms",
44
+ SWITCH_ROOM = "switch-room",
45
+ FEEDBACK = "feedback",
46
+ ASR_START = "asr-start",
47
+ ASR_STOP = "asr-stop"
40
48
  }
41
49
  export default SignalingCommandType;
@@ -41,6 +41,11 @@ declare enum SignalingNotification {
41
41
  MOVIE_SHARE_INFO = "movie-share-info",
42
42
  MOVIE_SHARE_STARTED = "movie-share-started",
43
43
  MOVIE_SHARE_STOPPED = "movie-share-stopped",
44
- FEATURES_PER_ROLE_CHANGED = "features-per-role-changed"
44
+ ROOM_UPDATED = "room-updated",
45
+ ROOMS_UPDATED = "rooms-updated",
46
+ ROOM_PARTICIPANTS_UPDATED = "room-participants-updated",
47
+ FEATURES_PER_ROLE_CHANGED = "features-per-role-changed",
48
+ ASR_STARTED = "asr-started",
49
+ ASR_STOPPED = "asr-stopped"
45
50
  }
46
51
  export default SignalingNotification;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vkontakte/calls-sdk",
3
- "version": "2.6.2-beta.25",
3
+ "version": "2.6.2-beta.27",
4
4
  "author": "vk.com",
5
5
  "description": "Library for video calls based on the vk.com platform",
6
6
  "homepage": "https://vk.com",
@@ -6,6 +6,7 @@ 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';
10
11
  import { IFeaturesPerRole } from '../types/ConversationFeature';
11
12
  import { ExternalId, ExternalParticipant, ExternalParticipantId, ExternalParticipantListChunk, ExternalParticipantListMarkers } from '../types/ExternalId';
@@ -15,6 +16,7 @@ import MediaSettings from '../types/MediaSettings';
15
16
  import { IOnRemoteMovieData, ISharedMovieInfo, ISharedMovieState, ISharedMovieStoppedInfo } from '../types/MovieShare';
16
17
  import MuteStates from '../types/MuteStates';
17
18
  import { ParticipantStateMapped } from '../types/Participant';
19
+ import { Room, RoomParticipantUpdate, RoomsUpdate } from '../types/Room';
18
20
  import { DebugMessageType } from './Debug';
19
21
  import { JSONObject } from './Json';
20
22
  /**
@@ -115,8 +117,9 @@ declare namespace External {
115
117
  * @param mediaModifiers Текущие настройки пользовательского медиа
116
118
  * @param muteStates Состояние устройств при входе в звонок
117
119
  * @param participants Список участников звонка (при `Params.batchParticipantsOnStart = true`)
120
+ * @param rooms Список комнат в звонке
118
121
  */
119
- function onConversation(userId: ExternalParticipantId, mediaModifiers: MediaModifiers, muteStates: MuteStates, participants?: ExternalParticipant[]): void;
122
+ function onConversation(userId: ExternalParticipantId, mediaModifiers: MediaModifiers, muteStates: MuteStates, participants?: ExternalParticipant[], rooms?: Room[]): void;
120
123
  /**
121
124
  * Постраничные данные про участников при начале звонка
122
125
  * @param chunk
@@ -414,6 +417,15 @@ declare namespace External {
414
417
  * @param joinLink токен присоединения к звонку
415
418
  */
416
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): void;
426
+ /**
427
+ */
428
+ function onRoomParticipantsUpdated(update: RoomParticipantUpdate): void;
417
429
  /**
418
430
  * Получена новая реакция
419
431
  */
@@ -424,5 +436,15 @@ declare namespace External {
424
436
  * @param featuresPerRole Информация о доступных фичах по ролям
425
437
  */
426
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;
427
449
  }
428
450
  export default External;
@@ -6,6 +6,7 @@ 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';
10
11
  import { IFeaturesPerRole } from '../types/ConversationFeature';
11
12
  import { ExternalId, ExternalParticipant, ExternalParticipantId, ExternalParticipantListChunk, ExternalParticipantListMarkers } from '../types/ExternalId';
@@ -16,6 +17,7 @@ import MediaSettings from '../types/MediaSettings';
16
17
  import { IOnRemoteMovieData, ISharedMovieInfo, ISharedMovieState, ISharedMovieStoppedInfo } from '../types/MovieShare';
17
18
  import MuteStates from '../types/MuteStates';
18
19
  import { ParticipantStateMapped } from '../types/Participant';
20
+ import { Room, RoomParticipantUpdate, RoomsUpdate } from '../types/Room';
19
21
  import AuthData from './AuthData';
20
22
  import { DebugMessageType } from './Debug';
21
23
  import { ParticipantStatus } from './External';
@@ -239,6 +241,10 @@ export declare type ParamsObject = {
239
241
  * Включить постраничный вывод участников. Работает только если включено videoTracksCount (слоты)
240
242
  */
241
243
  useParticipantListChunk: boolean;
244
+ /**
245
+ * Включить комнаты
246
+ */
247
+ useRooms: boolean;
242
248
  /**
243
249
  * Индекс участника для первого chunk'а который придет при установки соединения с сервером
244
250
  */
@@ -284,6 +290,11 @@ export declare type ParamsObject = {
284
290
  * @hidden
285
291
  */
286
292
  preserveAudioTracks: boolean;
293
+ /**
294
+ * Использовать congestion control для шаринга
295
+ * @hidden
296
+ */
297
+ screenShareCongestionControl: boolean;
287
298
  /**
288
299
  * Получен локальный стрим с камеры/микрофона
289
300
  */
@@ -331,7 +342,7 @@ export declare type ParamsObject = {
331
342
  /**
332
343
  * Начат звонок
333
344
  */
334
- onConversation?: (userId: ExternalParticipantId, mediaModifiers: MediaModifiers, muteStates: MuteStates, participants?: ExternalParticipant[]) => void;
345
+ onConversation?: (userId: ExternalParticipantId, mediaModifiers: MediaModifiers, muteStates: MuteStates, participants?: ExternalParticipant[], rooms?: Room[]) => void;
335
346
  /**
336
347
  * Начальный список участников для постраничного звонка
337
348
  */
@@ -525,6 +536,23 @@ export declare type ParamsObject = {
525
536
  * @param joinLink токен присоединения к звонку
526
537
  */
527
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) => void;
551
+ /**
552
+ * Получение обновление списка участников в комнате
553
+ * @param update обновление списка участников
554
+ */
555
+ onRoomParticipantsUpdated?: (update: RoomParticipantUpdate) => void;
528
556
  /**
529
557
  * Получены новые реакции в звонке
530
558
  * @param feedback массив с реакциями
@@ -633,6 +661,7 @@ export default abstract class Params {
633
661
  static get breakVideoPayloadTypes(): boolean;
634
662
  static get filteredMessages(): boolean;
635
663
  static get useParticipantListChunk(): boolean;
664
+ static get useRooms(): boolean;
636
665
  static get participantListChunkInitIndex(): number;
637
666
  static get participantListChunkInitCount(): number;
638
667
  static get serverAudioRed(): boolean;
@@ -643,4 +672,5 @@ export default abstract class Params {
643
672
  static get muteMode(): boolean;
644
673
  static get preserveAudioTracks(): boolean;
645
674
  static get audioShareCapabilityEnabled(): boolean;
675
+ static get screenShareCongestionControl(): boolean;
646
676
  }
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
+ }
@@ -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
  }
@@ -0,0 +1,60 @@
1
+ import { ExternalParticipantId, ExternalParticipantListChunk } from './ExternalId';
2
+ import { Participant, 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
+ export interface RoomsUpdate {
37
+ rooms?: Room[];
38
+ roomIds?: number[];
39
+ }
40
+ export interface RoomParticipantUpdate {
41
+ roomId: number;
42
+ /**
43
+ * total number of participants in the room
44
+ */
45
+ participantCount: number;
46
+ /**
47
+ * ids of added participants, always present (if any) so participants would be able
48
+ * to identify their presence in particular room
49
+ */
50
+ addedParticipantIds?: ExternalParticipantId[];
51
+ /**
52
+ * optional, data for added participants
53
+ */
54
+ addedParticipants?: Participant[];
55
+ /**
56
+ * optional, depending on the context may contain either markers
57
+ * for all (sorted) lists available or be empty (if client fails to support chunked participants)
58
+ */
59
+ removedParticipantMarkers?: ParticipantListMarkers;
60
+ }
@@ -5,10 +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';
10
11
  import { IFeaturesPerRole } from './ConversationFeature';
11
12
  import { IFeedback } from './Feedback';
13
+ import { AsrInfo } from './Asr';
12
14
  import MediaModifiers from './MediaModifiers';
13
15
  import MediaSettings from './MediaSettings';
14
16
  import { ISharedMovieInfo, ISharedMovieState, ISharedMovieStoppedInfo } from './MovieShare';
@@ -81,6 +83,16 @@ declare namespace SignalingMessage {
81
83
  options: ConversationOption[];
82
84
  muteStates?: MuteStates;
83
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
+ }
84
96
  interface Notification extends SignalingMessage {
85
97
  type?: string;
86
98
  notification?: string;
@@ -281,6 +293,10 @@ declare namespace SignalingMessage {
281
293
  mediaModifiers: MediaModifiers;
282
294
  participants?: ParticipantListChunk;
283
295
  chatRoom?: ChatRoom;
296
+ rooms?: {
297
+ rooms: Room[];
298
+ roomId?: number;
299
+ };
284
300
  }
285
301
  export interface JoinLinkChanged extends Notification {
286
302
  joinLink: string;
@@ -296,9 +312,34 @@ declare namespace SignalingMessage {
296
312
  }
297
313
  export interface SharedMovieStoppedInfo extends Notification, ISharedMovieStoppedInfo {
298
314
  }
315
+ export interface RoomsUpdated extends Notification {
316
+ updates: Partial<Record<RoomsEventType, {
317
+ rooms?: Room;
318
+ roomIds?: number[];
319
+ }>>;
320
+ }
321
+ export interface RoomUpdated extends Notification {
322
+ events: RoomsEventType[];
323
+ room?: Room;
324
+ roomId: number;
325
+ deactivate?: boolean;
326
+ }
327
+ export interface RoomParticipantsUpdated extends Notification {
328
+ roomId: number;
329
+ participantCount: number;
330
+ addedParticipantIds?: CompositeUserId[];
331
+ addedParticipants?: Participant[];
332
+ removedParticipantMarkers?: ParticipantListMarkers;
333
+ }
299
334
  export interface FeaturesPerRoleChanged extends Notification {
300
335
  featuresPerRole?: IFeaturesPerRole | null;
301
336
  }
337
+ export interface AsrStarted extends Notification {
338
+ asrInfo: AsrInfo;
339
+ }
340
+ export interface AsrStopped extends Notification {
341
+ movieId: number;
342
+ }
302
343
  export {};
303
344
  }
304
345
  export default SignalingMessage;
@@ -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;