@vkontakte/calls-sdk 2.8.11-dev.d88537e0.0 → 2.8.11-dev.e63f7408.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 -21
- package/abstract/BaseApi.d.ts +2 -0
- package/abstract/BaseSignaling.d.ts +3 -4
- package/calls-sdk.cjs.js +9 -9
- package/calls-sdk.esm.js +5727 -5094
- package/classes/CallRegistry.d.ts +26 -0
- package/classes/Conversation.d.ts +35 -8
- package/classes/ConversationResponseValidator.d.ts +3 -0
- package/classes/MediaSource.d.ts +7 -0
- package/classes/SpecListener.d.ts +5 -0
- package/classes/codec/WorkerBase.d.ts +2 -0
- package/classes/stat/StatFirstMediaReceived.d.ts +2 -1
- package/classes/transport/DirectTransport.d.ts +3 -0
- package/classes/transport/Transport.d.ts +2 -3
- package/default/Api.d.ts +7 -0
- package/default/Signaling.d.ts +29 -45
- package/default/SignalingTransport.d.ts +68 -0
- package/enums/HangupType.d.ts +2 -1
- package/enums/SignalingNotification.d.ts +3 -1
- package/package.json +2 -2
- package/static/Capabilities.d.ts +5 -0
- package/static/External.d.ts +143 -71
- package/static/Params.d.ts +93 -83
- package/static/ParticipantConnectionStatusUtils.d.ts +16 -0
- package/types/Capabilities.d.ts +24 -0
- package/types/Participant.d.ts +12 -1
- package/types/PushData.d.ts +3 -0
- package/types/SignalingMessage.d.ts +15 -1
- package/types/WebTransport.d.ts +4 -0
package/CallsSDK.d.ts
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* CallsSDK
|
|
3
3
|
*/
|
|
4
4
|
import type { IEffect, VideoEffects } from '@vkontakte/calls-video-effects';
|
|
5
|
-
import type { EffectVoiceChange
|
|
5
|
+
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';
|
|
@@ -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
|
+
import PushData from './types/PushData';
|
|
70
71
|
export type { CurrentLogItem, DebugLogGetParams, DebugLogSessionInfo, DebugLogStorageStats } from './utils/DebugStorage';
|
|
71
72
|
/**
|
|
72
73
|
* Информация о текущем браузере
|
|
@@ -211,13 +212,6 @@ export declare function setVideoEffects(effects: VideoEffects): void;
|
|
|
211
212
|
* @param effects Экземпляр класса `EffectVoiceChange` из `@vkontakte/calls-audio-effects`
|
|
212
213
|
*/
|
|
213
214
|
export declare function setAudioEffects(effects: EffectVoiceChange): void;
|
|
214
|
-
/**
|
|
215
|
-
* Устанавливает поддержку VAD
|
|
216
|
-
*
|
|
217
|
-
* @param vad принимает VadController из `@vkontakte/calls-audio-effects`
|
|
218
|
-
* @param options принимает VadControllerOptions из `@vkontakte/calls-audio-effects`
|
|
219
|
-
*/
|
|
220
|
-
export declare function setVad(vad: VadLib, options?: VadControllerOptions): void;
|
|
221
215
|
/**
|
|
222
216
|
* Устанавливает библиотеку вимоджи
|
|
223
217
|
*
|
|
@@ -262,6 +256,7 @@ export declare function callInternal(ids: OkUserId[], type: CallType | undefined
|
|
|
262
256
|
*/
|
|
263
257
|
export declare function processPush(conversationId: string, conversationParams?: string): Promise<void>;
|
|
264
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[]>;
|
|
265
260
|
/**
|
|
266
261
|
* Авторизоваться для совершения звонков
|
|
267
262
|
*
|
|
@@ -274,11 +269,11 @@ export declare function authorize(authToken?: string, apiBaseUrl?: IAPIBaseUrl):
|
|
|
274
269
|
*
|
|
275
270
|
* @param mediaOptions Нужно ли включать камеру и микрофон
|
|
276
271
|
*/
|
|
277
|
-
export declare function acceptCall(mediaOptions?: MediaOption[]): Promise<ConversationData>;
|
|
272
|
+
export declare function acceptCall(mediaOptions?: MediaOption[], conversationId?: string): Promise<ConversationData>;
|
|
278
273
|
/**
|
|
279
274
|
* Отклонить входящий звонок
|
|
280
275
|
*/
|
|
281
|
-
export declare function declineCall(): Promise<void>;
|
|
276
|
+
export declare function declineCall(conversationId?: string): Promise<void>;
|
|
282
277
|
/**
|
|
283
278
|
* Присоединиться к активному звонку
|
|
284
279
|
*
|
|
@@ -301,7 +296,7 @@ export declare function joinCallByLink(joinLink: string, mediaOptions?: MediaOpt
|
|
|
301
296
|
/**
|
|
302
297
|
* Завершить текущий разговор
|
|
303
298
|
*/
|
|
304
|
-
export declare function hangup(): Promise<void>;
|
|
299
|
+
export declare function hangup(conversationId?: string): Promise<void>;
|
|
305
300
|
/**
|
|
306
301
|
* Добавить собеседника в звонок
|
|
307
302
|
*
|
|
@@ -349,7 +344,7 @@ export declare function changeDevice(kind: MediaDeviceKind, deviceId: string): P
|
|
|
349
344
|
* state Включить или выключить захват экрана
|
|
350
345
|
* settings Параметры захваты экрана
|
|
351
346
|
*/
|
|
352
|
-
export declare function captureScreen(stateOrSettings: boolean | ScreenCaptureSettings): Promise<void>;
|
|
347
|
+
export declare function captureScreen(stateOrSettings: boolean | ScreenCaptureSettings, conversationId?: string): Promise<void>;
|
|
353
348
|
/**
|
|
354
349
|
* Включить/выключить передачу точек вимоджи
|
|
355
350
|
*
|
|
@@ -370,13 +365,13 @@ export declare function setVideoStream(stream: MediaStream, isScreen?: boolean):
|
|
|
370
365
|
*
|
|
371
366
|
* @param enabled
|
|
372
367
|
*/
|
|
373
|
-
export declare function toggleLocalVideo(enabled: boolean): Promise<void>;
|
|
368
|
+
export declare function toggleLocalVideo(enabled: boolean, conversationId?: string): Promise<void>;
|
|
374
369
|
/**
|
|
375
370
|
* Включить или выключить свой микрофон
|
|
376
371
|
*
|
|
377
372
|
* @param enabled
|
|
378
373
|
*/
|
|
379
|
-
export declare function toggleLocalAudio(enabled: boolean): Promise<void>;
|
|
374
|
+
export declare function toggleLocalAudio(enabled: boolean, conversationId?: string): Promise<void>;
|
|
380
375
|
/**
|
|
381
376
|
* Изменяет размеры локального видео
|
|
382
377
|
*
|
|
@@ -402,12 +397,6 @@ export declare function changePriorities(priorities: ParticipantPriority[]): Pro
|
|
|
402
397
|
* @param externalId Внешний ID пользователя
|
|
403
398
|
*/
|
|
404
399
|
export declare function changeParticipantState(state: ParticipantStateData, externalId?: ExternalId): Promise<void>;
|
|
405
|
-
/**
|
|
406
|
-
* Ставит звонок на удержание
|
|
407
|
-
*
|
|
408
|
-
* @param hold - true/false
|
|
409
|
-
*/
|
|
410
|
-
export declare function hold(hold: boolean): Promise<void>;
|
|
411
400
|
/**
|
|
412
401
|
* Принудительно опустить руки участников в текущем сессионном зале админа
|
|
413
402
|
*/
|
|
@@ -764,7 +753,7 @@ export declare function userFeedbackStats(userResponse: number, reason?: string,
|
|
|
764
753
|
* @param immediatelty Отправить ли событие немедленно
|
|
765
754
|
*/
|
|
766
755
|
export declare function logClientEvent(eventType: string, eventData?: Record<string, string | number | boolean>, immediately?: boolean): void;
|
|
767
|
-
export declare function enableFeatureForRoles(feature: ConversationFeature, roles: UserRole[]): Promise<void>;
|
|
756
|
+
export declare function enableFeatureForRoles(feature: ConversationFeature, roles: UserRole[], conversationId?: string): Promise<void>;
|
|
768
757
|
/**
|
|
769
758
|
* Удаляет записи истории звонков
|
|
770
759
|
*
|
|
@@ -788,6 +777,8 @@ export declare function stopUrlSharing(): Promise<void>;
|
|
|
788
777
|
export declare function sendTestCommand(name: string, params?: any): void;
|
|
789
778
|
export declare function startAnalyzingAudio(expectAudio: boolean, expectedActiveTracks?: number | null, expectedTrackFrequencies?: number[] | null): void;
|
|
790
779
|
export declare function stopAnalyzingAudio(): void;
|
|
780
|
+
export declare function switchCall(conversationId: string): Promise<void>;
|
|
781
|
+
export declare function getActiveCallId(): string | null;
|
|
791
782
|
/**
|
|
792
783
|
* Возвращает текущее время, скорректированное на смещение относительно серверного времени.
|
|
793
784
|
* Доступно после установки соединения (начало/присоединение к звонку).
|
package/abstract/BaseApi.d.ts
CHANGED
|
@@ -5,6 +5,7 @@ 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 = {
|
|
9
10
|
vcid: ConversationData['id'] | null;
|
|
10
11
|
[k: string]: string | number | boolean | null;
|
|
@@ -85,4 +86,5 @@ export default abstract class BaseApi {
|
|
|
85
86
|
removeHistoryRecords(recordIds: number[]): Promise<void>;
|
|
86
87
|
getServerTime(): Promise<number>;
|
|
87
88
|
cleanup(): void;
|
|
89
|
+
getInbounds(): Promise<PushData[]>;
|
|
88
90
|
}
|
|
@@ -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
|