@vkontakte/calls-sdk 2.8.6-dev.15af4b30.0 → 2.8.6-dev.164b8e60.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 +6 -5
- package/calls-sdk.cjs.js +8 -8
- package/calls-sdk.esm.js +8 -8
- package/classes/Conversation.d.ts +12 -5
- package/classes/Logger.d.ts +24 -18
- package/classes/MediaSource.d.ts +3 -0
- package/classes/SignalingActor.d.ts +9 -0
- package/classes/codec/IEncoder.d.ts +0 -1
- package/classes/screenshare/BaseStreamBuilder.d.ts +1 -1
- package/classes/stat/StatPings.d.ts +17 -0
- package/classes/stat/StatSignalingCommands.d.ts +12 -0
- package/classes/transport/Statistics.d.ts +23 -10
- package/default/Signaling.d.ts +12 -9
- package/enums/ChatRoomEventType.d.ts +1 -1
- package/enums/ConversationOption.d.ts +3 -3
- package/enums/HangupType.d.ts +2 -1
- package/enums/RecordRole.d.ts +1 -1
- package/enums/SignalingTransportStat.d.ts +17 -0
- package/enums/Stat.d.ts +18 -36
- package/enums/StatLog.d.ts +32 -0
- package/package.json +1 -3
- package/static/ApiTransport.d.ts +1 -1
- package/static/External.d.ts +7 -4
- package/static/Params.d.ts +14 -4
- package/static/SignalingCapabilities.d.ts +24 -0
- package/static/SimulcastInfo.d.ts +1 -1
- package/static/Utils.d.ts +1 -1
- package/types/ConversationParams.d.ts +1 -0
- package/types/ExternalId.d.ts +2 -0
- package/types/SignalingCommand.d.ts +1 -0
- package/types/SignalingMessage.d.ts +3 -1
- package/types/Streams.d.ts +1 -0
- package/types/WebTransport.d.ts +2 -11
- package/utils/Lz4.d.ts +1 -1
- package/utils/MsgPackerBufferUtils.d.ts +1 -1
- package/utils/P2Quantile.d.ts +14 -0
- package/utils/StatTracker.d.ts +18 -0
- package/utils/VariableLengthInteger.d.ts +1 -1
- package/utils/Welford.d.ts +9 -0
- package/worker/LibVPxDecoderWorker.d.ts +0 -1
- package/worker/LibVPxEncoderWorker.d.ts +0 -1
- package/worker/WebCodecsDecoderWorker.d.ts +0 -1
- package/worker/WebCodecsEncoderWorker.d.ts +0 -1
|
@@ -30,12 +30,14 @@ import EventEmitter from './EventEmitter';
|
|
|
30
30
|
export default class Conversation extends EventEmitter {
|
|
31
31
|
private readonly _api;
|
|
32
32
|
private readonly _signaling;
|
|
33
|
+
private readonly _signalingActor;
|
|
33
34
|
private _mediaSource;
|
|
34
35
|
private _conversation;
|
|
35
36
|
private _myLastRequestedLayouts;
|
|
36
37
|
private _state;
|
|
37
38
|
private _participantState;
|
|
38
39
|
private _participants;
|
|
40
|
+
private _pendingParticipants;
|
|
39
41
|
private _transport;
|
|
40
42
|
private _debugInfo;
|
|
41
43
|
private _volumesDetector;
|
|
@@ -65,7 +67,7 @@ export default class Conversation extends EventEmitter {
|
|
|
65
67
|
static current(): Conversation | null;
|
|
66
68
|
static hangupAfterInit(): void;
|
|
67
69
|
static id(): string | null;
|
|
68
|
-
onStart({ opponentIds, opponentType, mediaOptions, payload, joiningAllowed, requireAuthToJoin, onlyAdminCanShareMovie, externalIds, onFastStart }: ConversationOnStartParams): Promise<ConversationData>;
|
|
70
|
+
onStart({ opponentIds, opponentType, mediaOptions, payload, joiningAllowed, requireAuthToJoin, onlyAdminCanShareMovie, externalIds, onFastStart, }: ConversationOnStartParams): Promise<ConversationData>;
|
|
69
71
|
onJoin(joinArgs: {
|
|
70
72
|
conversationId?: string;
|
|
71
73
|
mediaOptions: MediaOption[];
|
|
@@ -77,7 +79,7 @@ export default class Conversation extends EventEmitter {
|
|
|
77
79
|
private _onJoinPart2;
|
|
78
80
|
private _extractExternalRooms;
|
|
79
81
|
private _extractExternalRoomsData;
|
|
80
|
-
onPush(conversationId: string, type?: UserType, peerId?: number, conversationParams?: string): Promise<void>;
|
|
82
|
+
onPush(conversationId: string, type?: UserType, peerId?: number, conversationParams?: string, wsEndpoint?: string): Promise<void>;
|
|
81
83
|
private _isInWaitingHall;
|
|
82
84
|
private _isRestricted;
|
|
83
85
|
private _isAudienceMode;
|
|
@@ -96,7 +98,7 @@ export default class Conversation extends EventEmitter {
|
|
|
96
98
|
updateStatisticsInterval(): void;
|
|
97
99
|
private _openTransport;
|
|
98
100
|
private _close;
|
|
99
|
-
destroy(): void
|
|
101
|
+
destroy(): Promise<void>;
|
|
100
102
|
private _getConversationParams;
|
|
101
103
|
private _setConversationParams;
|
|
102
104
|
private _addGeoParamsToEndpoint;
|
|
@@ -228,7 +230,7 @@ export default class Conversation extends EventEmitter {
|
|
|
228
230
|
startAsr(params: IAsrStartParams): Promise<void>;
|
|
229
231
|
stopAsr(params?: IAsrStopParams): Promise<void>;
|
|
230
232
|
requestAsr(request: boolean): Promise<void>;
|
|
231
|
-
muteParticipant(participantId:
|
|
233
|
+
muteParticipant(participantId: (ParticipantId | null) | undefined, muteStates: MuteStates, requestedMedia?: MediaOption[], roomId?: number | null): Promise<void>;
|
|
232
234
|
enableFeatureForRoles(feature: ConversationFeature, roles: UserRole[]): Promise<void>;
|
|
233
235
|
pinParticipant(participantId: ParticipantId, unpin: boolean, roomId?: number | null): Promise<void>;
|
|
234
236
|
updateMediaModifiers(mediaModifiers: MediaModifiers): Promise<void>;
|
|
@@ -265,7 +267,7 @@ export default class Conversation extends EventEmitter {
|
|
|
265
267
|
switchRoom(toRoomId: number | null, participantId?: ParticipantId): Promise<void>;
|
|
266
268
|
removeRooms(roomIds: number[]): Promise<void>;
|
|
267
269
|
startStream(isRecord?: boolean, name?: string | null, movieId?: string | null, privacy?: 'PUBLIC' | 'FRIENDS' | 'DIRECT_LINK', groupId?: string | null, roomId?: number | null): Promise<undefined>;
|
|
268
|
-
stopStream(roomId?: number | null): Promise<undefined>;
|
|
270
|
+
stopStream(roomId?: number | null, remove?: boolean): Promise<undefined>;
|
|
269
271
|
publishStream(roomId?: number | null): Promise<undefined>;
|
|
270
272
|
recordSetConf(king?: ParticipantId, pawns?: ParticipantId[], hideParticipantCount?: boolean, roomId?: number | null): Promise<void>;
|
|
271
273
|
getStreamInfo(): Promise<{
|
|
@@ -312,6 +314,7 @@ export default class Conversation extends EventEmitter {
|
|
|
312
314
|
private _onChatMessage;
|
|
313
315
|
private _onCustomData;
|
|
314
316
|
private _onRecordInfo;
|
|
317
|
+
private _onStopRecordInfo;
|
|
315
318
|
private _changePinnedParticipantForRoom;
|
|
316
319
|
_changeRecordInfoForRoom(): Promise<void>;
|
|
317
320
|
private _changeAsrInfoForRoom;
|
|
@@ -344,6 +347,7 @@ export default class Conversation extends EventEmitter {
|
|
|
344
347
|
private _onAnimojiError;
|
|
345
348
|
private _onPeerConnectionClosed;
|
|
346
349
|
private _changeFeatureSet;
|
|
350
|
+
private _changeFeaturesPerRole;
|
|
347
351
|
private _changeNeedRate;
|
|
348
352
|
private _onVolumesDetected;
|
|
349
353
|
private _onSpeakerChanged;
|
|
@@ -383,6 +387,9 @@ export default class Conversation extends EventEmitter {
|
|
|
383
387
|
private _getMuteStatesForCurrentRoom;
|
|
384
388
|
private _setMuteStatesForRoomId;
|
|
385
389
|
private _forceOpenTransportForAloneInCall;
|
|
390
|
+
private _registerParticipant;
|
|
391
|
+
private _getParticipants;
|
|
392
|
+
private _getParticipant;
|
|
386
393
|
}
|
|
387
394
|
export declare class UpdateDisplayLayoutError extends Error {
|
|
388
395
|
readonly participantErrors: {
|
package/classes/Logger.d.ts
CHANGED
|
@@ -1,35 +1,41 @@
|
|
|
1
1
|
import BaseApi from '../abstract/BaseApi';
|
|
2
2
|
import BaseLogger from '../abstract/BaseLogger';
|
|
3
|
-
import
|
|
3
|
+
import StatLog from '../enums/StatLog';
|
|
4
|
+
/**
|
|
5
|
+
* Класс отвечает за отправку различной информации в сервис статистики (события, статистика и подобное)
|
|
6
|
+
*/
|
|
4
7
|
export default class Logger extends BaseLogger {
|
|
8
|
+
private static _instance;
|
|
9
|
+
private static _conversationIdProvider;
|
|
10
|
+
static setConversationIdProvider(provider: () => string | null): void;
|
|
11
|
+
static create(api: BaseApi, externalLogger: BaseLogger | null): void;
|
|
12
|
+
static log(name: StatLog, value?: string, immediately?: boolean): void;
|
|
13
|
+
static logCustom(name: StatLog, params: Record<string, string | number>, immediately?: boolean): void;
|
|
14
|
+
static logClientStats(params: Record<string, string | number | undefined | null>, immediately?: boolean): void;
|
|
15
|
+
static logClientEvent(params: Record<string, string | number | undefined | null>, immediately?: boolean): void;
|
|
16
|
+
static destroy(): void;
|
|
5
17
|
private readonly _externalLogger;
|
|
6
18
|
private readonly _api;
|
|
7
|
-
private _batchInterval;
|
|
19
|
+
private readonly _batchInterval;
|
|
8
20
|
private _batchedLogItems;
|
|
9
21
|
private _batchedClientStats;
|
|
10
22
|
private _batchedClientEvents;
|
|
11
23
|
private _batchTimeout;
|
|
12
24
|
private _serverTimeDelta;
|
|
13
|
-
private static _instance;
|
|
14
25
|
constructor(api: BaseApi, externalLogger: BaseLogger | null);
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
26
|
+
log(name: StatLog, value?: string, immediately?: boolean): void;
|
|
27
|
+
logCustom(name: string, params: Record<string, string | number>, immediately?: boolean): void;
|
|
28
|
+
logClientStats(data: Record<string, string | number | undefined | null>, immediately?: boolean): void;
|
|
29
|
+
logClientEvent(data: Record<string, string | number | undefined | null>, immediately?: boolean): void;
|
|
30
|
+
destroy(): void;
|
|
31
|
+
private _logInternal;
|
|
32
|
+
private _getConversationId;
|
|
18
33
|
private _sendBatch;
|
|
19
34
|
private _startTimeout;
|
|
20
35
|
private _stopTimeout;
|
|
36
|
+
private _sendLogItems;
|
|
37
|
+
private _sendClientStats;
|
|
38
|
+
private _sendClientEvents;
|
|
21
39
|
private _calculateServerTimeDelta;
|
|
22
40
|
private _now;
|
|
23
|
-
log(name: Stat, value?: string, immediately?: boolean): void;
|
|
24
|
-
logCustom(name: string, params: Record<string, string | number>, immediately?: boolean): void;
|
|
25
|
-
logClientStats(data: Record<string, string | number | undefined | null>, immediately?: boolean): void;
|
|
26
|
-
logClientEvent(data: Record<string, string | number | undefined | null>, immediately?: boolean): void;
|
|
27
|
-
_logInternal(operation: string, custom: Record<string, string | number>, immediately: boolean): void;
|
|
28
|
-
destroy(): void;
|
|
29
|
-
static create(api: BaseApi, externalLogger: BaseLogger | null): void;
|
|
30
|
-
static log(name: Stat, value?: string, immediately?: boolean): void;
|
|
31
|
-
static logCustom(name: string, params: Record<string, string | number>, immediately?: boolean): void;
|
|
32
|
-
static logClientStats(params: Record<string, string | number | undefined | null>, immediately?: boolean): void;
|
|
33
|
-
static logClientEvent(params: Record<string, string | number | undefined | null>, immediately?: boolean): void;
|
|
34
|
-
static destroy(): void;
|
|
35
41
|
}
|
package/classes/MediaSource.d.ts
CHANGED
|
@@ -53,6 +53,8 @@ export declare class MediaSource extends EventEmitter {
|
|
|
53
53
|
/** вычисляем низкую производительность видео эффектов */
|
|
54
54
|
private readonly _videoEffectsFpsLimiter?;
|
|
55
55
|
constructor();
|
|
56
|
+
get cameraVideoTrack(): MediaStreamTrack | null;
|
|
57
|
+
set cameraVideoTrack(track: MediaStreamTrack | null);
|
|
56
58
|
request(mediaOptions?: MediaOption[], needEmptyTracks?: boolean): Promise<void>;
|
|
57
59
|
getStream(): MediaStream | null;
|
|
58
60
|
getScreenTrack(): MediaStreamTrack | null;
|
|
@@ -90,6 +92,7 @@ export declare class MediaSource extends EventEmitter {
|
|
|
90
92
|
destroy(): void;
|
|
91
93
|
toggleScreenCapturing(settings: ScreenCaptureSettings): Promise<void>;
|
|
92
94
|
disableScreenCapturing(): Promise<void>;
|
|
95
|
+
private videoTrackMuteHandler;
|
|
93
96
|
toggleVideo(enabled: boolean): Promise<void>;
|
|
94
97
|
toggleAudio(enabled: boolean): Promise<void>;
|
|
95
98
|
toggleAnimojiCapturing(enabled: boolean): void;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import SignalingMessage from '../types/SignalingMessage';
|
|
2
|
+
export declare class SignalingActor {
|
|
3
|
+
private processor;
|
|
4
|
+
private queue;
|
|
5
|
+
private isProcessing;
|
|
6
|
+
constructor(processor: (message: SignalingMessage) => Promise<unknown> | unknown);
|
|
7
|
+
add(message: SignalingMessage): void;
|
|
8
|
+
private processQueue;
|
|
9
|
+
}
|
|
@@ -15,7 +15,7 @@ export declare abstract class BaseStreamBuilder {
|
|
|
15
15
|
destroy(): void;
|
|
16
16
|
protected abstract _processFrame(frame: FrameData): void;
|
|
17
17
|
private _processFrameData;
|
|
18
|
-
static getFrameSize(frameData: Uint8Array): {
|
|
18
|
+
static getFrameSize(frameData: Uint8Array<ArrayBuffer>): {
|
|
19
19
|
width: number;
|
|
20
20
|
height: number;
|
|
21
21
|
};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { SignalingTransportType } from '../../enums/SignalingTransportStat';
|
|
2
|
+
import { TransportTopology } from '../transport/Transport';
|
|
3
|
+
export declare class StatPings {
|
|
4
|
+
private static _instance?;
|
|
5
|
+
static create(): void;
|
|
6
|
+
/**
|
|
7
|
+
* Вызывать при входящем ping в сигналингу.
|
|
8
|
+
* Будет произведен расчет времени между пингами.
|
|
9
|
+
*/
|
|
10
|
+
static mark(transport: SignalingTransportType): void;
|
|
11
|
+
/** Отправляем данные в стату */
|
|
12
|
+
static logMetrics(topology?: TransportTopology): void;
|
|
13
|
+
static destroy(): void;
|
|
14
|
+
private trackerByTransport;
|
|
15
|
+
private lastSeen;
|
|
16
|
+
private _destroy;
|
|
17
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { SignalingTransportType } from '../../enums/SignalingTransportStat';
|
|
2
|
+
import { TransportTopology } from '../transport/Transport';
|
|
3
|
+
export declare class StatSignalingCommands {
|
|
4
|
+
private static _instance?;
|
|
5
|
+
static create(): void;
|
|
6
|
+
static mark(command: string, time: number, transport: SignalingTransportType): void;
|
|
7
|
+
/** Отправляем данные в стату */
|
|
8
|
+
static logMetrics(topology?: TransportTopology): void;
|
|
9
|
+
static destroy(): void;
|
|
10
|
+
private trackerByCommand;
|
|
11
|
+
private _destroy;
|
|
12
|
+
}
|
|
@@ -1,25 +1,38 @@
|
|
|
1
1
|
import { ParticipantId } from '../../types/Participant';
|
|
2
2
|
import { StatItem, StatRtp, StatTransport } from '../../types/Statistics';
|
|
3
3
|
export declare const NO_STAT_REQUEST_DELAY = 1000;
|
|
4
|
-
|
|
5
|
-
|
|
4
|
+
declare function distinctById(items: RTCStats[]): RTCStats[];
|
|
5
|
+
declare function rtcStatsToArray(stats: RTCStatsReport[]): RTCStats[];
|
|
6
6
|
/**
|
|
7
7
|
* Extracts transport statistics from the gives stats
|
|
8
8
|
* @hidden
|
|
9
9
|
*/
|
|
10
|
-
|
|
10
|
+
declare function extractTransport(stats: RTCStats[]): StatTransport;
|
|
11
11
|
/**
|
|
12
12
|
* Extracts media statistics from the given stats
|
|
13
13
|
* @hidden
|
|
14
14
|
*/
|
|
15
|
-
|
|
15
|
+
declare function extractRtps(stats: RTCStats[], ssrcMap: Record<string, string>, needToExtractRemote?: boolean): StatRtp[];
|
|
16
16
|
/**
|
|
17
17
|
* Computes delta (the difference) between two stat reports.
|
|
18
18
|
* @hidden
|
|
19
19
|
*/
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
20
|
+
declare function delta(current: StatItem, previous: StatItem, needToExtractRemote?: boolean): StatItem;
|
|
21
|
+
declare function collectStats(pc: RTCPeerConnection, previous: StatItem | null, ssrcMap?: Record<string, string>, needToExtractRemote?: boolean): Promise<StatItem>;
|
|
22
|
+
declare function setMark(name: string): void;
|
|
23
|
+
declare function clearMark(name: string): void;
|
|
24
|
+
declare function measureMark(name: string): null | number;
|
|
25
|
+
declare function getMarkNameScreenshareFirstFrame(uid: ParticipantId): string;
|
|
26
|
+
declare const _default: {
|
|
27
|
+
distinctById: typeof distinctById;
|
|
28
|
+
rtcStatsToArray: typeof rtcStatsToArray;
|
|
29
|
+
extractTransport: typeof extractTransport;
|
|
30
|
+
extractRtps: typeof extractRtps;
|
|
31
|
+
delta: typeof delta;
|
|
32
|
+
collectStats: typeof collectStats;
|
|
33
|
+
setMark: typeof setMark;
|
|
34
|
+
clearMark: typeof clearMark;
|
|
35
|
+
measureMark: typeof measureMark;
|
|
36
|
+
getMarkNameScreenshareFirstFrame: typeof getMarkNameScreenshareFirstFrame;
|
|
37
|
+
};
|
|
38
|
+
export default _default;
|
package/default/Signaling.d.ts
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import BaseSignaling, { AddParticipantParams } from '../abstract/BaseSignaling';
|
|
2
2
|
import { ParticipantIdRegistry } from '../classes/ParticipantIdRegistry';
|
|
3
3
|
import { SharingStatReport } from '../classes/screenshare/SharingStatReport';
|
|
4
|
-
import { NetworkStatReport } from '../types/NetworkStatReport';
|
|
5
4
|
import { TransportTopology } from '../classes/transport/Transport';
|
|
6
5
|
import ConversationFeature from '../enums/ConversationFeature';
|
|
7
6
|
import ConversationOption from '../enums/ConversationOption';
|
|
@@ -11,16 +10,17 @@ import SignalingConnectionType from '../enums/SignalingConnectionType';
|
|
|
11
10
|
import UserRole from '../enums/UserRole';
|
|
12
11
|
import { JSONObject } from '../static/Json';
|
|
13
12
|
import { IAsrStartParams, IAsrStopParams } from '../types/Asr';
|
|
13
|
+
import { ChangeSimulcast } from '../types/ChangeSimulcast';
|
|
14
14
|
import MediaModifiers from '../types/MediaModifiers';
|
|
15
15
|
import MediaSettings from '../types/MediaSettings';
|
|
16
16
|
import { IAddMovieParams, IUpdateMovieData } from '../types/MovieShare';
|
|
17
17
|
import MuteStates from '../types/MuteStates';
|
|
18
|
+
import { NetworkStatReport } from '../types/NetworkStatReport';
|
|
18
19
|
import { CompositeUserId, ParticipantId, ParticipantStateData } from '../types/Participant';
|
|
19
20
|
import ParticipantLayout, { RequestKeyFrame, StopStream } from '../types/ParticipantLayout';
|
|
20
21
|
import { ParticipantListChunkParameters } from '../types/ParticipantListChunk';
|
|
21
22
|
import { StreamDescriptionString } from '../types/ParticipantStreamDescription';
|
|
22
23
|
import { PerfStatReport } from '../types/PerfStatReporter';
|
|
23
|
-
import { ChangeSimulcast } from '../types/ChangeSimulcast';
|
|
24
24
|
import SignalingMessage, { GetParticipantsSignalingResponse, GetRoomsSignalingResponse, SignalingSuccessResponse } from '../types/SignalingMessage';
|
|
25
25
|
import { IPublishStreamData, IRecordConfData, IStartStreamData, IStopStreamData } from '../types/Streams';
|
|
26
26
|
export default class Signaling extends BaseSignaling {
|
|
@@ -31,6 +31,7 @@ export default class Signaling extends BaseSignaling {
|
|
|
31
31
|
private datachannelCommandsQueue;
|
|
32
32
|
private incomingCache;
|
|
33
33
|
private responseHandlers;
|
|
34
|
+
private connectionType;
|
|
34
35
|
private reconnectCount;
|
|
35
36
|
private endpoint;
|
|
36
37
|
private wtEndpoint;
|
|
@@ -49,13 +50,12 @@ export default class Signaling extends BaseSignaling {
|
|
|
49
50
|
private producerCommandDataChannel;
|
|
50
51
|
private producerCommandDataChannelEnabled;
|
|
51
52
|
private producerCommandSerializationService;
|
|
52
|
-
private static
|
|
53
|
-
private static
|
|
54
|
-
private static
|
|
55
|
-
private static
|
|
56
|
-
private static
|
|
57
|
-
private static
|
|
58
|
-
private static _getCapabilityFlags;
|
|
53
|
+
private static get RECONNECT_DELAY();
|
|
54
|
+
private static get RECONNECT_MAX_DELAY();
|
|
55
|
+
private static get RECONNECT_MAX_COUNT();
|
|
56
|
+
private static get WAIT_CONNECTION_DELAY();
|
|
57
|
+
private static get WAIT_RESPONSE_DELAY();
|
|
58
|
+
private static get WAIT_MESSAGE_DELAY();
|
|
59
59
|
get ready(): boolean;
|
|
60
60
|
setEndpoint(endpoint: string): void;
|
|
61
61
|
setWebTransportEndpoint(endpoint: string | null): void;
|
|
@@ -186,4 +186,7 @@ export default class Signaling extends BaseSignaling {
|
|
|
186
186
|
private _startDoctor;
|
|
187
187
|
private _stopDoctor;
|
|
188
188
|
private isWebTransportAvailable;
|
|
189
|
+
private _getSocketType;
|
|
190
|
+
private _markTransportStat;
|
|
191
|
+
private _logTransportStat;
|
|
189
192
|
}
|
|
@@ -3,10 +3,10 @@
|
|
|
3
3
|
*/
|
|
4
4
|
declare enum ConversationOption {
|
|
5
5
|
REQUIRE_AUTH_TO_JOIN = "REQUIRE_AUTH_TO_JOIN",
|
|
6
|
-
AUDIENCE_MODE = "AUDIENCE_MODE"
|
|
7
|
-
WAITING_HALL = "WAITING_HALL"
|
|
6
|
+
AUDIENCE_MODE = "AUDIENCE_MODE",// Stereo chat room
|
|
7
|
+
WAITING_HALL = "WAITING_HALL",// Waiting Hall is ON
|
|
8
8
|
ASR = "ASR",
|
|
9
|
-
FEEDBACK = "FEEDBACK"
|
|
9
|
+
FEEDBACK = "FEEDBACK",// Reactions (default = off)
|
|
10
10
|
RECURRING = "RECURRING"
|
|
11
11
|
}
|
|
12
12
|
export default ConversationOption;
|
package/enums/HangupType.d.ts
CHANGED
|
@@ -27,6 +27,7 @@ declare enum HangupType {
|
|
|
27
27
|
KILLED_WITHOUT_DELETE = "KILLED_WITHOUT_DELETE",
|
|
28
28
|
ANOTHER_DEVICE = "ANOTHER_DEVICE",
|
|
29
29
|
NOT_FOUND = "NOT_FOUND",
|
|
30
|
-
VCHAT_DETAILED_ERROR = "VCHAT_DETAILED_ERROR"
|
|
30
|
+
VCHAT_DETAILED_ERROR = "VCHAT_DETAILED_ERROR",
|
|
31
|
+
TIMEOUT = "TIMEOUT"
|
|
31
32
|
}
|
|
32
33
|
export default HangupType;
|
package/enums/RecordRole.d.ts
CHANGED
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import Stat from './Stat';
|
|
2
|
+
export declare const enum SignalingTransportType {
|
|
3
|
+
WEBSOCKET = "ws",
|
|
4
|
+
WEBTRANSPORT = "wt"
|
|
5
|
+
}
|
|
6
|
+
export declare const enum SignalingTransportStat {
|
|
7
|
+
CONNECTED = "connected",
|
|
8
|
+
RECONNECTED = "reconnected",
|
|
9
|
+
FAILED_PINGS = "failed_pings",
|
|
10
|
+
FAILED_EXCEPTIONS = "failed_exception",
|
|
11
|
+
TIMEOUT = "timeout",
|
|
12
|
+
RESTART = "restart"
|
|
13
|
+
}
|
|
14
|
+
export declare const SOCKET_STAT: Record<SignalingTransportStat, {
|
|
15
|
+
[SignalingTransportType.WEBSOCKET]: Stat;
|
|
16
|
+
[SignalingTransportType.WEBTRANSPORT]: Stat;
|
|
17
|
+
}>;
|
package/enums/Stat.d.ts
CHANGED
|
@@ -1,44 +1,26 @@
|
|
|
1
1
|
declare const enum Stat {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
ICE_CONNECTION_TYPE = "callIceConnectionType",
|
|
7
|
-
ICE_RESTART = "callIceRestart",
|
|
8
|
-
PUSH = "callPush",
|
|
9
|
-
OUTGOING_CALL = "callStart",
|
|
10
|
-
CALL_FINISH = "call_finish",
|
|
11
|
-
OUTGOING_MULTIPARTY_CALL = "callStartMultiparty",
|
|
12
|
-
JOIN_CONVERSATION = "callJoinConversation",
|
|
13
|
-
ACCEPTED_OUTGOING = "callAcceptedOutgoing",
|
|
14
|
-
ACCEPT_INCOMING = "callAcceptIncoming",
|
|
15
|
-
DECLINE_INCOMING = "callDeclineIncoming",
|
|
16
|
-
ACCEPT_CONCURRENT = "callAcceptConcurrent",
|
|
17
|
-
HANGUP = "callHangup",
|
|
18
|
-
CODEC_USAGE = "codec_usage",
|
|
19
|
-
MEDIA_STATUS = "callMediaStatus",
|
|
20
|
-
DEVICE_CHANGED = "callDeviceChanged",
|
|
21
|
-
SOCKET_ACTION = "callSocketAction",
|
|
22
|
-
ADD_PARTICIPANT = "callAddParticipant",
|
|
23
|
-
REMOVE_PARTICIPANT = "callRemoveParticipant",
|
|
24
|
-
POOR_CONNECTION = "callPoorConnection",
|
|
25
|
-
TOPOLOGY_CHANGE_REQUESTED = "callTopologyChangeRequested",
|
|
26
|
-
RELAY_POLICY = "callForceRelay",
|
|
27
|
-
PAT_ALLOCATED = "patAllocate",
|
|
28
|
-
PAT_DEALLOCATED = "patDeallocate",
|
|
29
|
-
PAT_ERROR = "patError",
|
|
30
|
-
PAT_WAITING_TIME_ERROR = "patWaitingTimeError",
|
|
31
|
-
PAT_OUTDATED_RESPONSE = "patOutdatedResponse",
|
|
32
|
-
SIGNALING_CONNECTED = "signaling_connected",
|
|
33
|
-
RECONNECT = "callReconnect",
|
|
34
|
-
SCREENSHARE_FIRST_FRAME = "screen_share_first_frame",
|
|
35
|
-
SCREENSHARE_FREEZE_DURATION = "callScreenshareFreezeDuration",
|
|
2
|
+
CALL_FINISH = "call_finish",// событие отправляемое в конце звонка
|
|
3
|
+
CODEC_USAGE = "codec_usage",// событие когда меняется кодек
|
|
4
|
+
SIGNALING_CONNECTED = "signaling_connected",// measure
|
|
5
|
+
SCREENSHARE_FIRST_FRAME = "screen_share_first_frame",// measure
|
|
36
6
|
/** Объединение callFirstDataReceivedP2P и callFirstAudioMixDataReceived */
|
|
37
7
|
FIRST_MEDIA_RECEIVED = "first_media_received",
|
|
38
|
-
CALL_EVENTUAL_STAT = "callEventualStat",
|
|
39
8
|
CALL_DECLINED_OR_HANGED_LOCALLY = "CallDeclinedOrHangedLocally",
|
|
40
9
|
USER_FEEDBACK_RECEIVED = "UserFeedbackReceived",
|
|
41
10
|
CALL_START = "call_start",
|
|
42
|
-
|
|
11
|
+
SIGNALING_PING_SUMMARY = "signaling_ping_summary",
|
|
12
|
+
SIGNALING_COMMAND_SUMMARY = "signaling_command_summary",
|
|
13
|
+
WEBSOCKET_CONNECTED = "websocket_connected",
|
|
14
|
+
WEBSOCKET_RECONNECTED = "websocket_reconnected",
|
|
15
|
+
WEBSOCKET_FAILED_PINGS = "websocket_failed_pings",
|
|
16
|
+
WEBSOCKET_FAILED_EXCEPTION = "websocket_failed_exception",
|
|
17
|
+
WEBSOCKET_TIMEOUT = "websocket_timeout",
|
|
18
|
+
WEBSOCKET_RESTART = "websocket_restart",
|
|
19
|
+
WEBTRANSPORT_CONNECTED = "webtransport_connected",
|
|
20
|
+
WEBTRANSPORT_RECONNECTED = "webtransport_reconnected",
|
|
21
|
+
WEBTRANSPORT_FAILED_PINGS = "webtransport_failed_pings",
|
|
22
|
+
WEBTRANSPORT_FAILED_EXCEPTION = "webtransport_failed_exception",
|
|
23
|
+
WEBTRANSPORT_TIMEOUT = "webtransport_timeout",
|
|
24
|
+
WEBTRANSPORT_RESTART = "webtransport_restart"
|
|
43
25
|
}
|
|
44
26
|
export default Stat;
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
declare const enum StatLog {
|
|
2
|
+
ACCEPT_CONCURRENT = "callAcceptConcurrent",// video/audio
|
|
3
|
+
ACCEPT_INCOMING = "callAcceptIncoming",// video/audio
|
|
4
|
+
ACCEPTED_OUTGOING = "callAcceptedOutgoing",// video/audio
|
|
5
|
+
ADD_PARTICIPANT = "callAddParticipant",
|
|
6
|
+
CALL_SPEC_ERROR = "callSpecError",// ошибки WebRTC
|
|
7
|
+
DECLINE_INCOMING = "callDeclineIncoming",
|
|
8
|
+
DEVICE_CHANGED = "callDeviceChanged",// смена камеры video/audio/screen
|
|
9
|
+
DEVICES = "callDevices",// залогировать количество %d_%d
|
|
10
|
+
ERROR = "callError",
|
|
11
|
+
HANGUP = "callHangup",
|
|
12
|
+
ICE_CONNECTION_STATE = "callIceConnectionState",// state
|
|
13
|
+
ICE_CONNECTION_TYPE = "callIceConnectionType",// type
|
|
14
|
+
ICE_RESTART = "callIceRestart",// без параметров
|
|
15
|
+
JOIN_CONVERSATION = "callJoinConversation",// video/audio
|
|
16
|
+
MEDIA_STATUS = "callMediaStatus",// изменение video_1, audio_0
|
|
17
|
+
OUTGOING_CALL = "callStart",// video/audio
|
|
18
|
+
OUTGOING_MULTIPARTY_CALL = "callStartMultiparty",// video/audio
|
|
19
|
+
PAT_ALLOCATED = "patAllocate",
|
|
20
|
+
PAT_DEALLOCATED = "patDeallocate",
|
|
21
|
+
PAT_ERROR = "patError",
|
|
22
|
+
PAT_OUTDATED_RESPONSE = "patOutdatedResponse",
|
|
23
|
+
PAT_WAITING_TIME_ERROR = "patWaitingTimeError",
|
|
24
|
+
POOR_CONNECTION = "callPoorConnection",// video / audio
|
|
25
|
+
PUSH = "callPush",// busy / rejected / accepted
|
|
26
|
+
RECONNECT = "callReconnect",// measure
|
|
27
|
+
RELAY_POLICY = "callForceRelay",// 1 / 0
|
|
28
|
+
REMOVE_PARTICIPANT = "callRemoveParticipant",
|
|
29
|
+
SOCKET_ACTION = "callSocketAction",
|
|
30
|
+
TOPOLOGY_CHANGE_REQUESTED = "callTopologyChangeRequested"
|
|
31
|
+
}
|
|
32
|
+
export default StatLog;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vkontakte/calls-sdk",
|
|
3
|
-
"version": "2.8.6-dev.
|
|
3
|
+
"version": "2.8.6-dev.164b8e60.0",
|
|
4
4
|
"author": "vk.com",
|
|
5
5
|
"description": "Library for video calls based on the vk.com platform",
|
|
6
6
|
"homepage": "https://vk.com",
|
|
@@ -14,8 +14,6 @@
|
|
|
14
14
|
"**/*.d.ts"
|
|
15
15
|
],
|
|
16
16
|
"dependencies": {
|
|
17
|
-
"@fails-components/webtransport": "^1.3.0",
|
|
18
|
-
"@fails-components/webtransport-transport-http3-quiche": "^1.3.0",
|
|
19
17
|
"@vkontakte/calls-audio-effects": "1.2.8",
|
|
20
18
|
"@vkontakte/calls-video-effects": "2.2.3-beta.5",
|
|
21
19
|
"@vkontakte/calls-vmoji": "1.0.10-beta.17",
|
package/static/ApiTransport.d.ts
CHANGED
|
@@ -6,5 +6,5 @@ export declare function sendBeakon(method: string, params?: {
|
|
|
6
6
|
}, noSession?: boolean): Promise<void>;
|
|
7
7
|
export declare function request(method: string, params?: {
|
|
8
8
|
[key: string]: any;
|
|
9
|
-
}, noSession?: boolean, customEndpoint?: string): Promise<
|
|
9
|
+
}, noSession?: boolean, customEndpoint?: string): Promise<any>;
|
|
10
10
|
export declare function sendFormData(url: string, data: FormData): Promise<void>;
|
package/static/External.d.ts
CHANGED
|
@@ -22,6 +22,7 @@ import { IRoomId, Room, RoomParticipantUpdate, Rooms, RoomsUpdate } from '../typ
|
|
|
22
22
|
import { VmojiError } from '../types/Vmoji';
|
|
23
23
|
import { DebugMessageType } from './Debug';
|
|
24
24
|
import { JSONObject } from './Json';
|
|
25
|
+
import { ParticipantCapabilities } from './SignalingCapabilities';
|
|
25
26
|
/**
|
|
26
27
|
* Статус собеседника
|
|
27
28
|
*/
|
|
@@ -224,9 +225,10 @@ declare namespace External {
|
|
|
224
225
|
*
|
|
225
226
|
* @param userId
|
|
226
227
|
* @param markers
|
|
228
|
+
* @param capabilities
|
|
227
229
|
*/
|
|
228
|
-
function onParticipantJoined(userId: ExternalId, markers: ExternalParticipantListMarkers | null): void;
|
|
229
|
-
function onLocalParticipantState(participantState: ParticipantStateMapped): void;
|
|
230
|
+
function onParticipantJoined(userId: ExternalId, markers: ExternalParticipantListMarkers | null, capabilities: ParticipantCapabilities): void;
|
|
231
|
+
function onLocalParticipantState(participantState: ParticipantStateMapped, global?: boolean): void;
|
|
230
232
|
/**
|
|
231
233
|
* Изменились данные состояний собеседника
|
|
232
234
|
*
|
|
@@ -342,8 +344,9 @@ declare namespace External {
|
|
|
342
344
|
/**
|
|
343
345
|
* Исходящий звонок был принят кем-то
|
|
344
346
|
* @param userId
|
|
347
|
+
* @param capabilities
|
|
345
348
|
*/
|
|
346
|
-
function onAcceptedCall(userId: ExternalId): void;
|
|
349
|
+
function onAcceptedCall(userId: ExternalId, capabilities: ParticipantCapabilities): void;
|
|
347
350
|
function onRateNeeded(): void;
|
|
348
351
|
/**
|
|
349
352
|
* Изменился говорящий в звонке
|
|
@@ -420,7 +423,7 @@ declare namespace External {
|
|
|
420
423
|
* Закончена запись звонка
|
|
421
424
|
* @param roomId ID зала в котором остановлена запись
|
|
422
425
|
*/
|
|
423
|
-
function onRecordStopped(roomId
|
|
426
|
+
function onRecordStopped(roomId: number | null | undefined, stopBy: ExternalParticipantId | null): void;
|
|
424
427
|
/**
|
|
425
428
|
* Состояние своей сети
|
|
426
429
|
*
|
package/static/Params.d.ts
CHANGED
|
@@ -27,6 +27,7 @@ import { VmojiError } from '../types/Vmoji';
|
|
|
27
27
|
import { DebugMessageType } from './Debug';
|
|
28
28
|
import { ParticipantStatus } from './External';
|
|
29
29
|
import { JSONObject } from './Json';
|
|
30
|
+
import { ParticipantCapabilities } from './SignalingCapabilities';
|
|
30
31
|
import { FacingMode } from './WebRTCUtils';
|
|
31
32
|
/**
|
|
32
33
|
* Параметры инициализации
|
|
@@ -359,6 +360,10 @@ export type ParamsObject = {
|
|
|
359
360
|
* _По умолчанию: `false`_
|
|
360
361
|
*/
|
|
361
362
|
useChatRooms: boolean;
|
|
363
|
+
/**
|
|
364
|
+
* Включить поддержку добавления участника в разговор
|
|
365
|
+
*/
|
|
366
|
+
addParticipant: boolean;
|
|
362
367
|
/**
|
|
363
368
|
* Индекс участника для первого chunk'а который придет при установке соединения с сервером
|
|
364
369
|
*
|
|
@@ -595,12 +600,15 @@ export type ParamsObject = {
|
|
|
595
600
|
/**
|
|
596
601
|
* Участник присоединился к звонку
|
|
597
602
|
*/
|
|
598
|
-
onParticipantJoined?: (userId: ExternalParticipantId, markers: ExternalParticipantListMarkers) => void;
|
|
603
|
+
onParticipantJoined?: (userId: ExternalParticipantId, markers: ExternalParticipantListMarkers, capabilities: ParticipantCapabilities) => void;
|
|
599
604
|
/**
|
|
600
605
|
* Получены данные по изменению локальных состояний со стороны админа
|
|
601
606
|
* Например, принудительно опущена рука
|
|
607
|
+
*
|
|
608
|
+
* @param participantState Полный объект состояния участника, полученный от SDK/сервера.
|
|
609
|
+
* @param global `true` – действие глобальное (для всех участников), `false` – действие локальное (только у текущего пользователя).
|
|
602
610
|
*/
|
|
603
|
-
onLocalParticipantState?: (participantState: ParticipantStateMapped) => void;
|
|
611
|
+
onLocalParticipantState?: (participantState: ParticipantStateMapped, global: boolean) => void;
|
|
604
612
|
/**
|
|
605
613
|
* Изменились данные состояний собеседника
|
|
606
614
|
*/
|
|
@@ -686,7 +694,7 @@ export type ParamsObject = {
|
|
|
686
694
|
* Исходящий звонок был принят кем-то
|
|
687
695
|
* @param userId
|
|
688
696
|
*/
|
|
689
|
-
onAcceptedCall?: (userId: ExternalParticipantId) => void;
|
|
697
|
+
onAcceptedCall?: (userId: ExternalParticipantId, capabilities: ParticipantCapabilities) => void;
|
|
690
698
|
/**
|
|
691
699
|
* Список устройств изменился
|
|
692
700
|
*/
|
|
@@ -715,7 +723,7 @@ export type ParamsObject = {
|
|
|
715
723
|
/**
|
|
716
724
|
* Закончена трансляция/запись звонка
|
|
717
725
|
*/
|
|
718
|
-
onRecordStopped?: (roomId: number | null) => void;
|
|
726
|
+
onRecordStopped?: (roomId: number | null, stopBy: ExternalParticipantId | null) => void;
|
|
719
727
|
/**
|
|
720
728
|
* Состояние своей сети
|
|
721
729
|
*
|
|
@@ -977,6 +985,7 @@ export default abstract class Params {
|
|
|
977
985
|
static get useParticipantListChunk(): boolean;
|
|
978
986
|
static get useRooms(): boolean;
|
|
979
987
|
static get useChatRooms(): boolean;
|
|
988
|
+
static get addParticipant(): boolean;
|
|
980
989
|
static get participantListChunkInitIndex(): number;
|
|
981
990
|
static get participantListChunkInitCount(): number | null;
|
|
982
991
|
static get serverAudioRed(): boolean;
|
|
@@ -1011,6 +1020,7 @@ export default abstract class Params {
|
|
|
1011
1020
|
useParticipantListChunk: boolean;
|
|
1012
1021
|
useRooms: boolean;
|
|
1013
1022
|
useChatRooms: boolean;
|
|
1023
|
+
addParticipant: boolean;
|
|
1014
1024
|
fastScreenShare: boolean;
|
|
1015
1025
|
participantListChunkInitCount: number | null;
|
|
1016
1026
|
screenShareCongestionControl: boolean;
|