@vkontakte/calls-sdk 2.8.5-dev.226a9d96.0 → 2.8.5-dev.2bca00a8.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,6 +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
6
  import type * as Vmoji from '@vkontakte/calls-vmoji';
6
7
  import BaseLogger from './abstract/BaseLogger';
7
8
  import { AddParticipantParams } from './abstract/BaseSignaling';
@@ -62,6 +63,7 @@ import { ArrayDequeue } from './utils/ArrayDequeue';
62
63
  import { ApiExternal } from './default/ApiExternal';
63
64
  import AuthData from './static/AuthData';
64
65
  import { VmojiError } from './types/Vmoji';
66
+ import { VolumeDetector } from './classes/VolumeDetector';
65
67
  /**
66
68
  * Информация о текущем браузере
67
69
  */
@@ -194,16 +196,22 @@ export declare const utils: {
194
196
  };
195
197
  export declare function setLogger(logger: BaseLogger): void;
196
198
  /**
197
- * Устанавливает библиотеку эффектов
199
+ * Устанавливает библиотеку видео эффектов
198
200
  *
199
201
  * @param effects Экземпляр класса `VideoEffects` из `@vkontakte/calls-video-effects`
200
202
  */
201
203
  export declare function setVideoEffects(effects: VideoEffects): void;
204
+ /**
205
+ * Устанавливает библиотеку аудио эффектов
206
+ *
207
+ * @param effects Экземпляр класса `EffectVoiceChange` из `@vkontakte/calls-audio-effects`
208
+ */
209
+ export declare function setAudioEffects(effects: EffectVoiceChange): void;
202
210
  /**
203
211
  * Устанавливает библиотеку вимоджи
204
212
  *
205
213
  * @param vmoji Экземпляр класса `Vmoji` из `@vkontakte/calls-vmoji`
206
- * @param sdk Экземпляр модуля `@vkontakte/calls-vmoji`, нужен для проброски дебаг сообщений
214
+ * @param sdk Экземпляр модуля `@vkontakte/calls-sdk`, нужен для проброски дебаг сообщений
207
215
  */
208
216
  export declare function setVmoji(vmoji: typeof Vmoji, sdk?: Parameters<typeof Vmoji.setSDK>[0] | null, renderingOptions?: Partial<Vmoji.RenderingOptions>, protocolVersion?: Vmoji.AnimojiVersion): void;
209
217
  /**
@@ -604,12 +612,23 @@ export declare function debug(enabled: boolean): void;
604
612
  * @param args
605
613
  */
606
614
  export declare function debugMessage(type: DebugMessageType, ...args: any[]): void;
615
+ /**
616
+ * Отправляет клиенские логи по conversationId на сервер OK
617
+ * @example можно посмотреть в examples/anonym/index.html
618
+ */
619
+ export declare function uploadDebugLogs(): Promise<void>;
607
620
  /**
608
621
  * Эффект локального видео
609
622
  *
610
623
  * @param effect
611
624
  */
612
625
  export declare function changeVideoEffect(effect: IEffect | null): Promise<void>;
626
+ /**
627
+ * Эффект локального аудио
628
+ *
629
+ * @param effect
630
+ */
631
+ export declare function changeAudioEffect(effects: string[], isPreset?: boolean): Promise<void>;
613
632
  /**
614
633
  * Позволяет установить кастомный стрим для аудио
615
634
  *
@@ -653,7 +672,7 @@ export declare function getAudienceModeHands(): Promise<AudienceModeHandsRespons
653
672
  * @param externalId Внешний ID пользователя
654
673
  * @param demote Запретить вход/отобрать права спикера
655
674
  */
656
- export declare function promoteParticipant(externalId: ExternalId, demote?: boolean): Promise<void>;
675
+ export declare function promoteParticipant(externalId?: ExternalId, demote?: boolean): Promise<void>;
657
676
  /**
658
677
  * Запросить/отозвать запрос на получение права стать спикером в комнате в
659
678
  * режиме Audience
@@ -706,4 +725,4 @@ export declare function sendTestCommand(name: string, params?: any): void;
706
725
  */
707
726
  export declare function version(): string;
