@vkontakte/calls-sdk 2.6.2-dev.6c48704.0 → 2.6.2-dev.8c1e202.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 (43) hide show
  1. package/CallsSDK.d.ts +26 -9
  2. package/abstract/BaseApi.d.ts +1 -1
  3. package/abstract/BaseSignaling.d.ts +7 -2
  4. package/calls-sdk.cjs.js +8 -8
  5. package/calls-sdk.esm.js +8 -8
  6. package/classes/Conversation.d.ts +19 -4
  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 -0
  20. package/default/Api.d.ts +1 -1
  21. package/default/Signaling.d.ts +7 -2
  22. package/enums/ConversationOption.d.ts +2 -1
  23. package/enums/LiveStatus.d.ts +7 -0
  24. package/enums/MediaOption.d.ts +2 -1
  25. package/enums/SignalingCommandType.d.ts +5 -1
  26. package/enums/SignalingNotification.d.ts +5 -1
  27. package/package.json +1 -1
  28. package/static/External.d.ts +26 -3
  29. package/static/Params.d.ts +36 -3
  30. package/static/WebRTCUtils.d.ts +2 -1
  31. package/types/Asr.d.ts +5 -0
  32. package/types/ConversationFeature.d.ts +3 -0
  33. package/types/Feedback.d.ts +22 -0
  34. package/types/MediaSettings.d.ts +4 -0
  35. package/types/MovieShare.d.ts +18 -2
  36. package/types/Participant.d.ts +1 -0
  37. package/types/ParticipantStreamDescription.d.ts +2 -1
  38. package/types/Room.d.ts +16 -4
  39. package/types/SignalingMessage.d.ts +22 -3
  40. package/types/WaitingHall.d.ts +2 -8
  41. package/utils/ArrayDequeue.d.ts +24 -0
  42. package/utils/ArrayDequeue.spec.d.ts +1 -0
  43. package/worker/LibVPxEncoderWorker.d.ts +1 -1
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
+ }
@@ -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[]>>;
@@ -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 {};
@@ -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 {
@@ -13,13 +14,28 @@ export interface IAddMovieParams {
13
14
  thumbnails?: IMoviePreview[];
14
15
  };
15
16
  }
16
- export declare type ISharedMovieStateResponse = [number, number, boolean, number, number];
17
+ export declare type ISharedMovieStateResponse = [
18
+ number,
19
+ number,
20
+ boolean,
21
+ number,
22
+ boolean,
23
+ number
24
+ ];
17
25
  export interface ISharedMovieState {
18
26
  participantId: CompositeUserId;
19
27
  gain?: number;
20
28
  pause?: boolean;
21
29
  offset?: number;
22
- duration?: number;
30
+ mute?: boolean;
31
+ liveStatus?: LiveStatus;
32
+ }
33
+ export interface IUpdateMovieData {
34
+ movieId: string;
35
+ gain?: number;
36
+ pause?: boolean;
37
+ offset?: number;
38
+ mute?: boolean;
23
39
  }
24
40
  export interface ISharedMovieInfo {
25
41
  movieId: OkUserId;
@@ -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[];
@@ -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;
package/types/Room.d.ts CHANGED
@@ -1,5 +1,5 @@
1
- import { ExternalParticipantId, ExternalParticipantListChunk } from './ExternalId';
2
- import { Participant, ParticipantListMarkers } from './Participant';
1
+ import { ExternalParticipant, ExternalParticipantId, ExternalParticipantListChunk } from './ExternalId';
2
+ import { ParticipantListMarkers } from './Participant';
3
3
  export interface Room {
4
4
  id: number;
5
5
  /**
@@ -33,9 +33,20 @@ export interface Room {
33
33
  */
34
34
  active?: boolean;
35
35
  }
36
+ /**
37
+ * Initial rooms state
38
+ */
39
+ export interface Rooms {
40
+ rooms: Room[];
41
+ /**
42
+ * current room id of participant. if null then the partipant is in the main call
43
+ */
44
+ roomId?: number;
45
+ }
36
46
  export interface RoomsUpdate {
37
47
  rooms?: Room[];
38
48
  roomIds?: number[];
49
+ deactivated?: boolean;
39
50
  }
40
51
  export interface RoomParticipantUpdate {
41
52
  roomId: number;
@@ -51,10 +62,11 @@ export interface RoomParticipantUpdate {
51
62
  /**
52
63
  * optional, data for added participants
53
64
  */
54
- addedParticipants?: Participant[];
65
+ addedParticipants?: ExternalParticipant[];
55
66
  /**
56
67
  * optional, depending on the context may contain either markers
57
68
  * for all (sorted) lists available or be empty (if client fails to support chunked participants)
58
69
  */
59
- removedParticipantMarkers?: ParticipantListMarkers;
70
+ removedParticipantMarkers?: ParticipantListMarkers[];
71
+ removedParticipantIds?: ExternalParticipantId[];
60
72
  }
@@ -8,6 +8,9 @@ import ParticipantState from '../enums/ParticipantState';
8
8
  import RoomsEventType from '../enums/RoomsEventType';
9
9
  import UserRole from '../enums/UserRole';
10
10
  import UserType from '../enums/UserType';
11
+ import { IFeaturesPerRole } from './ConversationFeature';
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,7 +78,7 @@ 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;
@@ -89,6 +92,8 @@ declare namespace SignalingMessage {
89
92
  removeParticipantIds?: CompositeUserId[];
90
93
  participants?: ParticipantListChunk;
91
94
  active?: boolean;
95
+ countdownSec?: number;
96
+ timeoutMs?: number;
92
97
  }
93
98
  interface Notification extends SignalingMessage {
94
99
  type?: string;
@@ -200,7 +205,7 @@ declare namespace SignalingMessage {
200
205
  }
201
206
  export interface FeatureSetChanged extends Notification {
202
207
  features: ConversationFeature[];
203
- featuresPerRole?: Partial<Record<ConversationFeature, UserRole[]>> | null;
208
+ featuresPerRole?: IFeaturesPerRole | null;
204
209
  }
205
210
  export interface MultipartyChatCreated extends Notification {
206
211
  chatId: string;
@@ -292,11 +297,15 @@ declare namespace SignalingMessage {
292
297
  chatRoom?: ChatRoom;
293
298
  rooms?: {
294
299
  rooms: Room[];
300
+ roomId?: number;
295
301
  };
296
302
  }
297
303
  export interface JoinLinkChanged extends Notification {
298
304
  joinLink: string;
299
305
  }
306
+ export interface Feedback extends Notification {
307
+ feedback: IFeedback[];
308
+ }
300
309
  export interface SharedMovieState extends Notification {
301
310
  data: ISharedMovieState[];
302
311
  }
@@ -309,6 +318,7 @@ declare namespace SignalingMessage {
309
318
  updates: Partial<Record<RoomsEventType, {
310
319
  rooms?: Room;
311
320
  roomIds?: number[];
321
+ deactivated?: boolean;
312
322
  }>>;
313
323
  }
314
324
  export interface RoomUpdated extends Notification {
@@ -322,7 +332,16 @@ declare namespace SignalingMessage {
322
332
  participantCount: number;
323
333
  addedParticipantIds?: CompositeUserId[];
324
334
  addedParticipants?: Participant[];
325
- removedParticipantMarkers?: ParticipantListMarkers;
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;
326
345
  }
327
346
  export {};
328
347
  }
@@ -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 {};
@@ -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;