@vkontakte/calls-sdk 2.8.11-dev.273c92c2.0 → 2.8.11-dev.323eff83.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 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 } from '@vkontakte/calls-audio-effects';
5
+ import type { EffectVoiceChange, VadControllerOptions, VadLib } 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';
@@ -209,6 +209,13 @@ export declare function setVideoEffects(effects: VideoEffects): void;
209
209
  * @param effects Экземпляр класса `EffectVoiceChange` из `@vkontakte/calls-audio-effects`
210
210
  */
211
211
  export declare function setAudioEffects(effects: EffectVoiceChange): void;
212
+ /**
213
+ * Устанавливает поддержку VAD
214
+ *
215
+ * @param vad принимает VadController из `@vkontakte/calls-audio-effects`
216
+ * @param options принимает VadControllerOptions из `@vkontakte/calls-audio-effects`
217
+ */
218
+ export declare function setVad(vad: VadLib, options?: VadControllerOptions): void;
212
219
  /**
213
220
  * Устанавливает библиотеку вимоджи
214
221
  *
@@ -265,11 +272,11 @@ export declare function authorize(authToken?: string, apiBaseUrl?: IAPIBaseUrl):
265
272
  *
266
273
  * @param mediaOptions Нужно ли включать камеру и микрофон
267
274
  */
268
- export declare function acceptCall(mediaOptions?: MediaOption[], conversationId?: string): Promise<ConversationData>;
275
+ export declare function acceptCall(mediaOptions?: MediaOption[]): Promise<ConversationData>;
269
276
  /**
270
277
  * Отклонить входящий звонок
271
278
  */
272
- export declare function declineCall(conversationId?: string): Promise<void>;
279
+ export declare function declineCall(): Promise<void>;
273
280
  /**
274
281
  * Присоединиться к активному звонку
275
282
  *
@@ -292,7 +299,7 @@ export declare function joinCallByLink(joinLink: string, mediaOptions?: MediaOpt
292
299
  /**
293
300
  * Завершить текущий разговор
294
301
  */
295
- export declare function hangup(conversationId?: string): Promise<void>;
302
+ export declare function hangup(): Promise<void>;
296
303
  /**
297
304
  * Добавить собеседника в звонок
298
305
  *
@@ -340,7 +347,7 @@ export declare function changeDevice(kind: MediaDeviceKind, deviceId: string): P
340
347
  * state Включить или выключить захват экрана
341
348
  * settings Параметры захваты экрана
342
349
  */
343
- export declare function captureScreen(stateOrSettings: boolean | ScreenCaptureSettings, conversationId?: string): Promise<void>;
350
+ export declare function captureScreen(stateOrSettings: boolean | ScreenCaptureSettings): Promise<void>;
344
351
  /**
345
352
  * Включить/выключить передачу точек вимоджи
346
353
  *
@@ -361,13 +368,13 @@ export declare function setVideoStream(stream: MediaStream, isScreen?: boolean):
361
368
  *
362
369
  * @param enabled
363
370
  */
364
- export declare function toggleLocalVideo(enabled: boolean, conversationId?: string): Promise<void>;
371
+ export declare function toggleLocalVideo(enabled: boolean): Promise<void>;
365
372
  /**
366
373
  * Включить или выключить свой микрофон
367
374
  *
368
375
  * @param enabled
369
376
  */
370
- export declare function toggleLocalAudio(enabled: boolean, conversationId?: string): Promise<void>;
377
+ export declare function toggleLocalAudio(enabled: boolean): Promise<void>;
371
378
  /**
372
379
  * Изменяет размеры локального видео
373
380
  *
@@ -393,6 +400,12 @@ export declare function changePriorities(priorities: ParticipantPriority[]): Pro
393
400
  * @param externalId Внешний ID пользователя
394
401
  */
395
402
  export declare function changeParticipantState(state: ParticipantStateData, externalId?: ExternalId): Promise<void>;
403
+ /**
404
+ * Ставит звонок на удержание
405
+ *
406
+ * @param hold - true/false
407
+ */
408
+ export declare function hold(hold: boolean): Promise<void>;
396
409
  /**
397
410
  * Принудительно опустить руки участников в текущем сессионном зале админа
398
411
  */
@@ -745,8 +758,12 @@ export declare function stopUrlSharing(): Promise<void>;
745
758
  export declare function sendTestCommand(name: string, params?: any): void;
746
759
  export declare function startAnalyzingAudio(expectAudio: boolean, expectedActiveTracks?: number | null, expectedTrackFrequencies?: number[] | null): void;
747
760
  export declare function stopAnalyzingAudio(): void;
748
- export declare function switchCall(conversationId: string): Promise<void>;
749
- export declare function getActiveCallId(): string | null;
761
+ /**
762
+ * Возвращает текущее время, скорректированное на смещение относительно серверного времени.
763
+ * Доступно после установки соединения (начало/присоединение к звонку).
764
+ * Если активного звонка нет — возвращает Date.now().
765
+ */
766
+ export declare function getSyncedTime(): number;
750
767
  /**
751
768
  * Версия SDK
752
769
  */
@@ -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, capabilities?: TCapabilities): Promise<SignalingMessage>;
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: TCapabilities): Promise<SignalingMessage>;
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