@vkontakte/calls-sdk 2.6.2-dev.9711e28.0 → 2.6.2-dev.a4e555e.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,42 @@
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 = [number, number, boolean, number, number];
17
+ export interface ISharedMovieState {
18
+ participantId: CompositeUserId;
19
+ gain?: number;
20
+ pause?: boolean;
21
+ offset?: number;
22
+ duration?: number;
23
+ }
24
+ export interface ISharedMovieInfo {
25
+ movieId: OkUserId;
26
+ initiatorId: CompositeUserId;
27
+ title: string;
28
+ source: MediaType;
29
+ externalMovieId: string;
30
+ duration: number;
31
+ thumbnails: IMoviePreview[];
32
+ }
33
+ export interface ISharedMovieStoppedInfo {
34
+ movieId: OkUserId;
35
+ initiatorId: CompositeUserId;
36
+ source: MediaType;
37
+ }
38
+ export interface IOnRemoteMovieData {
39
+ streamName: string;
40
+ stream: MediaStream | null;
41
+ mediaType: MediaType;
42
+ }
@@ -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
  */
@@ -7,8 +7,10 @@ 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 { IFeedback } from './Feedback';
10
11
  import MediaModifiers from './MediaModifiers';
11
12
  import MediaSettings from './MediaSettings';
13
+ import { ISharedMovieInfo, ISharedMovieState, ISharedMovieStoppedInfo } from './MovieShare';
12
14
  import MuteStates from './MuteStates';
13
15
  import { CompositeUserId, OkUserId, ParticipantId, ParticipantListMarker as ParticipantParticipantListMarker, ParticipantListMarkers, ParticipantListType as ParticipantParticipantListType } from './Participant';
14
16
  import VideoSettings from './VideoSettings';
@@ -54,6 +56,7 @@ declare namespace SignalingMessage {
54
56
  unmuteOptions?: MediaOption[];
55
57
  markers?: ParticipantListMarkers;
56
58
  observedIds?: CompositeUserId[];
59
+ movieShareInfos?: ISharedMovieInfo[];
57
60
  }
58
61
  export interface ParticipantListChunk extends Notification {
59
62
  participants: (Participant & Required<Pick<Participant, 'markers'>>)[];
@@ -148,6 +151,8 @@ declare namespace SignalingMessage {
148
151
  muteStates: MuteStates;
149
152
  unmuteOptions?: MediaOption[];
150
153
  mediaOptions: MediaOption[];
154
+ requestedMedia?: MediaOption[];
155
+ stateUpdated?: boolean;
151
156
  unmute?: boolean;
152
157
  muteAll?: boolean;
153
158
  }
@@ -240,6 +245,7 @@ declare namespace SignalingMessage {
240
245
  demote: boolean;
241
246
  mediaModifiers: MediaModifiers;
242
247
  conversation: Conversation;
248
+ participants?: ParticipantListChunk;
243
249
  }
244
250
  export interface ChatRoomUpdated extends Notification {
245
251
  eventType: ChatRoomEventType;
@@ -276,6 +282,17 @@ declare namespace SignalingMessage {
276
282
  export interface JoinLinkChanged extends Notification {
277
283
  joinLink: string;
278
284
  }
285
+ export interface Feedback extends Notification {
286
+ feedback: IFeedback[];
287
+ }
288
+ export interface SharedMovieState extends Notification {
289
+ data: ISharedMovieState[];
290
+ }
291
+ export interface SharedMovieInfo extends Notification {
292
+ movieShareInfo: ISharedMovieInfo;
293
+ }
294
+ export interface SharedMovieStoppedInfo extends Notification, ISharedMovieStoppedInfo {
295
+ }
279
296
  export {};
280
297
  }
281
298
  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
+ };