@vkontakte/calls-sdk 2.6.2-beta.2 → 2.6.2-beta.21

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 (42) hide show
  1. package/CallsSDK.d.ts +26 -9
  2. package/abstract/BaseApi.d.ts +6 -2
  3. package/abstract/BaseSignaling.d.ts +8 -3
  4. package/calls-sdk.cjs.js +8 -8
  5. package/calls-sdk.esm.js +8 -8
  6. package/classes/Conversation.d.ts +23 -7
  7. package/classes/MediaSource.d.ts +7 -2
  8. package/classes/ParticipantIdRegistry.d.ts +2 -0
  9. package/classes/ProducerCommandSerializationService.d.ts +17 -0
  10. package/classes/screenshare/ScreenCaptureSender.d.ts +1 -0
  11. package/classes/screenshare/Utils.d.ts +1 -0
  12. package/classes/transport/ServerTransport.d.ts +2 -0
  13. package/default/Api.d.ts +7 -2
  14. package/default/Api.test.d.ts +1 -0
  15. package/default/Signaling.d.ts +13 -4
  16. package/enums/ConversationFeature.d.ts +2 -1
  17. package/enums/ConversationOption.d.ts +3 -1
  18. package/enums/HangupType.d.ts +3 -1
  19. package/enums/MediaOption.d.ts +3 -1
  20. package/enums/SignalingCommandType.d.ts +3 -1
  21. package/enums/SignalingNotification.d.ts +7 -1
  22. package/package.json +1 -1
  23. package/static/ApiTransport.d.ts +1 -1
  24. package/static/External.d.ts +75 -4
  25. package/static/Params.d.ts +79 -2
  26. package/static/Utils.d.ts +5 -1
  27. package/static/WebRTCUtils.d.ts +2 -1
  28. package/types/Conversation.d.ts +12 -0
  29. package/types/ConversationFeature.d.ts +3 -0
  30. package/types/ConversationParams.d.ts +1 -0
  31. package/types/ExternalId.d.ts +2 -0
  32. package/types/Feedback.d.ts +22 -0
  33. package/types/LayoutUtils.d.ts +5 -0
  34. package/types/MediaSettings.d.ts +5 -1
  35. package/types/MovieShare.d.ts +55 -0
  36. package/types/Participant.d.ts +2 -0
  37. package/types/ParticipantLayout.d.ts +7 -1
  38. package/types/ParticipantStreamDescription.d.ts +2 -1
  39. package/types/SignalingMessage.d.ts +22 -0
  40. package/types/WaitingHall.d.ts +2 -8
  41. package/utils/Conversation.d.ts +2 -0
  42. package/utils/MsgPackerBufferUtils.d.ts +31 -0
@@ -7,10 +7,13 @@ import ConversationOption from '../enums/ConversationOption';
7
7
  import FatalError from '../enums/FatalError';
8
8
  import MediaOption from '../enums/MediaOption';
9
9
  import UserRole from '../enums/UserRole';
10
+ import { IFeaturesPerRole } from '../types/ConversationFeature';
10
11
  import { ExternalId, ExternalParticipant, ExternalParticipantId, ExternalParticipantListChunk, ExternalParticipantListMarkers } from '../types/ExternalId';
12
+ import { IFeedbackExternal } from '../types/Feedback';
11
13
  import IceServer from '../types/IceServer';
12
14
  import MediaModifiers from '../types/MediaModifiers';
13
15
  import MediaSettings from '../types/MediaSettings';
16
+ import { IOnRemoteMovieData, ISharedMovieInfo, ISharedMovieState, ISharedMovieStoppedInfo } from '../types/MovieShare';
14
17
  import MuteStates from '../types/MuteStates';
15
18
  import { ParticipantStateMapped } from '../types/Participant';
16
19
  import AuthData from './AuthData';
