@vkontakte/calls-sdk 2.8.11-dev.882b025a.0 → 2.8.11-dev.8e365e39.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 +57 -15
- package/abstract/BaseApi.d.ts +1 -1
- package/abstract/BaseSignaling.d.ts +5 -4
- package/calls-sdk.cjs.js +16 -13
- package/calls-sdk.esm.js +11564 -13
- package/classes/AudioFix.d.ts +5 -1
- package/classes/AudioOutput.d.ts +5 -1
- package/classes/Conversation.d.ts +14 -10
- package/classes/DebugInfo.d.ts +3 -0
- package/classes/DisplayLayoutRequester.d.ts +39 -0
- package/classes/MediaSource.d.ts +5 -8
- package/classes/ParticipantIdRegistry.d.ts +3 -0
- package/classes/ProducerCommandSerializationService.d.ts +3 -0
- package/classes/SignalingActor.d.ts +3 -6
- package/classes/SpeakerDetector.d.ts +2 -1
- package/classes/SpecListener.d.ts +5 -1
- package/classes/StatsLogger.d.ts +29 -0
- package/classes/VideoEffectsFpsLimiter.d.ts +3 -0
- package/classes/asr/AsrReceiver.d.ts +3 -1
- package/classes/codec/LibVPxDecoder.d.ts +3 -0
- package/classes/codec/LibVPxEncoder.d.ts +3 -1
- package/classes/codec/WebCodecsDecoder.d.ts +3 -0
- package/classes/codec/WebCodecsEncoder.d.ts +3 -1
- package/classes/codec/WorkerBase.d.ts +5 -0
- package/classes/screenshare/BaseStreamBuilder.d.ts +4 -1
- package/classes/screenshare/CanvasRenderer.d.ts +3 -1
- package/classes/screenshare/ScreenCaptureReceiver.d.ts +7 -1
- package/classes/screenshare/ScreenCaptureSender.d.ts +5 -1
- package/classes/screenshare/ScreenCongestionControl.d.ts +3 -1
- package/classes/screenshare/StreamBuilder.d.ts +5 -1
- package/classes/screenshare/TrackGeneratorRenderer.d.ts +3 -1
- package/classes/screenshare/WebmBuilder.d.ts +3 -1
- package/classes/stat/CodecStatsAggregator.d.ts +7 -7
- package/classes/stat/ConversationStats.d.ts +21 -0
- package/classes/stat/StatAggregator.d.ts +6 -6
- package/classes/stat/StatFirstMediaReceived.d.ts +4 -1
- package/classes/stat/StatPings.d.ts +9 -9
- package/classes/stat/StatScreenShareFirstFrame.d.ts +3 -1
- package/classes/stat/StatSignalingCommands.d.ts +8 -8
- package/classes/transport/BaseTransport.d.ts +1 -1
- package/classes/transport/DirectStatReporter.d.ts +3 -1
- package/classes/transport/DirectTransport.d.ts +9 -1
- package/classes/transport/PerfStatReporter.d.ts +5 -1
- package/classes/transport/ServerTransport.d.ts +10 -2
- package/classes/transport/Transport.d.ts +11 -14
- package/default/Signaling.d.ts +14 -2
- package/enums/TransportState.d.ts +10 -0
- package/enums/TransportTopology.d.ts +5 -0
- package/package.json +1 -1
- package/static/Debug.d.ts +27 -8
- package/static/External.d.ts +17 -38
- package/static/Params.d.ts +28 -22
- package/static/Utils.d.ts +3 -2
- package/static/WebRTCUtils.d.ts +6 -4
- package/types/Conversation.d.ts +1 -1
- package/types/FastStart.d.ts +1 -0
- package/types/ParticipantLayout.d.ts +33 -0
- package/types/PerfStatReporter.d.ts +2 -1
- package/types/SignalingMessage.d.ts +4 -1
- package/types/Statistics.d.ts +1 -1
- package/types/WebTransport.d.ts +1 -0
- package/utils/DebugStorage.d.ts +100 -1
- package/classes/CallRegistry.d.ts +0 -20
- package/classes/Logger.d.ts +0 -36
- package/classes/stat/EventMetricsService.d.ts +0 -9
- package/static/Capabilities.d.ts +0 -5
- package/static/ConversationDebugLogger.d.ts +0 -13
- package/types/Capabilities.d.ts +0 -24
package/CallsSDK.d.ts
CHANGED
|
@@ -6,11 +6,10 @@ import type { EffectVoiceChange } from '@vkontakte/calls-audio-effects';
|
|
|
6
6
|
import type * as Vmoji from '@vkontakte/calls-vmoji';
|
|
7
7
|
import BaseLogger from './abstract/BaseLogger';
|
|
8
8
|
import { AddParticipantParams } from './abstract/BaseSignaling';
|
|
9
|
-
import Conversation from './classes/Conversation';
|
|
10
9
|
import HangupReason, { HangupReasonData, CustomError } from './classes/HangupReason';
|
|
11
10
|
import { MediaTrackKind } from './classes/MediaSource';
|
|
12
11
|
import { AudienceModeHandsResponse } from './types/AudienceMode';
|
|
13
|
-
import
|
|
12
|
+
import TransportTopology from './enums/TransportTopology';
|
|
14
13
|
import Api from './default/Api';
|
|
15
14
|
import Signaling from './default/Signaling';
|
|
16
15
|
import CallDirection from './enums/CallDirection';
|
|
@@ -31,6 +30,7 @@ import SignalingNotification from './enums/SignalingNotification';
|
|
|
31
30
|
import UserRole from './enums/UserRole';
|
|
32
31
|
import UserType from './enums/UserType';
|
|
33
32
|
import { DebugMessageType } from './static/Debug';
|
|
33
|
+
import * as DebugStorage from './utils/DebugStorage';
|
|
34
34
|
import { ParticipantStatus } from './static/External';
|
|
35
35
|
import { JSONArray, JSONObject, JSONType } from './static/Json';
|
|
36
36
|
import { ParamsObject } from './static/Params';
|
|
@@ -50,7 +50,7 @@ import { IAddMovieParams, IMovieMetaData, IMoviePreview, IOnRemoteMovieData, ISh
|
|
|
50
50
|
import MuteStates, { IMuteParticipantInternalParams, IMuteParticipantParams } from './types/MuteStates';
|
|
51
51
|
import { IAPIBaseUrl, IApiEnv } from './types/Params';
|
|
52
52
|
import { CompositeUserId, IGetParticipantsParameters, OkUserId, ParticipantId, ParticipantListMarker, ParticipantListMarkers, ParticipantListType, ParticipantsStateList, ParticipantStateMapped, ParticipantStateData, ParticipantStateDataKey, ParticipantStateDataValue } from './types/Participant';
|
|
53
|
-
import ParticipantLayout, { Layout, RequestKeyFrame, StopStream } from './types/ParticipantLayout';
|
|
53
|
+
import ParticipantLayout, { DisplayLayoutRequest, Layout, RequestKeyFrame, StopStream } from './types/ParticipantLayout';
|
|
54
54
|
import { ParticipantListChunkParameters } from './types/ParticipantListChunk';
|
|
55
55
|
import ParticipantPriority from './types/ParticipantPriority';
|
|
56
56
|
import { MediaType, ParticipantStreamDescription } from './types/ParticipantStreamDescription';
|
|
@@ -67,6 +67,7 @@ import { VmojiError } from './types/Vmoji';
|
|
|
67
67
|
import { VolumeDetector } from './classes/VolumeDetector';
|
|
68
68
|
import { FastStartHandler, FastStartParams } from './types/FastStart';
|
|
69
69
|
import { FastJoinHandler, FastJoinParams, FastJoinResponse } from './types/FastJoin';
|
|
70
|
+
export type { CurrentLogItem, DebugLogGetParams, DebugLogSessionInfo, DebugLogStorageStats } from './utils/DebugStorage';
|
|
70
71
|
/**
|
|
71
72
|
* Информация о текущем браузере
|
|
72
73
|
*/
|
|
@@ -266,11 +267,11 @@ export declare function authorize(authToken?: string, apiBaseUrl?: IAPIBaseUrl):
|
|
|
266
267
|
*
|
|
267
268
|
* @param mediaOptions Нужно ли включать камеру и микрофон
|
|
268
269
|
*/
|
|
269
|
-
export declare function acceptCall(mediaOptions?: MediaOption[]
|
|
270
|
+
export declare function acceptCall(mediaOptions?: MediaOption[]): Promise<ConversationData>;
|
|
270
271
|
/**
|
|
271
272
|
* Отклонить входящий звонок
|
|
272
273
|
*/
|
|
273
|
-
export declare function declineCall(
|
|
274
|
+
export declare function declineCall(): Promise<void>;
|
|
274
275
|
/**
|
|
275
276
|
* Присоединиться к активному звонку
|
|
276
277
|
*
|
|
@@ -293,7 +294,7 @@ export declare function joinCallByLink(joinLink: string, mediaOptions?: MediaOpt
|
|
|
293
294
|
/**
|
|
294
295
|
* Завершить текущий разговор
|
|
295
296
|
*/
|
|
296
|
-
export declare function hangup(
|
|
297
|
+
export declare function hangup(): Promise<void>;
|
|
297
298
|
/**
|
|
298
299
|
* Добавить собеседника в звонок
|
|
299
300
|
*
|
|
@@ -341,7 +342,7 @@ export declare function changeDevice(kind: MediaDeviceKind, deviceId: string): P
|
|
|
341
342
|
* state Включить или выключить захват экрана
|
|
342
343
|
* settings Параметры захваты экрана
|
|
343
344
|
*/
|
|
344
|
-
export declare function captureScreen(stateOrSettings: boolean | ScreenCaptureSettings
|
|
345
|
+
export declare function captureScreen(stateOrSettings: boolean | ScreenCaptureSettings): Promise<void>;
|
|
345
346
|
/**
|
|
346
347
|
* Включить/выключить передачу точек вимоджи
|
|
347
348
|
*
|
|
@@ -362,13 +363,13 @@ export declare function setVideoStream(stream: MediaStream, isScreen?: boolean):
|
|
|
362
363
|
*
|
|
363
364
|
* @param enabled
|
|
364
365
|
*/
|
|
365
|
-
export declare function toggleLocalVideo(enabled: boolean
|
|
366
|
+
export declare function toggleLocalVideo(enabled: boolean): Promise<void>;
|
|
366
367
|
/**
|
|
367
368
|
* Включить или выключить свой микрофон
|
|
368
369
|
*
|
|
369
370
|
* @param enabled
|
|
370
371
|
*/
|
|
371
|
-
export declare function toggleLocalAudio(enabled: boolean
|
|
372
|
+
export declare function toggleLocalAudio(enabled: boolean): Promise<void>;
|
|
372
373
|
/**
|
|
373
374
|
* Изменяет размеры локального видео
|
|
374
375
|
*
|
|
@@ -399,7 +400,7 @@ export declare function changeParticipantState(state: ParticipantStateData, exte
|
|
|
399
400
|
*
|
|
400
401
|
* @param hold - true/false
|
|
401
402
|
*/
|
|
402
|
-
export declare function hold(hold: boolean
|
|
403
|
+
export declare function hold(hold: boolean): Promise<void>;
|
|
403
404
|
/**
|
|
404
405
|
* Принудительно опустить руки участников в текущем сессионном зале админа
|
|
405
406
|
*/
|
|
@@ -411,6 +412,12 @@ export declare function putHandsDown(): Promise<void>;
|
|
|
411
412
|
* @param layout Список приоритетов
|
|
412
413
|
*/
|
|
413
414
|
export declare function updateDisplayLayout(layout: ParticipantLayout[]): Promise<void>;
|
|
415
|
+
/**
|
|
416
|
+
* Запрашивает стримы, которые клиент хочет получать для отображения.
|
|
417
|
+
*
|
|
418
|
+
* @param requests Полный список стримов, которые должны приходить на клиент
|
|
419
|
+
*/
|
|
420
|
+
export declare function requestDisplayLayout(requests: DisplayLayoutRequest[]): Promise<void>;
|
|
414
421
|
/**
|
|
415
422
|
* Выдать или забрать роли в звонке пользователю
|
|
416
423
|
*
|
|
@@ -642,6 +649,38 @@ export declare function debug(enabled: boolean): void;
|
|
|
642
649
|
* @param args
|
|
643
650
|
*/
|
|
644
651
|
export declare function debugMessage(type: DebugMessageType, ...args: any[]): void;
|
|
652
|
+
/**
|
|
653
|
+
* Локальные отладочные логи, сохраненные в браузере.
|
|
654
|
+
*
|
|
655
|
+
* Работает при включенном параметре `debugLog: true`.
|
|
656
|
+
* Логи хранятся в IndexedDB: последние 10 звонков, максимум 25 МБ суммарно.
|
|
657
|
+
*/
|
|
658
|
+
export declare const debugLogs: {
|
|
659
|
+
/**
|
|
660
|
+
* Возвращает список сохраненных локальных сессий логирования.
|
|
661
|
+
*/
|
|
662
|
+
list: typeof DebugStorage.list;
|
|
663
|
+
/**
|
|
664
|
+
* Возвращает логи конкретного звонка вместе с глобальным контекстом SDK.
|
|
665
|
+
*/
|
|
666
|
+
get: typeof DebugStorage.get;
|
|
667
|
+
/**
|
|
668
|
+
* Возвращает логи конкретного звонка вместе с глобальным контекстом SDK JSON-строкой.
|
|
669
|
+
*/
|
|
670
|
+
getJson: typeof DebugStorage.getJson;
|
|
671
|
+
/**
|
|
672
|
+
* Скачивает логи конкретного звонка вместе с глобальным контекстом SDK JSON-файлом.
|
|
673
|
+
*/
|
|
674
|
+
download: typeof DebugStorage.download;
|
|
675
|
+
/**
|
|
676
|
+
* Очищает логи конкретного звонка или все локальные логи SDK.
|
|
677
|
+
*/
|
|
678
|
+
clear: typeof DebugStorage.clear;
|
|
679
|
+
/**
|
|
680
|
+
* Возвращает статистику локального хранилища логов.
|
|
681
|
+
*/
|
|
682
|
+
stats: typeof DebugStorage.stats;
|
|
683
|
+
};
|
|
645
684
|
/**
|
|
646
685
|
* Отправляет клиенские логи по conversationId на сервер OK
|
|
647
686
|
* @example можно посмотреть в examples/anonym/index.html
|
|
@@ -750,14 +789,17 @@ export declare function requestAsr(request: boolean): Promise<void>;
|
|
|
750
789
|
export declare function startUrlSharing(sharedUrl: string): Promise<void>;
|
|
751
790
|
export declare function stopUrlSharing(): Promise<void>;
|
|
752
791
|
export declare function sendTestCommand(name: string, params?: any): void;
|
|
753
|
-
export declare function startAnalyzingAudio(expectAudio: boolean): void;
|
|
792
|
+
export declare function startAnalyzingAudio(expectAudio: boolean, expectedActiveTracks?: number | null, expectedTrackFrequencies?: number[] | null): void;
|
|
754
793
|
export declare function stopAnalyzingAudio(): void;
|
|
755
|
-
|
|
756
|
-
|
|
757
|
-
|
|
794
|
+
/**
|
|
795
|
+
* Возвращает текущее время, скорректированное на смещение относительно серверного времени.
|
|
796
|
+
* Доступно после установки соединения (начало/присоединение к звонку).
|
|
797
|
+
* Если активного звонка нет — возвращает Date.now().
|
|
798
|
+
*/
|
|
799
|
+
export declare function getSyncedTime(): number;
|
|
758
800
|
/**
|
|
759
801
|
* Версия SDK
|
|
760
802
|
*/
|
|
761
803
|
export declare function version(): string;
|
|
762
|
-
export type { AddParticipantParams, AudienceModeHandsResponse, BrowserName, CompositeUserId, ConversationData, ConversationParams, ConversationResponse, CustomError, ExternalId, ExternalParticipant, ExternalParticipantListChunk, ExternalParticipantListMarker, ExternalParticipantListMarkers as ExternalParticipantMarkers, ExternalParticipantId, GetParticipantsSignalingResponse, GetRoomsSignalingResponse, HangupReasonData, IApiEnv, IAPIBaseUrl, IAsrStartParams, IAsrStopParams, IAsrData, IceServer, JSONArray, JSONObject, JSONType, Layout, MediaModifiers, MediaSettings, MuteStates, OkUserId, ParamsObject, ParticipantId, ParticipantLayout, ParticipantListMarkers, ParticipantListType, ParticipantPriority, ParticipantsStateList, ParticipantStateData, ParticipantStateDataKey, ParticipantStateMapped, ParticipantStreamDescription, ParticipantListChunkParameters, ParticipantListMarker, RequestKeyFrame, Rooms, IGetParticipantsParameters, ScreenCaptureSettings, SignalingMessage, StatResult, StopStream, WaitingHallResponse, IMovieMetaData, IVideoDimentions, IFeedbackExternal, ISharedMovieInfo, ISharedMovieStoppedInfo, ISharedMovieState, ISharedMovieStateResponse, IAddMovieParams, IOnRemoteMovieData, IMoviePreview, IRoomId, Room, RoomsUpdate, RoomParticipantUpdate, IUpdateMovieData, IFeaturesPerRole, IMuteParticipantParams, IMuteParticipantInternalParams, IStartStreamData, IStopStreamData, IPublishStreamData, VmojiError, FastStartHandler, FastStartParams, FastJoinHandler, FastJoinParams, FastJoinResponse, };
|
|
804
|
+
export type { AddParticipantParams, AudienceModeHandsResponse, BrowserName, CompositeUserId, ConversationData, ConversationParams, ConversationResponse, CustomError, ExternalId, ExternalParticipant, ExternalParticipantListChunk, ExternalParticipantListMarker, ExternalParticipantListMarkers as ExternalParticipantMarkers, ExternalParticipantId, DisplayLayoutRequest, GetParticipantsSignalingResponse, GetRoomsSignalingResponse, HangupReasonData, IApiEnv, IAPIBaseUrl, IAsrStartParams, IAsrStopParams, IAsrData, IceServer, JSONArray, JSONObject, JSONType, Layout, MediaModifiers, MediaSettings, MuteStates, OkUserId, ParamsObject, ParticipantId, ParticipantLayout, ParticipantListMarkers, ParticipantListType, ParticipantPriority, ParticipantsStateList, ParticipantStateData, ParticipantStateDataKey, ParticipantStateMapped, ParticipantStreamDescription, ParticipantListChunkParameters, ParticipantListMarker, RequestKeyFrame, Rooms, IGetParticipantsParameters, ScreenCaptureSettings, SignalingMessage, StatResult, StopStream, WaitingHallResponse, IMovieMetaData, IVideoDimentions, IFeedbackExternal, ISharedMovieInfo, ISharedMovieStoppedInfo, ISharedMovieState, ISharedMovieStateResponse, IAddMovieParams, IOnRemoteMovieData, IMoviePreview, IRoomId, Room, RoomsUpdate, RoomParticipantUpdate, IUpdateMovieData, IFeaturesPerRole, IMuteParticipantParams, IMuteParticipantInternalParams, IStartStreamData, IStopStreamData, IPublishStreamData, VmojiError, FastStartHandler, FastStartParams, FastJoinHandler, FastJoinParams, FastJoinResponse, };
|
|
763
805
|
export { Api, AuthData, BaseLogger, CallDirection, CallType, ChatRoomEventType, ConversationOption, DebugMessageType, ExternalIdType, FacingMode, FatalError, HangupReason, HangupType, MediaOption, MediaTrackKind, MediaType, MuteState, ParticipantState, ParticipantStateDataValue, ParticipantStatus, RecordRole, Signaling, SignalingCommandType, SignalingConnectionType, SignalingNotification, UserRole, UserType, TransportTopology, RoomsEventType, ConversationFeature, ArrayDequeue, ApiExternal, VolumeDetector, };
|
package/abstract/BaseApi.d.ts
CHANGED
|
@@ -7,7 +7,7 @@ import { ExternalId, ExternalParticipantId, ExternalUserId } from '../types/Exte
|
|
|
7
7
|
import { CompositeUserId, OkUserId, ParticipantId } from '../types/Participant';
|
|
8
8
|
export type ClientStats = {
|
|
9
9
|
vcid: ConversationData['id'] | null;
|
|
10
|
-
[k: string]: string | number | null;
|
|
10
|
+
[k: string]: string | number | boolean | null;
|
|
11
11
|
};
|
|
12
12
|
export type ClientEvent = {
|
|
13
13
|
timestamp: number;
|
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
import EventEmitter from '../classes/EventEmitter';
|
|
2
2
|
import { ParticipantIdRegistry } from '../classes/ParticipantIdRegistry';
|
|
3
|
-
import { TCapabilities } from '../types/Capabilities';
|
|
4
3
|
import { StreamDescriptionString } from '../types/ParticipantStreamDescription';
|
|
5
4
|
import { PerfStatReport } from '../types/PerfStatReporter';
|
|
6
5
|
import { NetworkStatReport } from '../types/NetworkStatReport';
|
|
7
|
-
import
|
|
6
|
+
import TransportTopology from '../enums/TransportTopology';
|
|
8
7
|
import ConversationFeature from '../enums/ConversationFeature';
|
|
9
8
|
import ConversationOption from '../enums/ConversationOption';
|
|
10
9
|
import MediaOption from '../enums/MediaOption';
|
|
@@ -62,12 +61,14 @@ export default abstract class BaseSignaling extends EventEmitter {
|
|
|
62
61
|
abstract sendCandidate(participantId: ParticipantId, candidate: RTCIceCandidate): Promise<SignalingMessage>;
|
|
63
62
|
abstract changeMediaSettings(mediaSettings: MediaSettings): Promise<SignalingMessage>;
|
|
64
63
|
abstract changeParticipantState(state: ParticipantStateData, compositeUserId?: CompositeUserId): Promise<SignalingMessage>;
|
|
65
|
-
abstract hold(hold: boolean
|
|
64
|
+
abstract hold(hold: boolean): Promise<SignalingMessage>;
|
|
66
65
|
abstract putHandsDown(): Promise<SignalingMessage>;
|
|
67
66
|
abstract addParticipant(externalIds: CompositeUserId[], params?: AddParticipantParams): Promise<SignalingMessage>;
|
|
68
67
|
abstract addParticipantLegacy(participantIds: CompositeUserId[], params?: AddParticipantParams): Promise<SignalingMessage>;
|
|
69
68
|
abstract removeParticipant(participantId: CompositeUserId, ban?: boolean): Promise<SignalingMessage>;
|
|
70
|
-
abstract allocateConsumer(description: RTCSessionDescription | null, capabilities:
|
|
69
|
+
abstract allocateConsumer(description: RTCSessionDescription | null, capabilities: {
|
|
70
|
+
[key: string]: number | boolean | string;
|
|
71
|
+
}): Promise<SignalingMessage>;
|
|
71
72
|
abstract acceptProducer(description: RTCSessionDescriptionInit, ssrcs: string[], sessionId: string): Promise<SignalingMessage>;
|
|
72
73
|
/**
|
|
73
74
|
* @deprecated Use updateDisplayLayout instead
|