@vkontakte/calls-sdk 2.8.5-dev.36da4e4e.0 → 2.8.5-dev.399d8ec3.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 +27 -11
- package/abstract/BaseApi.d.ts +1 -1
- package/abstract/BaseSignaling.d.ts +2 -1
- package/calls-sdk.cjs.js +8 -8
- package/calls-sdk.esm.js +8 -8
- package/classes/Conversation.d.ts +15 -4
- package/classes/Logger.d.ts +3 -0
- package/classes/MediaSource.d.ts +13 -5
- 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 +2 -1
- package/enums/ConversationOption.d.ts +2 -1
- package/enums/SignalingNotification.d.ts +1 -0
- package/package.json +3 -2
- package/static/ApiTransport.d.ts +0 -1
- package/static/External.d.ts +10 -2
- package/static/Params.d.ts +23 -30
- package/static/Utils.d.ts +3 -3
- package/static/WebRTCUtils.d.ts +6 -2
- package/types/Participant.d.ts +5 -0
- package/types/SignalingMessage.d.ts +18 -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';
|
|
@@ -193,22 +193,26 @@ export declare const utils: {
|
|
|
193
193
|
*/
|
|
194
194
|
participantMarkerCompare: typeof Utils.participantMarkerCompare;
|
|
195
195
|
};
|
|
196
|
-
export declare function setApi(api: BaseApi): void;
|
|
197
|
-
export declare function setSignalingFactory(signalingFactory: () => BaseSignaling): void;
|
|
198
196
|
export declare function setLogger(logger: BaseLogger): void;
|
|
199
197
|
/**
|
|
200
|
-
* Устанавливает библиотеку эффектов
|
|
198
|
+
* Устанавливает библиотеку видео эффектов
|
|
201
199
|
*
|
|
202
200
|
* @param effects Экземпляр класса `VideoEffects` из `@vkontakte/calls-video-effects`
|
|
203
201
|
*/
|
|
204
202
|
export declare function setVideoEffects(effects: VideoEffects): void;
|
|
203
|
+
/**
|
|
204
|
+
* Устанавливает библиотеку аудио эффектов
|
|
205
|
+
*
|
|
206
|
+
* @param effects Экземпляр класса `EffectVoiceChange` из `@vkontakte/calls-audio-effects`
|
|
207
|
+
*/
|
|
208
|
+
export declare function setAudioEffects(effects: EffectVoiceChange): void;
|
|
205
209
|
/**
|
|
206
210
|
* Устанавливает библиотеку вимоджи
|
|
207
211
|
*
|
|
208
212
|
* @param vmoji Экземпляр класса `Vmoji` из `@vkontakte/calls-vmoji`
|
|
209
|
-
* @param sdk Экземпляр модуля `@vkontakte/calls-
|
|
213
|
+
* @param sdk Экземпляр модуля `@vkontakte/calls-sdk`, нужен для проброски дебаг сообщений
|
|
210
214
|
*/
|
|
211
|
-
export declare function setVmoji(vmoji: typeof Vmoji, sdk?: Parameters<typeof Vmoji.setSDK>[0] | null, renderingOptions?: Vmoji.RenderingOptions
|
|
215
|
+
export declare function setVmoji(vmoji: typeof Vmoji, sdk?: Parameters<typeof Vmoji.setSDK>[0] | null, renderingOptions?: Partial<Vmoji.RenderingOptions>, protocolVersion?: Vmoji.AnimojiVersion): void;
|
|
212
216
|
/**
|
|
213
217
|
* Инициализирует библиотеку
|
|
214
218
|
*
|
|
@@ -516,7 +520,7 @@ export declare function forceRelayPolicy(enabled: boolean): void;
|
|
|
516
520
|
* @param groupId
|
|
517
521
|
* @param roomId
|
|
518
522
|
*/
|
|
519
|
-
export declare function startStream(isRecord?: boolean, name?: string | null, movieId?: string | null, privacy?: 'PUBLIC' | 'FRIENDS' | 'DIRECT_LINK', groupId?: string | null, roomId?: number | null
|
|
523
|
+
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>;
|
|
520
524
|
/**
|
|
521
525
|
* Завершить трансляцию звонка
|
|
522
526
|
* @param roomId
|
|
@@ -613,6 +617,12 @@ export declare function debugMessage(type: DebugMessageType, ...args: any[]): vo
|
|
|
613
617
|
* @param effect
|
|
614
618
|
*/
|
|
615
619
|
export declare function changeVideoEffect(effect: IEffect | null): Promise<void>;
|
|
620
|
+
/**
|
|
621
|
+
* Эффект локального аудио
|
|
622
|
+
*
|
|
623
|
+
* @param effect
|
|
624
|
+
*/
|
|
625
|
+
export declare function changeAudioEffect(effects: string[], isPreset?: boolean): Promise<void>;
|
|
616
626
|
/**
|
|
617
627
|
* Позволяет установить кастомный стрим для аудио
|
|
618
628
|
*
|
|
@@ -631,6 +641,12 @@ export declare function setAudioStream(stream: MediaStream): Promise<void>;
|
|
|
631
641
|
* нужен только в случае присвоения участнику чужого аватара
|
|
632
642
|
*/
|
|
633
643
|
export declare function setVmojiSvg(svg: string | ArrayBuffer, externalId?: ExternalId | null, customKey?: string | null): Promise<void>;
|
|
644
|
+
/**
|
|
645
|
+
* Позволяет установить цвет фона собственного vmoji
|
|
646
|
+
*
|
|
647
|
+
* @param {(RGBTuple|string)} fill - цвет в виде rgb-кортежа или hex-кода
|
|
648
|
+
*/
|
|
649
|
+
export declare function setVmojiFill(fill: Vmoji.RGBTuple | string): void;
|
|
634
650
|
/**
|
|
635
651
|
* Получить состояние зала ожидания
|
|
636
652
|
*
|
|
@@ -702,5 +718,5 @@ export declare function sendTestCommand(name: string, params?: any): void;
|
|
|
702
718
|
* Версия SDK
|
|
703
719
|
*/
|
|
704
720
|
export declare function version(): string;
|
|
705
|
-
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, };
|
|
706
|
-
export { Api, AuthData,
|
|
721
|
+
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, };
|
|
722
|
+
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, };
|
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>;
|
|
@@ -106,6 +106,7 @@ export default abstract class BaseSignaling extends EventEmitter {
|
|
|
106
106
|
abstract useCommandDataChannel(status: boolean): void;
|
|
107
107
|
abstract getParticipantListChunk(participantListChunkParameters: ParticipantListChunkParameters): Promise<SignalingMessage>;
|
|
108
108
|
abstract getParticipants(externalIds: SignalingMessage.ExternalId[]): Promise<GetParticipantsSignalingResponse>;
|
|
109
|
+
abstract getPeerId(): number | null;
|
|
109
110
|
abstract startAsr(params: IAsrStartParams): Promise<SignalingMessage>;
|
|
110
111
|
abstract stopAsr(params?: IAsrStopParams): Promise<SignalingMessage>;
|
|
111
112
|
abstract requestAsr(request: boolean): Promise<SignalingMessage>;
|