@vkontakte/calls-sdk 2.8.13-dev.b0dfcfc5.0 → 2.8.13-dev.b9b0c10d.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 +42 -14
- package/abstract/BaseApi.d.ts +1 -1
- package/calls-sdk.cjs.js +7 -7
- package/calls-sdk.esm.js +2826 -2263
- package/classes/AudioOutput.d.ts +2 -0
- package/classes/CallRegistry.d.ts +17 -4
- package/classes/MediaSource.d.ts +5 -0
- package/classes/StatsLogger.d.ts +1 -1
- package/classes/conversation/Conversation.d.ts +24 -7
- package/classes/conversation/Conversation.testUtils.d.ts +1 -0
- package/classes/stat/BatteryStats.d.ts +25 -0
- package/classes/stat/ClientResourceStats.d.ts +41 -0
- package/classes/stat/ConversationStats.d.ts +6 -1
- package/classes/stat/NetworkAdaptationStats.d.ts +35 -0
- package/classes/stat/PeerConnectionStats.d.ts +3 -0
- package/classes/stat/SdpStats.d.ts +2 -0
- package/classes/stat/Stat.testUtils.d.ts +10 -0
- package/classes/stat/StatAggregator.d.ts +3 -1
- package/classes/stat/StatEventCollector.d.ts +1 -1
- package/classes/stat/StatPings.d.ts +2 -0
- package/classes/stat/StatQueue.d.ts +2 -2
- package/classes/transport/DirectTransport.d.ts +5 -0
- package/classes/transport/PerfStatReporter.d.ts +5 -1
- package/classes/transport/ServerTransport.d.ts +2 -0
- package/default/Api.d.ts +3 -0
- package/default/SignalingTransport.d.ts +5 -1
- package/enums/ActiveFeature.d.ts +19 -0
- package/enums/Stat.d.ts +6 -1
- package/package.json +1 -1
- package/static/AuthData.d.ts +11 -1
- package/static/BrowserEnvironment.d.ts +90 -0
- package/static/External.d.ts +11 -0
- package/static/Params.d.ts +22 -2
- package/static/WebRTCUtils.d.ts +7 -71
- package/types/ClientStatsEvent.d.ts +12 -0
- package/types/DeviceSelection.d.ts +8 -0
- package/types/FastHangup.d.ts +7 -5
- package/types/Params.d.ts +1 -1
- package/types/PerfStatReporter.d.ts +26 -1
- package/types/SignalingMessage.d.ts +1 -0
- package/types/Statistics.d.ts +22 -7
package/CallsSDK.d.ts
CHANGED
|
@@ -28,6 +28,7 @@ import RoomsEventType from './enums/RoomsEventType';
|
|
|
28
28
|
import SignalingCommandType from './enums/SignalingCommandType';
|
|
29
29
|
import SignalingConnectionType from './enums/SignalingConnectionType';
|
|
30
30
|
import SignalingNotification from './enums/SignalingNotification';
|
|
31
|
+
import Stat from './enums/Stat';
|
|
31
32
|
import UserRole from './enums/UserRole';
|
|
32
33
|
import UserType from './enums/UserType';
|
|
33
34
|
import { DebugMessageType } from './static/Debug';
|
|
@@ -36,7 +37,8 @@ import { ParticipantStatus } from './static/External';
|
|
|
36
37
|
import { JSONArray, JSONObject, JSONType } from './static/Json';
|
|
37
38
|
import { ParamsObject } from './static/Params';
|
|
38
39
|
import Utils from './static/Utils';
|
|
39
|
-
import
|
|
40
|
+
import BrowserEnvironment, { BrowserName } from './static/BrowserEnvironment';
|
|
41
|
+
import WebRTCUtils, { FacingMode } from './static/WebRTCUtils';
|
|
40
42
|
import { IAsrData, IAsrStartParams, IAsrStopParams } from './types/Asr';
|
|
41
43
|
import { ConversationData } from './types/Conversation';
|
|
42
44
|
import { IFeaturesPerRole } from './types/ConversationFeature';
|
|
@@ -59,6 +61,7 @@ import { IRoomId, Room, RoomParticipantUpdate, Rooms, RoomsUpdate } from './type
|
|
|
59
61
|
import { ScreenCaptureSettings } from './types/ScreenCaptureSettings';
|
|
60
62
|
import SignalingMessage, { GetRoomsSignalingResponse, GetParticipantsSignalingResponse } from './types/SignalingMessage';
|
|
61
63
|
import { StatResult } from './types/Statistics';
|
|
64
|
+
import { ClientStatsEvent } from './types/ClientStatsEvent';
|
|
62
65
|
import { IStartStreamData, IStopStreamData, IPublishStreamData } from './types/Streams';
|
|
63
66
|
import { WaitingHallResponse } from './types/WaitingHall';
|
|
64
67
|
import { ArrayDequeue } from './utils/ArrayDequeue';
|
|
@@ -70,6 +73,7 @@ import { FastStartHandler, FastStartParams } from './types/FastStart';
|
|
|
70
73
|
import { FastJoinHandler, FastJoinParams, FastJoinResponse } from './types/FastJoin';
|
|
71
74
|
import { FastHangupHandler, FastHangupParams, FastHangupResponse, HangupParams } from './types/FastHangup';
|
|
72
75
|
import PushData from './types/PushData';
|
|
76
|
+
import type { DeviceSelection, DeviceSelectionMode } from './types/DeviceSelection';
|
|
73
77
|
export type { CurrentLogItem, DebugLogGetParams, DebugLogSessionInfo, DebugLogStorageStats } from './utils/DebugStorage';
|
|
74
78
|
/**
|
|
75
79
|
* Информация о текущем браузере
|
|
@@ -111,6 +115,12 @@ export declare const browser: {
|
|
|
111
115
|
* Возвращает сохраненное устройство вывода
|
|
112
116
|
*/
|
|
113
117
|
getSavedOutput: typeof WebRTCUtils.getSavedOutput;
|
|
118
|
+
/** Возвращает способ выбора и фактически используемую камеру. */
|
|
119
|
+
getCameraSelection: typeof WebRTCUtils.getCameraSelection;
|
|
120
|
+
/** Возвращает способ выбора и фактически используемый микрофон. */
|
|
121
|
+
getMicrophoneSelection: typeof WebRTCUtils.getMicrophoneSelection;
|
|
122
|
+
/** Возвращает способ выбора и фактически используемый аудиовыход. */
|
|
123
|
+
getOutputSelection: typeof WebRTCUtils.getOutputSelection;
|
|
114
124
|
/**
|
|
115
125
|
* Проверяет получен ли доступ к камере
|
|
116
126
|
*/
|
|
@@ -144,43 +154,57 @@ export declare const browser: {
|
|
|
144
154
|
*
|
|
145
155
|
* _Метод доступен до инициализации_
|
|
146
156
|
*/
|
|
147
|
-
isBrowserSupported: typeof
|
|
157
|
+
isBrowserSupported: typeof BrowserEnvironment.isBrowserSupported;
|
|
148
158
|
/**
|
|
149
159
|
* Проверяет поддержку трансляции экрана браузером
|
|
150
160
|
*
|
|
151
161
|
* _Метод доступен до инициализации_
|
|
152
162
|
*/
|
|
153
|
-
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;
|
|
154
178
|
/**
|
|
155
179
|
* Имя операционной системы
|
|
156
180
|
*
|
|
157
181
|
* _Метод доступен до инициализации_
|
|
158
182
|
*/
|
|
159
|
-
os: typeof
|
|
183
|
+
os: typeof BrowserEnvironment.os;
|
|
160
184
|
/**
|
|
161
185
|
* Мобильный браузер или нет
|
|
162
186
|
*
|
|
163
187
|
* _Метод доступен до инициализации_
|
|
164
188
|
*/
|
|
165
|
-
isMobile: typeof
|
|
189
|
+
isMobile: typeof BrowserEnvironment.isMobile;
|
|
166
190
|
/**
|
|
167
191
|
* Имя браузера
|
|
168
192
|
*
|
|
169
193
|
* _Метод доступен до инициализации_
|
|
170
194
|
*/
|
|
171
|
-
browserName: typeof
|
|
195
|
+
browserName: typeof BrowserEnvironment.browserName;
|
|
172
196
|
/**
|
|
173
197
|
* Версия браузера
|
|
174
198
|
*
|
|
175
199
|
* _Метод доступен до инициализации_
|
|
176
200
|
*/
|
|
177
|
-
browserVersion: typeof
|
|
201
|
+
browserVersion: typeof BrowserEnvironment.browserVersion;
|
|
178
202
|
/**
|
|
179
203
|
* Если браузер основан на хроме - возвращает версию
|
|
180
204
|
*
|
|
181
205
|
* _Метод доступен до инициализации_
|
|
182
206
|
*/
|
|
183
|
-
baseChromeVersion: typeof
|
|
207
|
+
baseChromeVersion: typeof BrowserEnvironment.baseChromeVersion;
|
|
184
208
|
/**
|
|
185
209
|
* Возвращает AudioContext
|
|
186
210
|
*/
|
|
@@ -190,7 +214,7 @@ export declare const browser: {
|
|
|
190
214
|
*
|
|
191
215
|
* _Метод доступен до инициализации_
|
|
192
216
|
*/
|
|
193
|
-
isAudioShareSupported: typeof
|
|
217
|
+
isAudioShareSupported: typeof BrowserEnvironment.isAudioShareSupported;
|
|
194
218
|
};
|
|
195
219
|
/**
|
|
196
220
|
* Вспомогательные функции
|
|
@@ -258,7 +282,7 @@ export declare function callInternal(ids: OkUserId[], type: CallType | undefined
|
|
|
258
282
|
* Для любого входящего пуша нужно вызвать этот метод.
|
|
259
283
|
* Если уже есть активный звонок, метод отправит "занято" вызывающему абоненту
|
|
260
284
|
*
|
|
261
|
-
* `acceptCall` и `declineCall`
|
|
285
|
+
* Перед `acceptCall` и `declineCall` необходимо дождаться успешного завершения `processPush`.
|
|
262
286
|
*
|
|
263
287
|
* @param conversationId ID звонка
|
|
264
288
|
* @param conversationParams conversationParams в base64
|
|
@@ -321,7 +345,10 @@ export declare function joinCallByLink(joinLink: string, mediaOptions?: MediaOpt
|
|
|
321
345
|
* для проброса в сигналинг: по умолчанию `HUNGUP` (если звонок активен) или `CANCELED`.
|
|
322
346
|
* См. {@link ClientHangupReason}.
|
|
323
347
|
* `params.onFastHangup` — опционально: вместо Calls API hangup, если обработчик передан.
|
|
324
|
-
* Без него API
|
|
348
|
+
* Без него отправляется Calls API beacon, если серверный ID уже известен. На `pagehide` всегда beacon.
|
|
349
|
+
* Локальное завершение и постановка onHangup в очередь происходят сразу; Promise ждёт известную SDK работу по завершению
|
|
350
|
+
* в пределах waitResponseDelay, без подтверждения доставки beacon или signaling HANGUP.
|
|
351
|
+
* Повторный вызов для того же завершающегося звонка возвращает тот же Promise.
|
|
325
352
|
* См. {@link HangupParams}.
|
|
326
353
|
*/
|
|
327
354
|
export declare function hangup(params?: HangupParams): Promise<void>;
|
|
@@ -330,8 +357,9 @@ export declare function hangup(params?: HangupParams): Promise<void>;
|
|
|
330
357
|
*
|
|
331
358
|
* @param externalIds Внешние ID пользователей
|
|
332
359
|
* @param params Параметры
|
|
360
|
+
* @returns Участники из ответа сервера в публичном формате; undefined, если активного звонка нет или сигналинг не готов.
|
|
333
361
|
*/
|
|
334
|
-
export declare function addParticipant(externalIds: ExternalId | ExternalId[], params?: AddParticipantParams): Promise<
|
|
362
|
+
export declare function addParticipant(externalIds: ExternalId | ExternalId[], params?: AddParticipantParams): Promise<ExternalParticipant[] | undefined>;
|
|
335
363
|
/**
|
|
336
364
|
* @deprecated - используйте addParticipant
|
|
337
365
|
* @param uids
|
|
@@ -809,5 +837,5 @@ export declare function getSyncedTime(): number;
|
|
|
809
837
|
* Версия SDK
|
|
810
838
|
*/
|
|
811
839
|
export declare function version(): string;
|
|
812
|
-
export type { AddParticipantParams, AudienceModeHandsResponse, BrowserName, ClientHangupReason, 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, };
|
|
813
|
-
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, };
|
|
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, };
|
|
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;
|