@vkontakte/calls-sdk 2.8.2-dev.e1d7e72.0 → 2.8.2-dev.e8ddcb1.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 +78 -41
- package/abstract/BaseApi.d.ts +11 -9
- package/abstract/BaseSignaling.d.ts +10 -8
- package/calls-sdk.cjs.js +8 -8
- package/calls-sdk.esm.js +8 -8
- package/classes/AudioOutput.d.ts +8 -3
- package/classes/Conversation.d.ts +27 -21
- package/classes/FpsMeter.d.ts +10 -0
- package/classes/MediaSource.d.ts +5 -4
- package/classes/ParticipantIdRegistry.d.ts +5 -0
- package/classes/ProducerCommandSerializationService.d.ts +2 -0
- package/classes/codec/IEncoder.d.ts +1 -1
- package/classes/codec/LibVPxEncoder.d.ts +1 -1
- package/classes/codec/Types.d.ts +12 -2
- package/classes/codec/WebCodecsEncoder.d.ts +1 -1
- package/classes/screenshare/PacketHistory.d.ts +3 -2
- package/classes/screenshare/ScreenCaptureSender.d.ts +14 -4
- package/classes/screenshare/ScreenCongestionControl.d.ts +7 -2
- package/classes/screenshare/StreamBuilder.d.ts +1 -0
- package/classes/screenshare/Utils.d.ts +1 -1
- package/classes/stat/StatAggregator.d.ts +1 -1
- package/classes/transport/DirectTransport.d.ts +5 -0
- package/classes/transport/ServerTransport.d.ts +2 -0
- package/classes/transport/Statistics.d.ts +20 -2
- package/classes/transport/Transport.d.ts +2 -1
- package/constants/Rooms.d.ts +1 -0
- package/default/Api.d.ts +14 -14
- package/default/ApiExternal.d.ts +11 -0
- package/default/Signaling.d.ts +12 -11
- package/enums/SignalingCommandType.d.ts +6 -2
- package/enums/SignalingNotification.d.ts +2 -2
- package/package.json +3 -6
- package/static/ApiTransport.d.ts +3 -1
- package/static/AuthData.d.ts +6 -6
- package/static/External.d.ts +59 -18
- package/static/Params.d.ts +127 -42
- package/static/Utils.d.ts +8 -4
- package/types/Asr.d.ts +22 -1
- package/types/AudienceMode.d.ts +8 -0
- package/types/Conversation.d.ts +4 -0
- package/types/ExternalId.d.ts +13 -15
- package/types/{Logger.d.ts → IEventualStatLog.d.ts} +2 -2
- package/types/MovieShare.d.ts +2 -2
- package/types/MuteStates.d.ts +1 -1
- package/types/Params.d.ts +1 -0
- package/types/Participant.d.ts +2 -2
- package/types/ParticipantLayout.d.ts +2 -2
- package/types/ParticipantListChunk.d.ts +1 -1
- package/types/ParticipantStreamDescription.d.ts +0 -1
- package/types/PerfStatReporter.d.ts +1 -1
- package/types/RequestAsr.d.ts +3 -0
- package/types/Room.d.ts +4 -0
- package/types/SignalingMessage.d.ts +34 -4
- package/types/Statistics.d.ts +9 -4
- package/types/Streams.d.ts +10 -0
- package/types/VideoSettings.d.ts +15 -0
- package/utils/ArrayDequeue.d.ts +1 -1
- package/utils/ArrayList.d.ts +5 -2
- package/utils/FastList.d.ts +5 -2
- package/utils/IList.d.ts +5 -2
package/types/Room.d.ts
CHANGED
|
@@ -18,6 +18,8 @@ import MediaSettings from './MediaSettings';
|
|
|
18
18
|
import { ISharedMovieInfo, ISharedMovieState, ISharedMovieStoppedInfo } from './MovieShare';
|
|
19
19
|
import MuteStates from './MuteStates';
|
|
20
20
|
import { CompositeUserId, OkUserId, ParticipantId, ParticipantListMarker as ParticipantParticipantListMarker, ParticipantListMarkers, ParticipantListType as ParticipantParticipantListType } from './Participant';
|
|
21
|
+
import { ParticipantStreamDescription } from './ParticipantStreamDescription';
|
|
22
|
+
import { IRoomId } from './Room';
|
|
21
23
|
import VideoSettings from './VideoSettings';
|
|
22
24
|
import { ChatRoom } from './WaitingHall';
|
|
23
25
|
export type RecordInfo = {
|
|
@@ -35,6 +37,10 @@ export interface SignalingResponse extends SignalingMessage {
|
|
|
35
37
|
sequence?: number;
|
|
36
38
|
type: 'response' | 'error' | 'timeout';
|
|
37
39
|
}
|
|
40
|
+
export interface SignalingSuccessResponse extends SignalingResponse {
|
|
41
|
+
response: SignalingCommandType;
|
|
42
|
+
sequence: number;
|
|
43
|
+
}
|
|
38
44
|
declare namespace SignalingMessage {
|
|
39
45
|
export interface ExternalId {
|
|
40
46
|
type: 'UNKNOWN' | 'VK' | 'ANONYM';
|
|
@@ -46,6 +52,17 @@ declare namespace SignalingMessage {
|
|
|
46
52
|
}
|
|
47
53
|
export type ParticipantListType = ParticipantParticipantListType;
|
|
48
54
|
export type ParticipantListMarker = ParticipantParticipantListMarker;
|
|
55
|
+
export type ParticipantUpdateInfo = {
|
|
56
|
+
participantStreamDescription: ParticipantStreamDescription | null;
|
|
57
|
+
streamId: string;
|
|
58
|
+
rtpTimestamp: number | null;
|
|
59
|
+
sequenceNumber: number;
|
|
60
|
+
fastScreenShare: boolean;
|
|
61
|
+
};
|
|
62
|
+
export type ParticipantSuspendInfo = {
|
|
63
|
+
participantStreamDescription: ParticipantStreamDescription | null;
|
|
64
|
+
suspend: boolean;
|
|
65
|
+
};
|
|
49
66
|
export interface Participant {
|
|
50
67
|
id: OkUserId;
|
|
51
68
|
idType?: UserType;
|
|
@@ -183,7 +200,7 @@ declare namespace SignalingMessage {
|
|
|
183
200
|
stateUpdated?: boolean;
|
|
184
201
|
unmute?: boolean;
|
|
185
202
|
muteAll?: boolean;
|
|
186
|
-
roomId?: number;
|
|
203
|
+
roomId?: number | null;
|
|
187
204
|
}
|
|
188
205
|
export interface PinParticipant extends Notification {
|
|
189
206
|
participantId: ParticipantId;
|
|
@@ -314,9 +331,6 @@ declare namespace SignalingMessage {
|
|
|
314
331
|
roomId?: number;
|
|
315
332
|
};
|
|
316
333
|
}
|
|
317
|
-
export interface JoinLinkChanged extends Notification {
|
|
318
|
-
joinLink: string;
|
|
319
|
-
}
|
|
320
334
|
export interface Feedback extends Notification {
|
|
321
335
|
feedback: IFeedback[];
|
|
322
336
|
roomId?: number;
|
|
@@ -326,8 +340,10 @@ declare namespace SignalingMessage {
|
|
|
326
340
|
}
|
|
327
341
|
export interface SharedMovieInfo extends Notification {
|
|
328
342
|
movieShareInfo: ISharedMovieInfo;
|
|
343
|
+
roomId?: IRoomId;
|
|
329
344
|
}
|
|
330
345
|
export interface SharedMovieStoppedInfo extends Notification, ISharedMovieStoppedInfo {
|
|
346
|
+
roomId?: IRoomId;
|
|
331
347
|
}
|
|
332
348
|
export interface RoomsUpdated extends Notification {
|
|
333
349
|
updates: Partial<Record<RoomsEventType, {
|
|
@@ -343,6 +359,7 @@ declare namespace SignalingMessage {
|
|
|
343
359
|
deactivate?: boolean;
|
|
344
360
|
muteStates?: MuteStates;
|
|
345
361
|
recordInfo?: RecordInfo;
|
|
362
|
+
asrInfo?: AsrInfo;
|
|
346
363
|
}
|
|
347
364
|
export interface RoomParticipantsUpdated extends Notification {
|
|
348
365
|
roomId?: number;
|
|
@@ -360,6 +377,19 @@ declare namespace SignalingMessage {
|
|
|
360
377
|
export interface ParticipantAnimojiChanged extends Notification {
|
|
361
378
|
participantId: ParticipantId;
|
|
362
379
|
}
|
|
380
|
+
export interface AsrStartNotification extends Notification {
|
|
381
|
+
asrInfo: AsrInfo;
|
|
382
|
+
roomId?: number;
|
|
383
|
+
}
|
|
384
|
+
export interface AsrStopNotification extends Notification {
|
|
385
|
+
roomId?: number;
|
|
386
|
+
}
|
|
387
|
+
export interface ParticipantSourcesUpdateNotification extends Notification {
|
|
388
|
+
participantUpdateInfos: ParticipantUpdateInfo[];
|
|
389
|
+
}
|
|
390
|
+
export interface ParticipantSourcesSuspendNotification extends Notification {
|
|
391
|
+
participantSuspendInfos: ParticipantSuspendInfo[];
|
|
392
|
+
}
|
|
363
393
|
export {};
|
|
364
394
|
}
|
|
365
395
|
export default SignalingMessage;
|
package/types/Statistics.d.ts
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { TransportTopology } from '../classes/transport/Transport';
|
|
2
|
-
import { ExternalParticipantId } from './ExternalId';
|
|
3
2
|
export type StatTransport = {
|
|
4
3
|
totalRoundTripTime: number;
|
|
5
4
|
currentRoundTripTime: number;
|
|
@@ -7,6 +6,11 @@ export type StatTransport = {
|
|
|
7
6
|
bytesReceived: number;
|
|
8
7
|
local?: ILocalIceCandidateStat;
|
|
9
8
|
remote?: IRemoteIceCandidateStat;
|
|
9
|
+
averageNetStat?: AverageNetStat;
|
|
10
|
+
};
|
|
11
|
+
export type AverageNetStat = {
|
|
12
|
+
currentRoundTripTime: number;
|
|
13
|
+
lostPercent: number;
|
|
10
14
|
};
|
|
11
15
|
export interface IRemoteIceCandidateStat {
|
|
12
16
|
type: RTCIceCandidateType;
|
|
@@ -32,7 +36,7 @@ export type StatRtp = {
|
|
|
32
36
|
pliCount: number;
|
|
33
37
|
firCount: number;
|
|
34
38
|
nackCount: number;
|
|
35
|
-
userId?: string
|
|
39
|
+
userId?: string;
|
|
36
40
|
bandwidth?: number;
|
|
37
41
|
packetLoss?: number;
|
|
38
42
|
clockRate?: number;
|
|
@@ -51,15 +55,16 @@ export type StatRtp = {
|
|
|
51
55
|
silentConcealedSamples?: number;
|
|
52
56
|
concealmentEvents?: number;
|
|
53
57
|
totalAudioEnergy?: number;
|
|
54
|
-
totalFreezesDuration
|
|
58
|
+
totalFreezesDuration: number;
|
|
55
59
|
totalFreezesDurationDelta?: number;
|
|
56
|
-
freezeCount
|
|
60
|
+
freezeCount: number;
|
|
57
61
|
freezeCountDelta?: number;
|
|
58
62
|
};
|
|
59
63
|
export type StatItem = {
|
|
60
64
|
timestamp: number;
|
|
61
65
|
transport: StatTransport;
|
|
62
66
|
rtps: StatRtp[];
|
|
67
|
+
remoteRtps?: StatRtp[];
|
|
63
68
|
};
|
|
64
69
|
export type StatResult = {
|
|
65
70
|
inbound: {
|
package/types/Streams.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { ParticipantId } from './Participant';
|
|
1
2
|
export interface IStartStreamData {
|
|
2
3
|
movieId: string | null;
|
|
3
4
|
name: string | null;
|
|
@@ -9,3 +10,12 @@ export interface IStartStreamData {
|
|
|
9
10
|
export interface IStopStreamData {
|
|
10
11
|
roomId: number | null;
|
|
11
12
|
}
|
|
13
|
+
export interface IPublishStreamData {
|
|
14
|
+
roomId: number | null;
|
|
15
|
+
}
|
|
16
|
+
export interface IRecordConfData {
|
|
17
|
+
king?: ParticipantId;
|
|
18
|
+
pawns?: ParticipantId[];
|
|
19
|
+
hideParticipantCount: boolean;
|
|
20
|
+
roomId: number | null;
|
|
21
|
+
}
|
package/types/VideoSettings.d.ts
CHANGED
|
@@ -20,6 +20,21 @@ export type VideoSettings = {
|
|
|
20
20
|
* https://www.w3.org/TR/mst-content-hint/#dom-rtcdegradationpreference
|
|
21
21
|
*/
|
|
22
22
|
degradationPreference: string;
|
|
23
|
+
/**
|
|
24
|
+
* Настройка временных слоев
|
|
25
|
+
* https://www.w3.org/TR/webrtc-svc/
|
|
26
|
+
*/
|
|
27
|
+
scalabilityMode: string;
|
|
23
28
|
};
|
|
24
29
|
export default VideoSettings;
|
|
25
30
|
export declare function compareVideoSettings(vs1: VideoSettings | null, vs2: VideoSettings | null): boolean;
|
|
31
|
+
/**
|
|
32
|
+
* Настройки временных слоев для режима масштабируемости
|
|
33
|
+
* https://www.w3.org/TR/webrtc-svc/#scalabilitymodes*
|
|
34
|
+
* 1, 2 и 3 слоя, чем хуже качество сети, тем больше нужно
|
|
35
|
+
*/
|
|
36
|
+
export declare enum VideoScalability {
|
|
37
|
+
L1T1 = "L1T1",
|
|
38
|
+
L1T2 = "L1T2",
|
|
39
|
+
L1T3 = "L1T3"
|
|
40
|
+
}
|
package/utils/ArrayDequeue.d.ts
CHANGED
|
@@ -14,7 +14,7 @@ export declare class ArrayDequeue<T = any> {
|
|
|
14
14
|
get length(): number;
|
|
15
15
|
/** возвращает текущую длину очереди */
|
|
16
16
|
get left(): number;
|
|
17
|
-
toArray(): T[];
|
|
17
|
+
toArray(): (T | null)[];
|
|
18
18
|
/** добавить элемент в очередь */
|
|
19
19
|
add(element: T): void;
|
|
20
20
|
/** вычисляет значение след курсора по кругу */
|
package/utils/ArrayList.d.ts
CHANGED
|
@@ -1,10 +1,13 @@
|
|
|
1
1
|
import IList from './IList';
|
|
2
|
-
export declare class ArrayList<T> implements IList<T> {
|
|
2
|
+
export declare class ArrayList<T = never> implements IList<T> {
|
|
3
3
|
private _items;
|
|
4
4
|
get length(): number;
|
|
5
|
-
push(data: T): void;
|
|
5
|
+
push(...data: T[]): void;
|
|
6
|
+
merge(data: ArrayList<T>): void;
|
|
6
7
|
shift(): T | null;
|
|
7
8
|
bisect(): void;
|
|
9
|
+
head(): T | null;
|
|
10
|
+
tail(): T | null;
|
|
8
11
|
clear(): void;
|
|
9
12
|
toString(): string;
|
|
10
13
|
}
|
package/utils/FastList.d.ts
CHANGED
|
@@ -1,12 +1,15 @@
|
|
|
1
1
|
import IList from './IList';
|
|
2
|
-
export declare class FastList<T> implements IList<T> {
|
|
2
|
+
export declare class FastList<T = never> implements IList<T> {
|
|
3
3
|
private _head;
|
|
4
4
|
private _tail;
|
|
5
5
|
private _length;
|
|
6
6
|
get length(): number;
|
|
7
|
-
push(data: T): void;
|
|
7
|
+
push(...data: T[]): void;
|
|
8
|
+
merge(data: FastList<T>): void;
|
|
8
9
|
shift(): T | null;
|
|
9
10
|
bisect(): void;
|
|
11
|
+
head(): T | null;
|
|
12
|
+
tail(): T | null;
|
|
10
13
|
clear(): void;
|
|
11
14
|
toString(): string;
|
|
12
15
|
}
|
package/utils/IList.d.ts
CHANGED
|
@@ -1,8 +1,11 @@
|
|
|
1
|
-
export default interface IList<T> {
|
|
1
|
+
export default interface IList<T = never> {
|
|
2
2
|
readonly length: number;
|
|
3
|
-
push(data: T): void;
|
|
3
|
+
push(...data: T[]): void;
|
|
4
|
+
merge(data: IList<T>): void;
|
|
4
5
|
shift(): T | null;
|
|
5
6
|
bisect(): void;
|
|
6
7
|
clear(): void;
|
|
8
|
+
head(): T | null;
|
|
9
|
+
tail(): T | null;
|
|
7
10
|
toString(): string;
|
|
8
11
|
}
|