@vkontakte/calls-sdk 2.6.3-dev.2be8ef8.0 → 2.6.3-dev.3b25f7c.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
@@ -1,6 +1,7 @@
1
1
  /**
2
2
  * CallsSDK
3
3
  */
4
+ import type * as Vmoji from '@vkontakte/calls-vmoji';
4
5
  import type { IEffect, VideoEffects } from '@vkontakte/calls-video-effects';
5
6
  import BaseApi from './abstract/BaseApi';
6
7
  import BaseLogger from './abstract/BaseLogger';
@@ -33,6 +34,7 @@ import { JSONArray, JSONObject, JSONType } from './static/Json';
33
34
  import { ParamsObject } from './static/Params';
34
35
  import Utils from './static/Utils';
35
36
  import WebRTCUtils, { FacingMode } from './static/WebRTCUtils';
37
+ import { IAsrStartParams } from './types/Asr';
36
38
  import ConversationParams from './types/ConversationParams';
37
39
  import ConversationResponse from './types/ConversationResponse';
38
40
  import { ExternalId, ExternalIdType, ExternalParticipant, ExternalParticipantId, ExternalParticipantListMarkers, ExternalUserId } from './types/ExternalId';
@@ -47,6 +49,7 @@ import ParticipantPriority from './types/ParticipantPriority';
47
49
  import { MediaType, ParticipantStreamDescription } from './types/ParticipantStreamDescription';
48
50
  import { Room, RoomsUpdate, RoomParticipantUpdate } from './types/Room';
49
51
  import RoomsEventType from './enums/RoomsEventType';
52
+ import { ScreenCaptureSettings } from './types/ScreenCaptureSettings';
50
53
  import SignalingMessage from './types/SignalingMessage';
51
54
  import { WaitingHallResponse } from './types/WaitingHall';
52
55
  import { IFeedbackExternal } from './types/Feedback';
@@ -165,6 +168,12 @@ export declare const browser: {
165
168
  * Возвращает AudioContext
166
169
  */
167
170
  getAudioContext: typeof WebRTCUtils.getAudioContext;
171
+ /**
172
+ * Браузер поддерживает захват звука при трансляции экрана
173
+ *
174
+ * _Метод доступен до инициализации_
175
+ */
176
+ isAudioShareSupported: typeof WebRTCUtils.isAudioShareSupported;
168
177
  };
169
178
  export declare function setApi(api: BaseApi): void;
170
179
  export declare function setSignalingFactory(signalingFactory: () => BaseSignaling): void;
@@ -175,6 +184,13 @@ export declare function setLogger(logger: BaseLogger): void;
175
184
  * @param effects Экземпляр класса `VideoEffects` из `@vkontakte/calls-video-effects`
176
185
  */
177
186
  export declare function setVideoEffects(effects: VideoEffects): void;
187
+ /**
188
+ * Устанавливает библиотеку вимоджи
189
+ *
190
+ * @param vmoji Экземпляр класса `Vmoji` из `@vkontakte/calls-vmoji`
191
+ * @param sdk Экземпляр модуля `@vkontakte/calls-vmoji`, нужен для проброски дебаг сообщений
192
+ */
193
+ export declare function setVmoji(vmoji: typeof Vmoji, sdk?: Parameters<typeof Vmoji.setSDK>[0] | null): void;
178
194
  /**
179
195
  * Инициализирует библиотеку
180
196
  *
@@ -283,16 +299,17 @@ export declare function changeDevice(kind: MediaDeviceKind, deviceId: string): P
283
299
  /**
284
300
  * Включить/выключить захват экрана
285
301
  *
286
- * @param state Включить или выключить
302
+ * @param stateOrSettings
303
+ * state Включить или выключить захват экрана
304
+ * settings Параметры захваты экрана
287
305
  */
288
- export declare function captureScreen(state: boolean): Promise<void>;
306
+ export declare function captureScreen(stateOrSettings: boolean | ScreenCaptureSettings): Promise<void>;
289
307
  /**
290
- * Включить/выключить захват экрана
308
+ * Включить/выключить передачу точек вимоджи
291
309
  *
292
- * @param screenState Включить или выключить захват экрана.
293
- * @param audioShareState Включить или выключить захват звука. Может быть использован только вместе с захватом экрана.
310
+ * @param state Включить или выключить
294
311
  */
295
- export declare function captureScreenAndAudio(screenState: boolean, audioShareState?: boolean): Promise<void>;
312
+ export declare function captureVmoji(state: boolean): void;
296
313
  /**
297
314
  * Позволяет установить кастомный стрим для видео
298
315
  * например для стрима из canvas, с наложением изображений
@@ -547,6 +564,17 @@ export declare function changeVideoEffect(effect: IEffect | null): Promise<void>
547
564
  * @hidden
548
565
  */
549
566
  export declare function setAudioStream(stream: MediaStream): Promise<void>;
