@vkontakte/calls-sdk 2.6.2-dev.65f330d.0 → 2.6.2-dev.6d2004b.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.
@@ -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,16 +1,38 @@
1
1
  import { OkUserId, CompositeUserId } from './Participant';
2
2
  import { MediaType } from './ParticipantStreamDescription';
3
+ export interface IMoviePreview {
4
+ url: string;
5
+ width: number;
6
+ height: number;
7
+ }
3
8
  export interface IAddMovieParams {
4
9
  movieId: string;
5
10
  gain?: number;
11
+ metadata?: {
12
+ title?: string;
13
+ thumbnails?: IMoviePreview[];
14
+ };
6
15
  }
7
- export declare type ISharedMovieStateResponse = [number, number, boolean, number, number];
16
+ export declare type ISharedMovieStateResponse = [
17
+ number,
18
+ number,
19
+ boolean,
20
+ number,
21
+ boolean
22
+ ];
8
23
  export interface ISharedMovieState {
9
24
  participantId: CompositeUserId;
10
25
  gain?: number;
11
26
  pause?: boolean;
12
27
  offset?: number;
13
- duration?: number;
28
+ mute?: boolean;
29
+ }
30
+ export interface IUpdateMovieData {
31
+ movieId: string;
32
+ gain?: number;
33
+ pause?: boolean;
34
+ offset?: number;
35
+ mute?: boolean;
14
36
  }
15
37
  export interface ISharedMovieInfo {
16
38
  movieId: OkUserId;
@@ -19,14 +41,15 @@ export interface ISharedMovieInfo {
19
41
  source: MediaType;
20
42
  externalMovieId: string;
21
43
  duration: number;
22
- thumbnailNormal: string;
23
- thumbnailMedium: string;
24
- thumbnailBig: string;
25
- thumbnailHigh: string;
26
- thumbnailHd: string;
44
+ thumbnails: IMoviePreview[];
27
45
  }
28
46
  export interface ISharedMovieStoppedInfo {
29
47
  movieId: OkUserId;
30
48
  initiatorId: CompositeUserId;
31
49
  source: MediaType;
32
50
  }
51
+ export interface IOnRemoteMovieData {
52
+ streamName: string;
53
+ stream: MediaStream | null;
54
+ mediaType: MediaType;
55
+ }
@@ -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
  }
@@ -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;
@@ -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,8 +5,10 @@ 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 { IFeedback } from './Feedback';
10
12
  import MediaModifiers from './MediaModifiers';
11
13
  import MediaSettings from './MediaSettings';
12
14
  import { ISharedMovieInfo, ISharedMovieState, ISharedMovieStoppedInfo } from './MovieShare';
@@ -74,10 +76,21 @@ declare namespace SignalingMessage {
74
76
  multichatId: string | null;
75
77
  tamtamMultichatId: string | null;
76
78
  recordInfo: RecordInfo | null;
79
+ featuresPerRole?: Partial<Record<ConversationFeature, UserRole[]>> | null;
77
80
  pinnedParticipantId: ParticipantId | null;
78
81
  options: ConversationOption[];
79
82
  muteStates?: MuteStates;
80
83
  }
84
+ export interface Room extends SignalingMessage {
85
+ id?: number;
86
+ name?: string;
87
+ participantCount?: number;
88
+ participantIds?: CompositeUserId[];
89
+ addParticipantIds?: CompositeUserId[];
90
+ removeParticipantIds?: CompositeUserId[];
91
+ participants?: ParticipantListChunk;
92
+ active?: boolean;
93
+ }
81
94
  interface Notification extends SignalingMessage {
82
95
  type?: string;
83
96
  notification?: string;
@@ -150,6 +163,8 @@ declare namespace SignalingMessage {
150
163
  muteStates: MuteStates;
151
164
  unmuteOptions?: MediaOption[];
152
165
  mediaOptions: MediaOption[];
166
+ requestedMedia?: MediaOption[];
167
+ stateUpdated?: boolean;
153
168
  unmute?: boolean;
154
169
  muteAll?: boolean;
155
170
  }
@@ -186,6 +201,7 @@ declare namespace SignalingMessage {
186
201
  }
187
202
  export interface FeatureSetChanged extends Notification {
188
203
  features: ConversationFeature[];
204
+ featuresPerRole?: Partial<Record<ConversationFeature, UserRole[]>> | null;
189
205
  }
190
206
  export interface MultipartyChatCreated extends Notification {
191
207
  chatId: string;
@@ -275,10 +291,16 @@ declare namespace SignalingMessage {
275
291
  mediaModifiers: MediaModifiers;
276
292
  participants?: ParticipantListChunk;
277
293
  chatRoom?: ChatRoom;
294
+ rooms?: {
295
+ rooms: Room[];
296
+ };
278
297
  }
279
298
  export interface JoinLinkChanged extends Notification {
280
299
  joinLink: string;
281
300
  }
301
+ export interface Feedback extends Notification {
302
+ feedback: IFeedback[];
303
+ }
282
304
  export interface SharedMovieState extends Notification {
283
305
  data: ISharedMovieState[];
284
306
  }
@@ -287,6 +309,25 @@ declare namespace SignalingMessage {
287
309
  }
288
310
  export interface SharedMovieStoppedInfo extends Notification, ISharedMovieStoppedInfo {
289
311
  }
312
+ export interface RoomsUpdated extends Notification {
313
+ updates: Partial<Record<RoomsEventType, {
314
+ rooms?: Room;
315
+ roomIds?: number[];
316
+ }>>;
317
+ }
318
+ export interface RoomUpdated extends Notification {
319
+ events: RoomsEventType[];
320
+ room?: Room;
321
+ roomId: number;
322
+ deactivate?: boolean;
323
+ }
324
+ export interface RoomParticipantsUpdated extends Notification {
325
+ roomId: number;
326
+ participantCount: number;
327
+ addedParticipantIds?: CompositeUserId[];
328
+ addedParticipants?: Participant[];
329
+ removedParticipantMarkers?: ParticipantListMarkers;
330
+ }
290
331
  export {};
291
332
  }
292
333
  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[];