@vkontakte/calls-sdk 2.8.5-dev.62f7a536.0 → 2.8.5-dev.6663961.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 +37 -4
- package/abstract/BaseApi.d.ts +1 -0
- package/abstract/BaseSignaling.d.ts +8 -1
- package/calls-sdk.cjs.js +8 -8
- package/calls-sdk.esm.js +8 -8
- package/classes/AudioFix.d.ts +4 -0
- package/classes/AudioOutput.d.ts +3 -0
- package/classes/Conversation.d.ts +4 -14
- package/classes/HangupReason.d.ts +13 -0
- package/classes/MediaSource.d.ts +18 -5
- package/classes/VideoEffectsFpsLimiter.d.ts +23 -0
- package/classes/codec/LibVPxDecoder.d.ts +1 -1
- package/classes/codec/LibVPxEncoder.d.ts +0 -3
- package/classes/stat/StatFirstMediaReceived.d.ts +6 -5
- package/default/Api.d.ts +1 -0
- package/default/Signaling.d.ts +1 -1
- package/enums/FatalError.d.ts +2 -1
- package/enums/HangupType.d.ts +2 -1
- package/package.json +4 -3
- package/static/ApiTransport.d.ts +1 -0
- package/static/ConversationDebugLogger.d.ts +13 -0
- package/static/External.d.ts +2 -1
- package/static/Params.d.ts +43 -2
- package/static/Utils.d.ts +2 -2
- package/static/WebRTCUtils.d.ts +6 -3
- package/types/Conversation.d.ts +2 -14
- package/types/GetLogUploadUrlParams.d.ts +6 -0
- package/types/GetLogUploadUrlResponse.d.ts +3 -0
- package/types/Params.d.ts +1 -1
- package/utils/Conversation.d.ts +4 -0
- package/utils/DebugStorage.d.ts +6 -0
- package/utils/Media.d.ts +1 -2
- package/utils/NavigatorPermissions.d.ts +13 -0
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,10 +63,25 @@ 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
|
*/
|
|
68
70
|
export declare const browser: {
|
|
71
|
+
/**
|
|
72
|
+
* Инициализации подписок на navigator.
|
|
73
|
+
* Без нее SDK не будет знать о новых устройствах.
|
|
74
|
+
* Нужно только в случае когда инициализация SDK не нужна.
|
|
75
|
+
*/
|
|
76
|
+
init: typeof WebRTCUtils.init;
|
|
77
|
+
/**
|
|
78
|
+
* Подписка на обновление устройств пользователя
|
|
79
|
+
*/
|
|
80
|
+
addEventListener: typeof WebRTCUtils.addEventListener;
|
|
81
|
+
/**
|
|
82
|
+
* Отписка на обновление устройств пользователя
|
|
83
|
+
*/
|
|
84
|
+
removeEventListener: typeof WebRTCUtils.removeEventListener;
|
|
69
85
|
/**
|
|
70
86
|
* Возвращает все подключенные камеры
|
|
71
87
|
*/
|
|
@@ -194,16 +210,22 @@ export declare const utils: {
|
|
|
194
210
|
};
|
|
195
211
|
export declare function setLogger(logger: BaseLogger): void;
|
|
196
212
|
/**
|
|
197
|
-
* Устанавливает библиотеку эффектов
|
|
213
|
+
* Устанавливает библиотеку видео эффектов
|
|
198
214
|
*
|
|
199
215
|
* @param effects Экземпляр класса `VideoEffects` из `@vkontakte/calls-video-effects`
|
|
200
216
|
*/
|
|
201
217
|
export declare function setVideoEffects(effects: VideoEffects): void;
|
|
218
|
+
/**
|
|
219
|
+
* Устанавливает библиотеку аудио эффектов
|
|
220
|
+
*
|
|
221
|
+
* @param effects Экземпляр класса `EffectVoiceChange` из `@vkontakte/calls-audio-effects`
|
|
222
|
+
*/
|
|
223
|
+
export declare function setAudioEffects(effects: EffectVoiceChange): void;
|
|
202
224
|
/**
|
|
203
225
|
* Устанавливает библиотеку вимоджи
|
|
204
226
|
*
|
|
205
227
|
* @param vmoji Экземпляр класса `Vmoji` из `@vkontakte/calls-vmoji`
|
|
206
|
-
* @param sdk Экземпляр модуля `@vkontakte/calls-
|
|
228
|
+
* @param sdk Экземпляр модуля `@vkontakte/calls-sdk`, нужен для проброски дебаг сообщений
|
|
207
229
|
*/
|
|
208
230
|
export declare function setVmoji(vmoji: typeof Vmoji, sdk?: Parameters<typeof Vmoji.setSDK>[0] | null, renderingOptions?: Partial<Vmoji.RenderingOptions>, protocolVersion?: Vmoji.AnimojiVersion): void;
|
|
209
231
|
/**
|
|
@@ -604,12 +626,23 @@ export declare function debug(enabled: boolean): void;
|
|
|
604
626
|
* @param args
|
|
605
627
|
*/
|
|
606
628
|
export declare function debugMessage(type: DebugMessageType, ...args: any[]): void;
|
|
629
|
+
/**
|
|
630
|
+
* Отправляет клиенские логи по conversationId на сервер OK
|
|
631
|
+
* @example можно посмотреть в examples/anonym/index.html
|
|
632
|
+
*/
|
|
633
|
+
export declare function uploadDebugLogs(): Promise<void>;
|
|
607
634
|
/**
|
|
608
635
|
* Эффект локального видео
|
|
609
636
|
*
|
|
610
637
|
* @param effect
|
|
611
638
|
*/
|
|
612
639
|
export declare function changeVideoEffect(effect: IEffect | null): Promise<void>;
|
|
640
|
+
/**
|
|
641
|
+
* Эффект локального аудио
|
|
642
|
+
*
|
|
643
|
+
* @param effect
|
|
644
|
+
*/
|
|
645
|
+
export declare function changeAudioEffect(effects: string[], isPreset?: boolean): Promise<void>;
|
|
613
646
|
/**
|
|
614
647
|
* Позволяет установить кастомный стрим для аудио
|
|
615
648
|
*
|
|
@@ -653,7 +686,7 @@ export declare function getAudienceModeHands(): Promise<AudienceModeHandsRespons
|
|
|
653
686
|
* @param externalId Внешний ID пользователя
|
|
654
687
|
* @param demote Запретить вход/отобрать права спикера
|
|
655
688
|
*/
|
|
656
|
-
export declare function promoteParticipant(externalId
|
|
689
|
+
export declare function promoteParticipant(externalId?: ExternalId, demote?: boolean): Promise<void>;
|
|
657
690
|
/**
|
|
658
691
|
* Запросить/отозвать запрос на получение права стать спикером в комнате в
|
|
659
692
|
* режиме Audience
|
|
@@ -706,4 +739,4 @@ export declare function sendTestCommand(name: string, params?: any): void;
|
|
|
706
739
|
*/
|
|
707
740
|
export declare function version(): string;
|
|
708
741
|
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, };
|
|
742
|
+
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, };
|
package/abstract/BaseApi.d.ts
CHANGED
|
@@ -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
|
|
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>;
|