@vkontakte/calls-sdk 2.8.4-dev.a76dcb2.0 → 2.8.4-dev.b2a2d69.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 +12 -8
- package/abstract/BaseApi.d.ts +12 -4
- package/abstract/BaseSignaling.d.ts +5 -0
- package/calls-sdk.cjs.js +8 -8
- package/calls-sdk.esm.js +8 -8
- package/classes/Conversation.d.ts +15 -2
- package/classes/Logger.d.ts +6 -3
- package/classes/ProducerCommandSerializationService.d.ts +4 -0
- package/classes/screenshare/ScreenCaptureSender.d.ts +3 -0
- package/classes/stat/WeightedAverage.d.ts +10 -0
- package/classes/transport/BaseTransport.d.ts +0 -1
- package/classes/transport/DirectStatReporter.d.ts +43 -0
- package/classes/transport/DirectTransport.d.ts +2 -4
- package/classes/transport/PerfStatReporter.d.ts +3 -1
- package/classes/transport/Transport.d.ts +1 -0
- package/default/Api.d.ts +2 -1
- package/default/Signaling.d.ts +9 -4
- package/enums/SignalingCommandType.d.ts +5 -1
- package/enums/SignalingNotification.d.ts +1 -0
- package/package.json +3 -3
- package/static/External.d.ts +30 -10
- package/static/Params.d.ts +57 -14
- package/static/WebRTCUtils.d.ts +5 -1
- package/types/AudienceMode.d.ts +1 -0
- package/types/Conversation.d.ts +8 -6
- package/types/EnableVideoSuspend.d.ts +3 -0
- package/types/MediaSettings.d.ts +0 -9
- package/types/MuteStates.d.ts +12 -0
- package/types/NetworkStatReport.d.ts +4 -0
- package/types/ParticipantStreamDescription.d.ts +2 -1
- package/types/PerfStatReporter.d.ts +6 -0
- package/types/Room.d.ts +5 -1
- package/types/SignalingCommand.d.ts +4 -4
- package/types/SignalingMessage.d.ts +34 -12
- package/types/Statistics.d.ts +9 -0
- package/types/Streams.d.ts +1 -0
- package/types/Vmoji.d.ts +5 -0
package/CallsSDK.d.ts
CHANGED
|
@@ -34,7 +34,7 @@ import { ParticipantStatus } from './static/External';
|
|
|
34
34
|
import { JSONArray, JSONObject, JSONType } from './static/Json';
|
|
35
35
|
import { ParamsObject } from './static/Params';
|
|
36
36
|
import Utils from './static/Utils';
|
|
37
|
-
import WebRTCUtils, { FacingMode } from './static/WebRTCUtils';
|
|
37
|
+
import WebRTCUtils, { BrowserName, FacingMode } from './static/WebRTCUtils';
|
|
38
38
|
import { IAsrData, IAsrStartParams, IAsrStopParams } from './types/Asr';
|
|
39
39
|
import { ConversationData } from './types/Conversation';
|
|
40
40
|
import { IFeaturesPerRole } from './types/ConversationFeature';
|
|
@@ -387,11 +387,6 @@ export declare function grantRoles(externalId: ExternalId, roles: UserRole[], re
|
|
|
387
387
|
export declare function grantRolesInternal(uid: OkUserId, deviceIdx: number, roles: UserRole[], revoke?: boolean): Promise<void>;
|
|
388
388
|
/**
|
|
389
389
|
* Выключить или выключить микрофон и/или камеру собеседнику (только если есть соответствующая роль)
|
|
390
|
-
*
|
|
391
|
-
* @param externalId Внешний ID пользователя (если не указано, сработает на всех)
|
|
392
|
-
* @param muteStates Состояние устройств пользователя
|
|
393
|
-
* @param requestedMedia Попросить пользователя включить устройство
|
|
394
|
-
* @param roomId ID сессионного зала, либо ничего если в основном зале
|
|
395
390
|
*/
|
|
396
391
|
export declare function muteParticipant({ externalId, muteStates, requestedMedia, roomId, }: IMuteParticipantParams): Promise<void>;
|
|
397
392
|
export declare function muteParticipantInternal({ uid, muteStates, requestedMedia, deviceIdx, roomId, }: IMuteParticipantInternalParams): Promise<void>;
|
|
@@ -410,6 +405,13 @@ export declare function pinParticipantInternal(uid: OkUserId, unpin?: boolean, d
|
|
|
410
405
|
* @param mediaModifiers
|
|
411
406
|
*/
|
|
412
407
|
export declare function setMediaModifiers(mediaModifiers: MediaModifiers): Promise<void>;
|
|
408
|
+
/**
|
|
409
|
+
* Автоматическое отключения принимаемых видео-потоков
|
|
410
|
+
* в условиях плохого соединения
|
|
411
|
+
*
|
|
412
|
+
* @param enabled true - включить, false - отключить
|
|
413
|
+
*/
|
|
414
|
+
export declare function enableVideoSuspend(enabled: boolean): Promise<void>;
|
|
413
415
|
/**
|
|
414
416
|
* Включить/выключить опции звонка
|
|
415
417
|
*
|
|
@@ -501,7 +503,7 @@ export declare function forceRelayPolicy(enabled: boolean): void;
|
|
|
501
503
|
* @param groupId
|
|
502
504
|
* @param roomId
|
|
503
505
|
*/
|
|
504
|
-
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>;
|
|
506
|
+
export declare function startStream(isRecord?: boolean, name?: string | null, movieId?: string | null, privacy?: 'PUBLIC' | 'FRIENDS' | 'DIRECT_LINK', groupId?: string | null, roomId?: number | null, externalAccessKey?: string | null): Promise<undefined>;
|
|
505
507
|
/**
|
|
506
508
|
* Завершить трансляцию звонка
|
|
507
509
|
* @param roomId
|
|
@@ -672,9 +674,11 @@ export declare function stopAsr(params?: IAsrStopParams): Promise<void>;
|
|
|
672
674
|
* Запрашивает/отключает реал-тайм расшифровку звонка
|
|
673
675
|
*/
|
|
674
676
|
export declare function requestAsr(request: boolean): Promise<void>;
|
|
677
|
+
export declare function startUrlSharing(sharedUrl: string): Promise<void>;
|
|
678
|
+
export declare function stopUrlSharing(): Promise<void>;
|
|
675
679
|
/**
|
|
676
680
|
* Версия SDK
|
|
677
681
|
*/
|
|
678
682
|
export declare function version(): string;
|
|
679
|
-
export type { AddParticipantParams, AudienceModeHandsResponse, CompositeUserId, ConversationData, ConversationParams, ConversationResponse, ExternalId, ExternalParticipant, ExternalParticipantListChunk, ExternalParticipantListMarker, ExternalParticipantListMarkers as ExternalParticipantMarkers, ExternalParticipantId, 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, };
|
|
683
|
+
export type { AddParticipantParams, AudienceModeHandsResponse, BrowserName, CompositeUserId, ConversationData, ConversationParams, ConversationResponse, ExternalId, ExternalParticipant, ExternalParticipantListChunk, ExternalParticipantListMarker, ExternalParticipantListMarkers as ExternalParticipantMarkers, ExternalParticipantId, 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, };
|
|
680
684
|
export { Api, AuthData, 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, TransportTopology, RoomsEventType, ConversationFeature, ArrayDequeue, ApiExternal, };
|
package/abstract/BaseApi.d.ts
CHANGED
|
@@ -4,12 +4,13 @@ import ConversationParams from '../types/ConversationParams';
|
|
|
4
4
|
import ConversationResponse from '../types/ConversationResponse';
|
|
5
5
|
import { ExternalId, ExternalParticipantId, ExternalUserId } from '../types/ExternalId';
|
|
6
6
|
import { CompositeUserId, OkUserId, ParticipantId } from '../types/Participant';
|
|
7
|
+
export type ClientStats = {
|
|
8
|
+
vcid: ConversationData['id'] | null;
|
|
9
|
+
[k: string]: string | number | null;
|
|
10
|
+
};
|
|
7
11
|
export type LogItem = {
|
|
8
12
|
count?: number;
|
|
9
|
-
custom:
|
|
10
|
-
vcid: ConversationData['id'] | null;
|
|
11
|
-
[k: string]: string | number | null;
|
|
12
|
-
};
|
|
13
|
+
custom: ClientStats;
|
|
13
14
|
data?: string[];
|
|
14
15
|
groups?: string[];
|
|
15
16
|
network?: string;
|
|
@@ -43,7 +44,14 @@ export default abstract class BaseApi {
|
|
|
43
44
|
abstract getConversationParams(conversationId?: string): Promise<ConversationParams>;
|
|
44
45
|
abstract getUserId(): OkUserId | null;
|
|
45
46
|
abstract setUserId(userId: OkUserId): void;
|
|
47
|
+
/**
|
|
48
|
+
* method: log.externalLog
|
|
49
|
+
*/
|
|
46
50
|
log(items: LogItem[]): void;
|
|
51
|
+
/**
|
|
52
|
+
* method: vchat.clientStats
|
|
53
|
+
*/
|
|
54
|
+
logClientStats(items: ClientStats[]): void;
|
|
47
55
|
prepareUserIds(ids: OkUserId[]): Promise<void>;
|
|
48
56
|
abstract getOkIdsByExternalIds(externalIds: ExternalId[]): Promise<OkUserId[]>;
|
|
49
57
|
abstract getParticipantIdsByExternalIds(externalIds: ExternalId[]): Promise<Map<ExternalId, ParticipantId>>;
|
|
@@ -2,6 +2,7 @@ import EventEmitter from '../classes/EventEmitter';
|
|
|
2
2
|
import { ParticipantIdRegistry } from '../classes/ParticipantIdRegistry';
|
|
3
3
|
import { StreamDescriptionString } from '../types/ParticipantStreamDescription';
|
|
4
4
|
import { PerfStatReport } from '../types/PerfStatReporter';
|
|
5
|
+
import { NetworkStatReport } from '../types/NetworkStatReport';
|
|
5
6
|
import { TransportTopology } from '../classes/transport/Transport';
|
|
6
7
|
import ConversationFeature from '../enums/ConversationFeature';
|
|
7
8
|
import ConversationOption from '../enums/ConversationOption';
|
|
@@ -67,6 +68,8 @@ export default abstract class BaseSignaling extends EventEmitter {
|
|
|
67
68
|
abstract addMovie(data: IAddMovieParams): Promise<SignalingMessage>;
|
|
68
69
|
abstract updateMovie(data: IUpdateMovieData): Promise<SignalingMessage>;
|
|
69
70
|
abstract removeMovie(data: any): Promise<SignalingMessage>;
|
|
71
|
+
abstract startUrlSharing(sharedUrl: string): Promise<SignalingMessage>;
|
|
72
|
+
abstract stopUrlSharing(): Promise<SignalingMessage>;
|
|
70
73
|
abstract updateRooms(rooms: Record<any, any>[], assignRandomly?: boolean): Promise<SignalingMessage>;
|
|
71
74
|
abstract activateRooms(roomIds: number[], deactivate: boolean): Promise<SignalingMessage>;
|
|
72
75
|
abstract switchRoom(toRoomId: number | null, participantId?: ParticipantId): Promise<SignalingMessage>;
|
|
@@ -80,6 +83,7 @@ export default abstract class BaseSignaling extends EventEmitter {
|
|
|
80
83
|
abstract switchTopology(topology: TransportTopology, force?: boolean): Promise<SignalingMessage>;
|
|
81
84
|
abstract reportPerfStat(report: PerfStatReport): Promise<SignalingMessage>;
|
|
82
85
|
abstract reportSharingStat(report: SharingStatReport): Promise<SignalingMessage>;
|
|
86
|
+
abstract reportNetworkStat(report: NetworkStatReport): Promise<SignalingMessage>;
|
|
83
87
|
abstract chatMessage(message: string, participantId: CompositeUserId | null): Promise<SignalingMessage>;
|
|
84
88
|
abstract chatHistory(count: number): Promise<SignalingMessage>;
|
|
85
89
|
abstract customData(data: JSONObject, participantId: ParticipantId | null): Promise<SignalingMessage>;
|
|
@@ -88,6 +92,7 @@ export default abstract class BaseSignaling extends EventEmitter {
|
|
|
88
92
|
abstract enableFeatureForRoles(feature: ConversationFeature, roles: UserRole[]): Promise<SignalingMessage>;
|
|
89
93
|
abstract pinParticipant(participantId: ParticipantId, unpin: boolean, roomId: number | null): Promise<SignalingMessage>;
|
|
90
94
|
abstract updateMediaModifiers(mediaModifiers: MediaModifiers): Promise<SignalingMessage>;
|
|
95
|
+
abstract enableVideoSuspend(enabled: boolean): Promise<SignalingMessage>;
|
|
91
96
|
abstract changeOptions(changes: {
|
|
92
97
|
[key in ConversationOption]?: boolean;
|
|
93
98
|
}): Promise<SignalingMessage>;
|