@vkontakte/calls-sdk 2.8.6-dev.15af4b30.0 → 2.8.6-dev.164b8e60.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 +6 -5
- package/calls-sdk.cjs.js +8 -8
- package/calls-sdk.esm.js +8 -8
- package/classes/Conversation.d.ts +12 -5
- package/classes/Logger.d.ts +24 -18
- package/classes/MediaSource.d.ts +3 -0
- package/classes/SignalingActor.d.ts +9 -0
- package/classes/codec/IEncoder.d.ts +0 -1
- package/classes/screenshare/BaseStreamBuilder.d.ts +1 -1
- package/classes/stat/StatPings.d.ts +17 -0
- package/classes/stat/StatSignalingCommands.d.ts +12 -0
- package/classes/transport/Statistics.d.ts +23 -10
- package/default/Signaling.d.ts +12 -9
- package/enums/ChatRoomEventType.d.ts +1 -1
- package/enums/ConversationOption.d.ts +3 -3
- package/enums/HangupType.d.ts +2 -1
- package/enums/RecordRole.d.ts +1 -1
- package/enums/SignalingTransportStat.d.ts +17 -0
- package/enums/Stat.d.ts +18 -36
- package/enums/StatLog.d.ts +32 -0
- package/package.json +1 -3
- package/static/ApiTransport.d.ts +1 -1
- package/static/External.d.ts +7 -4
- package/static/Params.d.ts +14 -4
- package/static/SignalingCapabilities.d.ts +24 -0
- package/static/SimulcastInfo.d.ts +1 -1
- package/static/Utils.d.ts +1 -1
- package/types/ConversationParams.d.ts +1 -0
- package/types/ExternalId.d.ts +2 -0
- package/types/SignalingCommand.d.ts +1 -0
- package/types/SignalingMessage.d.ts +3 -1
- package/types/Streams.d.ts +1 -0
- package/types/WebTransport.d.ts +2 -11
- package/utils/Lz4.d.ts +1 -1
- package/utils/MsgPackerBufferUtils.d.ts +1 -1
- package/utils/P2Quantile.d.ts +14 -0
- package/utils/StatTracker.d.ts +18 -0
- package/utils/VariableLengthInteger.d.ts +1 -1
- package/utils/Welford.d.ts +9 -0
- package/worker/LibVPxDecoderWorker.d.ts +0 -1
- package/worker/LibVPxEncoderWorker.d.ts +0 -1
- package/worker/WebCodecsDecoderWorker.d.ts +0 -1
- package/worker/WebCodecsEncoderWorker.d.ts +0 -1
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
declare const PREDICATES: {
|
|
2
|
+
readonly producerScreenTrack: () => boolean;
|
|
3
|
+
readonly videoTracksCount: () => boolean;
|
|
4
|
+
readonly waitingHall: () => boolean;
|
|
5
|
+
readonly filteredMessages: () => boolean;
|
|
6
|
+
readonly consumerScreenTrack: () => boolean;
|
|
7
|
+
readonly muteNotificationForAdmins: () => boolean;
|
|
8
|
+
readonly movieShare: () => boolean;
|
|
9
|
+
readonly useParticipantListChunk: () => boolean;
|
|
10
|
+
readonly useRooms: () => boolean;
|
|
11
|
+
readonly vmoji: () => boolean;
|
|
12
|
+
readonly useCallsToContacts: () => boolean;
|
|
13
|
+
readonly useChatRooms: () => boolean;
|
|
14
|
+
readonly audienceModeHandUpTimestamps: () => boolean;
|
|
15
|
+
readonly animojiBackendRender: () => boolean;
|
|
16
|
+
readonly addParticipant: () => boolean;
|
|
17
|
+
};
|
|
18
|
+
type ParticipantCapabilitiesKeys = keyof typeof PREDICATES;
|
|
19
|
+
export type ParticipantCapabilities = Record<ParticipantCapabilitiesKeys, boolean>;
|
|
20
|
+
export declare class SignalingCapabilities {
|
|
21
|
+
static getFlags(): string;
|
|
22
|
+
static parseCapabilities(mask?: string): ParticipantCapabilities;
|
|
23
|
+
}
|
|
24
|
+
export {};
|
|
@@ -10,4 +10,4 @@ export declare const MAP_RID_TO_SCALE_RESOLUTION_DOWN_BY: Record<string, number>
|
|
|
10
10
|
export declare function isEqualSimulcastInfo(si1: ISimulcastInfo | null, si2: ISimulcastInfo | null): boolean;
|
|
11
11
|
export declare function findBitrateAsc(maxDimension: number, bitrates: VideoBitrateSettings[]): number;
|
|
12
12
|
export declare function calculateSimulcastInfo(width?: number, height?: number, bitrates?: VideoBitrateSettings[]): ISimulcastInfo;
|
|
13
|
-
export declare function findScaleResolutionDownBy(rid
|
|
13
|
+
export declare function findScaleResolutionDownBy(rid?: string): number;
|
package/static/Utils.d.ts
CHANGED
|
@@ -71,7 +71,7 @@ declare namespace Utils {
|
|
|
71
71
|
function participantMarkerCompare(marker1: ExternalParticipantListMarker | undefined, marker2: ExternalParticipantListMarker | undefined): number;
|
|
72
72
|
/** убирает все ключи со значением `V` на 1 уровне */
|
|
73
73
|
function objectFilterOutValues<T extends Record<string, V>, V = unknown>(obj: T, value?: unknown | unknown[]): Partial<T>;
|
|
74
|
-
function objectReduce<R, T extends
|
|
74
|
+
function objectReduce<R, T extends object>(obj: T, callback: (acc: R, value: T[keyof T], key: keyof T) => R, initialValue: R): R;
|
|
75
75
|
const setImmediate: (fn: VoidFunction) => VoidFunction;
|
|
76
76
|
function isObject(obj: unknown): obj is object;
|
|
77
77
|
function patchSimulcastAnswerSdp(sdp: string, trans: RTCRtpTransceiver, width: number, height: number): string;
|
package/types/ExternalId.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import MediaOption from '../enums/MediaOption';
|
|
2
|
+
import UserRole from '../enums/UserRole';
|
|
2
3
|
import { ParticipantStatus } from '../static/External';
|
|
3
4
|
import MediaSettings from './MediaSettings';
|
|
4
5
|
import { ISharedMovieInfo } from './MovieShare';
|
|
@@ -96,6 +97,7 @@ export interface ExternalParticipant {
|
|
|
96
97
|
unmuteOptions: MediaOption[];
|
|
97
98
|
markers: ExternalParticipantListMarkers | null;
|
|
98
99
|
movieShareInfos?: ISharedMovieInfo[];
|
|
100
|
+
roles: UserRole[];
|
|
99
101
|
}
|
|
100
102
|
/**
|
|
101
103
|
* Позиция в чанке
|
|
@@ -3,6 +3,7 @@ import { SignalingResponse, SignalingSuccessResponse } from './SignalingMessage'
|
|
|
3
3
|
interface SignalingCommand<T extends SignalingResponse = SignalingSuccessResponse> {
|
|
4
4
|
sequence: number;
|
|
5
5
|
name: SignalingCommandType;
|
|
6
|
+
statMarkName: string;
|
|
6
7
|
params: object;
|
|
7
8
|
responseTimer: number;
|
|
8
9
|
needResponse: boolean;
|
|
@@ -182,6 +182,7 @@ declare namespace SignalingMessage {
|
|
|
182
182
|
deviceIdx?: number;
|
|
183
183
|
peerId: PeerId;
|
|
184
184
|
mediaSettings: Partial<MediaSettings>;
|
|
185
|
+
capabilities?: string;
|
|
185
186
|
}
|
|
186
187
|
export interface Hungup extends Notification {
|
|
187
188
|
participantId: OkUserId;
|
|
@@ -256,6 +257,7 @@ declare namespace SignalingMessage {
|
|
|
256
257
|
participantId: OkUserId;
|
|
257
258
|
participant: Participant;
|
|
258
259
|
mediaSettings: Partial<MediaSettings>;
|
|
260
|
+
capabilities?: string;
|
|
259
261
|
}
|
|
260
262
|
export interface ProducerUpdated extends Notification {
|
|
261
263
|
description: string;
|
|
@@ -276,7 +278,6 @@ declare namespace SignalingMessage {
|
|
|
276
278
|
}
|
|
277
279
|
export interface FeatureSetChanged extends Notification {
|
|
278
280
|
features: ConversationFeature[];
|
|
279
|
-
featuresPerRole?: IFeaturesPerRole | null;
|
|
280
281
|
}
|
|
281
282
|
export interface MultipartyChatCreated extends Notification {
|
|
282
283
|
chatId: string;
|
|
@@ -289,6 +290,7 @@ declare namespace SignalingMessage {
|
|
|
289
290
|
recordInfo: RecordInfo;
|
|
290
291
|
}
|
|
291
292
|
export interface RecordStopped extends Notification {
|
|
293
|
+
/** кто остановил запись или если в комнатах, то это админ */
|
|
292
294
|
participant: ParticipantId;
|
|
293
295
|
recordMovieId: number;
|
|
294
296
|
}
|
package/types/Streams.d.ts
CHANGED
package/types/WebTransport.d.ts
CHANGED
|
@@ -1,14 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
algorithm?: string;
|
|
3
|
-
value?: BufferSource;
|
|
4
|
-
}
|
|
5
|
-
interface WebTransportOptions {
|
|
6
|
-
allowPooling?: boolean;
|
|
7
|
-
congestionControl?: CongestionControlType;
|
|
8
|
-
requireUnreliable?: boolean;
|
|
9
|
-
serverCertificateHashes?: WebTransportHash[];
|
|
10
|
-
}
|
|
11
|
-
type CongestionControlType = 'default' | 'low-latency' | 'throughput';
|
|
1
|
+
import { WebTransportOptions } from '@fails-components/webtransport';
|
|
12
2
|
declare class WebTransportEventual {
|
|
13
3
|
private webTransport;
|
|
14
4
|
private stream;
|
|
@@ -27,6 +17,7 @@ declare class WebTransportEventual {
|
|
|
27
17
|
constructor(url: string, options?: WebTransportOptions);
|
|
28
18
|
private getCompressionTypeFromUrl;
|
|
29
19
|
private connect;
|
|
20
|
+
private readChunks;
|
|
30
21
|
private readLoop;
|
|
31
22
|
send(data: string): Promise<void>;
|
|
32
23
|
close(code?: number, reason?: string): void;
|
package/utils/Lz4.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare function lz4Decompress(input: Uint8Array, outputLength: number): Uint8Array
|
|
1
|
+
export declare function lz4Decompress(input: Uint8Array, outputLength: number): Uint8Array<ArrayBuffer>;
|
|
@@ -13,7 +13,7 @@ export declare function createWriteBuffer(): {
|
|
|
13
13
|
putUi32(v: number): void;
|
|
14
14
|
putUi64(v: number): void;
|
|
15
15
|
putF(v: number): void;
|
|
16
|
-
ui8array(): Uint8Array
|
|
16
|
+
ui8array(): Uint8Array<ArrayBuffer>;
|
|
17
17
|
};
|
|
18
18
|
export declare function createReadBuffer(buf: BufferSource): {
|
|
19
19
|
peek(): number;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Класс, реализующий возможность найти медиану или другой персентиль не храня весь поток данных для расчета
|
|
3
|
+
*/
|
|
4
|
+
export declare class P2Quantile {
|
|
5
|
+
private readonly q;
|
|
6
|
+
private inits;
|
|
7
|
+
private n;
|
|
8
|
+
private np;
|
|
9
|
+
private qv;
|
|
10
|
+
constructor(q: number);
|
|
11
|
+
add(x: number): void;
|
|
12
|
+
value(): number;
|
|
13
|
+
private bootstrap;
|
|
14
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
export declare class StatTracker {
|
|
2
|
+
private count;
|
|
3
|
+
private minVal;
|
|
4
|
+
private maxVal;
|
|
5
|
+
private mean;
|
|
6
|
+
private p50;
|
|
7
|
+
private p95;
|
|
8
|
+
add(x: number): void;
|
|
9
|
+
snapshot(): {
|
|
10
|
+
min: number;
|
|
11
|
+
max: number;
|
|
12
|
+
avg: number;
|
|
13
|
+
median: number;
|
|
14
|
+
p95: number;
|
|
15
|
+
count: number;
|
|
16
|
+
};
|
|
17
|
+
get hasData(): boolean;
|
|
18
|
+
}
|
|
@@ -12,7 +12,7 @@ declare class VariableLengthIntegerDecoder {
|
|
|
12
12
|
* @param data The Uint8Array to decode.
|
|
13
13
|
* @returns The decoded integer.
|
|
14
14
|
*/
|
|
15
|
-
decode(data: Uint8Array): bigint;
|
|
15
|
+
decode(data: Uint8Array): bigint | null;
|
|
16
16
|
getNumBytesForLengthInteger(data: Uint8Array): number;
|
|
17
17
|
}
|
|
18
18
|
export { VariableLengthIntegerEncoder, VariableLengthIntegerDecoder };
|