@vkontakte/calls-sdk 2.8.11-dev.fdf6f999.0 → 2.8.12-beta.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 +12 -24
- package/abstract/BaseApi.d.ts +4 -5
- package/abstract/BaseSignaling.d.ts +3 -4
- package/calls-sdk.cjs.js +9 -11
- package/calls-sdk.esm.js +6147 -5794
- package/classes/CallRegistry.d.ts +26 -0
- package/classes/Conversation.d.ts +48 -31
- package/classes/MediaSource.d.ts +7 -0
- package/classes/SpecListener.d.ts +5 -0
- package/classes/StatsLogger.d.ts +17 -5
- package/classes/codec/WorkerBase.d.ts +2 -0
- package/classes/stat/CallLifecycleStats.d.ts +47 -0
- package/classes/stat/ConversationStats.d.ts +5 -4
- package/classes/stat/FirstMediaSentProbe.d.ts +13 -0
- package/classes/stat/StatPings.d.ts +1 -2
- package/classes/stat/StatSignalingCommands.d.ts +1 -2
- package/classes/transport/BaseTransport.d.ts +7 -1
- package/classes/transport/DirectTransport.d.ts +6 -11
- package/classes/transport/ServerTransport.d.ts +1 -15
- package/classes/transport/Transport.d.ts +9 -21
- package/default/Api.d.ts +9 -8
- package/default/Signaling.d.ts +2 -0
- package/default/SignalingTransport.d.ts +3 -1
- package/enums/HangupType.d.ts +1 -0
- package/enums/SignalingNotification.d.ts +3 -1
- package/enums/Stat.d.ts +6 -1
- package/package.json +1 -1
- package/static/Capabilities.d.ts +5 -0
- package/static/External.d.ts +143 -76
- package/static/Params.d.ts +103 -100
- package/static/ParticipantConnectionStatusUtils.d.ts +16 -0
- package/types/Capabilities.d.ts +24 -0
- package/types/Conversation.d.ts +12 -2
- package/types/ExternalId.d.ts +1 -1
- package/types/Participant.d.ts +12 -1
- package/types/PushData.d.ts +3 -0
- package/types/SignalingMessage.d.ts +14 -1
- package/types/Statistics.d.ts +0 -4
- package/types/WebTransport.d.ts +3 -1
- package/static/DebugVideoStats.d.ts +0 -37
- package/types/VideoStreamDebug.d.ts +0 -5
package/CallsSDK.d.ts
CHANGED
|
@@ -59,7 +59,6 @@ import { ScreenCaptureSettings } from './types/ScreenCaptureSettings';
|
|
|
59
59
|
import SignalingMessage, { GetRoomsSignalingResponse, GetParticipantsSignalingResponse } from './types/SignalingMessage';
|
|
60
60
|
import { StatResult } from './types/Statistics';
|
|
61
61
|
import { IStartStreamData, IStopStreamData, IPublishStreamData } from './types/Streams';
|
|
62
|
-
import type { VideoStreamDebugInfo } from './types/VideoStreamDebug';
|
|
63
62
|
import { WaitingHallResponse } from './types/WaitingHall';
|
|
64
63
|
import { ArrayDequeue } from './utils/ArrayDequeue';
|
|
65
64
|
import { ApiExternal } from './default/ApiExternal';
|
|
@@ -68,6 +67,7 @@ import { VmojiError } from './types/Vmoji';
|
|
|
68
67
|
import { VolumeDetector } from './classes/VolumeDetector';
|
|
69
68
|
import { FastStartHandler, FastStartParams } from './types/FastStart';
|
|
70
69
|
import { FastJoinHandler, FastJoinParams, FastJoinResponse } from './types/FastJoin';
|
|
70
|
+
import PushData from './types/PushData';
|
|
71
71
|
export type { CurrentLogItem, DebugLogGetParams, DebugLogSessionInfo, DebugLogStorageStats } from './utils/DebugStorage';
|
|
72
72
|
/**
|
|
73
73
|
* Информация о текущем браузере
|
|
@@ -256,6 +256,7 @@ export declare function callInternal(ids: OkUserId[], type: CallType | undefined
|
|
|
256
256
|
*/
|
|
257
257
|
export declare function processPush(conversationId: string, conversationParams?: string): Promise<void>;
|
|
258
258
|
export declare function processPushInternal(conversationId: string, type?: UserType, peerId?: number, conversationParams?: string, wsEndpoint?: string, userId?: number): Promise<void>;
|
|
259
|
+
export declare function getInbounds(): Promise<PushData[]>;
|
|
259
260
|
/**
|
|
260
261
|
* Авторизоваться для совершения звонков
|
|
261
262
|
*
|
|
@@ -268,11 +269,11 @@ export declare function authorize(authToken?: string, apiBaseUrl?: IAPIBaseUrl):
|
|
|
268
269
|
*
|
|
269
270
|
* @param mediaOptions Нужно ли включать камеру и микрофон
|
|
270
271
|
*/
|
|
271
|
-
export declare function acceptCall(mediaOptions?: MediaOption[]): Promise<ConversationData>;
|
|
272
|
+
export declare function acceptCall(mediaOptions?: MediaOption[], conversationId?: string): Promise<ConversationData>;
|
|
272
273
|
/**
|
|
273
274
|
* Отклонить входящий звонок
|
|
274
275
|
*/
|
|
275
|
-
export declare function declineCall(): Promise<void>;
|
|
276
|
+
export declare function declineCall(conversationId?: string): Promise<void>;
|
|
276
277
|
/**
|
|
277
278
|
* Присоединиться к активному звонку
|
|
278
279
|
*
|
|
@@ -295,7 +296,7 @@ export declare function joinCallByLink(joinLink: string, mediaOptions?: MediaOpt
|
|
|
295
296
|
/**
|
|
296
297
|
* Завершить текущий разговор
|
|
297
298
|
*/
|
|
298
|
-
export declare function hangup(): Promise<void>;
|
|
299
|
+
export declare function hangup(conversationId?: string): Promise<void>;
|
|
299
300
|
/**
|
|
300
301
|
* Добавить собеседника в звонок
|
|
301
302
|
*
|
|
@@ -343,7 +344,7 @@ export declare function changeDevice(kind: MediaDeviceKind, deviceId: string): P
|
|
|
343
344
|
* state Включить или выключить захват экрана
|
|
344
345
|
* settings Параметры захваты экрана
|
|
345
346
|
*/
|
|
346
|
-
export declare function captureScreen(stateOrSettings: boolean | ScreenCaptureSettings): Promise<void>;
|
|
347
|
+
export declare function captureScreen(stateOrSettings: boolean | ScreenCaptureSettings, conversationId?: string): Promise<void>;
|
|
347
348
|
/**
|
|
348
349
|
* Включить/выключить передачу точек вимоджи
|
|
349
350
|
*
|
|
@@ -364,13 +365,13 @@ export declare function setVideoStream(stream: MediaStream, isScreen?: boolean):
|
|
|
364
365
|
*
|
|
365
366
|
* @param enabled
|
|
366
367
|
*/
|
|
367
|
-
export declare function toggleLocalVideo(enabled: boolean): Promise<void>;
|
|
368
|
+
export declare function toggleLocalVideo(enabled: boolean, conversationId?: string): Promise<void>;
|
|
368
369
|
/**
|
|
369
370
|
* Включить или выключить свой микрофон
|
|
370
371
|
*
|
|
371
372
|
* @param enabled
|
|
372
373
|
*/
|
|
373
|
-
export declare function toggleLocalAudio(enabled: boolean): Promise<void>;
|
|
374
|
+
export declare function toggleLocalAudio(enabled: boolean, conversationId?: string): Promise<void>;
|
|
374
375
|
/**
|
|
375
376
|
* Изменяет размеры локального видео
|
|
376
377
|
*
|
|
@@ -396,12 +397,6 @@ export declare function changePriorities(priorities: ParticipantPriority[]): Pro
|
|
|
396
397
|
* @param externalId Внешний ID пользователя
|
|
397
398
|
*/
|
|
398
399
|
export declare function changeParticipantState(state: ParticipantStateData, externalId?: ExternalId): Promise<void>;
|
|
399
|
-
/**
|
|
400
|
-
* Ставит звонок на удержание
|
|
401
|
-
*
|
|
402
|
-
* @param hold - true/false
|
|
403
|
-
*/
|
|
404
|
-
export declare function hold(hold: boolean): Promise<void>;
|
|
405
400
|
/**
|
|
406
401
|
* Принудительно опустить руки участников в текущем сессионном зале админа
|
|
407
402
|
*/
|
|
@@ -749,16 +744,7 @@ export declare function acceptPromotion(reject?: boolean): Promise<void>;
|
|
|
749
744
|
export declare function getParticipantListChunk(participantListChunkParameters: ParticipantListChunkParameters): Promise<ExternalParticipantListChunk>;
|
|
750
745
|
export declare function getParticipants(parameters: IGetParticipantsParameters): Promise<ExternalParticipant[]>;
|
|
751
746
|
export declare function feedback(key: string): Promise<SignalingMessage>;
|
|
752
|
-
export declare function
|
|
753
|
-
/**
|
|
754
|
-
* Логирует клиентское событие статистики
|
|
755
|
-
*
|
|
756
|
-
* @param eventType Тип события
|
|
757
|
-
* @param eventData Дополнительные данные события
|
|
758
|
-
* @param immediatelty Отправить ли событие немедленно
|
|
759
|
-
*/
|
|
760
|
-
export declare function logClientEvent(eventType: string, eventData?: Record<string, string | number | boolean>, immediately?: boolean): void;
|
|
761
|
-
export declare function enableFeatureForRoles(feature: ConversationFeature, roles: UserRole[]): Promise<void>;
|
|
747
|
+
export declare function enableFeatureForRoles(feature: ConversationFeature, roles: UserRole[], conversationId?: string): Promise<void>;
|
|
762
748
|
/**
|
|
763
749
|
* Удаляет записи истории звонков
|
|
764
750
|
*
|
|
@@ -782,6 +768,8 @@ export declare function stopUrlSharing(): Promise<void>;
|
|
|
782
768
|
export declare function sendTestCommand(name: string, params?: any): void;
|
|
783
769
|
export declare function startAnalyzingAudio(expectAudio: boolean, expectedActiveTracks?: number | null, expectedTrackFrequencies?: number[] | null): void;
|
|
784
770
|
export declare function stopAnalyzingAudio(): void;
|
|
771
|
+
export declare function switchCall(conversationId: string): Promise<void>;
|
|
772
|
+
export declare function getActiveCallId(): string | null;
|
|
785
773
|
/**
|
|
786
774
|
* Возвращает текущее время, скорректированное на смещение относительно серверного времени.
|
|
787
775
|
* Доступно после установки соединения (начало/присоединение к звонку).
|
|
@@ -792,5 +780,5 @@ export declare function getSyncedTime(): number;
|
|
|
792
780
|
* Версия SDK
|
|
793
781
|
*/
|
|
794
782
|
export declare function version(): string;
|
|
795
|
-
export type { AddParticipantParams, AudienceModeHandsResponse, BrowserName, 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,
|
|
783
|
+
export type { AddParticipantParams, AudienceModeHandsResponse, BrowserName, 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, };
|
|
796
784
|
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, };
|
package/abstract/BaseApi.d.ts
CHANGED
|
@@ -5,7 +5,9 @@ import ConversationParams from '../types/ConversationParams';
|
|
|
5
5
|
import ConversationResponse from '../types/ConversationResponse';
|
|
6
6
|
import { ExternalId, ExternalParticipantId, ExternalUserId } from '../types/ExternalId';
|
|
7
7
|
import { CompositeUserId, OkUserId, ParticipantId } from '../types/Participant';
|
|
8
|
+
import PushData from '../types/PushData';
|
|
8
9
|
export type ClientStats = {
|
|
10
|
+
call_topology: 'D' | 'S';
|
|
9
11
|
vcid: ConversationData['id'] | null;
|
|
10
12
|
[k: string]: string | number | boolean | null;
|
|
11
13
|
};
|
|
@@ -68,14 +70,10 @@ export default abstract class BaseApi {
|
|
|
68
70
|
* method: vchat.clientStats
|
|
69
71
|
*/
|
|
70
72
|
logClientStats(items: ClientStats[]): void;
|
|
71
|
-
/**
|
|
72
|
-
* method: vchat.clientEvents
|
|
73
|
-
*/
|
|
74
|
-
logClientEvents(items: ClientEvent[]): void;
|
|
75
73
|
abstract uploadDebugLogs(conversationId: string, startTime: number, endTime: number, log: string): Promise<void>;
|
|
76
|
-
abstract getExternalIdsByOkIds(uids: OkUserId[]): Promise<ExternalParticipantId[]>;
|
|
77
74
|
getCachedOkIdByExternalId(externalId: ExternalId): ParticipantId | null;
|
|
78
75
|
getCachedRawOkIdByExternalId(externalId: ExternalId): OkUserId | null;
|
|
76
|
+
getCachedExternalIdByOkId(okId: OkUserId): ExternalParticipantId | null;
|
|
79
77
|
cacheExternalId(compositeId: OkUserId | CompositeUserId | ParticipantId, externalId: ExternalParticipantId): void;
|
|
80
78
|
mapDecorativeId(decorativeId: OkUserId | CompositeUserId | ParticipantId, okId: OkUserId | CompositeUserId): void;
|
|
81
79
|
unmapDecorativeId(decorativeId: OkUserId | CompositeUserId | ParticipantId): void;
|
|
@@ -85,4 +83,5 @@ export default abstract class BaseApi {
|
|
|
85
83
|
removeHistoryRecords(recordIds: number[]): Promise<void>;
|
|
86
84
|
getServerTime(): Promise<number>;
|
|
87
85
|
cleanup(): void;
|
|
86
|
+
getInbounds(): Promise<PushData[]>;
|
|
88
87
|
}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import EventEmitter from '../classes/EventEmitter';
|
|
2
2
|
import { ParticipantIdRegistry } from '../classes/ParticipantIdRegistry';
|
|
3
|
+
import { TCapabilities } from '../types/Capabilities';
|
|
3
4
|
import { StreamDescriptionString } from '../types/ParticipantStreamDescription';
|
|
4
5
|
import { PerfStatReport } from '../types/PerfStatReporter';
|
|
5
6
|
import { NetworkStatReport } from '../types/NetworkStatReport';
|
|
@@ -61,14 +62,12 @@ export default abstract class BaseSignaling extends EventEmitter {
|
|
|
61
62
|
abstract sendCandidate(participantId: ParticipantId, candidate: RTCIceCandidate): Promise<SignalingMessage>;
|
|
62
63
|
abstract changeMediaSettings(mediaSettings: MediaSettings): Promise<SignalingMessage>;
|
|
63
64
|
abstract changeParticipantState(state: ParticipantStateData, compositeUserId?: CompositeUserId): Promise<SignalingMessage>;
|
|
64
|
-
abstract hold(hold: boolean): Promise<SignalingMessage>;
|
|
65
|
+
abstract hold(hold: boolean, capabilities?: TCapabilities): Promise<SignalingMessage>;
|
|
65
66
|
abstract putHandsDown(): Promise<SignalingMessage>;
|
|
66
67
|
abstract addParticipant(externalIds: CompositeUserId[], params?: AddParticipantParams): Promise<SignalingMessage>;
|
|
67
68
|
abstract addParticipantLegacy(participantIds: CompositeUserId[], params?: AddParticipantParams): Promise<SignalingMessage>;
|
|
68
69
|
abstract removeParticipant(participantId: CompositeUserId, ban?: boolean): Promise<SignalingMessage>;
|
|
69
|
-
abstract allocateConsumer(description: RTCSessionDescription | null, capabilities:
|
|
70
|
-
[key: string]: number | boolean | string;
|
|
71
|
-
}): Promise<SignalingMessage>;
|
|
70
|
+
abstract allocateConsumer(description: RTCSessionDescription | null, capabilities: TCapabilities): Promise<SignalingMessage>;
|
|
72
71
|
abstract acceptProducer(description: RTCSessionDescriptionInit, ssrcs: string[], sessionId: string): Promise<SignalingMessage>;
|
|
73
72
|
/**
|
|
74
73
|
* @deprecated Use updateDisplayLayout instead
|