@vkontakte/calls-sdk 2.8.13-dev.a25e6d68.0 → 2.8.13-dev.ad2c4012.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
  * Вспомогательные функции
@@ -809,5 +826,5 @@ export declare function getSyncedTime(): number;
809
826
  * Версия SDK
810
827
  */
811
828
  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, };
829
+ 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, };
830
+ 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, };
@@ -7,6 +7,7 @@ import ConversationResponse from '../types/ConversationResponse';
7
7
  import { ExternalId, ExternalParticipantId, ExternalUserId } from '../types/ExternalId';
8
8
  import { OkUserId, ParticipantId } from '../types/Participant';
9
9
  import PushData from '../types/PushData';
10
+ import { ApiCallStats } from '../classes/stat/ApiCallStats';
10
11
  export type ClientStats = {
11
12
  call_topology: 'D' | 'S';
12
13
  vcid: ConversationData['id'] | null;
@@ -26,6 +27,9 @@ export type LogItem = {
26
27
  };
27
28
  export default abstract class BaseApi {
28
29
  protected _abortSignal?: AbortSignal;
30
+ protected _apiCallStats: ApiCallStats | null;
31
+ /** Куда писать время выполнения запросов, появляется вместе со звонком */
32
+ setApiCallStats(apiCallStats: ApiCallStats | null): void;
29
33
  /**
30
34
  * Устанавливает сигнал прерывания для запуска звонка, если не успели отменить до установки соединения с другим участником, то он больше ни как не будет использоваться
31
35
  * @param signal - Сигнал прерывания или undefined для очистки