@vkontakte/calls-sdk 2.8.2 → 2.8.3-beta.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.
@@ -1,4 +1,4 @@
1
- import type { IEffect } from '@vkontakte/calls-video-effects';
1
+ import type { IEffect, IEffectDrawParams } from '@vkontakte/calls-video-effects';
2
2
  import BaseApi from '../abstract/BaseApi';
3
3
  import BaseLogger from '../abstract/BaseLogger';
4
4
  import BaseSignaling, { AddParticipantParams } from '../abstract/BaseSignaling';
@@ -272,7 +272,7 @@ export default class Conversation extends EventEmitter {
272
272
  video: IVideoDimentions;
273
273
  effect?: IVideoDimentions;
274
274
  }): Promise<void | undefined>;
275
- videoEffect(effect: IEffect | null): Promise<void | undefined>;
275
+ videoEffect(effect: IEffect<IEffectDrawParams> | null): Promise<void | undefined>;
276
276
  getParticipants(parameters: IGetParticipantsParameters): Promise<ExternalParticipant[]>;
277
277
  getParticipantListChunk(participantListChunkParameters: ParticipantListChunkParameters): Promise<ExternalParticipantListChunk>;
278
278
  private _getInitialParticiapntListChunk;
@@ -1,4 +1,4 @@
1
- import type { IEffect } from '@vkontakte/calls-video-effects';
1
+ import type { IEffect, IEffectDrawParams } from '@vkontakte/calls-video-effects';
2
2
  import EventEmitter from '../classes/EventEmitter';
3
3
  import MediaOption from '../enums/MediaOption';
4
4
  import MediaSettings, { IVideoDimentions } from '../types/MediaSettings';
@@ -83,6 +83,6 @@ export declare class MediaSource extends EventEmitter {
83
83
  effect?: IVideoDimentions;
84
84
  }): Promise<void>;
85
85
  updateNoiseSuppression(): Promise<void>;
86
- videoEffect(effect: IEffect | null): Promise<void>;
86
+ videoEffect(effect: IEffect<IEffectDrawParams> | null): Promise<void>;
87
87
  getAudioShareTrack(): MediaStreamTrack | null;
88
88
  }
@@ -72,13 +72,12 @@ export default class Signaling extends BaseSignaling {
72
72
  /**
73
73
  * Send a command to a signaling server
74
74
  */
75
- protected _send(command: SignalingCommandType, params?: any, retryCount?: number): Promise<SignalingMessage>;
75
+ protected _send(command: SignalingCommandType, params?: any, needResponse?: boolean, retryCount?: number): Promise<SignalingMessage>;
76
76
  /**
77
77
  * Send a raw command to a signaling server
78
78
  */
79
- protected _sendRaw(command: SignalingCommandType, params?: any, retryCount?: number): Promise<SignalingMessage>;
79
+ protected _sendRaw(command: SignalingCommandType, params?: any, needResponse?: boolean, retryCount?: number): Promise<SignalingMessage>;
80
80
  private _isDataChannelCommand;
81
- private static _isDataChannelResponseRequired;
82
81
  getNextCommandSequenceNumber(): number;
83
82
  hangup(reason: string): Promise<SignalingMessage | void>;
84
83
  sendCandidate(participantId: ParticipantId, candidate: RTCIceCandidate): Promise<SignalingMessage>;
@@ -168,6 +167,7 @@ export default class Signaling extends BaseSignaling {
168
167
  protected _reconnect(): void;
169
168
  private _handleCommandResponse;
170
169
  private _handleCommandsQueue;
170
+ private _startResponseTimer;
171
171
  private _serializeBinary;
172
172
  private _serializeJson;
173
173
  private _convertDisplayLayout;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vkontakte/calls-sdk",
3
- "version": "2.8.2",
3
+ "version": "2.8.3-beta.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",
@@ -14,7 +14,7 @@
14
14
  "**/*.d.ts"
15
15
  ],
16
16
  "dependencies": {
17
- "@vkontakte/calls-video-effects": "2.0.1",
17
+ "@vkontakte/calls-video-effects": "2.1.1-beta.3",
18
18
  "@vkontakte/calls-vmoji": "1.0.8-beta.6",
19
19
  "@vkontakte/libvpx": "2.0.9",
20
20
  "bit-buffer": "0.2.5",
@@ -158,13 +158,13 @@ export type ParamsObject = {
158
158
  /**
159
159
  * Максимальная ширина видео в пикселях для видео эффекта
160
160
  *
161
- * _По умолчанию: `854`_
161
+ * _По умолчанию: `640`_
162
162
  */
163
163
  videoEffectMaxWidth: number;
164
164
  /**
165
165
  * Максимальная высота видео в пикселях для видео эффекта
166
166
  *
167
- * _По умолчанию: `480`_
167
+ * _По умолчанию: `360`_
168
168
  */
169
169
  videoEffectMaxHeight: number;
170
170
  /**
@@ -732,6 +732,14 @@ export type ParamsObject = {
732
732
  * @param roomId Id комнаты
733
733
  */
734
734
  onAsrStopped?: (roomId: number | null) => void;
735
+ /**
736
+ * Получена расшифровка речи
737
+ * @param id Id пользователя, произнесшего реплику
738
+ * @param text Текст расшифровки
739
+ * @param timestamp Время расшифровки
740
+ * @param duration Длительность реплики в расшифровке
741
+ */
742
+ onAsrTranscription?: (id: ExternalParticipantId, text: string, timestamp: number, duration: number) => void;
735
743
  /**
736
744
  * Установка начальных параметров текстовой расшифровки звонка. (Используется при входе в звонок/ смене комнаты)
737
745
  * @param data Начальная информация по ASR
@@ -828,6 +836,7 @@ export default abstract class Params {
828
836
  static get networkStatisticsInterval(): number;
829
837
  static get perfStatReportEnabled(): boolean;
830
838
  static get callStatReportEnabled(): boolean;
839
+ static get enableLogPerfStatReport(): boolean;
831
840
  static get producerNotificationDataChannel(): boolean;
832
841
  static get producerCommandDataChannel(): boolean;
833
842
  static get consumerScreenDataChannel(): boolean;
@@ -5,6 +5,7 @@ type SignalingCommand = {
5
5
  name: SignalingCommandType;
6
6
  params: object;
7
7
  responseTimer: number;
8
+ needResponse: boolean;
8
9
  resolve: (message: SignalingMessage) => void;
9
10
  reject: (error: Error, force?: boolean) => void;
10
11
  };