@vkontakte/calls-sdk 2.6.2-dev.22f43ca.0 → 2.6.2-dev.24c50f4.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 (53) 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 +37 -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 +2 -1
  25. package/enums/HangupType.d.ts +1 -0
  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 +98 -5
  33. package/static/Params.d.ts +95 -3
  34. package/static/Utils.d.ts +1 -0
  35. package/static/WebRTCUtils.d.ts +2 -1
  36. package/types/Asr.d.ts +5 -0
  37. package/types/Conversation.d.ts +12 -0
  38. package/types/ConversationFeature.d.ts +3 -0
  39. package/types/ConversationParams.d.ts +1 -0
  40. package/types/ExternalId.d.ts +2 -0
  41. package/types/Feedback.d.ts +22 -0
  42. package/types/MediaSettings.d.ts +5 -1
  43. package/types/MovieShare.d.ts +58 -0
  44. package/types/Participant.d.ts +2 -0
  45. package/types/ParticipantListChunk.d.ts +2 -0
  46. package/types/ParticipantStreamDescription.d.ts +2 -1
  47. package/types/Room.d.ts +72 -0
  48. package/types/SignalingMessage.d.ts +66 -0
  49. package/types/WaitingHall.d.ts +2 -8
  50. package/utils/ArrayDequeue.d.ts +24 -0
  51. package/utils/ArrayDequeue.spec.d.ts +1 -0
  52. package/utils/Conversation.d.ts +2 -0
  53. package/worker/LibVPxEncoderWorker.d.ts +1 -1
@@ -5,10 +5,15 @@ 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';
12
+ import { IFeedback } from './Feedback';
13
+ import { AsrInfo } from './Asr';
10
14
  import MediaModifiers from './MediaModifiers';
11
15
  import MediaSettings from './MediaSettings';
16
+ import { ISharedMovieInfo, ISharedMovieState, ISharedMovieStoppedInfo } from './MovieShare';
12
17
  import MuteStates from './MuteStates';
13
18
  import { CompositeUserId, OkUserId, ParticipantId, ParticipantListMarker as ParticipantParticipantListMarker, ParticipantListMarkers, ParticipantListType as ParticipantParticipantListType } from './Participant';
14
19
  import VideoSettings from './VideoSettings';
@@ -54,6 +59,7 @@ declare namespace SignalingMessage {
54
59
  unmuteOptions?: MediaOption[];
55
60
  markers?: ParticipantListMarkers;
56
61
  observedIds?: CompositeUserId[];
62
+ movieShareInfos?: ISharedMovieInfo[];
57
63
  }
58
64
  export interface ParticipantListChunk extends Notification {
59
65
  participants: (Participant & Required<Pick<Participant, 'markers'>>)[];
@@ -72,10 +78,23 @@ declare namespace SignalingMessage {
72
78
  multichatId: string | null;
73
79
  tamtamMultichatId: string | null;
74
80
  recordInfo: RecordInfo | null;
81
+ featuresPerRole?: IFeaturesPerRole | null;
75
82
  pinnedParticipantId: ParticipantId | null;
76
83
  options: ConversationOption[];
77
84
  muteStates?: MuteStates;
78
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
+ }
79
98
  interface Notification extends SignalingMessage {
80
99
  type?: string;
81
100
  notification?: string;
@@ -148,6 +167,8 @@ declare namespace SignalingMessage {
148
167
  muteStates: MuteStates;
149
168
  unmuteOptions?: MediaOption[];
150
169
  mediaOptions: MediaOption[];
170
+ requestedMedia?: MediaOption[];
171
+ stateUpdated?: boolean;
151
172
  unmute?: boolean;
152
173
  muteAll?: boolean;
153
174
  }
@@ -184,6 +205,7 @@ declare namespace SignalingMessage {
184
205
  }
185
206
  export interface FeatureSetChanged extends Notification {
186
207
  features: ConversationFeature[];
208
+ featuresPerRole?: IFeaturesPerRole | null;
187
209
  }
188
210
  export interface MultipartyChatCreated extends Notification {
189
211
  chatId: string;
@@ -273,10 +295,54 @@ declare namespace SignalingMessage {
273
295
  mediaModifiers: MediaModifiers;
274
296
  participants?: ParticipantListChunk;
275
297
  chatRoom?: ChatRoom;
298
+ rooms?: {
299
+ rooms: Room[];
300
+ roomId?: number;
301
+ };
276
302
  }
277
303
  export interface JoinLinkChanged extends Notification {
278
304
  joinLink: string;
279
305
  }
306
+ export interface Feedback extends Notification {
307
+ feedback: IFeedback[];
308
+ }
309
+ export interface SharedMovieState extends Notification {
310
+ data: ISharedMovieState[];
311
+ }
312
+ export interface SharedMovieInfo extends Notification {
313
+ movieShareInfo: ISharedMovieInfo;
314
+ }
315
+ export interface SharedMovieStoppedInfo extends Notification, ISharedMovieStoppedInfo {
316
+ }
317
+ export interface RoomsUpdated extends Notification {
318
+ updates: Partial<Record<RoomsEventType, {
319
+ rooms?: Room;
320
+ roomIds?: number[];
321
+ deactivated?: boolean;
322
+ }>>;
323
+ }
324
+ export interface RoomUpdated extends Notification {
325
+ events: RoomsEventType[];
326
+ room?: Room;
327
+ roomId: number;
328
+ deactivate?: boolean;
329
+ }
330
+ export interface RoomParticipantsUpdated extends Notification {
331
+ roomId: number;
332
+ participantCount: number;
333
+ addedParticipantIds?: CompositeUserId[];
334
+ addedParticipants?: Participant[];
335
+ removedParticipantMarkers?: ParticipantListMarkers[];
336
+ }
337
+ export interface FeaturesPerRoleChanged extends Notification {
338
+ featuresPerRole?: IFeaturesPerRole | null;
339
+ }
340
+ export interface AsrStarted extends Notification {
341
+ asrInfo: AsrInfo;
342
+ }
343
+ export interface AsrStopped extends Notification {
344
+ movieId: number;
345
+ }
280
346
  export {};
281
347
  }
282
348
  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,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 {};
@@ -0,0 +1,2 @@
1
+ import { MuteState, MediaOption, MuteStates } from '../CallsSDK';
2
+ export declare const getMediaOptionsByMuteState: (muteStates: MuteStates, value: MuteState) => MediaOption[];
@@ -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;