@vkontakte/calls-sdk 2.8.5-dev.1925f9b.0 → 2.8.5-dev.36da4e4e.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 +21 -1
- package/abstract/BaseApi.d.ts +11 -0
- package/abstract/BaseSignaling.d.ts +3 -3
- package/calls-sdk.cjs.js +8 -8
- package/calls-sdk.esm.js +8 -8
- package/classes/Conversation.d.ts +6 -3
- package/classes/Logger.d.ts +4 -0
- package/classes/ProducerCommandSerializationService.d.ts +2 -0
- package/default/Api.d.ts +2 -1
- package/default/Signaling.d.ts +3 -3
- package/enums/SignalingCommandType.d.ts +3 -1
- package/enums/SignalingNotification.d.ts +2 -1
- package/enums/Stat.d.ts +3 -1
- package/package.json +1 -1
- package/static/External.d.ts +2 -0
- package/static/Params.d.ts +19 -1
- package/types/EnableVideoSuspendSuggest.d.ts +3 -0
- package/types/SignalingMessage.d.ts +3 -0
|
@@ -195,14 +195,14 @@ export default class Conversation extends EventEmitter {
|
|
|
195
195
|
* @deprecated Use updateDisplayLayout instead
|
|
196
196
|
*/
|
|
197
197
|
changePriorities(priorities: ParticipantPriority[]): Promise<void>;
|
|
198
|
-
changeParticipantState(state:
|
|
199
|
-
|
|
200
|
-
}): Promise<void>;
|
|
198
|
+
changeParticipantState(state: Record<string, string>, compositeUserId?: CompositeUserId): Promise<void>;
|
|
199
|
+
putHandsDown(): Promise<void>;
|
|
201
200
|
requestKeyFrame(participantStreamDescription: ParticipantStreamDescription): Promise<void | SignalingMessage>;
|
|
202
201
|
requestTestMode(consumerCommand: string, producerCommand: string): Promise<void>;
|
|
203
202
|
updateDisplayLayout(layouts: ParticipantLayout[]): Promise<void>;
|
|
204
203
|
feedback(key: string): Promise<SignalingMessage>;
|
|
205
204
|
userFeedbackStats(userResponse: number, reason?: string, groupCallUsersCount?: number): void;
|
|
205
|
+
sendClientEvent(eventType: string, eventData?: Record<string, string | number | boolean>, immediately?: boolean): void;
|
|
206
206
|
private _changeMediaSettings;
|
|
207
207
|
private _stopStreaming;
|
|
208
208
|
private _sendUpdateDisplayLayout;
|
|
@@ -235,6 +235,7 @@ export default class Conversation extends EventEmitter {
|
|
|
235
235
|
pinParticipant(participantId: ParticipantId, unpin: boolean, roomId?: number | null): Promise<void>;
|
|
236
236
|
updateMediaModifiers(mediaModifiers: MediaModifiers): Promise<void>;
|
|
237
237
|
enableVideoSuspend(enabled: boolean): Promise<void>;
|
|
238
|
+
enableVideoSuspendSuggest(enabled: boolean): Promise<void>;
|
|
238
239
|
changeOptions(changes: {
|
|
239
240
|
[key in ConversationOption]?: boolean;
|
|
240
241
|
}): Promise<void>;
|
|
@@ -284,6 +285,7 @@ export default class Conversation extends EventEmitter {
|
|
|
284
285
|
private _onLocalMediaStreamChanged;
|
|
285
286
|
private _onScreenSharingStatus;
|
|
286
287
|
private _changeRemoteMediaSettings;
|
|
288
|
+
private _changeLocalParticipantState;
|
|
287
289
|
private _changeRemoteParticipantState;
|
|
288
290
|
private _invokeRolesChangedCallbackIfNeeded;
|
|
289
291
|
private _onSignalingNotification;
|
|
@@ -372,6 +374,7 @@ export default class Conversation extends EventEmitter {
|
|
|
372
374
|
/** получили из сингналинга сообщение о реакции пользователей */
|
|
373
375
|
private _onFeedback;
|
|
374
376
|
private _onDecorativeParticipantIdChanged;
|
|
377
|
+
private _onVideoSuspendSuggest;
|
|
375
378
|
private _isMe;
|
|
376
379
|
private _getMuteStatesForRoomId;
|
|
377
380
|
private _getMuteStatesForCurrentRoom;
|
package/classes/Logger.d.ts
CHANGED
|
@@ -7,22 +7,26 @@ export default class Logger extends BaseLogger {
|
|
|
7
7
|
private _batchInterval;
|
|
8
8
|
private _batchedLogItems;
|
|
9
9
|
private _batchedClientStats;
|
|
10
|
+
private _batchedClientEvents;
|
|
10
11
|
private _batchTimeout;
|
|
11
12
|
private static _instance;
|
|
12
13
|
constructor(api: BaseApi, externalLogger: BaseLogger | null);
|
|
13
14
|
private _sendLogItems;
|
|
14
15
|
private _sendClientStats;
|
|
16
|
+
private _sendClientEvents;
|
|
15
17
|
private _sendBatch;
|
|
16
18
|
private _startTimeout;
|
|
17
19
|
private _stopTimeout;
|
|
18
20
|
log(name: Stat, value?: string, immediately?: boolean): void;
|
|
19
21
|
logCustom(name: string, params: Record<string, string | number>, immediately?: boolean): void;
|
|
20
22
|
logClientStats(data: Record<string, string | number | undefined | null>, immediately?: boolean): void;
|
|
23
|
+
logClientEvent(data: Record<string, string | number | undefined | null>, immediately?: boolean): void;
|
|
21
24
|
_logInternal(operation: string, custom: Record<string, string | number>, immediately: boolean): void;
|
|
22
25
|
destroy(): void;
|
|
23
26
|
static create(api: BaseApi, externalLogger: BaseLogger | null): void;
|
|
24
27
|
static log(name: Stat, value?: string, immediately?: boolean): void;
|
|
25
28
|
static logCustom(name: string, params: Record<string, string | number>, immediately?: boolean): void;
|
|
26
29
|
static logClientStats(params: Record<string, string | number | undefined | null>, immediately?: boolean): void;
|
|
30
|
+
static logClientEvent(params: Record<string, string | number | undefined | null>, immediately?: boolean): void;
|
|
27
31
|
static destroy(): void;
|
|
28
32
|
}
|
|
@@ -2,6 +2,7 @@ import { NetworkStatReport } from '../types/NetworkStatReport';
|
|
|
2
2
|
import ParticipantLayout, { RequestKeyFrame, StopStream } from '../types/ParticipantLayout';
|
|
3
3
|
import { RequestAsr } from '../types/RequestAsr';
|
|
4
4
|
import { EnableVideoSuspend } from '../types/EnableVideoSuspend';
|
|
5
|
+
import { EnableVideoSuspendSuggest } from '../types/EnableVideoSuspendSuggest';
|
|
5
6
|
import SignalingMessage from '../types/SignalingMessage';
|
|
6
7
|
import { PerfStatReport } from '../types/PerfStatReporter';
|
|
7
8
|
import { SharingStatReport } from './screenshare/SharingStatReport';
|
|
@@ -19,6 +20,7 @@ export declare class ProducerCommandSerializationService {
|
|
|
19
20
|
serializeRequestAsr(sequenceNumber: number, params: RequestAsr): ArrayBuffer;
|
|
20
21
|
serializeNetworkStatReport(sequenceNumber: number, report: NetworkStatReport): ArrayBuffer;
|
|
21
22
|
serializeEnableVideoSuspend(sequenceNumber: number, params: EnableVideoSuspend): ArrayBuffer;
|
|
23
|
+
serializeEnableVideoSuspendSuggest(sequenceNumber: number, params: EnableVideoSuspendSuggest): ArrayBuffer;
|
|
22
24
|
deserializeCommandResponse(data: BufferSource | Blob): Promise<SignalingMessage | undefined>;
|
|
23
25
|
private deserializeUpdateDisplayLayoutResponse;
|
|
24
26
|
private deserializeReportPerfStatResponse;
|
package/default/Api.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import BaseApi, { LogItem, ClientStats } from '../abstract/BaseApi';
|
|
1
|
+
import BaseApi, { LogItem, ClientStats, ClientEvent } from '../abstract/BaseApi';
|
|
2
2
|
import CallType from '../enums/CallType';
|
|
3
3
|
import ConversationParams from '../types/ConversationParams';
|
|
4
4
|
import ConversationResponse from '../types/ConversationResponse';
|
|
@@ -16,6 +16,7 @@ export default class Api extends BaseApi {
|
|
|
16
16
|
authorize(): Promise<void>;
|
|
17
17
|
log(items: LogItem[]): void;
|
|
18
18
|
logClientStats(items: ClientStats[]): void;
|
|
19
|
+
logClientEvents(items: ClientEvent[]): void;
|
|
19
20
|
init(): void;
|
|
20
21
|
joinConversation(conversationId: string, isVideo?: boolean, chatId?: string): Promise<ConversationResponse>;
|
|
21
22
|
createConversation(conversationId: string, payload?: string, requireAuthToJoin?: boolean, { onlyAdminCanShareMovie, audienceMode, audioOnly, }?: {
|
package/default/Signaling.d.ts
CHANGED
|
@@ -85,9 +85,8 @@ export default class Signaling extends BaseSignaling {
|
|
|
85
85
|
sendSdp(participantId: ParticipantId, sdp: RTCSessionDescriptionInit): Promise<SignalingMessage>;
|
|
86
86
|
acceptCall(mediaSettings: MediaSettings): Promise<SignalingMessage>;
|
|
87
87
|
changeMediaSettings(mediaSettings: MediaSettings): Promise<SignalingMessage>;
|
|
88
|
-
changeParticipantState(state:
|
|
89
|
-
|
|
90
|
-
}): Promise<SignalingMessage>;
|
|
88
|
+
changeParticipantState(state: Record<string, string>, compositeUserId?: CompositeUserId): Promise<SignalingMessage>;
|
|
89
|
+
putHandsDown(): Promise<SignalingMessage>;
|
|
91
90
|
addParticipant(participantId: CompositeUserId, params?: AddParticipantParams): Promise<SignalingMessage>;
|
|
92
91
|
removeParticipant(participantId: CompositeUserId, ban?: boolean): Promise<SignalingMessage>;
|
|
93
92
|
allocateConsumer(description: RTCSessionDescription | null, capabilities: {
|
|
@@ -132,6 +131,7 @@ export default class Signaling extends BaseSignaling {
|
|
|
132
131
|
pinParticipant(participantId: ParticipantId, unpin: boolean, roomId: number | null): Promise<SignalingMessage>;
|
|
133
132
|
updateMediaModifiers(mediaModifiers: MediaModifiers): Promise<SignalingMessage>;
|
|
134
133
|
enableVideoSuspend(enabled: boolean): Promise<SignalingMessage>;
|
|
134
|
+
enableVideoSuspendSuggest(enabled: boolean): Promise<SignalingMessage>;
|
|
135
135
|
changeOptions(changes: {
|
|
136
136
|
[key in ConversationOption]?: boolean;
|
|
137
137
|
}): Promise<SignalingMessage>;
|
|
@@ -53,6 +53,8 @@ declare enum SignalingCommandType {
|
|
|
53
53
|
REQUEST_PROMOTION = "request-promotion",
|
|
54
54
|
ACCEPT_PROMOTION = "accept-promotion",
|
|
55
55
|
GET_HAND_QUEUE = "get-hand-queue",
|
|
56
|
-
ENABLE_VIDEO_SUSPEND = "enable-video-suspend"
|
|
56
|
+
ENABLE_VIDEO_SUSPEND = "enable-video-suspend",
|
|
57
|
+
ENABLE_VIDEO_SUSPEND_SUGGEST = "enable-video-suspend-suggest",
|
|
58
|
+
PUT_HANDS_DOWN = "put-hands-down"
|
|
57
59
|
}
|
|
58
60
|
export default SignalingCommandType;
|
|
@@ -48,6 +48,7 @@ declare enum SignalingNotification {
|
|
|
48
48
|
PARTICIPANT_ANIMOJI_CHANGED = "participant-animoji-changed",
|
|
49
49
|
ASR_STARTED = "asr-started",
|
|
50
50
|
ASR_STOPPED = "asr-stopped",
|
|
51
|
-
DECORATIVE_PARTICIPANT_ID_CHANGED = "decorative-participant-id-changed"
|
|
51
|
+
DECORATIVE_PARTICIPANT_ID_CHANGED = "decorative-participant-id-changed",
|
|
52
|
+
VIDEO_SUSPEND_SUGGEST = "video-suspend-suggest"
|
|
52
53
|
}
|
|
53
54
|
export default SignalingNotification;
|
package/enums/Stat.d.ts
CHANGED
|
@@ -33,6 +33,8 @@ declare const enum Stat {
|
|
|
33
33
|
SCREENSHARE_FREEZE_DURATION = "callScreenshareFreezeDuration",
|
|
34
34
|
/** Объединение callFirstDataReceivedP2P и callFirstAudioMixDataReceived */
|
|
35
35
|
FIRST_MEDIA_RECEIVED = "first_media_received",
|
|
36
|
-
CALL_EVENTUAL_STAT = "callEventualStat"
|
|
36
|
+
CALL_EVENTUAL_STAT = "callEventualStat",
|
|
37
|
+
CALL_DECLINED_OR_HANGED_LOCALLY = "CallDeclinedOrHangedLocally",
|
|
38
|
+
USER_FEEDBACK_RECEIVED = "UserFeedbackReceived"
|
|
37
39
|
}
|
|
38
40
|
export default Stat;
|
package/package.json
CHANGED
package/static/External.d.ts
CHANGED
|
@@ -226,6 +226,7 @@ declare namespace External {
|
|
|
226
226
|
* @param markers
|
|
227
227
|
*/
|
|
228
228
|
function onParticipantJoined(userId: ExternalId, markers: ExternalParticipantListMarkers | null): void;
|
|
229
|
+
function onLocalParticipantState(participantState: ParticipantStateMapped): void;
|
|
229
230
|
/**
|
|
230
231
|
* Изменились данные состояний собеседника
|
|
231
232
|
*
|
|
@@ -539,6 +540,7 @@ declare namespace External {
|
|
|
539
540
|
* @param newId
|
|
540
541
|
*/
|
|
541
542
|
function onParticipantIdChanged(prevId: ExternalParticipantId, newId: ExternalParticipantId): void;
|
|
543
|
+
function onVideoSuspendSuggest(bandwidth: number): void;
|
|
542
544
|
/**
|
|
543
545
|
* Одобрено повышение пользователя в зеле ожидания/зале в режиме Audience
|
|
544
546
|
*
|
package/static/Params.d.ts
CHANGED
|
@@ -229,12 +229,18 @@ export type ParamsObject = {
|
|
|
229
229
|
/**
|
|
230
230
|
* Включает использование обновленного API и формата
|
|
231
231
|
* логирования статистики качества аудио/видео.
|
|
232
|
-
* Требует указания clientStatsPlatform.
|
|
233
232
|
*
|
|
234
233
|
* _По умолчанию: `false`_
|
|
235
234
|
* @hidden
|
|
236
235
|
*/
|
|
237
236
|
useCallStatReportNewAPI: boolean;
|
|
237
|
+
/**
|
|
238
|
+
* Включает логирование событий продуктовой статистики.
|
|
239
|
+
*
|
|
240
|
+
* _По умолчанию: `false`_
|
|
241
|
+
* @hidden
|
|
242
|
+
*/
|
|
243
|
+
clientEventsLoggingEnabled: boolean;
|
|
238
244
|
/** @hidden */
|
|
239
245
|
networkStatReportEnabled: boolean;
|
|
240
246
|
/**
|
|
@@ -558,6 +564,11 @@ export type ParamsObject = {
|
|
|
558
564
|
* Участник присоединился к звонку
|
|
559
565
|
*/
|
|
560
566
|
onParticipantJoined?: (userId: ExternalParticipantId, markers: ExternalParticipantListMarkers) => void;
|
|
567
|
+
/**
|
|
568
|
+
* Получены данные по изменению локальных состояний со стороны админа
|
|
569
|
+
* Например, принудительно опущена рука
|
|
570
|
+
*/
|
|
571
|
+
onLocalParticipantState?: (participantState: ParticipantStateMapped) => void;
|
|
561
572
|
/**
|
|
562
573
|
* Изменились данные состояний собеседника
|
|
563
574
|
*/
|
|
@@ -799,6 +810,12 @@ export type ParamsObject = {
|
|
|
799
810
|
* @param newId
|
|
800
811
|
*/
|
|
801
812
|
onParticipantIdChanged?: (prevId: ExternalParticipantId, newId: ExternalParticipantId) => void;
|
|
813
|
+
/**
|
|
814
|
+
* Предложение включить режим автоматического отключения приёма видео
|
|
815
|
+
* в плохой сети
|
|
816
|
+
* @param bandwidth текущая полоса пропускания, kbps
|
|
817
|
+
*/
|
|
818
|
+
onVideoSuspendSuggest?: (bandwidth: number) => void;
|
|
802
819
|
/**
|
|
803
820
|
* Одобрено повышение пользователя в зале ожидания/зале в режиме Audience
|
|
804
821
|
*
|
|
@@ -903,6 +920,7 @@ export default abstract class Params {
|
|
|
903
920
|
static get perfStatReportEnabled(): boolean;
|
|
904
921
|
static get callStatReportEnabled(): boolean;
|
|
905
922
|
static get useCallStatReportNewAPI(): boolean;
|
|
923
|
+
static get clientEventsLoggingEnabled(): boolean;
|
|
906
924
|
static get networkStatReportEnabled(): boolean;
|
|
907
925
|
static get enableLogPerfStatReport(): boolean;
|
|
908
926
|
static get includeRemoteRtpsInCallStat(): boolean;
|
|
@@ -427,6 +427,9 @@ declare namespace SignalingMessage {
|
|
|
427
427
|
decorativeParticipantId?: CompositeUserId;
|
|
428
428
|
decorativeExternalParticipantId?: ExternalId;
|
|
429
429
|
}
|
|
430
|
+
export interface VideoSuspendSuggest extends Notification {
|
|
431
|
+
bandwidth: number;
|
|
432
|
+
}
|
|
430
433
|
export {};
|
|
431
434
|
}
|
|
432
435
|
export default SignalingMessage;
|