708
727
  export type { AddParticipantParams, AudienceModeHandsResponse, BrowserName, CompositeUserId, ConversationData, ConversationParams, ConversationResponse, ExternalId, ExternalParticipant, ExternalParticipantListChunk, ExternalParticipantListMarker, ExternalParticipantListMarkers as ExternalParticipantMarkers, ExternalParticipantId, GetParticipantsSignalingResponse, GetRoomsSignalingResponse, HangupReasonData, IApiEnv, IAsrStartParams, IAsrStopParams, IAsrData, IceServer, JSONArray, JSONObject, JSONType, Layout, MediaModifiers, MediaSettings, MuteStates, OkUserId, ParamsObject, ParticipantId, ParticipantLayout, ParticipantListMarkers, ParticipantListType, ParticipantPriority, ParticipantsStateList, 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, };
709
- export { Api, AuthData, BaseLogger, CallDirection, CallType, ChatRoomEventType, ConversationOption, DebugMessageType, ExternalIdType, FacingMode, FatalError, HangupReason, HangupType, MediaOption, MediaTrackKind, MediaType, MuteState, ParticipantState, ParticipantStatus, RecordRole, Signaling, SignalingCommandType, SignalingConnectionType, SignalingNotification, UserRole, UserType, TransportTopology, RoomsEventType, ConversationFeature, ArrayDequeue, ApiExternal, };
728
+ export { Api, AuthData, BaseLogger, CallDirection, CallType, ChatRoomEventType, ConversationOption, DebugMessageType, ExternalIdType, FacingMode, FatalError, HangupReason, HangupType, MediaOption, MediaTrackKind, MediaType, MuteState, ParticipantState, ParticipantStatus, RecordRole, Signaling, SignalingCommandType, SignalingConnectionType, SignalingNotification, UserRole, UserType, TransportTopology, RoomsEventType, ConversationFeature, ArrayDequeue, ApiExternal, VolumeDetector, };
@@ -62,6 +62,7 @@ export default abstract class BaseApi {
62
62
  * method: vchat.clientEvents
63
63
  */
64
64
  logClientEvents(items: ClientEvent[]): void;
65
+ abstract uploadDebugLogs(conversationId: string, startTime: number, endTime: number, log: string): Promise<void>;
65
66
  abstract getOkIdsByExternalIds(externalIds: ExternalId[]): Promise<OkUserId[]>;
66
67
  abstract getParticipantIdsByExternalIds(externalIds: ExternalId[]): Promise<Map<ExternalId, ParticipantId>>;
67
68
  abstract getExternalIdsByOkIds(uids: OkUserId[]): Promise<ExternalParticipantId[]>;
@@ -26,12 +26,19 @@ import { SharingStatReport } from '../classes/screenshare/SharingStatReport';
26
26
  * Параметры добавления пользователя в звонок
27
27
  */
28
28
  export interface AddParticipantParams {
29
+ /**
30
+ * @deprecated
31
+ */
29
32
  showChatHistory?: boolean;
30
33
  ttChat?: boolean;
31
34
  /**
32
35
  * Удалить юзера из бан-листа. Доступно только админу звонка
33
36
  */
34
37
  unban?: boolean;
38
+ /**
39
+ * JSON.stringify({show_chat_history: boolean})
40
+ */
41
+ payload?: string;
35
42
  }
36
43
  /**
37
44
  * Should trigger SignalingEvent.NOTIFICATION on notification message and SignalingEvent.FAILED on error
@@ -96,7 +103,7 @@ export default abstract class BaseSignaling extends EventEmitter {
96
103
  [key in ConversationOption]?: boolean;
97
104
  }): Promise<SignalingMessage>;
98
105
  abstract getWaitingHall(fromId: SignalingMessage.WaitingParticipantId | null, count?: number, backward?: boolean): Promise<SignalingMessage>;
99
- abstract promoteParticipant(participantId: CompositeUserId, demote?: boolean): Promise<SignalingMessage>;
106
+ abstract promoteParticipant(participantId?: CompositeUserId, demote?: boolean): Promise<SignalingMessage>;
100
107
  abstract requestPromotion(unrequest: boolean): Promise<SignalingMessage>;
101
108
  abstract acceptPromotion(reject: boolean): Promise<SignalingMessage>;
102
109
  abstract feedback(key: string): Promise<SignalingMessage>;