@vkontakte/calls-sdk 2.8.11-dev.48925708.0 → 2.8.11-dev.4ddae26a.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.
@@ -20,7 +20,7 @@ import { IVideoDimentions } from '../types/MediaSettings';
20
20
  import { IAddMovieParams, IUpdateMovieData } from '../types/MovieShare';
21
21
  import MuteStates from '../types/MuteStates';
22
22
  import { CompositeUserId, IGetParticipantsParameters, ParticipantId, ParticipantStateData } from '../types/Participant';
23
- import { DisplayLayoutRequest, ParticipantLayout } from '../types/ParticipantLayout';
23
+ import { ParticipantLayout } from '../types/ParticipantLayout';
24
24
  import { ParticipantListChunkParameters } from '../types/ParticipantListChunk';
25
25
  import ParticipantPriority from '../types/ParticipantPriority';
26
26
  import { ParticipantStreamDescription } from '../types/ParticipantStreamDescription';
@@ -32,7 +32,6 @@ export default class Conversation extends EventEmitter {
32
32
  private readonly _api;
33
33
  private readonly _signaling;
34
34
  private readonly _signalingActor;
35
- private readonly _displayLayoutRequester;
36
35
  private _mediaSource;
37
36
  private _conversation;
38
37
  private _myLastRequestedLayouts;
@@ -42,6 +41,7 @@ export default class Conversation extends EventEmitter {
42
41
  private _pendingParticipants;
43
42
  private _transport;
44
43
  private _debugInfo;
44
+ private _debugSessionId;
45
45
  private _volumesDetector;
46
46
  private _speakerDetector;
47
47
  private _localVolumeDetector;
@@ -72,6 +72,7 @@ export default class Conversation extends EventEmitter {
72
72
  static hangupAfterInit(): void;
73
73
  static id(): string | null;
74
74
  static getSyncedTime(): number;
75
+ get debugSessionId(): string | null;
75
76
  onStart({ opponentIds, opponentType, mediaOptions, payload, joiningAllowed, requireAuthToJoin, onlyAdminCanShareMovie, externalIds, onFastStart, conversationId, }: ConversationOnStartParams): Promise<ConversationData>;
76
77
  onJoin(joinArgs: {
77
78
  conversationId?: string;
@@ -207,7 +208,6 @@ export default class Conversation extends EventEmitter {
207
208
  requestKeyFrame(participantStreamDescription: ParticipantStreamDescription): Promise<void | SignalingMessage>;
208
209
  requestTestMode(consumerCommand: string, producerCommand: string): Promise<void>;
209
210
  updateDisplayLayout(layouts: ParticipantLayout[]): Promise<void>;
210
- requestDisplayLayout(requests: DisplayLayoutRequest[]): Promise<void>;
211
211
  feedback(key: string): Promise<SignalingMessage>;
212
212
  userFeedbackStats(userResponse: number, reason?: string, groupCallUsersCount?: number): void;
213
213
  sendClientEvent(eventType: string, eventData?: Record<string, string | number | boolean>, immediately?: boolean): void;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vkontakte/calls-sdk",
3
- "version": "2.8.11-dev.48925708.0",
3
+ "version": "2.8.11-dev.4ddae26a.0",
4
4
  "author": "vk.com",
5
5
  "description": "Library for video calls based on the vk.com platform",
6
6
  "homepage": "https://vk.com",
@@ -306,12 +306,6 @@ export type ParamsObject = {
306
306
  * _По умолчанию: `30`_
307
307
  */
308
308
  videoTracksCount: number;
309
- /**
310
- * Минимальный интервал отправки diff для requestDisplayLayout в миллисекундах.
311
- *
312
- * _По умолчанию: `250`_
313
- */
314
- requestDisplayLayoutThrottleMs: number;
315
309
  /** @hidden */
316
310
  movieShare: boolean;
317
311
  /** @hidden */
@@ -969,7 +963,6 @@ export default abstract class Params {
969
963
  static get audioNack(): boolean;
970
964
  static get movieShare(): boolean;
971
965
  static get videoTracksCount(): number;
972
- static get requestDisplayLayoutThrottleMs(): number;
973
966
  static get breakVideoPayloadTypes(): boolean;
974
967
  static get useCallsToContacts(): boolean;
975
968
  static get useParticipantListChunk(): boolean;
@@ -1017,7 +1010,6 @@ export default abstract class Params {
1017
1010
  screenShareCongestionControl: boolean;
1018
1011
  screenShareCongestionControlThreshold: number;
1019
1012
  videoTracksCount: number;
1020
- requestDisplayLayoutThrottleMs: number;
1021
1013
  asrDataChannel: boolean;
1022
1014
  videoMaxHeight: number;
1023
1015
  videoMaxWidth: number;
@@ -31,6 +31,7 @@ export interface FastStartParams {
31
31
  conversationId: string;
32
32
  internalParams: string;
33
33
  externalIds?: ExternalId[];
34
+ payload: string;
34
35
  opponentType: CallType;
35
36
  mediaOptions: MediaOption[];
36
37
  joiningAllowed?: boolean;
@@ -54,37 +54,4 @@ export type ParticipantLayout = (Layout | StopStream | RequestKeyFrame) & {
54
54
  */
55
55
  streamName?: string;
56
56
  };
57
- /**
58
- * Запрос стрима, который клиент хочет получать для отображения.
59
- */
60
- export type DisplayLayoutRequest = {
61
- /**
62
- * Внешний ID пользователя
63
- */
64
- uid: ExternalParticipantId | string;
65
- /**
66
- * Тип медиа (видео с камеры, картинка с экрана, лайв или мувик)
67
- */
68
- mediaType: MediaType;
69
- /**
70
- * Ширина окошка в котором отображается видео, в пикселях
71
- */
72
- width: number;
73
- /**
74
- * Высота окошка в котором отображается видео, в пикселях
75
- */
76
- height: number;
77
- /**
78
- * Отображать видео как CSS object-fit: cover. По умолчанию используется contain.
79
- */
80
- cover?: boolean;
81
- /**
82
- * Приоритет
83
- */
84
- priority?: number;
85
- /**
86
- * ID лайва или мувика. null для камеры или скрин-шары.
87
- */
88
- streamName?: string;
89
- };
90
57
  export default ParticipantLayout;
@@ -1,8 +1,108 @@
1
+ /**
2
+ * Запись отладочного лога SDK.
3
+ */
1
4
  export type CurrentLogItem = {
2
5
  readonly t: number;
3
6
  readonly l: string;
4
7
  readonly d: any[];
5
8
  readonly h: string;
6
9
  };
7
- export declare function add(level: string, args: any[]): void;
10
+ /**
11
+ * Информация о сохраненной локальной сессии логирования.
12
+ */
13
+ export type DebugLogSessionInfo = {
14
+ /**
15
+ * Внутренний id локальной сессии логирования.
16
+ */
17
+ readonly sessionId: string;
18
+ /**
19
+ * Id звонка. Может быть null, если звонок не успел стартовать.
20
+ */
21
+ readonly conversationId: string | null;
22
+ /**
23
+ * Время первой записи в ms.
24
+ */
25
+ readonly startTime: number;
26
+ /**
27
+ * Время последней записи в ms.
28
+ */
29
+ readonly endTime: number;
30
+ /**
31
+ * Время последнего обновления в ms.
32
+ */
33
+ readonly updatedAt: number;
34
+ /**
35
+ * Размер сохраненных данных в байтах.
36
+ */
37
+ readonly bytes: number;
38
+ /**
39
+ * Количество записей лога.
40
+ */
41
+ readonly entriesCount: number;
42
+ };
43
+ /**
44
+ * Статистика локального хранилища отладочных логов.
45
+ */
46
+ export type DebugLogStorageStats = {
47
+ /**
48
+ * Доступен ли IndexedDB для сохранения логов.
49
+ */
50
+ readonly supported: boolean;
51
+ /**
52
+ * Количество сохраненных звонков.
53
+ */
54
+ readonly callsCount: number;
55
+ /**
56
+ * Количество локальных сессий логирования.
57
+ */
58
+ readonly sessionsCount: number;
59
+ /**
60
+ * Размер сохраненных логов SDK в байтах.
61
+ */
62
+ readonly usedBytes: number;
63
+ /**
64
+ * Максимальный размер DebugStorage в байтах.
65
+ */
66
+ readonly maxBytes: number;
67
+ /**
68
+ * Максимальное количество звонков в DebugStorage.
69
+ */
70
+ readonly maxCalls: number;
71
+ /**
72
+ * Общая квота браузерного хранилища, если доступна.
73
+ */
74
+ readonly quotaBytes?: number;
75
+ /**
76
+ * Использование браузерного хранилища, если доступно.
77
+ */
78
+ readonly usageBytes?: number;
79
+ };
80
+ /**
81
+ * Параметры чтения или очистки локальных логов.
82
+ */
83
+ export type DebugLogGetParams = {
84
+ /**
85
+ * Id звонка. Вернет все локальные сессии с этим conversationId.
86
+ */
87
+ readonly conversationId: string;
88
+ readonly sessionId?: never;
89
+ } | {
90
+ /**
91
+ * Внутренний id локальной сессии из debugLogs.list().
92
+ */
93
+ readonly sessionId: string;
94
+ readonly conversationId?: never;
95
+ };
96
+ export declare function add(level: string, args: any[], sessionId?: string): CurrentLogItem;
8
97
  export declare function init(): void;
98
+ export declare function startSession(forceNew?: boolean): string;
99
+ export declare function setConversationId(conversationId: string | null, sessionId?: string): void;
100
+ export declare function list(): Promise<DebugLogSessionInfo[]>;
101
+ export declare function getCurrentSession(): Promise<DebugLogSessionInfo | null>;
102
+ export declare function get(params: DebugLogGetParams): Promise<CurrentLogItem[]>;
103
+ export declare function getJson(params: DebugLogGetParams): Promise<string>;
104
+ export declare function download(params: DebugLogGetParams): Promise<string>;
105
+ export declare function clear(params?: DebugLogGetParams): Promise<void>;
106
+ export declare function stats(): Promise<DebugLogStorageStats>;
107
+ export declare function getAllJson(): Promise<string>;
108
+ export declare function downloadAll(): Promise<string>;
@@ -1,36 +0,0 @@
1
- import BaseApi from '../abstract/BaseApi';
2
- import { DisplayLayoutRequest, ParticipantLayout } from '../types/ParticipantLayout';
3
- import { Participant, ParticipantId } from '../types/Participant';
4
- type DisplayLayoutRequesterParams = {
5
- api: BaseApi;
6
- getParticipants: () => Promise<Record<ParticipantId, Participant>>;
7
- isMe: (participantId: ParticipantId) => boolean;
8
- updateDisplayLayout: (layouts: ParticipantLayout[]) => Promise<void>;
9
- };
10
- export default class DisplayLayoutRequester {
11
- private readonly _api;
12
- private readonly _getParticipants;
13
- private readonly _isMe;
14
- private readonly _updateDisplayLayout;
15
- private _requestedLayouts;
16
- private _uncertainLayouts;
17
- private _pendingRequests;
18
- private _pendingPromises;
19
- private _lastRequests;
20
- private _timer;
21
- private _inFlight;
22
- private _lastFlushAt;
23
- private _generation;
24
- private _forceNextFlush;
25
- constructor({ api, getParticipants, isMe, updateDisplayLayout }: DisplayLayoutRequesterParams);
26
- request(requests: DisplayLayoutRequest[]): Promise<void>;
27
- resend(): void;
28
- cleanupParticipant(participantId: ParticipantId): void;
29
- clear(): void;
30
- private _schedule;
31
- private _flush;
32
- private _getRequestLayouts;
33
- private _getDiff;
34
- private _isChanged;
35
- }
36
- export {};
@@ -1,13 +0,0 @@
1
- import { CurrentLogItem } from '../utils/DebugStorage';
2
- export declare class ConversationDebugLogger {
3
- private static _list;
4
- private static _conversationId;
5
- static get startTime(): number;
6
- static get endTime(): number;
7
- static startSession(): void;
8
- static get conversationId(): string | null;
9
- static set conversationId(conversationId: string | null);
10
- static add(item: CurrentLogItem): void;
11
- private static _createContextLogs;
12
- static collectLogs(): CurrentLogItem[];
13
- }