@vkontakte/calls-sdk 2.6.2-dev.aa1b4e2.0 → 2.6.2-dev.aa45c56.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 +27 -9
- package/abstract/BaseApi.d.ts +6 -2
- 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 +21 -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 +7 -2
- 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 +7 -1
- package/package.json +1 -1
- package/static/External.d.ts +72 -3
- package/static/Params.d.ts +69 -1
- package/static/Utils.d.ts +1 -1
- package/static/WebRTCUtils.d.ts +2 -1
- package/types/ConversationFeature.d.ts +3 -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 +20 -0
- package/types/WaitingHall.d.ts +2 -8
- package/utils/ArrayDequeue.d.ts +20 -0
- package/utils/ArrayDequeue.spec.d.ts +1 -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,11 @@ 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 { IFeaturesPerRole } from './ConversationFeature';
|
|
11
|
+
import { IFeedback } from './Feedback';
|
|
10
12
|
import MediaModifiers from './MediaModifiers';
|
|
11
13
|
import MediaSettings from './MediaSettings';
|
|
14
|
+
import { ISharedMovieInfo, ISharedMovieState, ISharedMovieStoppedInfo } from './MovieShare';
|
|
12
15
|
import MuteStates from './MuteStates';
|
|
13
16
|
import { CompositeUserId, OkUserId, ParticipantId, ParticipantListMarker as ParticipantParticipantListMarker, ParticipantListMarkers, ParticipantListType as ParticipantParticipantListType } from './Participant';
|
|
14
17
|
import VideoSettings from './VideoSettings';
|
|
@@ -54,6 +57,7 @@ declare namespace SignalingMessage {
|
|
|
54
57
|
unmuteOptions?: MediaOption[];
|
|
55
58
|
markers?: ParticipantListMarkers;
|
|
56
59
|
observedIds?: CompositeUserId[];
|
|
60
|
+
movieShareInfos?: ISharedMovieInfo[];
|
|
57
61
|
}
|
|
58
62
|
export interface ParticipantListChunk extends Notification {
|
|
59
63
|
participants: (Participant & Required<Pick<Participant, 'markers'>>)[];
|
|
@@ -72,6 +76,7 @@ declare namespace SignalingMessage {
|
|
|
72
76
|
multichatId: string | null;
|
|
73
77
|
tamtamMultichatId: string | null;
|
|
74
78
|
recordInfo: RecordInfo | null;
|
|
79
|
+
featuresPerRole?: IFeaturesPerRole | null;
|
|
75
80
|
pinnedParticipantId: ParticipantId | null;
|
|
76
81
|
options: ConversationOption[];
|
|
77
82
|
muteStates?: MuteStates;
|
|
@@ -186,6 +191,7 @@ declare namespace SignalingMessage {
|
|
|
186
191
|
}
|
|
187
192
|
export interface FeatureSetChanged extends Notification {
|
|
188
193
|
features: ConversationFeature[];
|
|
194
|
+
featuresPerRole?: IFeaturesPerRole | null;
|
|
189
195
|
}
|
|
190
196
|
export interface MultipartyChatCreated extends Notification {
|
|
191
197
|
chatId: string;
|
|
@@ -279,6 +285,20 @@ declare namespace SignalingMessage {
|
|
|
279
285
|
export interface JoinLinkChanged extends Notification {
|
|
280
286
|
joinLink: string;
|
|
281
287
|
}
|
|
288
|
+
export interface Feedback extends Notification {
|
|
289
|
+
feedback: IFeedback[];
|
|
290
|
+
}
|
|
291
|
+
export interface SharedMovieState extends Notification {
|
|
292
|
+
data: ISharedMovieState[];
|
|
293
|
+
}
|
|
294
|
+
export interface SharedMovieInfo extends Notification {
|
|
295
|
+
movieShareInfo: ISharedMovieInfo;
|
|
296
|
+
}
|
|
297
|
+
export interface SharedMovieStoppedInfo extends Notification, ISharedMovieStoppedInfo {
|
|
298
|
+
}
|
|
299
|
+
export interface FeaturesPerRoleChanged extends Notification {
|
|
300
|
+
featuresPerRole?: IFeaturesPerRole | null;
|
|
301
|
+
}
|
|
282
302
|
export {};
|
|
283
303
|
}
|
|
284
304
|
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`
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
export declare class ArrayDequeue<T = any> {
|
|
2
|
+
/** очередь */
|
|
3
|
+
private readonly _q;
|
|
4
|
+
/** курсор для чтения */
|
|
5
|
+
private _rc;
|
|
6
|
+
/** курсор для записи */
|
|
7
|
+
private _wc;
|
|
8
|
+
/** подвинуть курсор чтения */
|
|
9
|
+
private _moveRC;
|
|
10
|
+
constructor(length: number);
|
|
11
|
+
/** возвращает длину, переданную в конструктор */
|
|
12
|
+
get length(): number;
|
|
13
|
+
toArray(): T[];
|
|
14
|
+
/** добавить элемент в очередь */
|
|
15
|
+
add(element: T): void;
|
|
16
|
+
/** вычисляет значение след курсора по кругу */
|
|
17
|
+
private nextCursor;
|
|
18
|
+
/** получить следующий элемент */
|
|
19
|
+
next(): T | null;
|
|
20
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|