@vkontakte/calls-sdk 2.6.2 → 2.6.3-dev.11298d2.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 +25 -17
- package/abstract/BaseSignaling.d.ts +11 -5
- package/calls-sdk.cjs.js +9 -9
- package/calls-sdk.esm.js +9 -9
- package/classes/Conversation.d.ts +44 -8
- package/classes/asr/AsrCommandSerializer.d.ts +3 -0
- package/classes/asr/AsrReceiver.d.ts +12 -0
- package/classes/transport/ServerTransport.d.ts +4 -0
- package/classes/transport/Transport.d.ts +3 -1
- package/default/Api.d.ts +4 -0
- package/default/Signaling.d.ts +16 -6
- package/enums/DataChannelLabel.d.ts +2 -1
- package/enums/SignalingCommandType.d.ts +3 -3
- package/package.json +1 -1
- package/static/External.d.ts +31 -8
- package/static/Params.d.ts +25 -13
- package/types/Asr.d.ts +6 -0
- package/types/Conversation.d.ts +1 -0
- package/types/MuteStates.d.ts +15 -0
- package/types/Participant.d.ts +1 -0
- package/types/ParticipantListChunk.d.ts +1 -1
- package/types/Room.d.ts +22 -5
- package/types/SignalingMessage.d.ts +14 -10
- package/types/Streams.d.ts +8 -0
package/CallsSDK.d.ts
CHANGED
|
@@ -39,8 +39,8 @@ import { ExternalId, ExternalIdType, ExternalParticipant, ExternalParticipantId,
|
|
|
39
39
|
import IceServer from './types/IceServer';
|
|
40
40
|
import MediaModifiers from './types/MediaModifiers';
|
|
41
41
|
import { IVideoDimentions, MediaSettings } from './types/MediaSettings';
|
|
42
|
-
import MuteStates from './types/MuteStates';
|
|
43
|
-
import { IGetParticipantsParameters, OkUserId,
|
|
42
|
+
import MuteStates, { IMuteParticipantInternalParams, IMuteParticipantParams } from './types/MuteStates';
|
|
43
|
+
import { IGetParticipantsParameters, OkUserId, ParticipantStateMapped } from './types/Participant';
|
|
44
44
|
import ParticipantLayout, { Layout, StopStream } from './types/ParticipantLayout';
|
|
45
45
|
import { ParticipantListChunkParameters } from './types/ParticipantListChunk';
|
|
46
46
|
import ParticipantPriority from './types/ParticipantPriority';
|
|
@@ -51,10 +51,10 @@ import SignalingMessage from './types/SignalingMessage';
|
|
|
51
51
|
import { WaitingHallResponse } from './types/WaitingHall';
|
|
52
52
|
import { IFeedbackExternal } from './types/Feedback';
|
|
53
53
|
import { ISharedMovieInfo, ISharedMovieStoppedInfo, ISharedMovieState, ISharedMovieStateResponse, IAddMovieParams, IOnRemoteMovieData, IMoviePreview, IUpdateMovieData } from './types/MovieShare';
|
|
54
|
+
import { IStartStreamData } from './types/Streams';
|
|
54
55
|
import ConversationFeature from './enums/ConversationFeature';
|
|
55
56
|
import { IFeaturesPerRole } from './types/ConversationFeature';
|
|
56
57
|
import { ArrayDequeue } from './utils/ArrayDequeue';
|
|
57
|
-
import { AsrInfo } from './types/Asr';
|
|
58
58
|
/**
|
|
59
59
|
* Информация о текущем браузере
|
|
60
60
|
*/
|
|
@@ -249,6 +249,8 @@ export declare function joinCallInternal(conversationId: string, mediaOptions: M
|
|
|
249
249
|
* @param joinLink Токен комнаты
|
|
250
250
|
* @param mediaOptions Нужно ли включать камеру и микрофон
|
|
251
251
|
* @param anonymToken Токен анонимной авторизации
|
|
252
|
+
* @param observedIds
|
|
253
|
+
* @param payload
|
|
252
254
|
*/
|
|
253
255
|
export declare function joinCallByLink(joinLink: string, mediaOptions?: MediaOption[], anonymToken?: string, observedIds?: ExternalUserId[], payload?: string): Promise<ConversationData>;
|
|
254
256
|
/**
|
|
@@ -358,9 +360,10 @@ export declare function grantRolesInternal(uid: OkUserId, roles: UserRole[], rev
|
|
|
358
360
|
* @param externalId Внешний ID пользователя (если не указано, сработает на всех)
|
|
359
361
|
* @param muteStates Состояние устройств пользователя
|
|
360
362
|
* @param requestedMedia Попросить пользователя включить устройство
|
|
363
|
+
* @param roomId ID сессионного зала, либо ничего если в основном зале
|
|
361
364
|
*/
|
|
362
|
-
export declare function muteParticipant(externalId
|
|
363
|
-
export declare function muteParticipantInternal(uid
|
|
365
|
+
export declare function muteParticipant({ externalId, muteStates, requestedMedia, roomId, }: IMuteParticipantParams): Promise<void>;
|
|
366
|
+
export declare function muteParticipantInternal({ uid, muteStates, requestedMedia, deviceIdx, roomId, }: IMuteParticipantInternalParams): Promise<void>;
|
|
364
367
|
/**
|
|
365
368
|
* Закрепить/открепить выбранного собеседника у всех (только если есть соответствующая роль)
|
|
366
369
|
*
|
|
@@ -444,8 +447,8 @@ export declare function setVolume(volume: number): void;
|
|
|
444
447
|
* @param enabled
|
|
445
448
|
*/
|
|
446
449
|
export declare function forceRelayPolicy(enabled: boolean): void;
|
|
447
|
-
export declare function startStream(isRecord?: boolean, name?: string | null, movieId?: string | null, privacy?: 'PUBLIC' | 'FRIENDS' | 'DIRECT_LINK', groupId?: string | null): Promise<SignalingMessage>;
|
|
448
|
-
export declare function stopStream(): Promise<SignalingMessage>;
|
|
450
|
+
export declare function startStream(isRecord?: boolean, name?: string | null, movieId?: string | null, privacy?: 'PUBLIC' | 'FRIENDS' | 'DIRECT_LINK', groupId?: string | null, roomId?: number | null): Promise<SignalingMessage>;
|
|
451
|
+
export declare function stopStream(roomId?: number | null): Promise<SignalingMessage>;
|
|
449
452
|
/**
|
|
450
453
|
* Устанавливает роль участника в запись звонка
|
|
451
454
|
* Если хотя бы у одного участника звонка выставлена роль, то в записи звонка будут
|
|
@@ -456,8 +459,9 @@ export declare function stopStream(): Promise<SignalingMessage>;
|
|
|
456
459
|
*
|
|
457
460
|
* @param externalId Внешний ID пользователя
|
|
458
461
|
* @param role Роль, если null, то роль удалится
|
|
462
|
+
* @param roomId ID сессионного зала записи. Если null, то роль применится в основном звонке
|
|
459
463
|
*/
|
|
460
|
-
export declare function recordSetRole(externalId: string | ExternalParticipantId, role: RecordRole | null): Promise<void>;
|
|
464
|
+
export declare function recordSetRole(externalId: string | ExternalParticipantId, role: RecordRole | null, roomId?: number | null): Promise<void>;
|
|
461
465
|
export declare function getStreamInfo(): Promise<{
|
|
462
466
|
movieId: any;
|
|
463
467
|
preview: any;
|
|
@@ -465,7 +469,7 @@ export declare function getStreamInfo(): Promise<{
|
|
|
465
469
|
/**
|
|
466
470
|
* Добавляет видео/лайв в звонок
|
|
467
471
|
*
|
|
468
|
-
* @param
|
|
472
|
+
* @param params
|
|
469
473
|
*/
|
|
470
474
|
export declare function addMovie(params: IAddMovieParams): Promise<{
|
|
471
475
|
movieId: string;
|
|
@@ -484,9 +488,9 @@ export declare function updateMovie(params: IUpdateMovieData): Promise<void>;
|
|
|
484
488
|
*/
|
|
485
489
|
export declare function removeMovie(movieId: string): Promise<void>;
|
|
486
490
|
/**
|
|
487
|
-
* Обновить
|
|
488
|
-
* @param rooms id в случае обновления
|
|
489
|
-
* @param assignRandomly рандомно назначить участников
|
|
491
|
+
* Обновить сессионные залы
|
|
492
|
+
* @param rooms id в случае обновления сессионного зала
|
|
493
|
+
* @param assignRandomly рандомно назначить участников залов из свободных в соответствии с participantCount
|
|
490
494
|
*/
|
|
491
495
|
export declare function updateRooms(rooms: {
|
|
492
496
|
id?: number;
|
|
@@ -495,19 +499,19 @@ export declare function updateRooms(rooms: {
|
|
|
495
499
|
active?: boolean;
|
|
496
500
|
}[], assignRandomly: boolean): Promise<void>;
|
|
497
501
|
/**
|
|
498
|
-
* Активировать
|
|
502
|
+
* Активировать сессионные залы
|
|
499
503
|
* @param roomIds
|
|
500
504
|
* @param deactivate
|
|
501
505
|
*/
|
|
502
506
|
export declare function activateRooms(roomIds: number[], deactivate: boolean): Promise<void>;
|
|
503
507
|
/**
|
|
504
|
-
* Cменить
|
|
508
|
+
* Cменить сессионный зал
|
|
505
509
|
* @param toRoomId
|
|
506
510
|
* @param participantId
|
|
507
511
|
*/
|
|
508
|
-
export declare function switchRoom(toRoomId?: number, participantId?:
|
|
512
|
+
export declare function switchRoom(toRoomId?: number | null, participantId?: string | ExternalParticipantId | null): Promise<void>;
|
|
509
513
|
/**
|
|
510
|
-
* Удалить
|
|
514
|
+
* Удалить сессионные залы
|
|
511
515
|
* @param roomIds
|
|
512
516
|
*/
|
|
513
517
|
export declare function removeRooms(roomIds: number[]): Promise<void>;
|
|
@@ -576,9 +580,13 @@ export declare function startAsr(): Promise<void>;
|
|
|
576
580
|
* Заканчивает текстовую расшифровку звонка
|
|
577
581
|
*/
|
|
578
582
|
export declare function stopAsr(): Promise<void>;
|
|
583
|
+
/**
|
|
584
|
+
* Запрашивает/отключает реал-тайм расшифровку звонка
|
|
585
|
+
*/
|
|
586
|
+
export declare function requestAsr(request: boolean): Promise<void>;
|
|
579
587
|
/**
|
|
580
588
|
* Версия SDK
|
|
581
589
|
*/
|
|
582
590
|
export declare function version(): string;
|
|
583
|
-
export type { AddParticipantParams, ConversationData, ConversationParams, ConversationResponse, ExternalId, ExternalParticipant, ExternalParticipantListMarkers as ExternalParticipantMarkers, ExternalParticipantId, HangupReasonData, IceServer, JSONArray, JSONObject, JSONType, Layout, MediaModifiers, MediaSettings, MuteStates, OkUserId, ParamsObject, ParticipantLayout, ParticipantPriority, ParticipantStateMapped, ParticipantStreamDescription, ParticipantListChunkParameters, IGetParticipantsParameters, SignalingMessage, StatResult, StopStream, WaitingHallResponse, IVideoDimentions, IFeedbackExternal, ISharedMovieInfo, ISharedMovieStoppedInfo, ISharedMovieState, ISharedMovieStateResponse, IAddMovieParams, IOnRemoteMovieData, IMoviePreview, Room, RoomsUpdate, RoomParticipantUpdate, IUpdateMovieData, IFeaturesPerRole,
|
|
591
|
+
export type { AddParticipantParams, ConversationData, ConversationParams, ConversationResponse, ExternalId, ExternalParticipant, ExternalParticipantListMarkers as ExternalParticipantMarkers, ExternalParticipantId, HangupReasonData, IceServer, JSONArray, JSONObject, JSONType, Layout, MediaModifiers, MediaSettings, MuteStates, OkUserId, ParamsObject, ParticipantLayout, ParticipantPriority, ParticipantStateMapped, ParticipantStreamDescription, ParticipantListChunkParameters, IGetParticipantsParameters, SignalingMessage, StatResult, StopStream, WaitingHallResponse, IVideoDimentions, IFeedbackExternal, ISharedMovieInfo, ISharedMovieStoppedInfo, ISharedMovieState, ISharedMovieStateResponse, IAddMovieParams, IOnRemoteMovieData, IMoviePreview, Room, RoomsUpdate, RoomParticipantUpdate, IUpdateMovieData, IFeaturesPerRole, IMuteParticipantParams, IMuteParticipantInternalParams, IStartStreamData, };
|
|
584
592
|
export { Api, BaseApi, BaseLogger, BaseSignaling, CallDirection, CallType, ChatRoomEventType, ConversationOption, DebugMessageType, ExternalIdType, FacingMode, FatalError, HangupReason, HangupType, MediaOption, MediaTrackKind, MediaType, MuteState, ParticipantState, ParticipantStatus, RecordRole, Signaling, SignalingCommandType, SignalingConnectionType, SignalingNotification, UserRole, UserType, Utils, TransportTopology, RoomsEventType, ConversationFeature, ArrayDequeue, };
|
|
@@ -18,6 +18,7 @@ import { CompositeUserId, ParticipantId } from '../types/Participant';
|
|
|
18
18
|
import { ParticipantLayout, RequestKeyFrame, StopStream } from '../types/ParticipantLayout';
|
|
19
19
|
import { ParticipantListChunkParameters } from '../types/ParticipantListChunk';
|
|
20
20
|
import SignalingMessage from '../types/SignalingMessage';
|
|
21
|
+
import { IStartStreamData } from '../types/Streams';
|
|
21
22
|
import { WaitingParticipantId } from '../types/WaitingHall';
|
|
22
23
|
import { SharingStatReport } from '../classes/screenshare/SharingStatReport';
|
|
23
24
|
/**
|
|
@@ -64,11 +65,14 @@ export default abstract class BaseSignaling extends EventEmitter {
|
|
|
64
65
|
abstract removeMovie(data: any): Promise<SignalingMessage>;
|
|
65
66
|
abstract updateRooms(rooms: Record<any, any>[], assignRandomly: boolean): Promise<SignalingMessage>;
|
|
66
67
|
abstract activateRooms(roomIds: number[], deactivate: boolean): Promise<SignalingMessage>;
|
|
67
|
-
abstract switchRoom(toRoomId
|
|
68
|
+
abstract switchRoom(toRoomId: number | null, participantId?: ParticipantId): Promise<SignalingMessage>;
|
|
69
|
+
abstract getRooms(withParticipants: boolean): Promise<SignalingMessage>;
|
|
68
70
|
abstract removeRooms(roomIds: number[]): Promise<SignalingMessage>;
|
|
69
|
-
abstract startStream(data:
|
|
70
|
-
abstract stopStream(
|
|
71
|
-
|
|
71
|
+
abstract startStream(data: IStartStreamData): Promise<SignalingMessage>;
|
|
72
|
+
abstract stopStream(data: {
|
|
73
|
+
roomId: number | null;
|
|
74
|
+
}): Promise<SignalingMessage>;
|
|
75
|
+
abstract recordSetRole(participantId: ParticipantId, role: RecordRole | null, roomId: number | null): Promise<SignalingMessage>;
|
|
72
76
|
abstract getRecordStatus(): Promise<SignalingMessage>;
|
|
73
77
|
abstract switchTopology(topology: TransportTopology, force?: boolean): Promise<SignalingMessage>;
|
|
74
78
|
abstract reportPerfStat(report: PerfStatReport): Promise<SignalingMessage>;
|
|
@@ -77,7 +81,7 @@ export default abstract class BaseSignaling extends EventEmitter {
|
|
|
77
81
|
abstract chatHistory(count: number): Promise<SignalingMessage>;
|
|
78
82
|
abstract customData(data: JSONObject, participantId: ParticipantId | null): Promise<SignalingMessage>;
|
|
79
83
|
abstract grantRoles(participantId: CompositeUserId, roles: UserRole[], revoke: boolean): Promise<SignalingMessage>;
|
|
80
|
-
abstract muteParticipant(participantId: ParticipantId | null, muteStates: MuteStates, requestedMedia: MediaOption[]): Promise<SignalingMessage>;
|
|
84
|
+
abstract muteParticipant(participantId: ParticipantId | null, muteStates: MuteStates, requestedMedia: MediaOption[], roomId: number | null): Promise<SignalingMessage>;
|
|
81
85
|
abstract enableFeatureForRoles(feature: ConversationFeature, roles: UserRole[]): Promise<SignalingMessage>;
|
|
82
86
|
abstract pinParticipant(participantId: ParticipantId, unpin: boolean): Promise<SignalingMessage>;
|
|
83
87
|
abstract updateMediaModifiers(mediaModifiers: MediaModifiers): Promise<SignalingMessage>;
|
|
@@ -90,10 +94,12 @@ export default abstract class BaseSignaling extends EventEmitter {
|
|
|
90
94
|
abstract setProducerNotificationDataChannel(dataChannel: RTCDataChannel): void;
|
|
91
95
|
abstract setProducerCommandDataChannel(dataChannel: RTCDataChannel): void;
|
|
92
96
|
abstract useCommandDataChannel(status: boolean): void;
|
|
97
|
+
abstract setAsrDataChannel(dataChannel: RTCDataChannel): void;
|
|
93
98
|
abstract getParticipantListChunk(participantListChunkParameters: ParticipantListChunkParameters): Promise<SignalingMessage>;
|
|
94
99
|
abstract getParticipants(externalIds: SignalingMessage.ExternalId[]): Promise<SignalingMessage>;
|
|
95
100
|
abstract startAsr(): Promise<SignalingMessage>;
|
|
96
101
|
abstract stopAsr(): Promise<SignalingMessage>;
|
|
102
|
+
abstract requestAsr(request: boolean): Promise<SignalingMessage>;
|
|
97
103
|
get ready(): boolean;
|
|
98
104
|
setParticipantIdRegistry(participantIdRegistry: ParticipantIdRegistry): void;
|
|
99
105
|
requestRealloc(): void;
|