@vkontakte/calls-sdk 2.6.3-dev.5d91977.0 → 2.6.3-dev.bc23365.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 +24 -19
- package/abstract/BaseSignaling.d.ts +7 -5
- package/calls-sdk.cjs.js +8 -8
- package/calls-sdk.esm.js +8 -8
- package/classes/Conversation.d.ts +42 -11
- package/classes/MediaSource.d.ts +0 -1
- package/default/Api.d.ts +4 -0
- package/default/Signaling.d.ts +7 -5
- package/enums/SignalingCommandType.d.ts +1 -2
- package/package.json +1 -1
- package/static/External.d.ts +32 -11
- package/static/Params.d.ts +36 -15
- package/types/Conversation.d.ts +1 -0
- package/types/MovieShare.d.ts +9 -138
- 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 +15 -3
- package/types/Streams.d.ts +11 -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,6 +51,7 @@ 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, IStopStreamData } from './types/Streams';
|
|
54
55
|
import ConversationFeature from './enums/ConversationFeature';
|
|
55
56
|
import { IFeaturesPerRole } from './types/ConversationFeature';
|
|
56
57
|
import { ArrayDequeue } from './utils/ArrayDequeue';
|
|
@@ -248,6 +249,8 @@ export declare function joinCallInternal(conversationId: string, mediaOptions: M
|
|
|
248
249
|
* @param joinLink Токен комнаты
|
|
249
250
|
* @param mediaOptions Нужно ли включать камеру и микрофон
|
|
250
251
|
* @param anonymToken Токен анонимной авторизации
|
|
252
|
+
* @param observedIds
|
|
253
|
+
* @param payload
|
|
251
254
|
*/
|
|
252
255
|
export declare function joinCallByLink(joinLink: string, mediaOptions?: MediaOption[], anonymToken?: string, observedIds?: ExternalUserId[], payload?: string): Promise<ConversationData>;
|
|
253
256
|
/**
|
|
@@ -289,7 +292,7 @@ export declare function captureScreen(state: boolean): Promise<void>;
|
|
|
289
292
|
* @param screenState Включить или выключить захват экрана.
|
|
290
293
|
* @param audioShareState Включить или выключить захват звука. Может быть использован только вместе с захватом экрана.
|
|
291
294
|
*/
|
|
292
|
-
export declare function captureScreenAndAudio(screenState: boolean, audioShareState
|
|
295
|
+
export declare function captureScreenAndAudio(screenState: boolean, audioShareState: boolean): Promise<void>;
|
|
293
296
|
/**
|
|
294
297
|
* Позволяет установить кастомный стрим для видео
|
|
295
298
|
* например для стрима из canvas, с наложением изображений
|
|
@@ -357,9 +360,10 @@ export declare function grantRolesInternal(uid: OkUserId, roles: UserRole[], rev
|
|
|
357
360
|
* @param externalId Внешний ID пользователя (если не указано, сработает на всех)
|
|
358
361
|
* @param muteStates Состояние устройств пользователя
|
|
359
362
|
* @param requestedMedia Попросить пользователя включить устройство
|
|
363
|
+
* @param roomId ID сессионного зала, либо ничего если в основном зале
|
|
360
364
|
*/
|
|
361
|
-
export declare function muteParticipant(externalId
|
|
362
|
-
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>;
|
|
363
367
|
/**
|
|
364
368
|
* Закрепить/открепить выбранного собеседника у всех (только если есть соответствующая роль)
|
|
365
369
|
*
|
|
@@ -443,8 +447,8 @@ export declare function setVolume(volume: number): void;
|
|
|
443
447
|
* @param enabled
|
|
444
448
|
*/
|
|
445
449
|
export declare function forceRelayPolicy(enabled: boolean): void;
|
|
446
|
-
export declare function startStream(isRecord?: boolean, name?: string | null, movieId?: string | null, privacy?: 'PUBLIC' | 'FRIENDS' | 'DIRECT_LINK', groupId?: string | null): Promise<SignalingMessage>;
|
|
447
|
-
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>;
|
|
448
452
|
/**
|
|
449
453
|
* Устанавливает роль участника в запись звонка
|
|
450
454
|
* Если хотя бы у одного участника звонка выставлена роль, то в записи звонка будут
|
|
@@ -455,8 +459,9 @@ export declare function stopStream(): Promise<SignalingMessage>;
|
|
|
455
459
|
*
|
|
456
460
|
* @param externalId Внешний ID пользователя
|
|
457
461
|
* @param role Роль, если null, то роль удалится
|
|
462
|
+
* @param roomId ID сессионного зала записи. Если null, то роль применится в основном звонке
|
|
458
463
|
*/
|
|
459
|
-
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>;
|
|
460
465
|
export declare function getStreamInfo(): Promise<{
|
|
461
466
|
movieId: any;
|
|
462
467
|
preview: any;
|
|
@@ -467,7 +472,7 @@ export declare function getStreamInfo(): Promise<{
|
|
|
467
472
|
* @param params
|
|
468
473
|
*/
|
|
469
474
|
export declare function addMovie(params: IAddMovieParams): Promise<{
|
|
470
|
-
movieId:
|
|
475
|
+
movieId: string;
|
|
471
476
|
streamType: string;
|
|
472
477
|
}>;
|
|
473
478
|
/**
|
|
@@ -479,13 +484,13 @@ export declare function updateMovie(params: IUpdateMovieData): Promise<void>;
|
|
|
479
484
|
/**
|
|
480
485
|
* Удалить видео/лайв из звонка
|
|
481
486
|
*
|
|
482
|
-
* @param movieId
|
|
487
|
+
* @param movieId
|
|
483
488
|
*/
|
|
484
|
-
export declare function removeMovie(movieId:
|
|
489
|
+
export declare function removeMovie(movieId: string): Promise<void>;
|
|
485
490
|
/**
|
|
486
|
-
* Обновить
|
|
487
|
-
* @param rooms id в случае обновления
|
|
488
|
-
* @param assignRandomly рандомно назначить участников
|
|
491
|
+
* Обновить сессионные залы
|
|
492
|
+
* @param rooms id в случае обновления сессионного зала
|
|
493
|
+
* @param assignRandomly рандомно назначить участников залов из свободных в соответствии с participantCount
|
|
489
494
|
*/
|
|
490
495
|
export declare function updateRooms(rooms: {
|
|
491
496
|
id?: number;
|
|
@@ -494,19 +499,19 @@ export declare function updateRooms(rooms: {
|
|
|
494
499
|
active?: boolean;
|
|
495
500
|
}[], assignRandomly: boolean): Promise<void>;
|
|
496
501
|
/**
|
|
497
|
-
* Активировать
|
|
502
|
+
* Активировать сессионные залы
|
|
498
503
|
* @param roomIds
|
|
499
504
|
* @param deactivate
|
|
500
505
|
*/
|
|
501
506
|
export declare function activateRooms(roomIds: number[], deactivate: boolean): Promise<void>;
|
|
502
507
|
/**
|
|
503
|
-
* Cменить
|
|
508
|
+
* Cменить сессионный зал
|
|
504
509
|
* @param toRoomId
|
|
505
510
|
* @param participantId
|
|
506
511
|
*/
|
|
507
|
-
export declare function switchRoom(toRoomId?: number, participantId?:
|
|
512
|
+
export declare function switchRoom(toRoomId?: number | null, participantId?: string | ExternalParticipantId | null): Promise<void>;
|
|
508
513
|
/**
|
|
509
|
-
* Удалить
|
|
514
|
+
* Удалить сессионные залы
|
|
510
515
|
* @param roomIds
|
|
511
516
|
*/
|
|
512
517
|
export declare function removeRooms(roomIds: number[]): Promise<void>;
|
|
@@ -583,5 +588,5 @@ export declare function requestAsr(request: boolean): Promise<void>;
|
|
|
583
588
|
* Версия SDK
|
|
584
589
|
*/
|
|
585
590
|
export declare function version(): string;
|
|
586
|
-
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, IStopStreamData, };
|
|
587
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, IStopStreamData } from '../types/Streams';
|
|
21
22
|
import { WaitingParticipantId } from '../types/WaitingHall';
|
|
22
23
|
import { SharingStatReport } from '../classes/screenshare/SharingStatReport';
|
|
23
24
|
/**
|
|
@@ -64,11 +65,12 @@ 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(): Promise<SignalingMessage>;
|
|
71
|
-
abstract recordSetRole(participantId: ParticipantId, role: RecordRole | null): Promise<SignalingMessage>;
|
|
71
|
+
abstract startStream(data: IStartStreamData): Promise<SignalingMessage>;
|
|
72
|
+
abstract stopStream(data: IStopStreamData): Promise<SignalingMessage>;
|
|
73
|
+
abstract recordSetRole(participantId: ParticipantId, role: RecordRole | null, roomId: number | null): Promise<SignalingMessage>;
|
|
72
74
|
abstract getRecordStatus(): Promise<SignalingMessage>;
|
|
73
75
|
abstract switchTopology(topology: TransportTopology, force?: boolean): Promise<SignalingMessage>;
|
|
74
76
|
abstract reportPerfStat(report: PerfStatReport): Promise<SignalingMessage>;
|
|
@@ -77,7 +79,7 @@ export default abstract class BaseSignaling extends EventEmitter {
|
|
|
77
79
|
abstract chatHistory(count: number): Promise<SignalingMessage>;
|
|
78
80
|
abstract customData(data: JSONObject, participantId: ParticipantId | null): Promise<SignalingMessage>;
|
|
79
81
|
abstract grantRoles(participantId: CompositeUserId, roles: UserRole[], revoke: boolean): Promise<SignalingMessage>;
|
|
80
|
-
abstract muteParticipant(participantId: ParticipantId | null, muteStates: MuteStates, requestedMedia: MediaOption[]): Promise<SignalingMessage>;
|
|
82
|
+
abstract muteParticipant(participantId: ParticipantId | null, muteStates: MuteStates, requestedMedia: MediaOption[], roomId: number | null): Promise<SignalingMessage>;
|
|
81
83
|
abstract enableFeatureForRoles(feature: ConversationFeature, roles: UserRole[]): Promise<SignalingMessage>;
|
|
82
84
|
abstract pinParticipant(participantId: ParticipantId, unpin: boolean): Promise<SignalingMessage>;
|
|
83
85
|
abstract updateMediaModifiers(mediaModifiers: MediaModifiers): Promise<SignalingMessage>;
|