@vkontakte/calls-sdk 2.8.13-dev.b0dfcfc5.0 → 2.8.13-dev.b18b02e0.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 +35 -14
- package/abstract/BaseApi.d.ts +1 -1
- package/calls-sdk.cjs.js +7 -7
- package/calls-sdk.esm.js +2812 -2217
- 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/classes/transport/Transport.d.ts +4 -3
- package/classes/transport/VadGate.d.ts +37 -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 +0 -71
- package/types/ClientStatsEvent.d.ts +12 -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';
|
|
@@ -144,43 +147,57 @@ export declare const browser: {
|
|
|
144
147
|
*
|
|
145
148
|
* _Метод доступен до инициализации_
|
|
146
149
|
*/
|
|
147
|
-
isBrowserSupported: typeof
|
|
150
|
+
isBrowserSupported: typeof BrowserEnvironment.isBrowserSupported;
|
|
148
151
|
/**
|
|
149
152
|
* Проверяет поддержку трансляции экрана браузером
|
|
150
153
|
*
|
|
151
154
|
* _Метод доступен до инициализации_
|
|
152
155
|
*/
|
|
153
|
-
isScreenCapturingSupported: typeof
|
|
156
|
+
isScreenCapturingSupported: typeof BrowserEnvironment.isScreenCapturingSupported;
|
|
157
|
+
/**
|
|
158
|
+
* Проверяет поддержку выбора микрофона браузером, независимо от списка устройств и разрешений.
|
|
159
|
+
* Не запрашивает разрешения и не захватывает медиа.
|
|
160
|
+
*
|
|
161
|
+
* _Метод доступен до инициализации_
|
|
162
|
+
*/
|
|
163
|
+
canSelectAudioInput: typeof BrowserEnvironment.canSelectAudioInput;
|
|
164
|
+
/**
|
|
165
|
+
* Проверяет поддержку выбора аудиовыхода браузером, независимо от списка устройств и разрешений.
|
|
166
|
+
* Не запрашивает разрешения и не меняет аудиовыход.
|
|
167
|
+
*
|
|
168
|
+
* _Метод доступен до инициализации_
|
|
169
|
+
*/
|
|
170
|
+
canSelectAudioOutput: typeof BrowserEnvironment.canSelectAudioOutput;
|
|
154
171
|
/**
|
|
155
172
|
* Имя операционной системы
|
|
156
173
|
*
|
|
157
174
|
* _Метод доступен до инициализации_
|
|
158
175
|
*/
|
|
159
|
-
os: typeof
|
|
176
|
+
os: typeof BrowserEnvironment.os;
|
|
160
177
|
/**
|
|
161
178
|
* Мобильный браузер или нет
|
|
162
179
|
*
|
|
163
180
|
* _Метод доступен до инициализации_
|
|
164
181
|
*/
|
|
165
|
-
isMobile: typeof
|
|
182
|
+
isMobile: typeof BrowserEnvironment.isMobile;
|
|
166
183
|
/**
|
|
167
184
|
* Имя браузера
|
|
168
185
|
*
|
|
169
186
|
* _Метод доступен до инициализации_
|
|
170
187
|
*/
|
|
171
|
-
browserName: typeof
|
|
188
|
+
browserName: typeof BrowserEnvironment.browserName;
|
|
172
189
|
/**
|
|
173
190
|
* Версия браузера
|
|
174
191
|
*
|
|
175
192
|
* _Метод доступен до инициализации_
|
|
176
193
|
*/
|
|
177
|
-
browserVersion: typeof
|
|
194
|
+
browserVersion: typeof BrowserEnvironment.browserVersion;
|
|
178
195
|
/**
|
|
179
196
|
* Если браузер основан на хроме - возвращает версию
|
|
180
197
|
*
|
|
181
198
|
* _Метод доступен до инициализации_
|
|
182
199
|
*/
|
|
183
|
-
baseChromeVersion: typeof
|
|
200
|
+
baseChromeVersion: typeof BrowserEnvironment.baseChromeVersion;
|
|
184
201
|
/**
|
|
185
202
|
* Возвращает AudioContext
|
|
186
203
|
*/
|
|
@@ -190,7 +207,7 @@ export declare const browser: {
|
|
|
190
207
|
*
|
|
191
208
|
* _Метод доступен до инициализации_
|
|
192
209
|
*/
|
|
193
|
-
isAudioShareSupported: typeof
|
|
210
|
+
isAudioShareSupported: typeof BrowserEnvironment.isAudioShareSupported;
|
|
194
211
|
};
|
|
195
212
|
/**
|
|
196
213
|
* Вспомогательные функции
|
|
@@ -258,7 +275,7 @@ export declare function callInternal(ids: OkUserId[], type: CallType | undefined
|
|
|
258
275
|
* Для любого входящего пуша нужно вызвать этот метод.
|
|
259
276
|
* Если уже есть активный звонок, метод отправит "занято" вызывающему абоненту
|
|
260
277
|
*
|
|
261
|
-
* `acceptCall` и `declineCall`
|
|
278
|
+
* Перед `acceptCall` и `declineCall` необходимо дождаться успешного завершения `processPush`.
|
|
262
279
|
*
|
|
263
280
|
* @param conversationId ID звонка
|
|
264
281
|
* @param conversationParams conversationParams в base64
|
|
@@ -321,7 +338,10 @@ export declare function joinCallByLink(joinLink: string, mediaOptions?: MediaOpt
|
|
|
321
338
|
* для проброса в сигналинг: по умолчанию `HUNGUP` (если звонок активен) или `CANCELED`.
|
|
322
339
|
* См. {@link ClientHangupReason}.
|
|
323
340
|
* `params.onFastHangup` — опционально: вместо Calls API hangup, если обработчик передан.
|
|
324
|
-
* Без него API
|
|
341
|
+
* Без него отправляется Calls API beacon, если серверный ID уже известен. На `pagehide` всегда beacon.
|
|
342
|
+
* Локальное завершение и постановка onHangup в очередь происходят сразу; Promise ждёт известную SDK работу по завершению
|
|
343
|
+
* в пределах waitResponseDelay, без подтверждения доставки beacon или signaling HANGUP.
|
|
344
|
+
* Повторный вызов для того же завершающегося звонка возвращает тот же Promise.
|
|
325
345
|
* См. {@link HangupParams}.
|
|
326
346
|
*/
|
|
327
347
|
export declare function hangup(params?: HangupParams): Promise<void>;
|
|
@@ -330,8 +350,9 @@ export declare function hangup(params?: HangupParams): Promise<void>;
|
|
|
330
350
|
*
|
|
331
351
|
* @param externalIds Внешние ID пользователей
|
|
332
352
|
* @param params Параметры
|
|
353
|
+
* @returns Участники из ответа сервера в публичном формате; undefined, если активного звонка нет или сигналинг не готов.
|
|
333
354
|
*/
|
|
334
|
-
export declare function addParticipant(externalIds: ExternalId | ExternalId[], params?: AddParticipantParams): Promise<
|
|
355
|
+
export declare function addParticipant(externalIds: ExternalId | ExternalId[], params?: AddParticipantParams): Promise<ExternalParticipant[] | undefined>;
|
|
335
356
|
/**
|
|
336
357
|
* @deprecated - используйте addParticipant
|
|
337
358
|
* @param uids
|
|
@@ -809,5 +830,5 @@ export declare function getSyncedTime(): number;
|
|
|
809
830
|
* Версия SDK
|
|
810
831
|
*/
|
|
811
832
|
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, };
|
|
833
|
+
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, };
|
|
834
|
+
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;
|