@vkontakte/calls-sdk 2.8.5-dev.6bbdf240.0 → 2.8.5-dev.7186ce24.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 +33 -11
- package/abstract/BaseApi.d.ts +1 -1
- package/abstract/BaseSignaling.d.ts +4 -4
- package/calls-sdk.cjs.js +8 -9
- package/calls-sdk.esm.js +8 -9
- package/classes/Conversation.d.ts +18 -7
- 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 +6 -4
- package/default/Api.d.ts +1 -1
- package/default/Signaling.d.ts +4 -4
- package/enums/ConversationOption.d.ts +2 -1
- package/enums/SignalingCommandType.d.ts +3 -1
- package/enums/SignalingNotification.d.ts +3 -1
- package/package.json +3 -2
- package/static/ApiTransport.d.ts +0 -1
- package/static/External.d.ts +12 -2
- package/static/Params.d.ts +27 -24
- package/static/Utils.d.ts +3 -3
- package/static/WebRTCUtils.d.ts +6 -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';
|
|
@@ -193,20 +193,24 @@ 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
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
|
/**
|
|
@@ -368,8 +372,13 @@ export declare function changePriorities(priorities: ParticipantPriority[]): Pro
|
|
|
368
372
|
* Изменяет состояния пользователя в звонке (например, "поднять руку" или "отошёл")
|
|
369
373
|
*
|
|
370
374
|
* @param state Список состояний в виде ключ-значение. Максимальная длина ключей и значений - 5 символов. Пустые значения будут пропущены
|
|
375
|
+
* @param externalId Внешний ID пользователя
|
|
371
376
|
*/
|
|
372
|
-
export declare function changeParticipantState(state: Record<string, string
|
|
377
|
+
export declare function changeParticipantState(state: Record<string, string>, externalId?: ExternalId): Promise<void>;
|
|
378
|
+
/**
|
|
379
|
+
* Принудительно опустить руки участников в текущем сессионном зале админа
|
|
380
|
+
*/
|
|
381
|
+
export declare function putHandsDown(): Promise<void>;
|
|
373
382
|
/**
|
|
374
383
|
* Изменяет лейаут.
|
|
375
384
|
* Также сообщает серверу каких участников звонка стримить на этот клиент
|
|
@@ -413,6 +422,13 @@ export declare function setMediaModifiers(mediaModifiers: MediaModifiers): Promi
|
|
|
413
422
|
* @param enabled true - включить, false - отключить
|
|
414
423
|
*/
|
|
415
424
|
export declare function enableVideoSuspend(enabled: boolean): Promise<void>;
|
|
425
|
+
/**
|
|
426
|
+
* Режим, при котором будет предложено включить автоматическое
|
|
427
|
+
* отключение приёма видео в условиях плохого соединения
|
|
428
|
+
*
|
|
429
|
+
* @param enabled true - включить, false - отключить
|
|
430
|
+
*/
|
|
431
|
+
export declare function enableVideoSuspendSuggest(enabled: boolean): Promise<void>;
|
|
416
432
|
/**
|
|
417
433
|
* Включить/выключить опции звонка
|
|
418
434
|
*
|
|
@@ -504,7 +520,7 @@ export declare function forceRelayPolicy(enabled: boolean): void;
|
|
|
504
520
|
* @param groupId
|
|
505
521
|
* @param roomId
|
|
506
522
|
*/
|
|
507
|
-
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>;
|
|
508
524
|
/**
|
|
509
525
|
* Завершить трансляцию звонка
|
|
510
526
|
* @param roomId
|
|
@@ -601,6 +617,12 @@ export declare function debugMessage(type: DebugMessageType, ...args: any[]): vo
|
|
|
601
617
|
* @param effect
|
|
602
618
|
*/
|
|
603
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>;
|
|
604
626
|
/**
|
|
605
627
|
* Позволяет установить кастомный стрим для аудио
|
|
606
628
|
*
|
|
@@ -696,5 +718,5 @@ export declare function sendTestCommand(name: string, params?: any): void;
|
|
|
696
718
|
* Версия SDK
|
|
697
719
|
*/
|
|
698
720
|
export declare function version(): string;
|
|
699
|
-
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, };
|
|
700
|
-
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,12 +43,11 @@ 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
|
-
abstract changeParticipantState(state:
|
|
50
|
-
|
|
51
|
-
}): Promise<SignalingMessage>;
|
|
49
|
+
abstract changeParticipantState(state: Record<string, string>, compositeUserId?: CompositeUserId): Promise<SignalingMessage>;
|
|
50
|
+
abstract putHandsDown(): Promise<SignalingMessage>;
|
|
52
51
|
abstract addParticipant(participantId: CompositeUserId, params?: AddParticipantParams): Promise<SignalingMessage>;
|
|
53
52
|
abstract removeParticipant(participantId: CompositeUserId, ban?: boolean): Promise<SignalingMessage>;
|
|
54
53
|
abstract allocateConsumer(description: RTCSessionDescription | null, capabilities: {
|
|
@@ -92,6 +91,7 @@ export default abstract class BaseSignaling extends EventEmitter {
|
|
|
92
91
|
abstract pinParticipant(participantId: ParticipantId, unpin: boolean, roomId: number | null): Promise<SignalingMessage>;
|
|
93
92
|
abstract updateMediaModifiers(mediaModifiers: MediaModifiers): Promise<SignalingMessage>;
|
|
94
93
|
abstract enableVideoSuspend(enabled: boolean): Promise<SignalingMessage>;
|
|
94
|
+
abstract enableVideoSuspendSuggest(enabled: boolean): Promise<SignalingMessage>;
|
|
95
95
|
abstract changeOptions(changes: {
|
|
96
96
|
[key in ConversationOption]?: boolean;
|
|
97
97
|
}): Promise<SignalingMessage>;
|