@vkontakte/calls-sdk 2.4.3-beta.4 → 2.4.3-beta.8
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 +22 -3
- package/abstract/BaseApi.d.ts +1 -0
- package/abstract/BaseSignaling.d.ts +2 -2
- package/calls-sdk.cjs.js +8 -6
- package/calls-sdk.esm.js +8 -6
- package/classes/Conversation.d.ts +2 -2
- package/classes/MediaSource.d.ts +0 -2
- package/classes/VolumeDetector.d.ts +0 -2
- package/classes/codec/IDecoder.d.ts +0 -2
- package/classes/codec/IEncoder.d.ts +1 -3
- package/classes/codec/LibVPxDecoder.d.ts +0 -2
- package/classes/codec/LibVPxEncoder.d.ts +2 -1
- package/classes/codec/Types.d.ts +14 -0
- package/classes/codec/WebCodecsDecoder.d.ts +0 -2
- package/classes/codec/WebCodecsEncoder.d.ts +2 -1
- package/classes/codec/WorkerBase.d.ts +1 -14
- package/classes/screenshare/ScreenCaptureReceiver.d.ts +0 -2
- package/classes/screenshare/ScreenCaptureSender.d.ts +0 -2
- package/classes/screenshare/StreamBuilder.d.ts +0 -2
- package/classes/transport/ServerTransport.d.ts +0 -2
- package/classes/transport/Statistics.d.ts +0 -2
- package/default/Api.d.ts +1 -0
- package/default/Signaling.d.ts +2 -2
- package/enums/RecordRole.d.ts +10 -0
- package/enums/SignalingCommandType.d.ts +1 -0
- package/package.json +2 -2
- package/static/External.d.ts +0 -2
- package/static/Params.d.ts +0 -2
- package/static/Utils.d.ts +0 -2
- package/static/WebRTCUtils.d.ts +0 -2
- package/types/MediaDeviceType.d.ts +0 -1
- package/types/Participant.d.ts +0 -2
- package/worker/LibVPxDecoderWorker.d.ts +4 -0
- package/worker/LibVPxEncoderWorker.d.ts +4 -0
- package/worker/WebCodecsDecoderWorker.d.ts +3 -0
- package/worker/WebCodecsEncoderWorker.d.ts +3 -0
- package/classes/codec/worker/LibVPxDecoderWorker.d.ts +0 -3
- package/classes/codec/worker/LibVPxEncoderWorker.d.ts +0 -3
- package/classes/codec/worker/WebCodecsDecoderWorker.d.ts +0 -2
- package/classes/codec/worker/WebCodecsEncoderWorker.d.ts +0 -2
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
/// <reference types="web" />
|
|
2
|
-
/// <reference types="webrtc" />
|
|
3
1
|
import type { IEffect } from '@vkontakte/calls-video-effects';
|
|
4
2
|
import BaseApi from '../abstract/BaseApi';
|
|
5
3
|
import BaseLogger from '../abstract/BaseLogger';
|
|
@@ -10,6 +8,7 @@ import ConversationFeature from '../enums/ConversationFeature';
|
|
|
10
8
|
import ConversationOption from '../enums/ConversationOption';
|
|
11
9
|
import MediaOption from '../enums/MediaOption';
|
|
12
10
|
import MuteState from '../enums/MuteState';
|
|
11
|
+
import RecordRole from '../enums/RecordRole';
|
|
13
12
|
import UpdateDisplayLayoutErrorReason from '../enums/UpdateDisplayLayoutErrorReason';
|
|
14
13
|
import UserRole from '../enums/UserRole';
|
|
15
14
|
import UserType from '../enums/UserType';
|
|
@@ -220,6 +219,7 @@ export default class Conversation extends EventEmitter {
|
|
|
220
219
|
removeMovie(movieId: string): Promise<void>;
|
|
221
220
|
startStream(isRecord?: boolean, name?: string | null, movieId?: string | null, privacy?: 'PUBLIC' | 'FRIENDS' | 'DIRECT_LINK', groupId?: string | null): Promise<SignalingMessage>;
|
|
222
221
|
stopStream(): Promise<SignalingMessage>;
|
|
222
|
+
recordSetRole(participantId: CompositeUserId, role: RecordRole | null): Promise<void>;
|
|
223
223
|
getStreamInfo(): Promise<{
|
|
224
224
|
movieId: any;
|
|
225
225
|
preview: any;
|
package/classes/MediaSource.d.ts
CHANGED
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
/// <reference types="web" />
|
|
2
|
-
/// <reference types="webgl2" />
|
|
3
1
|
export default interface IDecoder {
|
|
4
2
|
init(onFrameImage: (image: ImageBitmap | ImageData) => void): Promise<void>;
|
|
5
3
|
decodeFrame(timestamp: number, data: Uint8Array, isVP9: boolean, keyFrame?: boolean): void;
|
|
@@ -1,6 +1,4 @@
|
|
|
1
|
-
import { MessageType } from './
|
|
2
|
-
export declare type EncodedVideoFrame = Pick<EncodedVideoChunk, 'type' | 'timestamp' | 'duration' | 'byteLength' | 'data'>;
|
|
3
|
-
export declare type OnFrameCallback = (chunk: EncodedVideoFrame | null, error?: string) => void;
|
|
1
|
+
import type { MessageType } from './Types';
|
|
4
2
|
export default interface IEncoder {
|
|
5
3
|
init(): Promise<void>;
|
|
6
4
|
requestFrame(keyFrame: boolean): void;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import IEncoder
|
|
1
|
+
import IEncoder from './IEncoder';
|
|
2
|
+
import { OnFrameCallback } from './Types';
|
|
2
3
|
import WorkerBase from './WorkerBase';
|
|
3
4
|
export default class LibVPxEncoder extends WorkerBase implements IEncoder {
|
|
4
5
|
private readonly _sourceTrack;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export declare const enum WebCodec {
|
|
2
|
+
VP9 = "vp09.00.50.08",
|
|
3
|
+
VP8 = "vp8"
|
|
4
|
+
}
|
|
5
|
+
export declare const enum MessageType {
|
|
6
|
+
INIT = "init",
|
|
7
|
+
READY = "ready",
|
|
8
|
+
FRAME = "frame",
|
|
9
|
+
ERROR = "error",
|
|
10
|
+
DEBUG = "debug",
|
|
11
|
+
LOG_ERROR = "log_error"
|
|
12
|
+
}
|
|
13
|
+
export declare type EncodedVideoFrame = Pick<EncodedVideoChunk, 'type' | 'timestamp' | 'duration' | 'byteLength' | 'data'>;
|
|
14
|
+
export declare type OnFrameCallback = (chunk: EncodedVideoFrame | null, error?: string) => void;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import IEncoder
|
|
1
|
+
import IEncoder from './IEncoder';
|
|
2
|
+
import { OnFrameCallback } from './Types';
|
|
2
3
|
import WorkerBase from './WorkerBase';
|
|
3
4
|
export default class WebCodecsEncoder extends WorkerBase implements IEncoder {
|
|
4
5
|
private readonly _sourceTrack;
|
|
@@ -1,19 +1,6 @@
|
|
|
1
|
-
/// <reference types="web" />
|
|
2
|
-
export declare enum WebCodec {
|
|
3
|
-
VP9 = "vp09.00.50.08",
|
|
4
|
-
VP8 = "vp8"
|
|
5
|
-
}
|
|
6
|
-
export declare enum MessageType {
|
|
7
|
-
INIT = "init",
|
|
8
|
-
READY = "ready",
|
|
9
|
-
FRAME = "frame",
|
|
10
|
-
ERROR = "error",
|
|
11
|
-
DEBUG = "debug",
|
|
12
|
-
LOG_ERROR = "log_error"
|
|
13
|
-
}
|
|
14
1
|
export default abstract class WorkerBase {
|
|
15
2
|
protected _worker: Worker | null;
|
|
16
|
-
protected _createWorker(
|
|
3
|
+
protected _createWorker(workerFunctionData: string, onFrame: (data: any) => void, workerArgs?: any[], initArgs?: {
|
|
17
4
|
[key: string]: any;
|
|
18
5
|
}, transfer?: any[]): Promise<void>;
|
|
19
6
|
protected _removeWorker(): void;
|
package/default/Api.d.ts
CHANGED
|
@@ -43,6 +43,7 @@ export default class Api extends BaseApi {
|
|
|
43
43
|
getUserId(): OkUserId | null;
|
|
44
44
|
setUserId(userId: OkUserId): void;
|
|
45
45
|
hangupConversation(conversationId: string): void;
|
|
46
|
+
removeHistoryRecords(recordIds: number[]): Promise<void>;
|
|
46
47
|
cleanup(): void;
|
|
47
48
|
private _getExternalIdsByOkIds;
|
|
48
49
|
getTokenForAnonym(userId: string, appKey?: string): Promise<string>;
|
package/default/Signaling.d.ts
CHANGED
|
@@ -1,11 +1,10 @@
|
|
|
1
|
-
/// <reference types="web" />
|
|
2
|
-
/// <reference types="webrtc" />
|
|
3
1
|
import BaseSignaling, { AddParticipantParams } from '../abstract/BaseSignaling';
|
|
4
2
|
import { ParticipantIdRegistry } from '../classes/ParticipantIdRegistry';
|
|
5
3
|
import { PerfStatReport } from '../classes/transport/PerfStatReporter';
|
|
6
4
|
import { TransportTopology } from '../classes/transport/Transport';
|
|
7
5
|
import ConversationOption from '../enums/ConversationOption';
|
|
8
6
|
import MediaOption from '../enums/MediaOption';
|
|
7
|
+
import RecordRole from '../enums/RecordRole';
|
|
9
8
|
import SignalingCommandType from '../enums/SignalingCommandType';
|
|
10
9
|
import SignalingConnectionType from '../enums/SignalingConnectionType';
|
|
11
10
|
import UserRole from '../enums/UserRole';
|
|
@@ -96,6 +95,7 @@ export default class Signaling extends BaseSignaling {
|
|
|
96
95
|
removeMovie(data: any): Promise<SignalingMessage>;
|
|
97
96
|
startStream(data: any): Promise<SignalingMessage>;
|
|
98
97
|
stopStream(): Promise<SignalingMessage>;
|
|
98
|
+
recordSetRole(participantId: CompositeUserId, role: RecordRole | null): Promise<SignalingMessage>;
|
|
99
99
|
getRecordStatus(): Promise<SignalingMessage>;
|
|
100
100
|
switchTopology(topology: TransportTopology, force?: boolean): Promise<SignalingMessage>;
|
|
101
101
|
requestRealloc(): Promise<SignalingMessage>;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Роль участника в записи звонке.
|
|
3
|
+
* Если выставлена хотя бы на одном участнике, то в записи звонка видны только те участники звонка,
|
|
4
|
+
* у которых есть роль.
|
|
5
|
+
*/
|
|
6
|
+
declare enum RecordRole {
|
|
7
|
+
KING = "KING",
|
|
8
|
+
PAWN = "PAWN"
|
|
9
|
+
}
|
|
10
|
+
export default RecordRole;
|
|
@@ -14,6 +14,7 @@ declare enum SignalingCommandType {
|
|
|
14
14
|
REPORT_PERF_STAT = "report-perf-stat",
|
|
15
15
|
RECORD_START = "record-start",
|
|
16
16
|
RECORD_STOP = "record-stop",
|
|
17
|
+
RECORD_SET_ROLE = "record-set-role",
|
|
17
18
|
RECORD_GET_STATUS = "record-get-status",
|
|
18
19
|
SWITCH_MICRO = "switch-micro",
|
|
19
20
|
SWITCH_TOPOLOGY = "switch-topology",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vkontakte/calls-sdk",
|
|
3
|
-
"version": "2.4.3-beta.
|
|
3
|
+
"version": "2.4.3-beta.8",
|
|
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": "1.0.
|
|
17
|
+
"@vkontakte/calls-video-effects": "1.0.6-beta.0",
|
|
18
18
|
"@vkontakte/libvpx": "2.0.9",
|
|
19
19
|
"big-integer": "1.6.48",
|
|
20
20
|
"messagepack": "1.1.12",
|
package/static/External.d.ts
CHANGED
package/static/Params.d.ts
CHANGED
package/static/Utils.d.ts
CHANGED
package/static/WebRTCUtils.d.ts
CHANGED
package/types/Participant.d.ts
CHANGED