567
+ /**
568
+ * Позволяет установить svg аватар для участника звонка
569
+ *
570
+ * @param {(string|ArrayBuffer)} svg - svg в незашифрованном (string)
571
+ * или зашифрованном (ArrayBuffer) виде
572
+ * @param {(ExternalParticipantId|null)} externalId - externalId внешнего участника звонка,
573
+ * не требуется для текущего участника (текущего пользователя клиента)
574
+ * @param {(string|null)} customKey - кастомный ключ расшифровки svg,
575
+ * нужен только в случае присвоения участнику чужого аватара
576
+ */
577
+ export declare function setVmojiSvg(svg: string | ArrayBuffer, externalId?: ExternalParticipantId | null, customKey?: string | null): Promise<void>;
550
578
  /**
551
579
  * Получить состояние зала ожидания
552
580
  *
@@ -575,7 +603,7 @@ export declare function removeHistoryRecords(recordIds: number[]): Promise<void>
575
603
  /**
576
604
  * Начинает текстовую расшифровку звонка
577
605
  */
578
- export declare function startAsr(): Promise<void>;
606
+ export declare function startAsr(params: IAsrStartParams): Promise<void>;
579
607
  /**
580
608
  * Заканчивает текстовую расшифровку звонка
581
609
  */
@@ -588,5 +616,5 @@ export declare function requestAsr(request: boolean): Promise<void>;
588
616
  * Версия SDK
589
617
  */
590
618
  export declare function version(): string;
591
- export type { AddParticipantParams, ConversationData, ConversationParams, ConversationResponse, ExternalId, ExternalParticipant, ExternalParticipantListMarkers as ExternalParticipantMarkers, ExternalParticipantId, HangupReasonData, IceServer, JSONArray, JSONObject, JSONType, Layout, MediaModifiers, MediaSettings, MuteStates, OkUserId, ParamsObject, ParticipantLayout, ParticipantPriority, ParticipantStateMapped, ParticipantStreamDescription, ParticipantListChunkParameters, IGetParticipantsParameters, SignalingMessage, StatResult, StopStream, WaitingHallResponse, IVideoDimentions, IFeedbackExternal, ISharedMovieInfo, ISharedMovieStoppedInfo, ISharedMovieState, ISharedMovieStateResponse, IAddMovieParams, IOnRemoteMovieData, IMoviePreview, Room, RoomsUpdate, RoomParticipantUpdate, IUpdateMovieData, IFeaturesPerRole, IMuteParticipantParams, IMuteParticipantInternalParams, IStartStreamData, IStopStreamData, };
619
+ export type { AddParticipantParams, ConversationData, ConversationParams, ConversationResponse, ExternalId, ExternalParticipant, ExternalParticipantListMarkers as ExternalParticipantMarkers, ExternalParticipantId, HangupReasonData, IceServer, JSONArray, JSONObject, JSONType, Layout, MediaModifiers, MediaSettings, MuteStates, OkUserId, ParamsObject, ParticipantLayout, ParticipantPriority, ParticipantStateMapped, ParticipantStreamDescription, ParticipantListChunkParameters, IGetParticipantsParameters, ScreenCaptureSettings, SignalingMessage, StatResult, StopStream, WaitingHallResponse, IVideoDimentions, IFeedbackExternal, ISharedMovieInfo, ISharedMovieStoppedInfo, ISharedMovieState, ISharedMovieStateResponse, IAddMovieParams, IOnRemoteMovieData, IMoviePreview, Room, RoomsUpdate, RoomParticipantUpdate, IUpdateMovieData, IFeaturesPerRole, IMuteParticipantParams, IMuteParticipantInternalParams, IStartStreamData, IStopStreamData, };
592
620
  export { Api, BaseApi, BaseLogger, BaseSignaling, CallDirection, CallType, ChatRoomEventType, ConversationOption, DebugMessageType, ExternalIdType, FacingMode, FatalError, HangupReason, HangupType, MediaOption, MediaTrackKind, MediaType, MuteState, ParticipantState, ParticipantStatus, RecordRole, Signaling, SignalingCommandType, SignalingConnectionType, SignalingNotification, UserRole, UserType, Utils, TransportTopology, RoomsEventType, ConversationFeature, ArrayDequeue, };
@@ -9,6 +9,7 @@ import RecordRole from '../enums/RecordRole';
9
9
  import SignalingConnectionType from '../enums/SignalingConnectionType';
10
10
  import UserRole from '../enums/UserRole';
11
11
  import { JSONObject } from '../static/Json';
12
+ import { IAsrStartParams } from '../types/Asr';
12
13
  import ConversationResponse from '../types/ConversationResponse';
13
14
  import MediaModifiers from '../types/MediaModifiers';
14
15
  import MediaSettings from '../types/MediaSettings';
@@ -95,7 +96,7 @@ export default abstract class BaseSignaling extends EventEmitter {
95
96
  abstract setAsrDataChannel(dataChannel: RTCDataChannel): void;
96
97
  abstract getParticipantListChunk(participantListChunkParameters: ParticipantListChunkParameters): Promise<SignalingMessage>;
97
98
  abstract getParticipants(externalIds: SignalingMessage.ExternalId[]): Promise<SignalingMessage>;
98
- abstract startAsr(): Promise<SignalingMessage>;
99
+ abstract startAsr(params: IAsrStartParams): Promise<SignalingMessage>;
99
100
  abstract stopAsr(): Promise<SignalingMessage>;
100
101
  abstract requestAsr(request: boolean): Promise<SignalingMessage>;
101
102
  get ready(): boolean;