@vkontakte/calls-sdk 2.6.2-dev.4163bb9.0 → 2.6.2-dev.4953823.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.
- package/CallsSDK.d.ts +26 -10
- package/abstract/BaseApi.d.ts +7 -3
- package/abstract/BaseSignaling.d.ts +6 -2
- package/calls-sdk.cjs.js +8 -8
- package/calls-sdk.esm.js +8 -8
- package/classes/Conversation.d.ts +22 -5
- package/classes/MediaSource.d.ts +7 -2
- package/classes/ProducerCommandSerializationService.d.ts +1 -1
- package/classes/transport/ServerTransport.d.ts +2 -0
- package/default/Api.d.ts +8 -3
- package/default/Api.test.d.ts +1 -0
- package/default/Signaling.d.ts +6 -2
- package/enums/ConversationFeature.d.ts +2 -1
- package/enums/ConversationOption.d.ts +3 -1
- package/enums/HangupType.d.ts +3 -1
- package/enums/MediaOption.d.ts +3 -1
- package/enums/SignalingCommandType.d.ts +3 -1
- package/enums/SignalingNotification.d.ts +6 -1
- package/package.json +1 -1
- package/static/External.d.ts +65 -3
- package/static/Params.d.ts +61 -1
- package/static/Utils.d.ts +3 -1
- package/static/WebRTCUtils.d.ts +2 -1
- package/types/Conversation.d.ts +12 -0
- package/types/ConversationParams.d.ts +1 -0
- package/types/ExternalId.d.ts +2 -0
- package/types/Feedback.d.ts +22 -0
- package/types/MediaSettings.d.ts +5 -1
- package/types/MovieShare.d.ts +55 -0
- package/types/Participant.d.ts +2 -0
- package/types/ParticipantStreamDescription.d.ts +2 -1
- package/types/SignalingMessage.d.ts +16 -0
- package/types/WaitingHall.d.ts +2 -8
- package/utils/Conversation.d.ts +2 -0
|
@@ -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 {};
|
package/types/MediaSettings.d.ts
CHANGED
|
@@ -14,12 +14,16 @@ 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 = {
|
|
20
24
|
id: string;
|
|
21
25
|
source: string;
|
|
22
|
-
|
|
26
|
+
externalMovieId?: string;
|
|
23
27
|
};
|
|
24
28
|
export default MediaSettings;
|
|
25
29
|
export declare function compareMediaSettings(ms1: MediaSettings, ms2: MediaSettings): boolean;
|
|
@@ -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[];
|
|
@@ -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;
|
|
@@ -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'>>)[];
|
|
@@ -72,6 +75,7 @@ declare namespace SignalingMessage {
|
|
|
72
75
|
multichatId: string | null;
|
|
73
76
|
tamtamMultichatId: string | null;
|
|
74
77
|
recordInfo: RecordInfo | null;
|
|
78
|
+
featuresPerRole?: Partial<Record<ConversationFeature, UserRole[]>> | null;
|
|
75
79
|
pinnedParticipantId: ParticipantId | null;
|
|
76
80
|
options: ConversationOption[];
|
|
77
81
|
muteStates?: MuteStates;
|
|
@@ -186,6 +190,7 @@ declare namespace SignalingMessage {
|
|
|
186
190
|
}
|
|
187
191
|
export interface FeatureSetChanged extends Notification {
|
|
188
192
|
features: ConversationFeature[];
|
|
193
|
+
featuresPerRole?: Partial<Record<ConversationFeature, UserRole[]>> | null;
|
|
189
194
|
}
|
|
190
195
|
export interface MultipartyChatCreated extends Notification {
|
|
191
196
|
chatId: string;
|
|
@@ -279,6 +284,17 @@ declare namespace SignalingMessage {
|
|
|
279
284
|
export interface JoinLinkChanged extends Notification {
|
|
280
285
|
joinLink: string;
|
|
281
286
|
}
|
|
287
|
+
export interface Feedback extends Notification {
|
|
288
|
+
feedback: IFeedback[];
|
|
289
|
+
}
|
|
290
|
+
export interface SharedMovieState extends Notification {
|
|
291
|
+
data: ISharedMovieState[];
|
|
292
|
+
}
|
|
293
|
+
export interface SharedMovieInfo extends Notification {
|
|
294
|
+
movieShareInfo: ISharedMovieInfo;
|
|
295
|
+
}
|
|
296
|
+
export interface SharedMovieStoppedInfo extends Notification, ISharedMovieStoppedInfo {
|
|
297
|
+
}
|
|
282
298
|
export {};
|
|
283
299
|
}
|
|
284
300
|
export default SignalingMessage;
|
package/types/WaitingHall.d.ts
CHANGED
|
@@ -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?:
|
|
17
|
+
feedback?: IFeedback[];
|
|
24
18
|
};
|
|
25
19
|
/**
|
|
26
20
|
* Ответ на запрос `getWaitingHall`
|