@vkontakte/calls-sdk 2.8.11-dev.273c92c2.0 → 2.8.11-dev.3630109f.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 +60 -10
- package/abstract/BaseSignaling.d.ts +4 -3
- package/calls-sdk.cjs.js +9 -9
- package/calls-sdk.esm.js +4453 -4318
- package/classes/Conversation.d.ts +12 -11
- package/classes/DisplayLayoutRequester.d.ts +36 -0
- package/classes/MediaSource.d.ts +0 -7
- package/classes/SignalingActor.d.ts +0 -5
- package/classes/transport/Transport.d.ts +0 -2
- package/enums/HangupType.d.ts +2 -1
- package/enums/SignalingNotification.d.ts +1 -2
- package/package.json +1 -1
- package/static/External.d.ts +15 -38
- package/static/Params.d.ts +22 -28
- package/types/FastStart.d.ts +1 -0
- package/types/ParticipantLayout.d.ts +33 -0
- package/types/SignalingMessage.d.ts +4 -4
- package/utils/DebugStorage.d.ts +101 -1
- package/classes/CallRegistry.d.ts +0 -22
- package/static/Capabilities.d.ts +0 -5
- package/static/ConversationDebugLogger.d.ts +0 -13
- package/types/Capabilities.d.ts +0 -24
package/CallsSDK.d.ts
CHANGED
|
@@ -30,6 +30,7 @@ import SignalingNotification from './enums/SignalingNotification';
|
|
|
30
30
|
import UserRole from './enums/UserRole';
|
|
31
31
|
import UserType from './enums/UserType';
|
|
32
32
|
import { DebugMessageType } from './static/Debug';
|
|
33
|
+
import * as DebugStorage from './utils/DebugStorage';
|
|
33
34
|
import { ParticipantStatus } from './static/External';
|
|
34
35
|
import { JSONArray, JSONObject, JSONType } from './static/Json';
|
|
35
36
|
import { ParamsObject } from './static/Params';
|
|
@@ -49,7 +50,7 @@ import { IAddMovieParams, IMovieMetaData, IMoviePreview, IOnRemoteMovieData, ISh
|
|
|
49
50
|
import MuteStates, { IMuteParticipantInternalParams, IMuteParticipantParams } from './types/MuteStates';
|
|
50
51
|
import { IAPIBaseUrl, IApiEnv } from './types/Params';
|
|
51
52
|
import { CompositeUserId, IGetParticipantsParameters, OkUserId, ParticipantId, ParticipantListMarker, ParticipantListMarkers, ParticipantListType, ParticipantsStateList, ParticipantStateMapped, ParticipantStateData, ParticipantStateDataKey, ParticipantStateDataValue } from './types/Participant';
|
|
52
|
-
import ParticipantLayout, { Layout, RequestKeyFrame, StopStream } from './types/ParticipantLayout';
|
|
53
|
+
import ParticipantLayout, { DisplayLayoutRequest, Layout, RequestKeyFrame, StopStream } from './types/ParticipantLayout';
|
|
53
54
|
import { ParticipantListChunkParameters } from './types/ParticipantListChunk';
|
|
54
55
|
import ParticipantPriority from './types/ParticipantPriority';
|
|
55
56
|
import { MediaType, ParticipantStreamDescription } from './types/ParticipantStreamDescription';
|
|
@@ -66,6 +67,7 @@ import { VmojiError } from './types/Vmoji';
|
|
|
66
67
|
import { VolumeDetector } from './classes/VolumeDetector';
|
|
67
68
|
import { FastStartHandler, FastStartParams } from './types/FastStart';
|
|
68
69
|
import { FastJoinHandler, FastJoinParams, FastJoinResponse } from './types/FastJoin';
|
|
70
|
+
export type { CurrentLogItem, DebugLogGetParams, DebugLogSessionInfo, DebugLogStorageStats } from './utils/DebugStorage';
|
|
69
71
|
/**
|
|
70
72
|
* Информация о текущем браузере
|
|
71
73
|
*/
|
|
@@ -265,11 +267,11 @@ export declare function authorize(authToken?: string, apiBaseUrl?: IAPIBaseUrl):
|
|
|
265
267
|
*
|
|
266
268
|
* @param mediaOptions Нужно ли включать камеру и микрофон
|
|
267
269
|
*/
|
|
268
|
-
export declare function acceptCall(mediaOptions?: MediaOption[]
|
|
270
|
+
export declare function acceptCall(mediaOptions?: MediaOption[]): Promise<ConversationData>;
|
|
269
271
|
/**
|
|
270
272
|
* Отклонить входящий звонок
|
|
271
273
|
*/
|
|
272
|
-
export declare function declineCall(
|
|
274
|
+
export declare function declineCall(): Promise<void>;
|
|
273
275
|
/**
|
|
274
276
|
* Присоединиться к активному звонку
|
|
275
277
|
*
|
|
@@ -292,7 +294,7 @@ export declare function joinCallByLink(joinLink: string, mediaOptions?: MediaOpt
|
|
|
292
294
|
/**
|
|
293
295
|
* Завершить текущий разговор
|
|
294
296
|
*/
|
|
295
|
-
export declare function hangup(
|
|
297
|
+
export declare function hangup(): Promise<void>;
|
|
296
298
|
/**
|
|
297
299
|
* Добавить собеседника в звонок
|
|
298
300
|
*
|
|
@@ -340,7 +342,7 @@ export declare function changeDevice(kind: MediaDeviceKind, deviceId: string): P
|
|
|
340
342
|
* state Включить или выключить захват экрана
|
|
341
343
|
* settings Параметры захваты экрана
|
|
342
344
|
*/
|
|
343
|
-
export declare function captureScreen(stateOrSettings: boolean | ScreenCaptureSettings
|
|
345
|
+
export declare function captureScreen(stateOrSettings: boolean | ScreenCaptureSettings): Promise<void>;
|
|
344
346
|
/**
|
|
345
347
|
* Включить/выключить передачу точек вимоджи
|
|
346
348
|
*
|
|
@@ -361,13 +363,13 @@ export declare function setVideoStream(stream: MediaStream, isScreen?: boolean):
|
|
|
361
363
|
*
|
|
362
364
|
* @param enabled
|
|
363
365
|
*/
|
|
364
|
-
export declare function toggleLocalVideo(enabled: boolean
|
|
366
|
+
export declare function toggleLocalVideo(enabled: boolean): Promise<void>;
|
|
365
367
|
/**
|
|
366
368
|
* Включить или выключить свой микрофон
|
|
367
369
|
*
|
|
368
370
|
* @param enabled
|
|
369
371
|
*/
|
|
370
|
-
export declare function toggleLocalAudio(enabled: boolean
|
|
372
|
+
export declare function toggleLocalAudio(enabled: boolean): Promise<void>;
|
|
371
373
|
/**
|
|
372
374
|
* Изменяет размеры локального видео
|
|
373
375
|
*
|
|
@@ -393,6 +395,12 @@ export declare function changePriorities(priorities: ParticipantPriority[]): Pro
|
|
|
393
395
|
* @param externalId Внешний ID пользователя
|
|
394
396
|
*/
|
|
395
397
|
export declare function changeParticipantState(state: ParticipantStateData, externalId?: ExternalId): Promise<void>;
|
|
398
|
+
/**
|
|
399
|
+
* Ставит звонок на удержание
|
|
400
|
+
*
|
|
401
|
+
* @param hold - true/false
|
|
402
|
+
*/
|
|
403
|
+
export declare function hold(hold: boolean): Promise<void>;
|
|
396
404
|
/**
|
|
397
405
|
* Принудительно опустить руки участников в текущем сессионном зале админа
|
|
398
406
|
*/
|
|
@@ -404,6 +412,12 @@ export declare function putHandsDown(): Promise<void>;
|
|
|
404
412
|
* @param layout Список приоритетов
|
|
405
413
|
*/
|
|
406
414
|
export declare function updateDisplayLayout(layout: ParticipantLayout[]): Promise<void>;
|
|
415
|
+
/**
|
|
416
|
+
* Запрашивает стримы, которые клиент хочет получать для отображения.
|
|
417
|
+
*
|
|
418
|
+
* @param requests Полный список стримов, которые должны приходить на клиент
|
|
419
|
+
*/
|
|
420
|
+
export declare function requestDisplayLayout(requests: DisplayLayoutRequest[]): Promise<void>;
|
|
407
421
|
/**
|
|
408
422
|
* Выдать или забрать роли в звонке пользователю
|
|
409
423
|
*
|
|
@@ -635,6 +649,38 @@ export declare function debug(enabled: boolean): void;
|
|
|
635
649
|
* @param args
|
|
636
650
|
*/
|
|
637
651
|
export declare function debugMessage(type: DebugMessageType, ...args: any[]): void;
|
|
652
|
+
/**
|
|
653
|
+
* Локальные отладочные логи, сохраненные в браузере.
|
|
654
|
+
*
|
|
655
|
+
* Работает при включенном параметре `debugLog: true`.
|
|
656
|
+
* Логи хранятся в IndexedDB: последние 10 звонков, максимум 25 МБ суммарно.
|
|
657
|
+
*/
|
|
658
|
+
export declare const debugLogs: {
|
|
659
|
+
/**
|
|
660
|
+
* Возвращает список сохраненных локальных сессий логирования.
|
|
661
|
+
*/
|
|
662
|
+
list: typeof DebugStorage.list;
|
|
663
|
+
/**
|
|
664
|
+
* Возвращает логи конкретного звонка.
|
|
665
|
+
*/
|
|
666
|
+
get: typeof DebugStorage.get;
|
|
667
|
+
/**
|
|
668
|
+
* Возвращает логи конкретного звонка JSON-строкой.
|
|
669
|
+
*/
|
|
670
|
+
getJson: typeof DebugStorage.getJson;
|
|
671
|
+
/**
|
|
672
|
+
* Скачивает логи конкретного звонка JSON-файлом.
|
|
673
|
+
*/
|
|
674
|
+
download: typeof DebugStorage.download;
|
|
675
|
+
/**
|
|
676
|
+
* Очищает логи конкретного звонка или все локальные логи SDK.
|
|
677
|
+
*/
|
|
678
|
+
clear: typeof DebugStorage.clear;
|
|
679
|
+
/**
|
|
680
|
+
* Возвращает статистику локального хранилища логов.
|
|
681
|
+
*/
|
|
682
|
+
stats: typeof DebugStorage.stats;
|
|
683
|
+
};
|
|
638
684
|
/**
|
|
639
685
|
* Отправляет клиенские логи по conversationId на сервер OK
|
|
640
686
|
* @example можно посмотреть в examples/anonym/index.html
|
|
@@ -745,11 +791,15 @@ export declare function stopUrlSharing(): Promise<void>;
|
|
|
745
791
|
export declare function sendTestCommand(name: string, params?: any): void;
|
|
746
792
|
export declare function startAnalyzingAudio(expectAudio: boolean, expectedActiveTracks?: number | null, expectedTrackFrequencies?: number[] | null): void;
|
|
747
793
|
export declare function stopAnalyzingAudio(): void;
|
|
748
|
-
|
|
749
|
-
|
|
794
|
+
/**
|
|
795
|
+
* Возвращает текущее время, скорректированное на смещение относительно серверного времени.
|
|
796
|
+
* Доступно после установки соединения (начало/присоединение к звонку).
|
|
797
|
+
* Если активного звонка нет — возвращает Date.now().
|
|
798
|
+
*/
|
|
799
|
+
export declare function getSyncedTime(): number;
|
|
750
800
|
/**
|
|
751
801
|
* Версия SDK
|
|
752
802
|
*/
|
|
753
803
|
export declare function version(): string;
|
|
754
|
-
export type { AddParticipantParams, AudienceModeHandsResponse, BrowserName, CompositeUserId, ConversationData, ConversationParams, ConversationResponse, CustomError, ExternalId, ExternalParticipant, ExternalParticipantListChunk, ExternalParticipantListMarker, ExternalParticipantListMarkers as ExternalParticipantMarkers, ExternalParticipantId, 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, };
|
|
804
|
+
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, };
|
|
755
805
|
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, };
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import EventEmitter from '../classes/EventEmitter';
|
|
2
2
|
import { ParticipantIdRegistry } from '../classes/ParticipantIdRegistry';
|
|
3
|
-
import { TCapabilities } from '../types/Capabilities';
|
|
4
3
|
import { StreamDescriptionString } from '../types/ParticipantStreamDescription';
|
|
5
4
|
import { PerfStatReport } from '../types/PerfStatReporter';
|
|
6
5
|
import { NetworkStatReport } from '../types/NetworkStatReport';
|
|
@@ -62,12 +61,14 @@ export default abstract class BaseSignaling extends EventEmitter {
|
|
|
62
61
|
abstract sendCandidate(participantId: ParticipantId, candidate: RTCIceCandidate): Promise<SignalingMessage>;
|
|
63
62
|
abstract changeMediaSettings(mediaSettings: MediaSettings): Promise<SignalingMessage>;
|
|
64
63
|
abstract changeParticipantState(state: ParticipantStateData, compositeUserId?: CompositeUserId): Promise<SignalingMessage>;
|
|
65
|
-
abstract hold(hold: boolean
|
|
64
|
+
abstract hold(hold: boolean): Promise<SignalingMessage>;
|
|
66
65
|
abstract putHandsDown(): Promise<SignalingMessage>;
|
|
67
66
|
abstract addParticipant(externalIds: CompositeUserId[], params?: AddParticipantParams): Promise<SignalingMessage>;
|
|
68
67
|
abstract addParticipantLegacy(participantIds: CompositeUserId[], params?: AddParticipantParams): Promise<SignalingMessage>;
|
|
69
68
|
abstract removeParticipant(participantId: CompositeUserId, ban?: boolean): Promise<SignalingMessage>;
|
|
70
|
-
abstract allocateConsumer(description: RTCSessionDescription | null, capabilities:
|
|
69
|
+
abstract allocateConsumer(description: RTCSessionDescription | null, capabilities: {
|
|
70
|
+
[key: string]: number | boolean | string;
|
|
71
|
+
}): Promise<SignalingMessage>;
|
|
71
72
|
abstract acceptProducer(description: RTCSessionDescriptionInit, ssrcs: string[], sessionId: string): Promise<SignalingMessage>;
|
|
72
73
|
/**
|
|
73
74
|
* @deprecated Use updateDisplayLayout instead
|