@@ -24,6 +27,7 @@ import { FacingMode } from './WebRTCUtils';
24
27
  export declare type ParamsObject = {
25
28
  platform: string;
26
29
  clientType: string;
30
+ externalUserType: string;
27
31
  device: string;
28
32
  /**
29
33
  * API ключ приложения
@@ -43,6 +47,11 @@ export declare type ParamsObject = {
43
47
  * Домен, чтобы попасть в тестовую группу. Для тестирования экспериментальных улучшений существуют отдельные сервера, чтобы собирать фидбек и уже потом раскатывать на всех юзеров. Если передать сюда специальный ключ, то конверсейшн будет обрабатываться на таком сервере.
44
48
  */
45
49
  domain: string;
50
+ /**
51
+ * Домен, куда будет ходить Ok api за данными
52
+ * @hidden
53
+ */
54
+ externalDomain: string;
46
55
  iceServers: IceServer[];
47
56
  wssBase: string;
48
57
  wssToken: string;
@@ -186,6 +195,7 @@ export declare type ParamsObject = {
186
195
  * Работает только при приёме экрана через дата-канал.
187
196
  *
188
197
  * _По умолчанию: `true`_
198
+ * @deprecated
189
199
  */
190
200
  producerScreenTrack: boolean;
191
201
  /**
@@ -193,12 +203,19 @@ export declare type ParamsObject = {
193
203
  * Работает только при отправке экрана через дата-канал.
194
204
  *
195
205
  * _По умолчанию: `true`_
206
+ * @deprecated
196
207
  */
197
208
  consumerScreenTrack: boolean;
198
209
  producerNotificationDataChannel: boolean;
199
210
  producerCommandDataChannel: boolean;
200
211
  consumerScreenDataChannel: boolean;
201
212
  producerScreenDataChannel: boolean;
213
+ /**
214
+ * Размер пакета для отправки трансляции экрана в датаканал в байтах.
215
+ * Максимальный размер пакета 65536 bytes в хроме, но по стандарту лучше максимум 16 Кб.
216
+ * @hidden
217
+ */
218
+ consumerScreenDataChannelPacketSize: number;
202
219
  screenShareWebmBuilder: boolean;
203
220
  noiseSuppression: boolean;
204
221
  /**
@@ -239,6 +256,11 @@ export declare type ParamsObject = {
239
256
  * Включать RED-extension (redundancy) для p2p звонков
240
257
  */
241
258
  p2pAudioRed: boolean;
259
+ /**
260
+ * Добавлять флаг spsPpsIdrInKeyframe для h264 кодека. В результате ключевые фреймы без sps и pps
261
+ * не используются как ключевые. Решает проблему с артефактами на видео в случае потерь пакетов.
262
+ */
263
+ h264spsPpsIdrInKeyframe: boolean;
242
264
  /**
243
265
  * Получать список участников звонка третьим аргументом в `onConversation`
244
266
  * @hidden
@@ -292,7 +314,20 @@ export declare type ParamsObject = {
292
314
  * Получен стрим трансляция или мувик от собеседника.
293
315
  * Если сервер закончил стримить экран собеседника, вместо стрима будет передан null
294
316
  */
295
- onRemoteLive?: (userId: ExternalParticipantId, streamId: string, stream: MediaStream | null) => void;
317
+ onRemoteLive?: (userId: ExternalParticipantId, data: IOnRemoteMovieData) => void;
318
+ /**
319
+ * Получен собственный стрим трансляция или мувик.
320
+ * Если сервер закончил стримить экран собеседника, вместо стрима будет передан null
321
+ */
322
+ onLocalLive?: (userId: ExternalParticipantId, data: IOnRemoteMovieData) => void;
323
+ /**
324
+ * Получено обновление стрима или лайва от собеседника.
325
+ */
326
+ onRemoteLiveUpdate?: (userId: ExternalParticipantId, data: ISharedMovieState) => void;
327
+ /**
328
+ * Получено обновление собственного стрима или лайва.
329
+ */
330
+ onLocalLiveUpdate?: (userId: ExternalParticipantId, data: ISharedMovieState) => void;
296
331
  /**
297
332
  * Начат звонок
298
333
  */
@@ -305,6 +340,26 @@ export declare type ParamsObject = {
305
340
  * Изменились данные стрима собеседника
306
341
  */
307
342
  onRemoteMediaSettings?: (userId: ExternalParticipantId, mediaSettings: MediaSettings, markers?: ExternalParticipantListMarkers) => void;
343
+ /**
344
+ * Изменились данные стрима собеседника
345
+ */
346
+ onLocalMediaSettings?: (userId: ExternalParticipantId, mediaSettings: MediaSettings) => void;
347
+ /**
348
+ * Полученны данные по стримам (лайв/мувик) от собеседника
349
+ */
350
+ onRemoteSharedMovieInfo?: (userId: ExternalParticipantId, sharedMovieInfo: ISharedMovieInfo) => void;
351
+ /**
352
+ * Полученны данные по остановленным стримам (лайв/мувик) от собеседника
353
+ */
354
+ onRemoteSharedMovieStoppedInfo?: (userId: ExternalParticipantId, sharedMovieStoppedInfo: ISharedMovieStoppedInfo) => void;
355
+ /**
356
+ * Полученны данные по собственным стримам (лайв/мувик)
357
+ */
358
+ onLocalSharedMovieInfo?: (userId: ExternalParticipantId, sharedMovieInfo: ISharedMovieInfo) => void;
359
+ /**
360
+ * Полученны данные по собственным остановленным стримам (лайв/мувик)
361
+ */
362
+ onLocalSharedMovieStoppedInfo?: (userId: ExternalParticipantId, sharedMovieStoppedInfo: ISharedMovieStoppedInfo) => void;
308
363
  /**
309
364
  * Добавили участника
310
365
  */
@@ -349,7 +404,7 @@ export declare type ParamsObject = {
349
404
  /**
350
405
  * Изменились состояния устройств пользователя или разрешения включать камеру/микрофон
351
406
  */
352
- onMuteStates?: (muteStates: MuteStates, unmuteOptions: MediaOption[], mediaOptions: MediaOption[], muteAll: boolean, unmute: boolean, userId: ExternalParticipantId | null, adminId: ExternalParticipantId | null) => void;
407
+ onMuteStates?: (muteStates: MuteStates, unmuteOptions: MediaOption[], mediaOptions: MediaOption[], muteAll: boolean, unmute: boolean, userId: ExternalParticipantId | null, adminId: ExternalParticipantId | null, stateUpdated?: boolean, requestedMedia?: MediaOption[]) => void;
353
408
  /**
354
409
  * Изменились роли собеседника в звонке
355
410
  */
@@ -470,6 +525,22 @@ export declare type ParamsObject = {
470
525
  * @param joinLink токен присоединения к звонку
471
526
  */
472
527
  onJoinLinkChanged?: (joinLink: string) => void;
528
+ /**
529
+ * Получены новые реакции в звонке
530
+ * @param feedback массив с реакциями
531
+ */
532
+ onFeedback?: (feedback: IFeedbackExternal[]) => void;
533
+ /**
534
+ * Включать capability c аудио шарой
535
+ */
536
+ audioShareCapabilityEnabled: boolean;
537
+ /**
538
+ * Изменился список ролей, которым доступны ConversationFeatures
539
+ *
540
+ * @param featuresPerRole Объект вида ключ: ConversationFeature = значение: UserRole[]
541
+ * (если ключ фичи отсутствует, или в ролях пустой массив, считаем фичу доступной для всех пользователей)
542
+ */
543
+ onFeaturesPerRoleChanged?: (featuresPerRole: IFeaturesPerRole) => void;
473
544
  };
474
545
  export default abstract class Params {
475
546
  private static _params;
@@ -486,6 +557,8 @@ export default abstract class Params {
486
557
  static set platform(value: string);
487
558
  static get clientType(): string;
488
559
  static set clientType(value: string);
560
+ static get externalUserType(): string;
561
+ static set externalUserType(value: string);
489
562
  static get device(): string;
490
563
  static get apiKey(): string;
491
564
  static get apiEnv(): string;
@@ -495,6 +568,7 @@ export default abstract class Params {
495
568
  static get anonymToken(): string;
496
569
  static set anonymToken(value: string);
497
570
  static get domain(): string;
571
+ static get externalDomain(): string;
498
572
  static get iceServers(): IceServer[];
499
573
  static set iceServers(value: IceServer[]);
500
574
  static get wssBase(): string;
@@ -544,6 +618,7 @@ export default abstract class Params {
544
618
  static get producerCommandDataChannel(): boolean;
545
619
  static get consumerScreenDataChannel(): boolean;
546
620
  static get producerScreenDataChannel(): boolean;
621
+ static get consumerScreenDataChannelPacketSize(): number;
547
622
  static get screenShareWebmBuilder(): boolean;
548
623
  static get noiseSuppression(): boolean;
549
624
  static set noiseSuppression(value: boolean);
@@ -562,8 +637,10 @@ export default abstract class Params {
562
637
  static get participantListChunkInitCount(): number;
563
638
  static get serverAudioRed(): boolean;
564
639
  static get p2pAudioRed(): boolean;
640
+ static get h264spsPpsIdrInKeyframe(): boolean;
565
641
  static get batchParticipantsOnStart(): boolean;
566
642
  static get filterObservers(): boolean;
567
643
  static get muteMode(): boolean;
568
644
  static get preserveAudioTracks(): boolean;
645
+ static get audioShareCapabilityEnabled(): boolean;
569
646
  }
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>;
@@ -60,5 +60,9 @@ declare namespace Utils {
60
60
  * https://stash.odkl.ru/projects/ODKL/repos/odnoklassniki-webrtc/browse/src/main/java/one/webrtc/domain/conversation/ParticipantIndex.java#67-78
61
61
  */
62
62
  function participantMarkerCompare(marker1: ExternalParticipantListMarker | undefined, marker2: ExternalParticipantListMarker | undefined): number;
63
+ /** убирает все ключи со значением `V` на 1 уровне */
64
+ function objectFilterOutValues<T extends Record<string, V>, V = unknown>(obj: T, value?: V | V[]): Partial<T>;
65
+ function objectReduce<R, T extends Object>(obj: T, callback: (acc: R, value: T[keyof T], key: keyof T) => R, initialValue: R): R;
66
+ const setImmediate: (fn: VoidFunction) => VoidFunction;
63
67
  }
64
68
  export default Utils;
@@ -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;
@@ -0,0 +1,12 @@
1
+ import MediaOption from '../enums/MediaOption';
2
+ import MediaSettings from './MediaSettings';
3
+ import { Participant } from './Participant';
4
+ export interface IProcessMuteStateParams {
5
+ mediaOptions?: MediaOption[];
6
+ muteAll?: boolean;
7
+ unmute?: boolean;
8
+ serverSettings?: MediaSettings | null;
9
+ admin?: Participant | null;
10
+ stateUpdated?: boolean;
11
+ requestedMedia?: MediaOption[];
12
+ }
@@ -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 {};
@@ -0,0 +1,5 @@
1
+ import { Layout, RequestKeyFrame, StopStream } from './ParticipantLayout';
2
+ export declare const REQUEST_KEY_FRAME_CODE = "kf";
3
+ export declare function isStopStreaming(layout: Layout | StopStream | RequestKeyFrame): layout is StopStream;
4
+ export declare function isRequestKeyFrame(layout: Layout | StopStream | RequestKeyFrame): layout is RequestKeyFrame;
5
+ export declare function layoutToString(layout: Layout | StopStream | RequestKeyFrame): string;
@@ -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,55 @@
1
+ import { OkUserId, CompositeUserId } from './Participant';
2
+ import { MediaType } from './ParticipantStreamDescription';
3
+ export interface IMoviePreview {
4
+ url: string;
5
+ width: number;
6
+ height: number;
7
+ }
8
+ export interface IAddMovieParams {
9
+ movieId: string;
10
+ gain?: number;
11
+ metadata?: {
12
+ title?: string;
13
+ thumbnails?: IMoviePreview[];
14
+ };
15
+ }
16
+ export declare type ISharedMovieStateResponse = [
17
+ number,
18
+ number,
19
+ boolean,
20
+ number,
21
+ boolean
22
+ ];
23
+ export interface ISharedMovieState {
24
+ participantId: CompositeUserId;
25
+ gain?: number;
26
+ pause?: boolean;
27
+ offset?: number;
28
+ mute?: boolean;
29
+ }
30
+ export interface IUpdateMovieData {
31
+ movieId: string;
32
+ gain?: number;
33
+ pause?: boolean;
34
+ offset?: number;
35
+ mute?: boolean;
36
+ }
37
+ export interface ISharedMovieInfo {
38
+ movieId: OkUserId;
39
+ initiatorId: CompositeUserId;
40
+ title: string;
41
+ source: MediaType;
42
+ externalMovieId: string;
43
+ duration: number;
44
+ thumbnails: IMoviePreview[];
45
+ }
46
+ export interface ISharedMovieStoppedInfo {
47
+ movieId: OkUserId;
48
+ initiatorId: CompositeUserId;
49
+ source: MediaType;
50
+ }
51
+ export interface IOnRemoteMovieData {
52
+ streamName: string;
53
+ stream: MediaStream | null;
54
+ mediaType: MediaType;
55
+ }
@@ -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,7 @@ export interface Participant {
55
56
  unmuteOptions: MediaOption[];
56
57
  observedIds: CompositeUserId[];
57
58
  markers?: ExternalParticipantListMarkers;
59
+ movieShareInfos?: ISharedMovieInfo[];
58
60
  }
59
61
  export interface IGetParticipantsParameters {
60
62
  externalIds: ExternalId[];
@@ -31,10 +31,16 @@ export declare type StopStream = {
31
31
  */
32
32
  stopStream: true;
33
33
  };
34
+ /**
35
+ * Request key frame from source. Should not be called often, negatively impacts video quality.
36
+ */
37
+ export declare type RequestKeyFrame = {
38
+ keyFrameRequested: true;
39
+ };
34
40
  /**
35
41
  * Лейаут собеседника в звонке
36
42
  */
37
- export declare type ParticipantLayout = (Layout | StopStream) & {
43
+ export declare type ParticipantLayout = (Layout | StopStream | RequestKeyFrame) & {
38
44
  /**
39
45
  * Внешний ID пользователя
40
46
  */
@@ -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;
@@ -7,8 +7,11 @@ import MediaOption from '../enums/MediaOption';
7
7
  import ParticipantState from '../enums/ParticipantState';
8
8
  import UserRole from '../enums/UserRole';
9
9
  import UserType from '../enums/UserType';
10
+ import { IFeaturesPerRole } from './ConversationFeature';
11
+ import { IFeedback } from './Feedback';
10
12
  import MediaModifiers from './MediaModifiers';
11
13
  import MediaSettings from './MediaSettings';
14
+ import { ISharedMovieInfo, ISharedMovieState, ISharedMovieStoppedInfo } from './MovieShare';
12
15
  import MuteStates from './MuteStates';
13
16
  import { CompositeUserId, OkUserId, ParticipantId, ParticipantListMarker as ParticipantParticipantListMarker, ParticipantListMarkers, ParticipantListType as ParticipantParticipantListType } from './Participant';
14
17
  import VideoSettings from './VideoSettings';
@@ -54,6 +57,7 @@ declare namespace SignalingMessage {
54
57
  unmuteOptions?: MediaOption[];
55
58
  markers?: ParticipantListMarkers;
56
59
  observedIds?: CompositeUserId[];
60
+ movieShareInfos?: ISharedMovieInfo[];
57
61
  }
58
62
  export interface ParticipantListChunk extends Notification {
59
63
  participants: (Participant & Required<Pick<Participant, 'markers'>>)[];
@@ -72,6 +76,7 @@ declare namespace SignalingMessage {
72
76
  multichatId: string | null;
73
77
  tamtamMultichatId: string | null;
74
78
  recordInfo: RecordInfo | null;
79
+ featuresPerRole?: IFeaturesPerRole | null;
75
80
  pinnedParticipantId: ParticipantId | null;
76
81
  options: ConversationOption[];
77
82
  muteStates?: MuteStates;
@@ -148,6 +153,8 @@ declare namespace SignalingMessage {
148
153
  muteStates: MuteStates;
149
154
  unmuteOptions?: MediaOption[];
150
155
  mediaOptions: MediaOption[];
156
+ requestedMedia?: MediaOption[];
157
+ stateUpdated?: boolean;
151
158
  unmute?: boolean;
152
159
  muteAll?: boolean;
153
160
  }
@@ -184,6 +191,7 @@ declare namespace SignalingMessage {
184
191
  }
185
192
  export interface FeatureSetChanged extends Notification {
186
193
  features: ConversationFeature[];
194
+ featuresPerRole?: IFeaturesPerRole | null;
187
195
  }
188
196
  export interface MultipartyChatCreated extends Notification {
189
197
  chatId: string;
@@ -277,6 +285,20 @@ declare namespace SignalingMessage {
277
285
  export interface JoinLinkChanged extends Notification {
278
286
  joinLink: string;
279
287
  }
288
+ export interface Feedback extends Notification {
289
+ feedback: IFeedback[];
290
+ }
291
+ export interface SharedMovieState extends Notification {
292
+ data: ISharedMovieState[];
293
+ }
294
+ export interface SharedMovieInfo extends Notification {
295
+ movieShareInfo: ISharedMovieInfo;
296
+ }
297
+ export interface SharedMovieStoppedInfo extends Notification, ISharedMovieStoppedInfo {
298
+ }
299
+ export interface FeaturesPerRoleChanged extends Notification {
300
+ featuresPerRole?: IFeaturesPerRole | null;
301
+ }
280
302
  export {};
281
303
  }
282
304
  export default SignalingMessage;
@@ -1,6 +1,7 @@
1
1
  import { ExternalId } from './ExternalId';
2
2
  import { CompositeUserId } from './Participant';
3
3
  import SignalingMessage from './SignalingMessage';
4
+ import { IFeedback } from './Feedback';
4
5
  export declare type WaitingParticipantId = {
5
6
  addedTs: number;
6
7
  id: CompositeUserId;
@@ -9,18 +10,11 @@ export declare type WaitingParticipant = {
9
10
  id: WaitingParticipantId;
10
11
  externalId?: SignalingMessage.ExternalId;
11
12
  };
12
- export declare type Feedback = {
13
- key: string;
14
- totalCount: number;
15
- currentCount: number;
16
- timeout: number;
17
- participantIds: CompositeUserId[];
18
- };
19
13
  export declare type ChatRoom = {
20
14
  totalCount: number;
21
15
  firstParticipants?: WaitingParticipant[];
22
16
  handCount?: number;
23
- feedback?: Feedback[];
17
+ feedback?: IFeedback[];
24
18
  };
25
19
  /**
26
20
  * Ответ на запрос `getWaitingHall`
@@ -0,0 +1,2 @@
1
+ import { MuteState, MediaOption, MuteStates } from '../CallsSDK';
2
+ export declare const getMediaOptionsByMuteState: (muteStates: MuteStates, value: MuteState) => MediaOption[];
@@ -0,0 +1,31 @@
1
+ /**
2
+ * Fork from messagepack internals.
3
+ * Package messagepack doesn't export createWriteBuffer and createReadBuffer methods.
4
+ */
5
+ export declare function createWriteBuffer(): {
6
+ put(v: BufferSource): void;
7
+ putI8(v: number): void;
8
+ putI16(v: number): void;
9
+ putI32(v: number): void;
10
+ putI64(v: number): void;
11
+ putUi8(v: number): void;
12
+ putUi16(v: number): void;
13
+ putUi32(v: number): void;
14
+ putUi64(v: number): void;
15
+ putF(v: number): void;
16
+ ui8array(): Uint8Array;
17
+ };
18
+ export declare function createReadBuffer(buf: BufferSource): {
19
+ peek(): number;
20
+ get(len: number): ArrayBuffer;
21
+ getI8(): number;
22
+ getI16(): number;
23
+ getI32(): number;
24
+ getI64(): number;
25
+ getUi8(): number;
26
+ getUi16(): number;
27
+ getUi32(): number;
28
+ getUi64(): number;
29
+ getF32(): number;
30
+ getF64(): number;
31
+ };