@vkontakte/calls-sdk 2.8.11-dev.4fa379f4.0 → 2.8.11-dev.54a3a1c9.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 +52 -15
- package/abstract/BaseApi.d.ts +2 -3
- package/abstract/BaseSignaling.d.ts +2 -3
- package/calls-sdk.cjs.js +9 -9
- package/calls-sdk.esm.js +5994 -5236
- package/classes/AudioFix.d.ts +5 -1
- package/classes/AudioOutput.d.ts +5 -1
- package/classes/CallRegistry.d.ts +5 -1
- package/classes/Conversation.d.ts +21 -4
- package/classes/ConversationResponseValidator.d.ts +3 -0
- package/classes/DebugInfo.d.ts +3 -0
- package/classes/DisplayLayoutRequester.d.ts +39 -0
- package/classes/ExternalIdCache.d.ts +19 -0
- package/classes/MediaSource.d.ts +6 -2
- 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 +10 -1
- package/classes/{Logger.d.ts → StatsLogger.d.ts} +3 -10
- 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 +7 -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 +6 -2
- 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 +12 -1
- package/classes/transport/PerfStatReporter.d.ts +5 -1
- package/classes/transport/ServerTransport.d.ts +10 -2
- package/classes/transport/Transport.d.ts +16 -16
- package/default/Api.d.ts +8 -11
- package/default/Signaling.d.ts +39 -45
- package/default/SignalingTransport.d.ts +68 -0
- package/enums/HangupType.d.ts +2 -1
- package/enums/TransportState.d.ts +10 -0
- package/enums/TransportTopology.d.ts +5 -0
- package/package.json +2 -2
- package/static/Debug.d.ts +27 -8
- package/static/External.d.ts +12 -12
- package/static/Params.d.ts +36 -10
- 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/Participant.d.ts +1 -0
- package/types/ParticipantLayout.d.ts +33 -0
- package/types/SignalingMessage.d.ts +3 -1
- package/types/Statistics.d.ts +1 -1
- package/types/WebTransport.d.ts +4 -0
- package/utils/DebugStorage.d.ts +100 -1
- package/classes/stat/EventMetricsService.d.ts +0 -9
- package/static/ConversationDebugLogger.d.ts +0 -13
package/CallsSDK.d.ts
CHANGED
|
@@ -2,14 +2,14 @@
|
|
|
2
2
|
* CallsSDK
|
|
3
3
|
*/
|
|
4
4
|
import type { IEffect, VideoEffects } from '@vkontakte/calls-video-effects';
|
|
5
|
-
import type { EffectVoiceChange } from '@vkontakte/calls-audio-effects';
|
|
5
|
+
import type { EffectVoiceChange, VadControllerOptions, VadLib } 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
9
|
import HangupReason, { HangupReasonData, CustomError } from './classes/HangupReason';
|
|
10
10
|
import { MediaTrackKind } from './classes/MediaSource';
|
|
11
11
|
import { AudienceModeHandsResponse } from './types/AudienceMode';
|
|
12
|
-
import
|
|
12
|
+
import TransportTopology from './enums/TransportTopology';
|
|
13
13
|
import Api from './default/Api';
|
|
14
14
|
import Signaling from './default/Signaling';
|
|
15
15
|
import CallDirection from './enums/CallDirection';
|
|
@@ -30,6 +30,7 @@ import SignalingNotification from './enums/SignalingNotification';
|
|
|
30
30
|
import UserRole from './enums/UserRole';
|
|
31
31
|
import UserType from './enums/UserType';
|
|
32
32
|
import { DebugMessageType } from './static/Debug';
|
|
33
|
+
import * as DebugStorage from './utils/DebugStorage';
|
|
33
34
|
import { ParticipantStatus } from './static/External';
|
|
34
35
|
import { JSONArray, JSONObject, JSONType } from './static/Json';
|
|
35
36
|
import { ParamsObject } from './static/Params';
|
|
@@ -49,7 +50,7 @@ import { IAddMovieParams, IMovieMetaData, IMoviePreview, IOnRemoteMovieData, ISh
|
|
|
49
50
|
import MuteStates, { IMuteParticipantInternalParams, IMuteParticipantParams } from './types/MuteStates';
|
|
50
51
|
import { IAPIBaseUrl, IApiEnv } from './types/Params';
|
|
51
52
|
import { CompositeUserId, IGetParticipantsParameters, OkUserId, ParticipantId, ParticipantListMarker, ParticipantListMarkers, ParticipantListType, ParticipantsStateList, ParticipantStateMapped, ParticipantStateData, ParticipantStateDataKey, ParticipantStateDataValue } from './types/Participant';
|
|
52
|
-
import ParticipantLayout, { Layout, RequestKeyFrame, StopStream } from './types/ParticipantLayout';
|
|
53
|
+
import ParticipantLayout, { DisplayLayoutRequest, Layout, RequestKeyFrame, StopStream } from './types/ParticipantLayout';
|
|
53
54
|
import { ParticipantListChunkParameters } from './types/ParticipantListChunk';
|
|
54
55
|
import ParticipantPriority from './types/ParticipantPriority';
|
|
55
56
|
import { MediaType, ParticipantStreamDescription } from './types/ParticipantStreamDescription';
|
|
@@ -66,6 +67,7 @@ import { VmojiError } from './types/Vmoji';
|
|
|
66
67
|
import { VolumeDetector } from './classes/VolumeDetector';
|
|
67
68
|
import { FastStartHandler, FastStartParams } from './types/FastStart';
|
|
68
69
|
import { FastJoinHandler, FastJoinParams, FastJoinResponse } from './types/FastJoin';
|
|
70
|
+
export type { CurrentLogItem, DebugLogGetParams, DebugLogSessionInfo, DebugLogStorageStats } from './utils/DebugStorage';
|
|
69
71
|
/**
|
|
70
72
|
* Информация о текущем браузере
|
|
71
73
|
*/
|
|
@@ -209,6 +211,13 @@ export declare function setVideoEffects(effects: VideoEffects): void;
|
|
|
209
211
|
* @param effects Экземпляр класса `EffectVoiceChange` из `@vkontakte/calls-audio-effects`
|
|
210
212
|
*/
|
|
211
213
|
export declare function setAudioEffects(effects: EffectVoiceChange): void;
|
|
214
|
+
/**
|
|
215
|
+
* Устанавливает поддержку VAD
|
|
216
|
+
*
|
|
217
|
+
* @param vad принимает VadController из `@vkontakte/calls-audio-effects`
|
|
218
|
+
* @param options принимает VadControllerOptions из `@vkontakte/calls-audio-effects`
|
|
219
|
+
*/
|
|
220
|
+
export declare function setVad(vad: VadLib, options?: VadControllerOptions): void;
|
|
212
221
|
/**
|
|
213
222
|
* Устанавливает библиотеку вимоджи
|
|
214
223
|
*
|
|
@@ -404,6 +413,12 @@ export declare function putHandsDown(): Promise<void>;
|
|
|
404
413
|
* @param layout Список приоритетов
|
|
405
414
|
*/
|
|
406
415
|
export declare function updateDisplayLayout(layout: ParticipantLayout[]): Promise<void>;
|
|
416
|
+
/**
|
|
417
|
+
* Запрашивает стримы, которые клиент хочет получать для отображения.
|
|
418
|
+
*
|
|
419
|
+
* @param requests Полный список стримов, которые должны приходить на клиент
|
|
420
|
+
*/
|
|
421
|
+
export declare function requestDisplayLayout(requests: DisplayLayoutRequest[]): Promise<void>;
|
|
407
422
|
/**
|
|
408
423
|
* Выдать или забрать роли в звонке пользователю
|
|
409
424
|
*
|
|
@@ -555,16 +570,6 @@ export declare function stopStream(roomId?: number | null, remove?: boolean): Pr
|
|
|
555
570
|
* @param roomId
|
|
556
571
|
*/
|
|
557
572
|
export declare function publishStream(roomId?: number | null): Promise<undefined>;
|
|
558
|
-
/**
|
|
559
|
-
* Устанавливает роль участника в запись звонка
|
|
560
|
-
* Если хотя бы у одного участника звонка выставлена роль, то в записи звонка будут
|
|
561
|
-
* видны только те участники, у кого есть роль.
|
|
562
|
-
* @param king участник показывается крупно в записи звонка (только один участник имеет такую роль)
|
|
563
|
-
* @param pawns участник показывается в записи звонка
|
|
564
|
-
* @param hideParticipantCount скрыть/показать количество невидимых участников
|
|
565
|
-
* @param roomId комната
|
|
566
|
-
*/
|
|
567
|
-
export declare function recordSetConf(king?: ExternalId, pawns?: ExternalId[], hideParticipantCount?: boolean, roomId?: number | null): Promise<void>;
|
|
568
573
|
/**
|
|
569
574
|
* Получить информацию о трансляции звонка
|
|
570
575
|
*/
|
|
@@ -635,6 +640,38 @@ export declare function debug(enabled: boolean): void;
|
|
|
635
640
|
* @param args
|
|
636
641
|
*/
|
|
637
642
|
export declare function debugMessage(type: DebugMessageType, ...args: any[]): void;
|
|
643
|
+
/**
|
|
644
|
+
* Локальные отладочные логи, сохраненные в браузере.
|
|
645
|
+
*
|
|
646
|
+
* Работает при включенном параметре `debugLog: true`.
|
|
647
|
+
* Логи хранятся в IndexedDB: последние 10 звонков, максимум 25 МБ суммарно.
|
|
648
|
+
*/
|
|
649
|
+
export declare const debugLogs: {
|
|
650
|
+
/**
|
|
651
|
+
* Возвращает список сохраненных локальных сессий логирования.
|
|
652
|
+
*/
|
|
653
|
+
list: typeof DebugStorage.list;
|
|
654
|
+
/**
|
|
655
|
+
* Возвращает логи конкретного звонка вместе с глобальным контекстом SDK.
|
|
656
|
+
*/
|
|
657
|
+
get: typeof DebugStorage.get;
|
|
658
|
+
/**
|
|
659
|
+
* Возвращает логи конкретного звонка вместе с глобальным контекстом SDK JSON-строкой.
|
|
660
|
+
*/
|
|
661
|
+
getJson: typeof DebugStorage.getJson;
|
|
662
|
+
/**
|
|
663
|
+
* Скачивает логи конкретного звонка вместе с глобальным контекстом SDK JSON-файлом.
|
|
664
|
+
*/
|
|
665
|
+
download: typeof DebugStorage.download;
|
|
666
|
+
/**
|
|
667
|
+
* Очищает логи конкретного звонка или все локальные логи SDK.
|
|
668
|
+
*/
|
|
669
|
+
clear: typeof DebugStorage.clear;
|
|
670
|
+
/**
|
|
671
|
+
* Возвращает статистику локального хранилища логов.
|
|
672
|
+
*/
|
|
673
|
+
stats: typeof DebugStorage.stats;
|
|
674
|
+
};
|
|
638
675
|
/**
|
|
639
676
|
* Отправляет клиенские логи по conversationId на сервер OK
|
|
640
677
|
* @example можно посмотреть в examples/anonym/index.html
|
|
@@ -721,7 +758,7 @@ export declare function userFeedbackStats(userResponse: number, reason?: string,
|
|
|
721
758
|
* @param immediatelty Отправить ли событие немедленно
|
|
722
759
|
*/
|
|
723
760
|
export declare function logClientEvent(eventType: string, eventData?: Record<string, string | number | boolean>, immediately?: boolean): void;
|
|
724
|
-
export declare function enableFeatureForRoles(feature: ConversationFeature, roles: UserRole[]): Promise<void>;
|
|
761
|
+
export declare function enableFeatureForRoles(feature: ConversationFeature, roles: UserRole[], conversationId?: string): Promise<void>;
|
|
725
762
|
/**
|
|
726
763
|
* Удаляет записи истории звонков
|
|
727
764
|
*
|
|
@@ -757,5 +794,5 @@ export declare function getSyncedTime(): number;
|
|
|
757
794
|
* Версия SDK
|
|
758
795
|
*/
|
|
759
796
|
export declare function version(): string;
|
|
760
|
-
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, };
|
|
797
|
+
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, };
|
|
761
798
|
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
|
@@ -44,7 +44,7 @@ export default abstract class BaseApi {
|
|
|
44
44
|
audioOnly?: boolean;
|
|
45
45
|
waitForAdmin?: boolean;
|
|
46
46
|
closedConversation?: boolean;
|
|
47
|
-
}, speakerIds?:
|
|
47
|
+
}, speakerIds?: ExternalId[]): Promise<ConversationResponse>;
|
|
48
48
|
abstract startConversation(conversationId: string, ids?: OkUserId[], type?: CallType, isVideo?: boolean, payload?: string, joiningAllowed?: boolean, requireAuthToJoin?: boolean, createConversationParameters?: {
|
|
49
49
|
onlyAdminCanShareMovie?: boolean;
|
|
50
50
|
}, externalIds?: ExternalId[]): Promise<ConversationResponse>;
|
|
@@ -73,10 +73,9 @@ export default abstract class BaseApi {
|
|
|
73
73
|
*/
|
|
74
74
|
logClientEvents(items: ClientEvent[]): void;
|
|
75
75
|
abstract uploadDebugLogs(conversationId: string, startTime: number, endTime: number, log: string): Promise<void>;
|
|
76
|
-
abstract getOkIdsByExternalIds(externalIds: ExternalId[]): Promise<OkUserId[]>;
|
|
77
|
-
abstract getParticipantIdsByExternalIds(externalIds: ExternalId[]): Promise<Map<ExternalId, ParticipantId>>;
|
|
78
76
|
abstract getExternalIdsByOkIds(uids: OkUserId[]): Promise<ExternalParticipantId[]>;
|
|
79
77
|
getCachedOkIdByExternalId(externalId: ExternalId): ParticipantId | null;
|
|
78
|
+
getCachedRawOkIdByExternalId(externalId: ExternalId): OkUserId | null;
|
|
80
79
|
cacheExternalId(compositeId: OkUserId | CompositeUserId | ParticipantId, externalId: ExternalParticipantId): void;
|
|
81
80
|
mapDecorativeId(decorativeId: OkUserId | CompositeUserId | ParticipantId, okId: OkUserId | CompositeUserId): void;
|
|
82
81
|
unmapDecorativeId(decorativeId: OkUserId | CompositeUserId | ParticipantId): void;
|
|
@@ -4,7 +4,7 @@ import { TCapabilities } from '../types/Capabilities';
|
|
|
4
4
|
import { StreamDescriptionString } from '../types/ParticipantStreamDescription';
|
|
5
5
|
import { PerfStatReport } from '../types/PerfStatReporter';
|
|
6
6
|
import { NetworkStatReport } from '../types/NetworkStatReport';
|
|
7
|
-
import
|
|
7
|
+
import TransportTopology from '../enums/TransportTopology';
|
|
8
8
|
import ConversationFeature from '../enums/ConversationFeature';
|
|
9
9
|
import ConversationOption from '../enums/ConversationOption';
|
|
10
10
|
import MediaOption from '../enums/MediaOption';
|
|
@@ -22,7 +22,7 @@ import { ParticipantLayout, RequestKeyFrame, StopStream } from '../types/Partici
|
|
|
22
22
|
import { ParticipantListChunkParameters } from '../types/ParticipantListChunk';
|
|
23
23
|
import SignalingMessage, { GetParticipantsSignalingResponse, GetRoomsSignalingResponse } from '../types/SignalingMessage';
|
|
24
24
|
import { ChangeSimulcast } from '../types/ChangeSimulcast';
|
|
25
|
-
import { IPublishStreamData,
|
|
25
|
+
import { IPublishStreamData, IStartStreamData, IStopStreamData } from '../types/Streams';
|
|
26
26
|
import { SharingStatReport } from '../classes/screenshare/SharingStatReport';
|
|
27
27
|
/**
|
|
28
28
|
* Параметры добавления пользователя в звонок
|
|
@@ -91,7 +91,6 @@ export default abstract class BaseSignaling extends EventEmitter {
|
|
|
91
91
|
abstract startStream(data: IStartStreamData): Promise<SignalingMessage>;
|
|
92
92
|
abstract stopStream(data: IStopStreamData): Promise<SignalingMessage>;
|
|
93
93
|
abstract publishStream(data: IPublishStreamData): Promise<SignalingMessage>;
|
|
94
|
-
abstract recordSetConf(conf: IRecordConfData): Promise<SignalingMessage>;
|
|
95
94
|
abstract getRecordStatus(): Promise<SignalingMessage>;
|
|
96
95
|
abstract switchTopology(topology: TransportTopology, force?: boolean): Promise<SignalingMessage>;
|
|
97
96
|
abstract reportPerfStat(report: PerfStatReport): Promise<SignalingMessage>;
|