@vkontakte/calls-sdk 2.8.4-dev.f8b43cb.0 → 2.8.4
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 +13 -9
- package/abstract/BaseApi.d.ts +17 -6
- package/abstract/BaseSignaling.d.ts +5 -5
- package/calls-sdk.cjs.js +8 -8
- package/calls-sdk.esm.js +8 -8
- package/classes/Conversation.d.ts +11 -4
- package/classes/Logger.d.ts +6 -3
- package/classes/ProducerCommandSerializationService.d.ts +2 -0
- package/classes/screenshare/ScreenCaptureSender.d.ts +3 -0
- package/classes/transport/BaseTransport.d.ts +0 -1
- package/classes/transport/DirectStatReporter.d.ts +0 -1
- package/classes/transport/PerfStatReporter.d.ts +1 -0
- package/classes/transport/Transport.d.ts +2 -1
- package/default/Api.d.ts +10 -4
- package/default/Signaling.d.ts +5 -5
- package/enums/SignalingCommandType.d.ts +2 -1
- package/enums/SignalingNotification.d.ts +2 -1
- package/package.json +2 -2
- package/static/Debug.d.ts +1 -0
- package/static/External.d.ts +16 -8
- package/static/Params.d.ts +41 -14
- package/static/Utils.d.ts +4 -2
- package/static/WebRTCUtils.d.ts +5 -1
- package/types/AudienceMode.d.ts +1 -0
- package/types/Conversation.d.ts +8 -8
- package/types/EnableVideoSuspend.d.ts +3 -0
- package/types/ExternalId.d.ts +1 -0
- package/types/MediaSettings.d.ts +0 -9
- package/types/MuteStates.d.ts +12 -0
- package/types/Participant.d.ts +7 -0
- package/types/SignalingMessage.d.ts +19 -1
- package/types/Streams.d.ts +1 -0
- package/types/Vmoji.d.ts +5 -0
- package/types/WaitingHall.d.ts +3 -12
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';
|
|
@@ -55,13 +55,14 @@ import ParticipantPriority from './types/ParticipantPriority';
|
|
|
55
55
|
import { MediaType, ParticipantStreamDescription } from './types/ParticipantStreamDescription';
|
|
56
56
|
import { IRoomId, Room, RoomParticipantUpdate, Rooms, RoomsUpdate } from './types/Room';
|
|
57
57
|
import { ScreenCaptureSettings } from './types/ScreenCaptureSettings';
|
|
58
|
-
import SignalingMessage from './types/SignalingMessage';
|
|
58
|
+
import SignalingMessage, { GetRoomsSignalingResponse, GetParticipantsSignalingResponse } from './types/SignalingMessage';
|
|
59
59
|
import { StatResult } from './types/Statistics';
|
|
60
60
|
import { IStartStreamData, IStopStreamData, IPublishStreamData } from './types/Streams';
|
|
61
61
|
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
|
|
@@ -674,9 +677,10 @@ export declare function stopAsr(params?: IAsrStopParams): Promise<void>;
|
|
|
674
677
|
export declare function requestAsr(request: boolean): Promise<void>;
|
|
675
678
|
export declare function startUrlSharing(sharedUrl: string): Promise<void>;
|
|
676
679
|
export declare function stopUrlSharing(): Promise<void>;
|
|
680
|
+
export declare function sendTestCommand(name: string, params?: any): void;
|
|
677
681
|
/**
|
|
678
682
|
* Версия SDK
|
|
679
683
|
*/
|
|
680
684
|
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, };
|
|
685
|
+
export type { AddParticipantParams, AudienceModeHandsResponse, BrowserName, CompositeUserId, ConversationData, ConversationParams, ConversationResponse, ExternalId, ExternalParticipant, ExternalParticipantListChunk, ExternalParticipantListMarker, ExternalParticipantListMarkers as ExternalParticipantMarkers, ExternalParticipantId, GetParticipantsSignalingResponse, GetRoomsSignalingResponse, 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
686
|
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, };
|
package/abstract/BaseApi.d.ts
CHANGED
|
@@ -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,13 +44,23 @@ 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;
|
|
47
|
-
|
|
51
|
+
/**
|
|
52
|
+
* method: vchat.clientStats
|
|
53
|
+
*/
|
|
54
|
+
logClientStats(items: ClientStats[]): void;
|
|
48
55
|
abstract getOkIdsByExternalIds(externalIds: ExternalId[]): Promise<OkUserId[]>;
|
|
49
56
|
abstract getParticipantIdsByExternalIds(externalIds: ExternalId[]): Promise<Map<ExternalId, ParticipantId>>;
|
|
50
57
|
abstract getExternalIdsByOkIds(uids: OkUserId[]): Promise<ExternalParticipantId[]>;
|
|
51
58
|
getCachedOkIdByExternalId(externalId: ExternalId): ParticipantId | null;
|
|
52
|
-
cacheExternalId(
|
|
59
|
+
cacheExternalId(compositeId: OkUserId | CompositeUserId | ParticipantId, externalId: ExternalParticipantId): void;
|
|
60
|
+
mapDecorativeId(decorativeId: OkUserId | CompositeUserId | ParticipantId, okId: OkUserId | CompositeUserId): void;
|
|
61
|
+
unmapDecorativeId(decorativeId: OkUserId | CompositeUserId | ParticipantId): void;
|
|
62
|
+
getDecorativeIdByInitialId(okId: OkUserId | CompositeUserId | ParticipantId): OkUserId | undefined;
|
|
63
|
+
replaceByInitialIdIdIfExists(id: OkUserId | CompositeUserId | ParticipantId): OkUserId;
|
|
53
64
|
hangupConversation(conversationId: string): void;
|
|
54
65
|
sendUserFeedbackStats(conversationId: string, userResponse: number, reason?: string, groupCallUsersCount?: number): void;
|
|
55
66
|
removeHistoryRecords(recordIds: number[]): Promise<void>;
|
|
@@ -19,9 +19,8 @@ import MuteStates from '../types/MuteStates';
|
|
|
19
19
|
import { CompositeUserId, ParticipantId } from '../types/Participant';
|
|
20
20
|
import { ParticipantLayout, RequestKeyFrame, StopStream } from '../types/ParticipantLayout';
|
|
21
21
|
import { ParticipantListChunkParameters } from '../types/ParticipantListChunk';
|
|
22
|
-
import SignalingMessage from '../types/SignalingMessage';
|
|
22
|
+
import SignalingMessage, { GetParticipantsSignalingResponse, GetRoomsSignalingResponse } from '../types/SignalingMessage';
|
|
23
23
|
import { IPublishStreamData, IRecordConfData, IStartStreamData, IStopStreamData } from '../types/Streams';
|
|
24
|
-
import { WaitingParticipantId } from '../types/WaitingHall';
|
|
25
24
|
import { SharingStatReport } from '../classes/screenshare/SharingStatReport';
|
|
26
25
|
/**
|
|
27
26
|
* Параметры добавления пользователя в звонок
|
|
@@ -73,7 +72,7 @@ export default abstract class BaseSignaling extends EventEmitter {
|
|
|
73
72
|
abstract updateRooms(rooms: Record<any, any>[], assignRandomly?: boolean): Promise<SignalingMessage>;
|
|
74
73
|
abstract activateRooms(roomIds: number[], deactivate: boolean): Promise<SignalingMessage>;
|
|
75
74
|
abstract switchRoom(toRoomId: number | null, participantId?: ParticipantId): Promise<SignalingMessage>;
|
|
76
|
-
abstract getRooms(withParticipants: boolean): Promise<
|
|
75
|
+
abstract getRooms(withParticipants: boolean): Promise<GetRoomsSignalingResponse>;
|
|
77
76
|
abstract removeRooms(roomIds: number[]): Promise<SignalingMessage>;
|
|
78
77
|
abstract startStream(data: IStartStreamData): Promise<SignalingMessage>;
|
|
79
78
|
abstract stopStream(data: IStopStreamData): Promise<SignalingMessage>;
|
|
@@ -92,10 +91,11 @@ export default abstract class BaseSignaling extends EventEmitter {
|
|
|
92
91
|
abstract enableFeatureForRoles(feature: ConversationFeature, roles: UserRole[]): Promise<SignalingMessage>;
|
|
93
92
|
abstract pinParticipant(participantId: ParticipantId, unpin: boolean, roomId: number | null): Promise<SignalingMessage>;
|
|
94
93
|
abstract updateMediaModifiers(mediaModifiers: MediaModifiers): Promise<SignalingMessage>;
|
|
94
|
+
abstract enableVideoSuspend(enabled: boolean): Promise<SignalingMessage>;
|
|
95
95
|
abstract changeOptions(changes: {
|
|
96
96
|
[key in ConversationOption]?: boolean;
|
|
97
97
|
}): Promise<SignalingMessage>;
|
|
98
|
-
abstract getWaitingHall(fromId: WaitingParticipantId | null, count?: number, backward?: boolean): Promise<SignalingMessage>;
|
|
98
|
+
abstract getWaitingHall(fromId: SignalingMessage.WaitingParticipantId | null, count?: number, backward?: boolean): Promise<SignalingMessage>;
|
|
99
99
|
abstract promoteParticipant(participantId: CompositeUserId, demote?: boolean): Promise<SignalingMessage>;
|
|
100
100
|
abstract requestPromotion(unrequest: boolean): Promise<SignalingMessage>;
|
|
101
101
|
abstract acceptPromotion(reject: boolean): Promise<SignalingMessage>;
|
|
@@ -105,7 +105,7 @@ export default abstract class BaseSignaling extends EventEmitter {
|
|
|
105
105
|
abstract setProducerCommandDataChannel(dataChannel: RTCDataChannel): void;
|
|
106
106
|
abstract useCommandDataChannel(status: boolean): void;
|
|
107
107
|
abstract getParticipantListChunk(participantListChunkParameters: ParticipantListChunkParameters): Promise<SignalingMessage>;
|
|
108
|
-
abstract getParticipants(externalIds: SignalingMessage.ExternalId[]): Promise<
|
|
108
|
+
abstract getParticipants(externalIds: SignalingMessage.ExternalId[]): Promise<GetParticipantsSignalingResponse>;
|
|
109
109
|
abstract startAsr(params: IAsrStartParams): Promise<SignalingMessage>;
|
|
110
110
|
abstract stopAsr(params?: IAsrStopParams): Promise<SignalingMessage>;
|
|
111
111
|
abstract requestAsr(request: boolean): Promise<SignalingMessage>;
|