@vkontakte/calls-sdk 2.8.13-dev.89692622.0 → 2.8.13-dev.8cbff503.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 +43 -17
- package/abstract/BaseApi.d.ts +2 -2
- package/calls-sdk.cjs.js +7 -7
- package/calls-sdk.esm.js +3599 -2773
- package/classes/AudioOutput.d.ts +4 -3
- package/classes/CallRegistry.d.ts +22 -6
- package/classes/MediaSource.d.ts +10 -0
- package/classes/SignalingErrors.d.ts +6 -0
- package/classes/StatsLogger.d.ts +1 -1
- package/classes/conversation/Conversation.d.ts +30 -10
- package/classes/conversation/Conversation.testUtils.d.ts +4 -3
- package/classes/screenshare/ScreenCaptureSender.d.ts +2 -2
- package/classes/stat/BatteryStats.d.ts +25 -0
- package/classes/stat/CallLifecycleStats.d.ts +4 -1
- package/classes/stat/CallStatTail.d.ts +65 -0
- package/classes/stat/ClientResourceStats.d.ts +41 -0
- package/classes/stat/CodecStatsAggregator.d.ts +4 -1
- package/classes/stat/ConversationStats.d.ts +13 -8
- package/classes/stat/NetworkAdaptationStats.d.ts +35 -0
- package/classes/stat/PeerConnectionStats.d.ts +22 -0
- package/classes/stat/SdpStats.d.ts +2 -1
- package/classes/stat/Stat.testUtils.d.ts +17 -0
- package/classes/stat/StatAggregator.d.ts +3 -1
- package/classes/stat/StatDrainScheduler.d.ts +34 -13
- package/classes/stat/StatEventCollector.d.ts +7 -12
- package/classes/stat/StatPings.d.ts +5 -1
- package/classes/stat/StatQueue.d.ts +42 -3
- package/classes/stat/StatSignalingCommands.d.ts +3 -1
- package/classes/transport/BaseTransport.d.ts +3 -3
- package/classes/transport/DirectStatReporter.d.ts +2 -2
- package/classes/transport/DirectTransport.d.ts +8 -2
- package/classes/transport/PerfStatReporter.d.ts +9 -3
- package/classes/transport/ServerTransport.d.ts +5 -2
- package/classes/transport/SimulcastSender.d.ts +2 -2
- package/classes/transport/Statistics.d.ts +2 -2
- package/classes/transport/Transport.d.ts +5 -5
- package/default/Api.d.ts +4 -1
- package/default/Signaling.d.ts +11 -17
- package/default/SignalingSession.d.ts +92 -0
- package/enums/ActiveFeature.d.ts +19 -0
- package/enums/Stat.d.ts +9 -0
- package/package.json +3 -3
- package/static/ApiTransport.d.ts +1 -1
- package/static/AuthData.d.ts +11 -1
- package/static/BrowserEnvironment.d.ts +90 -0
- package/static/External.d.ts +4 -0
- package/static/Params.d.ts +53 -10
- package/static/WebRTCUtils.d.ts +7 -71
- package/types/AddParticipantParams.d.ts +18 -0
- package/types/ClientStatsEvent.d.ts +2 -1
- package/types/DeviceSelection.d.ts +8 -0
- package/types/ExternalId.d.ts +1 -1
- package/types/FastHangup.d.ts +10 -8
- package/types/Participant.d.ts +2 -2
- package/types/PerfStatReporter.d.ts +26 -1
- package/types/SignalingMessage.d.ts +3 -0
- package/types/Statistics.d.ts +22 -7
- package/abstract/BaseSignaling.d.ts +0 -143
- package/classes/stat/StatUnloadJournal.d.ts +0 -27
- package/default/SignalingTransport.d.ts +0 -76
package/CallsSDK.d.ts
CHANGED
|
@@ -5,7 +5,7 @@ import type { IEffect, VideoEffects } from '@vkontakte/calls-video-effects';
|
|
|
5
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
|
-
import { AddParticipantParams } from './
|
|
8
|
+
import type { AddParticipantParams } from './types/AddParticipantParams';
|
|
9
9
|
import HangupReason, { HangupReasonData, CustomError } from './classes/HangupReason';
|
|
10
10
|
import { MediaTrackKind } from './classes/MediaSource';
|
|
11
11
|
import { AudienceModeHandsResponse } from './types/AudienceMode';
|
|
@@ -37,7 +37,8 @@ import { ParticipantStatus } from './static/External';
|
|
|
37
37
|
import { JSONArray, JSONObject, JSONType } from './static/Json';
|
|
38
38
|
import { ParamsObject } from './static/Params';
|
|
39
39
|
import Utils from './static/Utils';
|
|
40
|
-
import
|
|
40
|
+
import BrowserEnvironment, { BrowserName } from './static/BrowserEnvironment';
|
|
41
|
+
import WebRTCUtils, { FacingMode } from './static/WebRTCUtils';
|
|
41
42
|
import { IAsrData, IAsrStartParams, IAsrStopParams } from './types/Asr';
|
|
42
43
|
import { ConversationData } from './types/Conversation';
|
|
43
44
|
import { IFeaturesPerRole } from './types/ConversationFeature';
|
|
@@ -72,6 +73,7 @@ import { FastStartHandler, FastStartParams } from './types/FastStart';
|
|
|
72
73
|
import { FastJoinHandler, FastJoinParams, FastJoinResponse } from './types/FastJoin';
|
|
73
74
|
import { FastHangupHandler, FastHangupParams, FastHangupResponse, HangupParams } from './types/FastHangup';
|
|
74
75
|
import PushData from './types/PushData';
|
|
76
|
+
import type { DeviceSelection, DeviceSelectionMode } from './types/DeviceSelection';
|
|
75
77
|
export type { CurrentLogItem, DebugLogGetParams, DebugLogSessionInfo, DebugLogStorageStats } from './utils/DebugStorage';
|
|
76
78
|
/**
|
|
77
79
|
* Информация о текущем браузере
|
|
@@ -113,6 +115,12 @@ export declare const browser: {
|
|
|
113
115
|
* Возвращает сохраненное устройство вывода
|
|
114
116
|
*/
|
|
115
117
|
getSavedOutput: typeof WebRTCUtils.getSavedOutput;
|
|
118
|
+
/** Возвращает способ выбора и фактически используемую камеру. */
|
|
119
|
+
getCameraSelection: typeof WebRTCUtils.getCameraSelection;
|
|
120
|
+
/** Возвращает способ выбора и фактически используемый микрофон. */
|
|
121
|
+
getMicrophoneSelection: typeof WebRTCUtils.getMicrophoneSelection;
|
|
122
|
+
/** Возвращает способ выбора и фактически используемый аудиовыход. */
|
|
123
|
+
getOutputSelection: typeof WebRTCUtils.getOutputSelection;
|
|
116
124
|
/**
|
|
117
125
|
* Проверяет получен ли доступ к камере
|
|
118
126
|
*/
|
|
@@ -146,43 +154,57 @@ export declare const browser: {
|
|
|
146
154
|
*
|
|
147
155
|
* _Метод доступен до инициализации_
|
|
148
156
|
*/
|
|
149
|
-
isBrowserSupported: typeof
|
|
157
|
+
isBrowserSupported: typeof BrowserEnvironment.isBrowserSupported;
|
|
150
158
|
/**
|
|
151
159
|
* Проверяет поддержку трансляции экрана браузером
|
|
152
160
|
*
|
|
153
161
|
* _Метод доступен до инициализации_
|
|
154
162
|
*/
|
|
155
|
-
isScreenCapturingSupported: typeof
|
|
163
|
+
isScreenCapturingSupported: typeof BrowserEnvironment.isScreenCapturingSupported;
|
|
164
|
+
/**
|
|
165
|
+
* Проверяет поддержку выбора микрофона браузером, независимо от списка устройств и разрешений.
|
|
166
|
+
* Не запрашивает разрешения и не захватывает медиа.
|
|
167
|
+
*
|
|
168
|
+
* _Метод доступен до инициализации_
|
|
169
|
+
*/
|
|
170
|
+
canSelectAudioInput: typeof BrowserEnvironment.canSelectAudioInput;
|
|
171
|
+
/**
|
|
172
|
+
* Проверяет поддержку выбора аудиовыхода браузером, независимо от списка устройств и разрешений.
|
|
173
|
+
* Не запрашивает разрешения и не меняет аудиовыход.
|
|
174
|
+
*
|
|
175
|
+
* _Метод доступен до инициализации_
|
|
176
|
+
*/
|
|
177
|
+
canSelectAudioOutput: typeof BrowserEnvironment.canSelectAudioOutput;
|
|
156
178
|
/**
|
|
157
179
|
* Имя операционной системы
|
|
158
180
|
*
|
|
159
181
|
* _Метод доступен до инициализации_
|
|
160
182
|
*/
|
|
161
|
-
os: typeof
|
|
183
|
+
os: typeof BrowserEnvironment.os;
|
|
162
184
|
/**
|
|
163
185
|
* Мобильный браузер или нет
|
|
164
186
|
*
|
|
165
187
|
* _Метод доступен до инициализации_
|
|
166
188
|
*/
|
|
167
|
-
isMobile: typeof
|
|
189
|
+
isMobile: typeof BrowserEnvironment.isMobile;
|
|
168
190
|
/**
|
|
169
191
|
* Имя браузера
|
|
170
192
|
*
|
|
171
193
|
* _Метод доступен до инициализации_
|
|
172
194
|
*/
|
|
173
|
-
browserName: typeof
|
|
195
|
+
browserName: typeof BrowserEnvironment.browserName;
|
|
174
196
|
/**
|
|
175
197
|
* Версия браузера
|
|
176
198
|
*
|
|
177
199
|
* _Метод доступен до инициализации_
|
|
178
200
|
*/
|
|
179
|
-
browserVersion: typeof
|
|
201
|
+
browserVersion: typeof BrowserEnvironment.browserVersion;
|
|
180
202
|
/**
|
|
181
203
|
* Если браузер основан на хроме - возвращает версию
|
|
182
204
|
*
|
|
183
205
|
* _Метод доступен до инициализации_
|
|
184
206
|
*/
|
|
185
|
-
baseChromeVersion: typeof
|
|
207
|
+
baseChromeVersion: typeof BrowserEnvironment.baseChromeVersion;
|
|
186
208
|
/**
|
|
187
209
|
* Возвращает AudioContext
|
|
188
210
|
*/
|
|
@@ -192,7 +214,7 @@ export declare const browser: {
|
|
|
192
214
|
*
|
|
193
215
|
* _Метод доступен до инициализации_
|
|
194
216
|
*/
|
|
195
|
-
isAudioShareSupported: typeof
|
|
217
|
+
isAudioShareSupported: typeof BrowserEnvironment.isAudioShareSupported;
|
|
196
218
|
};
|
|
197
219
|
/**
|
|
198
220
|
* Вспомогательные функции
|
|
@@ -258,9 +280,9 @@ export declare function callInternal(ids: OkUserId[], type: CallType | undefined
|
|
|
258
280
|
* Обработать пуш о входящем звонке
|
|
259
281
|
*
|
|
260
282
|
* Для любого входящего пуша нужно вызвать этот метод.
|
|
261
|
-
* Если уже есть
|
|
283
|
+
* Если уже есть звонок с другим пользователем и удержание выключено, метод отправит "занято" вызывающему абоненту
|
|
262
284
|
*
|
|
263
|
-
* `acceptCall` и `declineCall`
|
|
285
|
+
* Перед `acceptCall` и `declineCall` необходимо дождаться успешного завершения `processPush`.
|
|
264
286
|
*
|
|
265
287
|
* @param conversationId ID звонка
|
|
266
288
|
* @param conversationParams conversationParams в base64
|
|
@@ -292,7 +314,7 @@ export declare function acceptCall(mediaOptions?: MediaOption[], conversationId?
|
|
|
292
314
|
* @param params Параметры завершения. `params.conversationId` — ID звонка
|
|
293
315
|
* (по умолчанию текущий активный), `params.reason` — причина завершения
|
|
294
316
|
* для проброса в сигналинг (по умолчанию `REJECTED`). См. {@link ClientHangupReason}.
|
|
295
|
-
* `params.onFastHangup` — опционально:
|
|
317
|
+
* `params.onFastHangup` — опционально: при ответе `{ success: false }` SDK отправляет Calls API beacon.
|
|
296
318
|
* На закрытии вкладки не используется. См. {@link HangupParams}.
|
|
297
319
|
*/
|
|
298
320
|
export declare function declineCall(params?: HangupParams): Promise<void>;
|
|
@@ -322,8 +344,11 @@ export declare function joinCallByLink(joinLink: string, mediaOptions?: MediaOpt
|
|
|
322
344
|
* (по умолчанию текущий активный), `params.reason` — причина завершения
|
|
323
345
|
* для проброса в сигналинг: по умолчанию `HUNGUP` (если звонок активен) или `CANCELED`.
|
|
324
346
|
* См. {@link ClientHangupReason}.
|
|
325
|
-
* `params.onFastHangup` — опционально:
|
|
326
|
-
* Без него API
|
|
347
|
+
* `params.onFastHangup` — опционально: при ответе `{ success: false }` SDK отправляет Calls API beacon.
|
|
348
|
+
* Без него отправляется Calls API beacon, если серверный ID уже известен. На `pagehide` всегда beacon.
|
|
349
|
+
* Локальное завершение и постановка onHangup в очередь происходят сразу; Promise ждёт известную SDK работу по завершению
|
|
350
|
+
* в пределах waitResponseDelay, без подтверждения доставки beacon или signaling HANGUP.
|
|
351
|
+
* Повторный вызов для того же завершающегося звонка возвращает тот же Promise.
|
|
327
352
|
* См. {@link HangupParams}.
|
|
328
353
|
*/
|
|
329
354
|
export declare function hangup(params?: HangupParams): Promise<void>;
|
|
@@ -332,8 +357,9 @@ export declare function hangup(params?: HangupParams): Promise<void>;
|
|
|
332
357
|
*
|
|
333
358
|
* @param externalIds Внешние ID пользователей
|
|
334
359
|
* @param params Параметры
|
|
360
|
+
* @returns Участники из ответа сервера в публичном формате; undefined, если активного звонка нет или сигналинг не готов.
|
|
335
361
|
*/
|
|
336
|
-
export declare function addParticipant(externalIds: ExternalId | ExternalId[], params?: AddParticipantParams): Promise<
|
|
362
|
+
export declare function addParticipant(externalIds: ExternalId | ExternalId[], params?: AddParticipantParams): Promise<ExternalParticipant[] | undefined>;
|
|
337
363
|
/**
|
|
338
364
|
* @deprecated - используйте addParticipant
|
|
339
365
|
* @param uids
|
|
@@ -811,5 +837,5 @@ export declare function getSyncedTime(): number;
|
|
|
811
837
|
* Версия SDK
|
|
812
838
|
*/
|
|
813
839
|
export declare function version(): string;
|
|
814
|
-
export type { AddParticipantParams, AudienceModeHandsResponse, BrowserName, ClientHangupReason, ClientStatsEvent, 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, FastHangupHandler, FastHangupParams, FastHangupResponse, HangupParams, };
|
|
840
|
+
export type { AddParticipantParams, AudienceModeHandsResponse, BrowserName, ClientHangupReason, ClientStatsEvent, 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, FastHangupHandler, FastHangupParams, FastHangupResponse, HangupParams, DeviceSelection, DeviceSelectionMode, };
|
|
815
841
|
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, Stat, UserRole, UserType, TransportTopology, RoomsEventType, ConversationFeature, ArrayDequeue, ApiExternal, VolumeDetector, };
|
package/abstract/BaseApi.d.ts
CHANGED
|
@@ -11,7 +11,7 @@ import { ApiCallStats } from '../classes/stat/ApiCallStats';
|
|
|
11
11
|
export type ClientStats = {
|
|
12
12
|
call_topology: 'D' | 'S';
|
|
13
13
|
vcid: ConversationData['id'] | null;
|
|
14
|
-
[k: string]: string | number | boolean | null;
|
|
14
|
+
[k: string]: string | string[] | number | boolean | null;
|
|
15
15
|
};
|
|
16
16
|
export type LogItem = {
|
|
17
17
|
count?: number;
|
|
@@ -82,7 +82,7 @@ export default abstract class BaseApi {
|
|
|
82
82
|
mapDecorativeId(decorativeId: ParticipantId, initialId: ParticipantId): void;
|
|
83
83
|
unmapDecorativeId(initialId: ParticipantId): void;
|
|
84
84
|
getDecorativeIdByInitialId(initialId: ParticipantId): ParticipantId | undefined;
|
|
85
|
-
hangupConversation(conversationId: string, reason?: HangupType, hangupParams?: Partial<IHangupParams>):
|
|
85
|
+
hangupConversation(conversationId: string, reason?: HangupType, hangupParams?: Partial<IHangupParams>): Promise<boolean>;
|
|
86
86
|
removeHistoryRecords(recordIds: number[]): Promise<void>;
|
|
87
87
|
getServerTime(): Promise<number>;
|
|
88
88
|
cleanup(): void;
|