@vkontakte/calls-sdk 2.6.2-dev.22f43ca.0 → 2.6.2-dev.25415fc.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 (54) 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/Polyfills.d.ts +6 -0
  35. package/static/Utils.d.ts +1 -0
  36. package/static/WebRTCUtils.d.ts +2 -1
  37. package/types/Asr.d.ts +5 -0
  38. package/types/Conversation.d.ts +12 -0
  39. package/types/ConversationFeature.d.ts +3 -0
  40. package/types/ConversationParams.d.ts +1 -0
  41. package/types/ExternalId.d.ts +2 -0
  42. package/types/Feedback.d.ts +22 -0
  43. package/types/MediaSettings.d.ts +5 -1
  44. package/types/MovieShare.d.ts +58 -0
  45. package/types/Participant.d.ts +2 -0
  46. package/types/ParticipantListChunk.d.ts +2 -0
  47. package/types/ParticipantStreamDescription.d.ts +2 -1
  48. package/types/Room.d.ts +60 -0
  49. package/types/SignalingMessage.d.ts +63 -0
  50. package/types/WaitingHall.d.ts +2 -8
  51. package/utils/ArrayDequeue.d.ts +24 -0
  52. package/utils/ArrayDequeue.spec.d.ts +1 -0
  53. package/utils/Conversation.d.ts +2 -0
  54. 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,21 @@ 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
+ }
79
96
  interface Notification extends SignalingMessage {
80
97
  type?: string;
81
98
  notification?: string;
@@ -148,6 +165,8 @@ declare namespace SignalingMessage {
148
165
  muteStates: MuteStates;
149
166
  unmuteOptions?: MediaOption[];
150
167
  mediaOptions: MediaOption[];
168
+ requestedMedia?: MediaOption[];
169
+ stateUpdated?: boolean;
151
170
  unmute?: boolean;
152
171
  muteAll?: boolean;
153
172
  }
@@ -184,6 +203,7 @@ declare namespace SignalingMessage {
184
203
  }
185
204
  export interface FeatureSetChanged extends Notification {
186
205
  features: ConversationFeature[];
206
+ featuresPerRole?: IFeaturesPerRole | null;
187
207
  }
188
208
  export interface MultipartyChatCreated extends Notification {
189
209
  chatId: string;
@@ -273,10 +293,53 @@ declare namespace SignalingMessage {
273
293
  mediaModifiers: MediaModifiers;
274
294
  participants?: ParticipantListChunk;
275
295
  chatRoom?: ChatRoom;
296
+ rooms?: {
297
+ rooms: Room[];
298
+ roomId?: number;
299
+ };
276
300
  }
277
301
  export interface JoinLinkChanged extends Notification {
278
302
  joinLink: string;
279
303
  }
304
+ export interface Feedback extends Notification {
305
+ feedback: IFeedback[];
306
+ }
307
+ export interface SharedMovieState extends Notification {
308
+ data: ISharedMovieState[];
309
+ }
310
+ export interface SharedMovieInfo extends Notification {
311
+ movieShareInfo: ISharedMovieInfo;
312
+ }
313
+ export interface SharedMovieStoppedInfo extends Notification, ISharedMovieStoppedInfo {
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
+ }
334
+ export interface FeaturesPerRoleChanged extends Notification {
335
+ featuresPerRole?: IFeaturesPerRole | null;
336
+ }
337
+ export interface AsrStarted extends Notification {
338
+ asrInfo: AsrInfo;
339
+ }
340
+ export interface AsrStopped extends Notification {
341
+ movieId: number;
342
+ }
280
343
  export {};
281
344
  }
282
345
  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;