@vkontakte/calls-sdk 2.8.11-dev.882b025a.0 → 2.8.11-dev.aeebd796.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 +42 -12
- package/abstract/BaseApi.d.ts +1 -1
- package/abstract/BaseSignaling.d.ts +4 -3
- package/calls-sdk.cjs.js +16 -13
- package/calls-sdk.esm.js +11323 -13
- package/classes/Conversation.d.ts +7 -9
- package/classes/Logger.d.ts +4 -4
- package/classes/MediaSource.d.ts +0 -7
- package/classes/SignalingActor.d.ts +0 -5
- package/default/Signaling.d.ts +2 -1
- package/package.json +1 -1
- package/static/Debug.d.ts +4 -4
- package/static/External.d.ts +14 -38
- package/static/Params.d.ts +14 -22
- package/types/PerfStatReporter.d.ts +2 -1
- package/types/WebTransport.d.ts +1 -0
- package/utils/DebugStorage.d.ts +101 -1
- package/classes/CallRegistry.d.ts +0 -20
- 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
|
@@ -6,7 +6,6 @@ import type { EffectVoiceChange } from '@vkontakte/calls-audio-effects';
|
|
|
6
6
|
import type * as Vmoji from '@vkontakte/calls-vmoji';
|
|
7
7
|
import BaseLogger from './abstract/BaseLogger';
|
|
8
8
|
import { AddParticipantParams } from './abstract/BaseSignaling';
|
|
9
|
-
import Conversation from './classes/Conversation';
|
|
10
9
|
import HangupReason, { HangupReasonData, CustomError } from './classes/HangupReason';
|
|
11
10
|
import { MediaTrackKind } from './classes/MediaSource';
|
|
12
11
|
import { AudienceModeHandsResponse } from './types/AudienceMode';
|
|
@@ -31,6 +30,7 @@ import SignalingNotification from './enums/SignalingNotification';
|
|
|
31
30
|
import UserRole from './enums/UserRole';
|
|
32
31
|
import UserType from './enums/UserType';
|
|
33
32
|
import { DebugMessageType } from './static/Debug';
|
|
33
|
+
import * as DebugStorage from './utils/DebugStorage';
|
|
34
34
|
import { ParticipantStatus } from './static/External';
|
|
35
35
|
import { JSONArray, JSONObject, JSONType } from './static/Json';
|
|
36
36
|
import { ParamsObject } from './static/Params';
|
|
@@ -67,6 +67,7 @@ import { VmojiError } from './types/Vmoji';
|
|
|
67
67
|
import { VolumeDetector } from './classes/VolumeDetector';
|
|
68
68
|
import { FastStartHandler, FastStartParams } from './types/FastStart';
|
|
69
69
|
import { FastJoinHandler, FastJoinParams, FastJoinResponse } from './types/FastJoin';
|
|
70
|
+
export type { CurrentLogItem, DebugLogGetParams, DebugLogSessionInfo, DebugLogStorageStats } from './utils/DebugStorage';
|
|
70
71
|
/**
|
|
71
72
|
* Информация о текущем браузере
|
|
72
73
|
*/
|
|
@@ -266,11 +267,11 @@ export declare function authorize(authToken?: string, apiBaseUrl?: IAPIBaseUrl):
|
|
|
266
267
|
*
|
|
267
268
|
* @param mediaOptions Нужно ли включать камеру и микрофон
|
|
268
269
|
*/
|
|
269
|
-
export declare function acceptCall(mediaOptions?: MediaOption[]
|
|
270
|
+
export declare function acceptCall(mediaOptions?: MediaOption[]): Promise<ConversationData>;
|
|
270
271
|
/**
|
|
271
272
|
* Отклонить входящий звонок
|
|
272
273
|
*/
|
|
273
|
-
export declare function declineCall(
|
|
274
|
+
export declare function declineCall(): Promise<void>;
|
|
274
275
|
/**
|
|
275
276
|
* Присоединиться к активному звонку
|
|
276
277
|
*
|
|
@@ -293,7 +294,7 @@ export declare function joinCallByLink(joinLink: string, mediaOptions?: MediaOpt
|
|
|
293
294
|
/**
|
|
294
295
|
* Завершить текущий разговор
|
|
295
296
|
*/
|
|
296
|
-
export declare function hangup(
|
|
297
|
+
export declare function hangup(): Promise<void>;
|
|
297
298
|
/**
|
|
298
299
|
* Добавить собеседника в звонок
|
|
299
300
|
*
|
|
@@ -341,7 +342,7 @@ export declare function changeDevice(kind: MediaDeviceKind, deviceId: string): P
|
|
|
341
342
|
* state Включить или выключить захват экрана
|
|
342
343
|
* settings Параметры захваты экрана
|
|
343
344
|
*/
|
|
344
|
-
export declare function captureScreen(stateOrSettings: boolean | ScreenCaptureSettings
|
|
345
|
+
export declare function captureScreen(stateOrSettings: boolean | ScreenCaptureSettings): Promise<void>;
|
|
345
346
|
/**
|
|
346
347
|
* Включить/выключить передачу точек вимоджи
|
|
347
348
|
*
|
|
@@ -362,13 +363,13 @@ export declare function setVideoStream(stream: MediaStream, isScreen?: boolean):
|
|
|
362
363
|
*
|
|
363
364
|
* @param enabled
|
|
364
365
|
*/
|
|
365
|
-
export declare function toggleLocalVideo(enabled: boolean
|
|
366
|
+
export declare function toggleLocalVideo(enabled: boolean): Promise<void>;
|
|
366
367
|
/**
|
|
367
368
|
* Включить или выключить свой микрофон
|
|
368
369
|
*
|
|
369
370
|
* @param enabled
|
|
370
371
|
*/
|
|
371
|
-
export declare function toggleLocalAudio(enabled: boolean
|
|
372
|
+
export declare function toggleLocalAudio(enabled: boolean): Promise<void>;
|
|
372
373
|
/**
|
|
373
374
|
* Изменяет размеры локального видео
|
|
374
375
|
*
|
|
@@ -399,7 +400,7 @@ export declare function changeParticipantState(state: ParticipantStateData, exte
|
|
|
399
400
|
*
|
|
400
401
|
* @param hold - true/false
|
|
401
402
|
*/
|
|
402
|
-
export declare function hold(hold: boolean
|
|
403
|
+
export declare function hold(hold: boolean): Promise<void>;
|
|
403
404
|
/**
|
|
404
405
|
* Принудительно опустить руки участников в текущем сессионном зале админа
|
|
405
406
|
*/
|
|
@@ -642,6 +643,38 @@ export declare function debug(enabled: boolean): void;
|
|
|
642
643
|
* @param args
|
|
643
644
|
*/
|
|
644
645
|
export declare function debugMessage(type: DebugMessageType, ...args: any[]): void;
|
|
646
|
+
/**
|
|
647
|
+
* Локальные отладочные логи, сохраненные в браузере.
|
|
648
|
+
*
|
|
649
|
+
* Работает при включенном параметре `debugLog: true`.
|
|
650
|
+
* Логи хранятся в IndexedDB: последние 10 звонков, максимум 25 МБ суммарно.
|
|
651
|
+
*/
|
|
652
|
+
export declare const debugLogs: {
|
|
653
|
+
/**
|
|
654
|
+
* Возвращает список сохраненных локальных сессий логирования.
|
|
655
|
+
*/
|
|
656
|
+
list: typeof DebugStorage.list;
|
|
657
|
+
/**
|
|
658
|
+
* Возвращает логи конкретного звонка.
|
|
659
|
+
*/
|
|
660
|
+
get: typeof DebugStorage.get;
|
|
661
|
+
/**
|
|
662
|
+
* Возвращает логи конкретного звонка JSON-строкой.
|
|
663
|
+
*/
|
|
664
|
+
getJson: typeof DebugStorage.getJson;
|
|
665
|
+
/**
|
|
666
|
+
* Скачивает логи конкретного звонка JSON-файлом.
|
|
667
|
+
*/
|
|
668
|
+
download: typeof DebugStorage.download;
|
|
669
|
+
/**
|
|
670
|
+
* Очищает логи конкретного звонка или все локальные логи SDK.
|
|
671
|
+
*/
|
|
672
|
+
clear: typeof DebugStorage.clear;
|
|
673
|
+
/**
|
|
674
|
+
* Возвращает статистику локального хранилища логов.
|
|
675
|
+
*/
|
|
676
|
+
stats: typeof DebugStorage.stats;
|
|
677
|
+
};
|
|
645
678
|
/**
|
|
646
679
|
* Отправляет клиенские логи по conversationId на сервер OK
|
|
647
680
|
* @example можно посмотреть в examples/anonym/index.html
|
|
@@ -750,11 +783,8 @@ export declare function requestAsr(request: boolean): Promise<void>;
|
|
|
750
783
|
export declare function startUrlSharing(sharedUrl: string): Promise<void>;
|
|
751
784
|
export declare function stopUrlSharing(): Promise<void>;
|
|
752
785
|
export declare function sendTestCommand(name: string, params?: any): void;
|
|
753
|
-
export declare function startAnalyzingAudio(expectAudio: boolean): void;
|
|
786
|
+
export declare function startAnalyzingAudio(expectAudio: boolean, expectedActiveTracks?: number | null, expectedTrackFrequencies?: number[] | null): void;
|
|
754
787
|
export declare function stopAnalyzingAudio(): void;
|
|
755
|
-
export declare function switchCall(conversationId: string): Promise<void>;
|
|
756
|
-
export declare function getCalls(): Map<string, Conversation>;
|
|
757
|
-
export declare function getActiveCallId(): string | null;
|
|
758
788
|
/**
|
|
759
789
|
* Версия SDK
|
|
760
790
|
*/
|
package/abstract/BaseApi.d.ts
CHANGED
|
@@ -7,7 +7,7 @@ import { ExternalId, ExternalParticipantId, ExternalUserId } from '../types/Exte
|
|
|
7
7
|
import { CompositeUserId, OkUserId, ParticipantId } from '../types/Participant';
|
|
8
8
|
export type ClientStats = {
|
|
9
9
|
vcid: ConversationData['id'] | null;
|
|
10
|
-
[k: string]: string | number | null;
|
|
10
|
+
[k: string]: string | number | boolean | null;
|
|
11
11
|
};
|
|
12
12
|
export type ClientEvent = {
|
|
13
13
|
timestamp: number;
|
|
@@ -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
|