@vkontakte/calls-sdk 2.8.4-dev.2b44e4f.0 → 2.8.4-dev.305f8da.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
@@ -34,7 +34,7 @@ import { ParticipantStatus } from './static/External';
34
34
  import { JSONArray, JSONObject, JSONType } from './static/Json';
35
35
  import { ParamsObject } from './static/Params';
36
36
  import Utils from './static/Utils';
37
- import WebRTCUtils, { FacingMode } from './static/WebRTCUtils';
37
+ import WebRTCUtils, { BrowserName, FacingMode } from './static/WebRTCUtils';
38
38
  import { IAsrData, IAsrStartParams, IAsrStopParams } from './types/Asr';
39
39
  import { ConversationData } from './types/Conversation';
40
40
  import { IFeaturesPerRole } from './types/ConversationFeature';
@@ -62,6 +62,7 @@ import { WaitingHallResponse } from './types/WaitingHall';
62
62
  import { ArrayDequeue } from './utils/ArrayDequeue';
63
63
  import { ApiExternal } from './default/ApiExternal';
64
64
  import AuthData from './static/AuthData';
65
+ import { VmojiError } from './types/Vmoji';
65
66
  /**
66
67
  * Информация о текущем браузере
67
68
  */
@@ -387,11 +388,6 @@ export declare function grantRoles(externalId: ExternalId, roles: UserRole[], re
387
388
  export declare function grantRolesInternal(uid: OkUserId, deviceIdx: number, roles: UserRole[], revoke?: boolean): Promise<void>;
388
389
  /**
389
390
  * Выключить или выключить микрофон и/или камеру собеседнику (только если есть соответствующая роль)
390
- *
391
- * @param externalId Внешний ID пользователя (если не указано, сработает на всех)
392
- * @param muteStates Состояние устройств пользователя
393
- * @param requestedMedia Попросить пользователя включить устройство
394
- * @param roomId ID сессионного зала, либо ничего если в основном зале
395
391
  */
396
392
  export declare function muteParticipant({ externalId, muteStates, requestedMedia, roomId, }: IMuteParticipantParams): Promise<void>;
397
393
  export declare function muteParticipantInternal({ uid, muteStates, requestedMedia, deviceIdx, roomId, }: IMuteParticipantInternalParams): Promise<void>;
@@ -410,6 +406,13 @@ export declare function pinParticipantInternal(uid: OkUserId, unpin?: boolean, d
410
406
  * @param mediaModifiers
411
407
  */
412
408
  export declare function setMediaModifiers(mediaModifiers: MediaModifiers): Promise<void>;
409
+ /**
410
+ * Автоматическое отключения принимаемых видео-потоков
411
+ * в условиях плохого соединения
412
+ *
413
+ * @param enabled true - включить, false - отключить
414
+ */
415
+ export declare function enableVideoSuspend(enabled: boolean): Promise<void>;
413
416
  /**
414
417
  * Включить/выключить опции звонка
415
418
  *
@@ -501,7 +504,7 @@ export declare function forceRelayPolicy(enabled: boolean): void;
501
504
  * @param groupId
502
505
  * @param roomId
503
506
  */
504
- export declare function startStream(isRecord?: boolean, name?: string | null, movieId?: string | null, privacy?: 'PUBLIC' | 'FRIENDS' | 'DIRECT_LINK', groupId?: string | null, roomId?: number | null): Promise<undefined>;
507
+ export declare function startStream(isRecord?: boolean, name?: string | null, movieId?: string | null, privacy?: 'PUBLIC' | 'FRIENDS' | 'DIRECT_LINK', groupId?: string | null, roomId?: number | null, externalAccessKey?: string | null): Promise<undefined>;
505
508
  /**
506
509
  * Завершить трансляцию звонка
507
510
  * @param roomId
@@ -678,5 +681,5 @@ export declare function stopUrlSharing(): Promise<void>;
678
681
  * Версия SDK
679
682
  */
680
683
  export declare function version(): string;
681
- export type { AddParticipantParams, AudienceModeHandsResponse, CompositeUserId, ConversationData, ConversationParams, ConversationResponse, ExternalId, ExternalParticipant, ExternalParticipantListChunk, ExternalParticipantListMarker, ExternalParticipantListMarkers as ExternalParticipantMarkers, ExternalParticipantId, HangupReasonData, IApiEnv, IAsrStartParams, IAsrStopParams, IAsrData, IceServer, JSONArray, JSONObject, JSONType, Layout, MediaModifiers, MediaSettings, MuteStates, OkUserId, ParamsObject, ParticipantId, ParticipantLayout, ParticipantListMarkers, ParticipantListType, ParticipantPriority, 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, };
684
+ export type { AddParticipantParams, AudienceModeHandsResponse, BrowserName, CompositeUserId, ConversationData, ConversationParams, ConversationResponse, ExternalId, ExternalParticipant, ExternalParticipantListChunk, ExternalParticipantListMarker, ExternalParticipantListMarkers as ExternalParticipantMarkers, ExternalParticipantId, HangupReasonData, IApiEnv, IAsrStartParams, IAsrStopParams, IAsrData, IceServer, JSONArray, JSONObject, JSONType, Layout, MediaModifiers, MediaSettings, MuteStates, OkUserId, ParamsObject, ParticipantId, ParticipantLayout, ParticipantListMarkers, ParticipantListType, ParticipantPriority, 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, };
682
685
  export { Api, AuthData, BaseApi, BaseLogger, BaseSignaling, CallDirection, CallType, ChatRoomEventType, ConversationOption, DebugMessageType, ExternalIdType, FacingMode, FatalError, HangupReason, HangupType, MediaOption, MediaTrackKind, MediaType, MuteState, ParticipantState, ParticipantStatus, RecordRole, Signaling, SignalingCommandType, SignalingConnectionType, SignalingNotification, UserRole, UserType, TransportTopology, RoomsEventType, ConversationFeature, ArrayDequeue, ApiExternal, };
@@ -4,12 +4,13 @@ import ConversationParams from '../types/ConversationParams';
4
4
  import ConversationResponse from '../types/ConversationResponse';
5
5
  import { ExternalId, ExternalParticipantId, ExternalUserId } from '../types/ExternalId';
6
6
  import { CompositeUserId, OkUserId, ParticipantId } from '../types/Participant';
7
+ export type ClientStats = {
8
+ vcid: ConversationData['id'] | null;
9
+ [k: string]: string | number | null;
10
+ };
7
11
  export type LogItem = {
8
12
  count?: number;
9
- custom: {
10
- vcid: ConversationData['id'] | null;
11
- [k: string]: string | number | null;
12
- };
13
+ custom: ClientStats;
13
14
  data?: string[];
14
15
  groups?: string[];
15
16
  network?: string;
@@ -43,7 +44,14 @@ export default abstract class BaseApi {
43
44
  abstract getConversationParams(conversationId?: string): Promise<ConversationParams>;
44
45
  abstract getUserId(): OkUserId | null;
45
46
  abstract setUserId(userId: OkUserId): void;
47
+ /**
48
+ * method: log.externalLog
49
+ */
46
50
  log(items: LogItem[]): void;
51
+ /**
52
+ * method: vchat.clientStats
53
+ */
54
+ logClientStats(items: ClientStats[]): void;
47
55
  prepareUserIds(ids: OkUserId[]): Promise<void>;
48
56
  abstract getOkIdsByExternalIds(externalIds: ExternalId[]): Promise<OkUserId[]>;
49
57
  abstract getParticipantIdsByExternalIds(externalIds: ExternalId[]): Promise<Map<ExternalId, ParticipantId>>;
@@ -92,6 +92,7 @@ export default abstract class BaseSignaling extends EventEmitter {
92
92
  abstract enableFeatureForRoles(feature: ConversationFeature, roles: UserRole[]): Promise<SignalingMessage>;
93
93
  abstract pinParticipant(participantId: ParticipantId, unpin: boolean, roomId: number | null): Promise<SignalingMessage>;
94
94
  abstract updateMediaModifiers(mediaModifiers: MediaModifiers): Promise<SignalingMessage>;
95
+ abstract enableVideoSuspend(enabled: boolean): Promise<SignalingMessage>;
95
96
  abstract changeOptions(changes: {
96
97
  [key in ConversationOption]?: boolean;
97
98
  }): Promise<SignalingMessage>;