@vkontakte/calls-sdk 2.8.13-dev.c1517745.0 → 2.8.13-dev.c70019f1.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 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 WebRTCUtils, { BrowserName, FacingMode } from './static/WebRTCUtils';
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 WebRTCUtils.isBrowserSupported;
150
+ isBrowserSupported: typeof BrowserEnvironment.isBrowserSupported;
148
151
  /**
149
152
  * Проверяет поддержку трансляции экрана браузером
150
153
  *
151
154
  * _Метод доступен до инициализации_
152
155
  */
153
- isScreenCapturingSupported: typeof WebRTCUtils.isScreenCapturingSupported;
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 WebRTCUtils.os;
176
+ os: typeof BrowserEnvironment.os;
160
177
  /**
161
178
  * Мобильный браузер или нет
162
179
  *
163
180
  * _Метод доступен до инициализации_
164
181
  */
165
- isMobile: typeof WebRTCUtils.isMobile;
182
+ isMobile: typeof BrowserEnvironment.isMobile;
166
183
  /**
167
184
  * Имя браузера
168
185
  *
169
186
  * _Метод доступен до инициализации_
170
187
  */
171
- browserName: typeof WebRTCUtils.browserName;
188
+ browserName: typeof BrowserEnvironment.browserName;
172
189
  /**
173
190
  * Версия браузера
174
191
  *
175
192
  * _Метод доступен до инициализации_
176
193
  */
177
- browserVersion: typeof WebRTCUtils.browserVersion;
194
+ browserVersion: typeof BrowserEnvironment.browserVersion;
178
195
  /**
179
196
  * Если браузер основан на хроме - возвращает версию
180
197
  *
181
198
  * _Метод доступен до инициализации_
182
199
  */
183
- baseChromeVersion: typeof WebRTCUtils.baseChromeVersion;
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 WebRTCUtils.isAudioShareSupported;
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` будут работать только после вызова `processPush`
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 hangup не вызывается (signaling hangup остаётся). На `pagehide` всегда beacon.
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>;
@@ -809,5 +829,5 @@ export declare function getSyncedTime(): number;
809
829
  * Версия SDK
810
830
  */
811
831
  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, };
832
+ 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, };
833
+ 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, };