@vkontakte/calls-sdk 2.8.5-dev.ee82f123.0 → 2.8.5-dev.f744eeb6.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 +35 -11
- package/abstract/BaseApi.d.ts +1 -1
- package/abstract/BaseSignaling.d.ts +3 -1
- package/calls-sdk.cjs.js +8 -8
- package/calls-sdk.esm.js +8 -8
- package/classes/Conversation.d.ts +17 -4
- package/classes/HangupReason.d.ts +13 -0
- package/classes/Logger.d.ts +3 -0
- package/classes/MediaSource.d.ts +13 -5
- package/classes/ProducerCommandSerializationService.d.ts +2 -0
- package/classes/codec/IDecoder.d.ts +1 -1
- package/classes/codec/LibVPxDecoder.d.ts +1 -1
- package/classes/codec/LibVPxEncoder.d.ts +0 -3
- package/classes/codec/WebCodecsDecoder.d.ts +1 -1
- package/classes/screenshare/StreamBuilder.d.ts +1 -0
- package/classes/transport/DirectStatReporter.d.ts +2 -1
- package/classes/transport/DirectTransport.d.ts +7 -0
- package/classes/transport/Transport.d.ts +2 -1
- package/default/Api.d.ts +1 -1
- package/default/Signaling.d.ts +3 -1
- package/enums/ConversationOption.d.ts +2 -1
- package/enums/HangupType.d.ts +2 -1
- package/enums/SignalingCommandType.d.ts +1 -0
- package/enums/SignalingNotification.d.ts +3 -1
- package/package.json +3 -2
- package/static/ApiTransport.d.ts +0 -1
- package/static/External.d.ts +13 -3
- package/static/Params.d.ts +30 -31
- package/static/Utils.d.ts +3 -3
- package/static/WebRTCUtils.d.ts +6 -2
- package/types/Conversation.d.ts +0 -2
- package/types/EnableVideoSuspendSuggest.d.ts +3 -0
- package/types/Participant.d.ts +5 -0
- package/types/SignalingMessage.d.ts +21 -0
- package/types/Streams.d.ts +0 -1
- package/types/VideoSettings.d.ts +1 -1
- package/utils/Conversation.d.ts +3 -1
package/CallsSDK.d.ts
CHANGED
|
@@ -2,10 +2,10 @@
|
|
|
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
|
-
import BaseApi from './abstract/BaseApi';
|
|
7
7
|
import BaseLogger from './abstract/BaseLogger';
|
|
8
|
-
import
|
|
8
|
+
import { AddParticipantParams } from './abstract/BaseSignaling';
|
|
9
9
|
import HangupReason, { HangupReasonData } from './classes/HangupReason';
|
|
10
10
|
import { MediaTrackKind } from './classes/MediaSource';
|
|
11
11
|
import { AudienceModeHandsResponse } from './types/AudienceMode';
|
|
@@ -48,7 +48,7 @@ import { IVideoDimentions, MediaSettings } from './types/MediaSettings';
|
|
|
48
48
|
import { IAddMovieParams, IMovieMetaData, IMoviePreview, IOnRemoteMovieData, ISharedMovieInfo, ISharedMovieState, ISharedMovieStateResponse, ISharedMovieStoppedInfo, IUpdateMovieData } from './types/MovieShare';
|
|
49
49
|
import MuteStates, { IMuteParticipantInternalParams, IMuteParticipantParams } from './types/MuteStates';
|
|
50
50
|
import { IApiEnv } from './types/Params';
|
|
51
|
-
import { CompositeUserId, IGetParticipantsParameters, OkUserId, ParticipantId, ParticipantListMarker, ParticipantListMarkers, ParticipantListType, ParticipantStateMapped } from './types/Participant';
|
|
51
|
+
import { CompositeUserId, IGetParticipantsParameters, OkUserId, ParticipantId, ParticipantListMarker, ParticipantListMarkers, ParticipantListType, ParticipantsStateList, ParticipantStateMapped } from './types/Participant';
|
|
52
52
|
import ParticipantLayout, { Layout, RequestKeyFrame, StopStream } from './types/ParticipantLayout';
|
|
53
53
|
import { ParticipantListChunkParameters } from './types/ParticipantListChunk';
|
|
54
54
|
import ParticipantPriority from './types/ParticipantPriority';
|
|
@@ -63,6 +63,7 @@ import { ArrayDequeue } from './utils/ArrayDequeue';
|
|
|
63
63
|
import { ApiExternal } from './default/ApiExternal';
|
|
64
64
|
import AuthData from './static/AuthData';
|
|
65
65
|
import { VmojiError } from './types/Vmoji';
|
|
66
|
+
import { VolumeDetector } from './classes/VolumeDetector';
|
|
66
67
|
/**
|
|
67
68
|
* Информация о текущем браузере
|
|
68
69
|
*/
|
|
@@ -193,22 +194,26 @@ export declare const utils: {
|
|
|
193
194
|
*/
|
|
194
195
|
participantMarkerCompare: typeof Utils.participantMarkerCompare;
|
|
195
196
|
};
|
|
196
|
-
export declare function setApi(api: BaseApi): void;
|
|
197
|
-
export declare function setSignalingFactory(signalingFactory: () => BaseSignaling): void;
|
|
198
197
|
export declare function setLogger(logger: BaseLogger): void;
|
|
199
198
|
/**
|
|
200
|
-
* Устанавливает библиотеку эффектов
|
|
199
|
+
* Устанавливает библиотеку видео эффектов
|
|
201
200
|
*
|
|
202
201
|
* @param effects Экземпляр класса `VideoEffects` из `@vkontakte/calls-video-effects`
|
|
203
202
|
*/
|
|
204
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;
|
|
205
210
|
/**
|
|
206
211
|
* Устанавливает библиотеку вимоджи
|
|
207
212
|
*
|
|
208
213
|
* @param vmoji Экземпляр класса `Vmoji` из `@vkontakte/calls-vmoji`
|
|
209
|
-
* @param sdk Экземпляр модуля `@vkontakte/calls-
|
|
214
|
+
* @param sdk Экземпляр модуля `@vkontakte/calls-sdk`, нужен для проброски дебаг сообщений
|
|
210
215
|
*/
|
|
211
|
-
export declare function setVmoji(vmoji: typeof Vmoji, sdk?: Parameters<typeof Vmoji.setSDK>[0] | null, renderingOptions?: Vmoji.RenderingOptions
|
|
216
|
+
export declare function setVmoji(vmoji: typeof Vmoji, sdk?: Parameters<typeof Vmoji.setSDK>[0] | null, renderingOptions?: Partial<Vmoji.RenderingOptions>, protocolVersion?: Vmoji.AnimojiVersion): void;
|
|
212
217
|
/**
|
|
213
218
|
* Инициализирует библиотеку
|
|
214
219
|
*
|
|
@@ -418,6 +423,13 @@ export declare function setMediaModifiers(mediaModifiers: MediaModifiers): Promi
|
|
|
418
423
|
* @param enabled true - включить, false - отключить
|
|
419
424
|
*/
|
|
420
425
|
export declare function enableVideoSuspend(enabled: boolean): Promise<void>;
|
|
426
|
+
/**
|
|
427
|
+
* Режим, при котором будет предложено включить автоматическое
|
|
428
|
+
* отключение приёма видео в условиях плохого соединения
|
|
429
|
+
*
|
|
430
|
+
* @param enabled true - включить, false - отключить
|
|
431
|
+
*/
|
|
432
|
+
export declare function enableVideoSuspendSuggest(enabled: boolean): Promise<void>;
|
|
421
433
|
/**
|
|
422
434
|
* Включить/выключить опции звонка
|
|
423
435
|
*
|
|
@@ -509,7 +521,7 @@ export declare function forceRelayPolicy(enabled: boolean): void;
|
|
|
509
521
|
* @param groupId
|
|
510
522
|
* @param roomId
|
|
511
523
|
*/
|
|
512
|
-
export declare function startStream(isRecord?: boolean, name?: string | null, movieId?: string | null, privacy?: 'PUBLIC' | 'FRIENDS' | 'DIRECT_LINK', groupId?: string | null, roomId?: number | null
|
|
524
|
+
export declare function startStream(isRecord?: boolean, name?: string | null, movieId?: string | null, privacy?: 'PUBLIC' | 'FRIENDS' | 'DIRECT_LINK', groupId?: string | null, roomId?: number | null): Promise<undefined>;
|
|
513
525
|
/**
|
|
514
526
|
* Завершить трансляцию звонка
|
|
515
527
|
* @param roomId
|
|
@@ -606,6 +618,12 @@ export declare function debugMessage(type: DebugMessageType, ...args: any[]): vo
|
|
|
606
618
|
* @param effect
|
|
607
619
|
*/
|
|
608
620
|
export declare function changeVideoEffect(effect: IEffect | null): Promise<void>;
|
|
621
|
+
/**
|
|
622
|
+
* Эффект локального аудио
|
|
623
|
+
*
|
|
624
|
+
* @param effect
|
|
625
|
+
*/
|
|
626
|
+
export declare function changeAudioEffect(effects: string[], isPreset?: boolean): Promise<void>;
|
|
609
627
|
/**
|
|
610
628
|
* Позволяет установить кастомный стрим для аудио
|
|
611
629
|
*
|
|
@@ -624,6 +642,12 @@ export declare function setAudioStream(stream: MediaStream): Promise<void>;
|
|
|
624
642
|
* нужен только в случае присвоения участнику чужого аватара
|
|
625
643
|
*/
|
|
626
644
|
export declare function setVmojiSvg(svg: string | ArrayBuffer, externalId?: ExternalId | null, customKey?: string | null): Promise<void>;
|
|
645
|
+
/**
|
|
646
|
+
* Позволяет установить цвет фона собственного vmoji
|
|
647
|
+
*
|
|
648
|
+
* @param {(RGBTuple|string)} fill - цвет в виде rgb-кортежа или hex-кода
|
|
649
|
+
*/
|
|
650
|
+
export declare function setVmojiFill(fill: Vmoji.RGBTuple | string): void;
|
|
627
651
|
/**
|
|
628
652
|
* Получить состояние зала ожидания
|
|
629
653
|
*
|
|
@@ -695,5 +719,5 @@ export declare function sendTestCommand(name: string, params?: any): void;
|
|
|
695
719
|
* Версия SDK
|
|
696
720
|
*/
|
|
697
721
|
export declare function version(): string;
|
|
698
|
-
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, 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, };
|
|
699
|
-
export { Api, AuthData,
|
|
722
|
+
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, };
|
|
723
|
+
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
|
@@ -28,7 +28,6 @@ export type LogItem = {
|
|
|
28
28
|
uid: OkUserId | null;
|
|
29
29
|
};
|
|
30
30
|
export default abstract class BaseApi {
|
|
31
|
-
abstract init(): void;
|
|
32
31
|
abstract authorize(): Promise<void>;
|
|
33
32
|
abstract userId(participantId: ParticipantId): Promise<ExternalParticipantId>;
|
|
34
33
|
abstract createConversation(conversationId: string, payload?: string, requireAuthToJoin?: boolean, createConversationParameters?: {
|
|
@@ -75,5 +74,6 @@ export default abstract class BaseApi {
|
|
|
75
74
|
hangupConversation(conversationId: string): void;
|
|
76
75
|
sendUserFeedbackStats(conversationId: string, userResponse: number, reason?: string, groupCallUsersCount?: number): void;
|
|
77
76
|
removeHistoryRecords(recordIds: number[]): Promise<void>;
|
|
77
|
+
getServerTime(): Promise<number>;
|
|
78
78
|
cleanup(): void;
|
|
79
79
|
}
|
|
@@ -43,7 +43,7 @@ export default abstract class BaseSignaling extends EventEmitter {
|
|
|
43
43
|
abstract close(): void;
|
|
44
44
|
abstract hangup(reason: string): Promise<SignalingMessage | void>;
|
|
45
45
|
abstract acceptCall(mediaSettings: MediaSettings): Promise<SignalingMessage>;
|
|
46
|
-
abstract sendSdp(participantId: ParticipantId, sdp: RTCSessionDescriptionInit): Promise<SignalingMessage>;
|
|
46
|
+
abstract sendSdp(participantId: ParticipantId, sdp: RTCSessionDescriptionInit, extraPayload?: Record<string, any>): Promise<SignalingMessage>;
|
|
47
47
|
abstract sendCandidate(participantId: ParticipantId, candidate: RTCIceCandidate): Promise<SignalingMessage>;
|
|
48
48
|
abstract changeMediaSettings(mediaSettings: MediaSettings): Promise<SignalingMessage>;
|
|
49
49
|
abstract changeParticipantState(state: Record<string, string>, compositeUserId?: CompositeUserId): Promise<SignalingMessage>;
|
|
@@ -91,6 +91,7 @@ export default abstract class BaseSignaling extends EventEmitter {
|
|
|
91
91
|
abstract pinParticipant(participantId: ParticipantId, unpin: boolean, roomId: number | null): Promise<SignalingMessage>;
|
|
92
92
|
abstract updateMediaModifiers(mediaModifiers: MediaModifiers): Promise<SignalingMessage>;
|
|
93
93
|
abstract enableVideoSuspend(enabled: boolean): Promise<SignalingMessage>;
|
|
94
|
+
abstract enableVideoSuspendSuggest(enabled: boolean): Promise<SignalingMessage>;
|
|
94
95
|
abstract changeOptions(changes: {
|
|
95
96
|
[key in ConversationOption]?: boolean;
|
|
96
97
|
}): Promise<SignalingMessage>;
|
|
@@ -105,6 +106,7 @@ export default abstract class BaseSignaling extends EventEmitter {
|
|
|
105
106
|
abstract useCommandDataChannel(status: boolean): void;
|
|
106
107
|
abstract getParticipantListChunk(participantListChunkParameters: ParticipantListChunkParameters): Promise<SignalingMessage>;
|
|
107
108
|
abstract getParticipants(externalIds: SignalingMessage.ExternalId[]): Promise<GetParticipantsSignalingResponse>;
|
|
109
|
+
abstract getPeerId(): number | null;
|
|
108
110
|
abstract startAsr(params: IAsrStartParams): Promise<SignalingMessage>;
|
|
109
111
|
abstract stopAsr(params?: IAsrStopParams): Promise<SignalingMessage>;
|
|
110
112
|
abstract requestAsr(request: boolean): Promise<SignalingMessage>;
|