@vkontakte/calls-sdk 2.4.4-beta.18 → 2.4.4-beta.21

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.
@@ -0,0 +1,25 @@
1
+ import { CompositeUserId } from '../../types/Participant';
2
+ import { FrameChunk } from './Utils';
3
+ export declare abstract class BaseStreamBuilder {
4
+ protected readonly _participantId: CompositeUserId;
5
+ protected readonly _onStream: (stream: MediaStream) => void;
6
+ protected _chunks: FrameChunk[];
7
+ protected constructor(participantId: CompositeUserId, onStream: (stream: MediaStream) => void);
8
+ appendChunk(chunk: FrameChunk): void;
9
+ destroy(): void;
10
+ protected abstract _processFrame(frame: FrameData): void;
11
+ private _processFrameData;
12
+ static getFrameSize(frameData: Uint8Array): {
13
+ width: number;
14
+ height: number;
15
+ };
16
+ static isBrowserSupported(): boolean;
17
+ }
18
+ export interface FrameData {
19
+ timestamp: number;
20
+ frameData: Uint8Array;
21
+ isVP9: boolean;
22
+ keyframe: boolean;
23
+ width: number;
24
+ height: number;
25
+ }
@@ -1,13 +1,10 @@
1
1
  import { CompositeUserId } from '../../types/Participant';
2
- import { FrameChunk } from './Utils';
3
- export default class StreamBuilder {
2
+ import { BaseStreamBuilder, FrameData } from './BaseStreamBuilder';
3
+ export default class StreamBuilder extends BaseStreamBuilder {
4
4
  private readonly _decoder;
5
5
  private _decoderReady;
6
6
  private _decoderQueue;
7
- private readonly _participantId;
8
- private _chunks;
9
7
  private readonly _useImageBitmap;
10
- private _onStream;
11
8
  private _canvas;
12
9
  private _canvasContext;
13
10
  private _stream;
@@ -15,11 +12,10 @@ export default class StreamBuilder {
15
12
  constructor(participantId: CompositeUserId, onStream: (stream: MediaStream) => void);
16
13
  private _createStream;
17
14
  private _removeStream;
18
- private _processFrameData;
19
15
  private _requestCanvasFrame;
20
16
  private _drawImage;
21
- private _decodeFrame;
17
+ protected _processFrame(frame: FrameData): void;
22
18
  private _decodeQueue;
23
- appendChunk(chunk: FrameChunk): void;
24
19
  destroy(): void;
20
+ static isBrowserSupported(): boolean;
25
21
  }
@@ -0,0 +1,19 @@
1
+ import { CompositeUserId } from '../../types/Participant';
2
+ import { BaseStreamBuilder, FrameData } from './BaseStreamBuilder';
3
+ export default class WebmBuilder extends BaseStreamBuilder {
4
+ private _mediaBuffer;
5
+ private _video;
6
+ private _stream;
7
+ private _earliestTimestamp;
8
+ private _clusterStartTime;
9
+ private _lastFrameTimestamp;
10
+ constructor(participantId: CompositeUserId, onStream: (stream: MediaStream) => void);
11
+ private static _intToU16BE;
12
+ private static _genWebmHeader;
13
+ private static _genSegmentHeader;
14
+ private static _genClusterHeader;
15
+ private _createVideo;
16
+ protected _processFrame(frame: FrameData): void;
17
+ destroy(): void;
18
+ static isBrowserSupported(): boolean;
19
+ }
@@ -10,6 +10,8 @@ declare enum HangupType {
10
10
  BUSY = "BUSY",
11
11
  FAILED = "FAILED",
12
12
  NETWORK_ERROR = "NETWORK_ERROR",
13
+ KILLED = "KILLED",
14
+ BANNED = "BANNED",
13
15
  CALLER_IS_BLOCKED = "CALLER_IS_BLOCKED",
14
16
  NOT_FRIENDS = "NOT_FRIENDS",
15
17
  CALLEE_IS_OFFLINE = "CALLEE_IS_OFFLINE",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vkontakte/calls-sdk",
3
- "version": "2.4.4-beta.18",
3
+ "version": "2.4.4-beta.21",
4
4
  "author": "vk.com",
5
5
  "description": "Library for video calls based on the vk.com platform",
6
6
  "homepage": "https://vk.com",
@@ -17,7 +17,9 @@
17
17
  "@vkontakte/calls-video-effects": "^1.0.6-beta.18",
18
18
  "@vkontakte/libvpx": "2.0.9",
19
19
  "big-integer": "1.6.48",
20
+ "bit-buffer": "0.2.5",
20
21
  "messagepack": "1.1.12",
22
+ "simple-ebml-builder": "^0.2.2",
21
23
  "webrtc-adapter": "7.7.0"
22
24
  }
23
25
  }
@@ -196,6 +196,7 @@ export declare type ParamsObject = {
196
196
  producerCommandDataChannel: boolean;
197
197
  consumerScreenDataChannel: boolean;
198
198
  producerScreenDataChannel: boolean;
199
+ screenShareWebmBuilder: boolean;
199
200
  noiseSuppression: boolean;
200
201
  /**
201
202
  * Количество входящих видео-треков.
@@ -481,6 +482,7 @@ export default abstract class Params {
481
482
  static get producerCommandDataChannel(): boolean;
482
483
  static get consumerScreenDataChannel(): boolean;
483
484
  static get producerScreenDataChannel(): boolean;
485
+ static get screenShareWebmBuilder(): boolean;
484
486
  static get noiseSuppression(): boolean;
485
487
  static set noiseSuppression(value: boolean);
486
488
  static get preferH264(): boolean;