@vkontakte/calls-sdk 2.6.2-beta.2 → 2.6.2-beta.20
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.
- package/CallsSDK.d.ts +16 -9
- package/abstract/BaseApi.d.ts +6 -2
- package/abstract/BaseSignaling.d.ts +7 -3
- package/calls-sdk.cjs.js +8 -8
- package/calls-sdk.esm.js +8 -8
- package/classes/Conversation.d.ts +16 -6
- package/classes/ParticipantIdRegistry.d.ts +2 -0
- package/classes/ProducerCommandSerializationService.d.ts +17 -0
- package/classes/screenshare/ScreenCaptureSender.d.ts +1 -0
- package/classes/screenshare/Utils.d.ts +1 -0
- package/default/Api.d.ts +7 -2
- package/default/Api.test.d.ts +1 -0
- package/default/Signaling.d.ts +12 -4
- package/enums/ConversationFeature.d.ts +2 -1
- package/enums/ConversationOption.d.ts +2 -1
- package/enums/HangupType.d.ts +3 -1
- package/enums/MediaOption.d.ts +2 -1
- package/enums/SignalingCommandType.d.ts +1 -0
- package/enums/SignalingNotification.d.ts +5 -1
- package/package.json +1 -1
- package/static/ApiTransport.d.ts +1 -1
- package/static/External.d.ts +63 -4
- package/static/Params.d.ts +60 -2
- package/static/Utils.d.ts +5 -1
- package/types/Conversation.d.ts +12 -0
- package/types/ConversationParams.d.ts +1 -0
- package/types/ExternalId.d.ts +2 -0
- package/types/LayoutUtils.d.ts +5 -0
- package/types/MediaSettings.d.ts +1 -1
- package/types/MovieShare.d.ts +55 -0
- package/types/Participant.d.ts +2 -0
- package/types/ParticipantLayout.d.ts +7 -1
- package/types/SignalingMessage.d.ts +14 -0
- package/utils/Conversation.d.ts +2 -0
- package/utils/MsgPackerBufferUtils.d.ts +31 -0
|
@@ -0,0 +1,55 @@
|
|
|
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 = [
|
|
17
|
+
number,
|
|
18
|
+
number,
|
|
19
|
+
boolean,
|
|
20
|
+
number,
|
|
21
|
+
boolean
|
|
22
|
+
];
|
|
23
|
+
export interface ISharedMovieState {
|
|
24
|
+
participantId: CompositeUserId;
|
|
25
|
+
gain?: number;
|
|
26
|
+
pause?: boolean;
|
|
27
|
+
offset?: number;
|
|
28
|
+
mute?: boolean;
|
|
29
|
+
}
|
|
30
|
+
export interface IUpdateMovieData {
|
|
31
|
+
movieId: string;
|
|
32
|
+
gain?: number;
|
|
33
|
+
pause?: boolean;
|
|
34
|
+
offset?: number;
|
|
35
|
+
mute?: boolean;
|
|
36
|
+
}
|
|
37
|
+
export interface ISharedMovieInfo {
|
|
38
|
+
movieId: OkUserId;
|
|
39
|
+
initiatorId: CompositeUserId;
|
|
40
|
+
title: string;
|
|
41
|
+
source: MediaType;
|
|
42
|
+
externalMovieId: string;
|
|
43
|
+
duration: number;
|
|
44
|
+
thumbnails: IMoviePreview[];
|
|
45
|
+
}
|
|
46
|
+
export interface ISharedMovieStoppedInfo {
|
|
47
|
+
movieId: OkUserId;
|
|
48
|
+
initiatorId: CompositeUserId;
|
|
49
|
+
source: MediaType;
|
|
50
|
+
}
|
|
51
|
+
export interface IOnRemoteMovieData {
|
|
52
|
+
streamName: string;
|
|
53
|
+
stream: MediaStream | null;
|
|
54
|
+
mediaType: MediaType;
|
|
55
|
+
}
|
package/types/Participant.d.ts
CHANGED
|
@@ -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
|
*/
|
|
@@ -9,6 +9,7 @@ import UserRole from '../enums/UserRole';
|
|
|
9
9
|
import UserType from '../enums/UserType';
|
|
10
10
|
import MediaModifiers from './MediaModifiers';
|
|
11
11
|
import MediaSettings from './MediaSettings';
|
|
12
|
+
import { ISharedMovieInfo, ISharedMovieState, ISharedMovieStoppedInfo } from './MovieShare';
|
|
12
13
|
import MuteStates from './MuteStates';
|
|
13
14
|
import { CompositeUserId, OkUserId, ParticipantId, ParticipantListMarker as ParticipantParticipantListMarker, ParticipantListMarkers, ParticipantListType as ParticipantParticipantListType } from './Participant';
|
|
14
15
|
import VideoSettings from './VideoSettings';
|
|
@@ -54,6 +55,7 @@ declare namespace SignalingMessage {
|
|
|
54
55
|
unmuteOptions?: MediaOption[];
|
|
55
56
|
markers?: ParticipantListMarkers;
|
|
56
57
|
observedIds?: CompositeUserId[];
|
|
58
|
+
movieShareInfos?: ISharedMovieInfo[];
|
|
57
59
|
}
|
|
58
60
|
export interface ParticipantListChunk extends Notification {
|
|
59
61
|
participants: (Participant & Required<Pick<Participant, 'markers'>>)[];
|
|
@@ -72,6 +74,7 @@ declare namespace SignalingMessage {
|
|
|
72
74
|
multichatId: string | null;
|
|
73
75
|
tamtamMultichatId: string | null;
|
|
74
76
|
recordInfo: RecordInfo | null;
|
|
77
|
+
featuresPerRole?: Partial<Record<ConversationFeature, UserRole[]>> | null;
|
|
75
78
|
pinnedParticipantId: ParticipantId | null;
|
|
76
79
|
options: ConversationOption[];
|
|
77
80
|
muteStates?: MuteStates;
|
|
@@ -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
|
}
|
|
@@ -184,6 +189,7 @@ declare namespace SignalingMessage {
|
|
|
184
189
|
}
|
|
185
190
|
export interface FeatureSetChanged extends Notification {
|
|
186
191
|
features: ConversationFeature[];
|
|
192
|
+
featuresPerRole?: Partial<Record<ConversationFeature, UserRole[]>> | null;
|
|
187
193
|
}
|
|
188
194
|
export interface MultipartyChatCreated extends Notification {
|
|
189
195
|
chatId: string;
|
|
@@ -277,6 +283,14 @@ declare namespace SignalingMessage {
|
|
|
277
283
|
export interface JoinLinkChanged extends Notification {
|
|
278
284
|
joinLink: string;
|
|
279
285
|
}
|
|
286
|
+
export interface SharedMovieState extends Notification {
|
|
287
|
+
data: ISharedMovieState[];
|
|
288
|
+
}
|
|
289
|
+
export interface SharedMovieInfo extends Notification {
|
|
290
|
+
movieShareInfo: ISharedMovieInfo;
|
|
291
|
+
}
|
|
292
|
+
export interface SharedMovieStoppedInfo extends Notification, ISharedMovieStoppedInfo {
|
|
293
|
+
}
|
|
280
294
|
export {};
|
|
281
295
|
}
|
|
282
296
|
export default SignalingMessage;
|
|
@@ -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
|
+
};
|