@vkontakte/calls-sdk 2.8.6-dev.e8081e23.0 → 2.8.6-dev.e9164ba1.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 +1 -1
- package/calls-sdk.cjs.js +8 -8
- package/calls-sdk.esm.js +8 -8
- package/classes/Conversation.d.ts +8 -3
- package/classes/Logger.d.ts +3 -0
- package/classes/MediaSource.d.ts +1 -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/transport/Statistics.d.ts +23 -10
- package/default/Signaling.d.ts +12 -8
- package/enums/ChatRoomEventType.d.ts +1 -1
- package/enums/ConversationOption.d.ts +3 -3
- package/enums/RecordRole.d.ts +1 -1
- package/enums/SignalingTransportStat.d.ts +17 -0
- package/enums/Stat.d.ts +34 -23
- package/package.json +1 -1
- package/static/ApiTransport.d.ts +1 -1
- package/static/SimulcastInfo.d.ts +1 -1
- package/static/Utils.d.ts +1 -1
- package/types/ConversationParams.d.ts +1 -0
- package/types/WebTransport.d.ts +1 -11
- package/utils/Lz4.d.ts +1 -1
- package/utils/MsgPackerBufferUtils.d.ts +1 -1
- package/utils/VariableLengthInteger.d.ts +1 -1
- 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
|
@@ -30,12 +30,14 @@ import EventEmitter from './EventEmitter';
|
|
|
30
30
|
export default class Conversation extends EventEmitter {
|
|
31
31
|
private readonly _api;
|
|
32
32
|
private readonly _signaling;
|
|
33
|
+
private readonly _signalingActor;
|
|
33
34
|
private _mediaSource;
|
|
34
35
|
private _conversation;
|
|
35
36
|
private _myLastRequestedLayouts;
|
|
36
37
|
private _state;
|
|
37
38
|
private _participantState;
|
|
38
39
|
private _participants;
|
|
40
|
+
private _pendingParticipants;
|
|
39
41
|
private _transport;
|
|
40
42
|
private _debugInfo;
|
|
41
43
|
private _volumesDetector;
|
|
@@ -77,7 +79,7 @@ export default class Conversation extends EventEmitter {
|
|
|
77
79
|
private _onJoinPart2;
|
|
78
80
|
private _extractExternalRooms;
|
|
79
81
|
private _extractExternalRoomsData;
|
|
80
|
-
onPush(conversationId: string, type?: UserType, peerId?: number, conversationParams?: string): Promise<void>;
|
|
82
|
+
onPush(conversationId: string, type?: UserType, peerId?: number, conversationParams?: string, wsEndpoint?: string): Promise<void>;
|
|
81
83
|
private _isInWaitingHall;
|
|
82
84
|
private _isRestricted;
|
|
83
85
|
private _isAudienceMode;
|
|
@@ -96,7 +98,7 @@ export default class Conversation extends EventEmitter {
|
|
|
96
98
|
updateStatisticsInterval(): void;
|
|
97
99
|
private _openTransport;
|
|
98
100
|
private _close;
|
|
99
|
-
destroy(): void
|
|
101
|
+
destroy(): Promise<void>;
|
|
100
102
|
private _getConversationParams;
|
|
101
103
|
private _setConversationParams;
|
|
102
104
|
private _addGeoParamsToEndpoint;
|
|
@@ -228,7 +230,7 @@ export default class Conversation extends EventEmitter {
|
|
|
228
230
|
startAsr(params: IAsrStartParams): Promise<void>;
|
|
229
231
|
stopAsr(params?: IAsrStopParams): Promise<void>;
|
|
230
232
|
requestAsr(request: boolean): Promise<void>;
|
|
231
|
-
muteParticipant(participantId:
|
|
233
|
+
muteParticipant(participantId: (ParticipantId | null) | undefined, muteStates: MuteStates, requestedMedia?: MediaOption[], roomId?: number | null): Promise<void>;
|
|
232
234
|
enableFeatureForRoles(feature: ConversationFeature, roles: UserRole[]): Promise<void>;
|
|
233
235
|
pinParticipant(participantId: ParticipantId, unpin: boolean, roomId?: number | null): Promise<void>;
|
|
234
236
|
updateMediaModifiers(mediaModifiers: MediaModifiers): Promise<void>;
|
|
@@ -383,6 +385,9 @@ export default class Conversation extends EventEmitter {
|
|
|
383
385
|
private _getMuteStatesForCurrentRoom;
|
|
384
386
|
private _setMuteStatesForRoomId;
|
|
385
387
|
private _forceOpenTransportForAloneInCall;
|
|
388
|
+
private _registerParticipant;
|
|
389
|
+
private _getParticipants;
|
|
390
|
+
private _getParticipant;
|
|
386
391
|
}
|
|
387
392
|
export declare class UpdateDisplayLayoutError extends Error {
|
|
388
393
|
readonly participantErrors: {
|
package/classes/Logger.d.ts
CHANGED
|
@@ -11,7 +11,10 @@ export default class Logger extends BaseLogger {
|
|
|
11
11
|
private _batchTimeout;
|
|
12
12
|
private _serverTimeDelta;
|
|
13
13
|
private static _instance;
|
|
14
|
+
private static _conversationIdProvider;
|
|
14
15
|
constructor(api: BaseApi, externalLogger: BaseLogger | null);
|
|
16
|
+
static setConversationIdProvider(provider: () => string | null): void;
|
|
17
|
+
private _getConversationId;
|
|
15
18
|
private _sendLogItems;
|
|
16
19
|
private _sendClientStats;
|
|
17
20
|
private _sendClientEvents;
|
package/classes/MediaSource.d.ts
CHANGED
|
@@ -52,6 +52,7 @@ export declare class MediaSource extends EventEmitter {
|
|
|
52
52
|
private _animojiEnabled;
|
|
53
53
|
/** вычисляем низкую производительность видео эффектов */
|
|
54
54
|
private readonly _videoEffectsFpsLimiter?;
|
|
55
|
+
private _deviceChangeListener;
|
|
55
56
|
constructor();
|
|
56
57
|
request(mediaOptions?: MediaOption[], needEmptyTracks?: boolean): Promise<void>;
|
|
57
58
|
getStream(): MediaStream | null;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import SignalingMessage from '../types/SignalingMessage';
|
|
2
|
+
export declare class SignalingActor {
|
|
3
|
+
private processor;
|
|
4
|
+
private queue;
|
|
5
|
+
private isProcessing;
|
|
6
|
+
constructor(processor: (message: SignalingMessage) => Promise<unknown> | unknown);
|
|
7
|
+
add(message: SignalingMessage): void;
|
|
8
|
+
private processQueue;
|
|
9
|
+
}
|
|
@@ -15,7 +15,7 @@ export declare abstract class BaseStreamBuilder {
|
|
|
15
15
|
destroy(): void;
|
|
16
16
|
protected abstract _processFrame(frame: FrameData): void;
|
|
17
17
|
private _processFrameData;
|
|
18
|
-
static getFrameSize(frameData: Uint8Array): {
|
|
18
|
+
static getFrameSize(frameData: Uint8Array<ArrayBuffer>): {
|
|
19
19
|
width: number;
|
|
20
20
|
height: number;
|
|
21
21
|
};
|
|
@@ -1,25 +1,38 @@
|
|
|
1
1
|
import { ParticipantId } from '../../types/Participant';
|
|
2
2
|
import { StatItem, StatRtp, StatTransport } from '../../types/Statistics';
|
|
3
3
|
export declare const NO_STAT_REQUEST_DELAY = 1000;
|
|
4
|
-
|
|
5
|
-
|
|
4
|
+
declare function distinctById(items: RTCStats[]): RTCStats[];
|
|
5
|
+
declare function rtcStatsToArray(stats: RTCStatsReport[]): RTCStats[];
|
|
6
6
|
/**
|
|
7
7
|
* Extracts transport statistics from the gives stats
|
|
8
8
|
* @hidden
|
|
9
9
|
*/
|
|
10
|
-
|
|
10
|
+
declare function extractTransport(stats: RTCStats[]): StatTransport;
|
|
11
11
|
/**
|
|
12
12
|
* Extracts media statistics from the given stats
|
|
13
13
|
* @hidden
|
|
14
14
|
*/
|
|
15
|
-
|
|
15
|
+
declare function extractRtps(stats: RTCStats[], ssrcMap: Record<string, string>, needToExtractRemote?: boolean): StatRtp[];
|
|
16
16
|
/**
|
|
17
17
|
* Computes delta (the difference) between two stat reports.
|
|
18
18
|
* @hidden
|
|
19
19
|
*/
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
20
|
+
declare function delta(current: StatItem, previous: StatItem, needToExtractRemote?: boolean): StatItem;
|
|
21
|
+
declare function collectStats(pc: RTCPeerConnection, previous: StatItem | null, ssrcMap?: Record<string, string>, needToExtractRemote?: boolean): Promise<StatItem>;
|
|
22
|
+
declare function setMark(name: string): void;
|
|
23
|
+
declare function clearMark(name: string): void;
|
|
24
|
+
declare function measureMark(name: string): null | number;
|
|
25
|
+
declare function getMarkNameScreenshareFirstFrame(uid: ParticipantId): string;
|
|
26
|
+
declare const _default: {
|
|
27
|
+
distinctById: typeof distinctById;
|
|
28
|
+
rtcStatsToArray: typeof rtcStatsToArray;
|
|
29
|
+
extractTransport: typeof extractTransport;
|
|
30
|
+
extractRtps: typeof extractRtps;
|
|
31
|
+
delta: typeof delta;
|
|
32
|
+
collectStats: typeof collectStats;
|
|
33
|
+
setMark: typeof setMark;
|
|
34
|
+
clearMark: typeof clearMark;
|
|
35
|
+
measureMark: typeof measureMark;
|
|
36
|
+
getMarkNameScreenshareFirstFrame: typeof getMarkNameScreenshareFirstFrame;
|
|
37
|
+
};
|
|
38
|
+
export default _default;
|
package/default/Signaling.d.ts
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import BaseSignaling, { AddParticipantParams } from '../abstract/BaseSignaling';
|
|
2
2
|
import { ParticipantIdRegistry } from '../classes/ParticipantIdRegistry';
|
|
3
3
|
import { SharingStatReport } from '../classes/screenshare/SharingStatReport';
|
|
4
|
-
import { NetworkStatReport } from '../types/NetworkStatReport';
|
|
5
4
|
import { TransportTopology } from '../classes/transport/Transport';
|
|
6
5
|
import ConversationFeature from '../enums/ConversationFeature';
|
|
7
6
|
import ConversationOption from '../enums/ConversationOption';
|
|
@@ -11,16 +10,17 @@ import SignalingConnectionType from '../enums/SignalingConnectionType';
|
|
|
11
10
|
import UserRole from '../enums/UserRole';
|
|
12
11
|
import { JSONObject } from '../static/Json';
|
|
13
12
|
import { IAsrStartParams, IAsrStopParams } from '../types/Asr';
|
|
13
|
+
import { ChangeSimulcast } from '../types/ChangeSimulcast';
|
|
14
14
|
import MediaModifiers from '../types/MediaModifiers';
|
|
15
15
|
import MediaSettings from '../types/MediaSettings';
|
|
16
16
|
import { IAddMovieParams, IUpdateMovieData } from '../types/MovieShare';
|
|
17
17
|
import MuteStates from '../types/MuteStates';
|
|
18
|
+
import { NetworkStatReport } from '../types/NetworkStatReport';
|
|
18
19
|
import { CompositeUserId, ParticipantId, ParticipantStateData } from '../types/Participant';
|
|
19
20
|
import ParticipantLayout, { RequestKeyFrame, StopStream } from '../types/ParticipantLayout';
|
|
20
21
|
import { ParticipantListChunkParameters } from '../types/ParticipantListChunk';
|
|
21
22
|
import { StreamDescriptionString } from '../types/ParticipantStreamDescription';
|
|
22
23
|
import { PerfStatReport } from '../types/PerfStatReporter';
|
|
23
|
-
import { ChangeSimulcast } from '../types/ChangeSimulcast';
|
|
24
24
|
import SignalingMessage, { GetParticipantsSignalingResponse, GetRoomsSignalingResponse, SignalingSuccessResponse } from '../types/SignalingMessage';
|
|
25
25
|
import { IPublishStreamData, IRecordConfData, IStartStreamData, IStopStreamData } from '../types/Streams';
|
|
26
26
|
export default class Signaling extends BaseSignaling {
|
|
@@ -31,6 +31,7 @@ export default class Signaling extends BaseSignaling {
|
|
|
31
31
|
private datachannelCommandsQueue;
|
|
32
32
|
private incomingCache;
|
|
33
33
|
private responseHandlers;
|
|
34
|
+
private connectionType;
|
|
34
35
|
private reconnectCount;
|
|
35
36
|
private endpoint;
|
|
36
37
|
private wtEndpoint;
|
|
@@ -49,12 +50,12 @@ export default class Signaling extends BaseSignaling {
|
|
|
49
50
|
private producerCommandDataChannel;
|
|
50
51
|
private producerCommandDataChannelEnabled;
|
|
51
52
|
private producerCommandSerializationService;
|
|
52
|
-
private static
|
|
53
|
-
private static
|
|
54
|
-
private static
|
|
55
|
-
private static
|
|
56
|
-
private static
|
|
57
|
-
private static
|
|
53
|
+
private static get RECONNECT_DELAY();
|
|
54
|
+
private static get RECONNECT_MAX_DELAY();
|
|
55
|
+
private static get RECONNECT_MAX_COUNT();
|
|
56
|
+
private static get WAIT_CONNECTION_DELAY();
|
|
57
|
+
private static get WAIT_RESPONSE_DELAY();
|
|
58
|
+
private static get WAIT_MESSAGE_DELAY();
|
|
58
59
|
private static _getCapabilityFlags;
|
|
59
60
|
get ready(): boolean;
|
|
60
61
|
setEndpoint(endpoint: string): void;
|
|
@@ -186,4 +187,7 @@ export default class Signaling extends BaseSignaling {
|
|
|
186
187
|
private _startDoctor;
|
|
187
188
|
private _stopDoctor;
|
|
188
189
|
private isWebTransportAvailable;
|
|
190
|
+
private _getSocketType;
|
|
191
|
+
private _markTransportStat;
|
|
192
|
+
private _logTransportStat;
|
|
189
193
|
}
|
|
@@ -3,10 +3,10 @@
|
|
|
3
3
|
*/
|
|
4
4
|
declare enum ConversationOption {
|
|
5
5
|
REQUIRE_AUTH_TO_JOIN = "REQUIRE_AUTH_TO_JOIN",
|
|
6
|
-
AUDIENCE_MODE = "AUDIENCE_MODE"
|
|
7
|
-
WAITING_HALL = "WAITING_HALL"
|
|
6
|
+
AUDIENCE_MODE = "AUDIENCE_MODE",// Stereo chat room
|
|
7
|
+
WAITING_HALL = "WAITING_HALL",// Waiting Hall is ON
|
|
8
8
|
ASR = "ASR",
|
|
9
|
-
FEEDBACK = "FEEDBACK"
|
|
9
|
+
FEEDBACK = "FEEDBACK",// Reactions (default = off)
|
|
10
10
|
RECURRING = "RECURRING"
|
|
11
11
|
}
|
|
12
12
|
export default ConversationOption;
|
package/enums/RecordRole.d.ts
CHANGED
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import Stat from './Stat';
|
|
2
|
+
export declare const enum SignalingTransportType {
|
|
3
|
+
WEBSOCKET = "ws",
|
|
4
|
+
WEBTRANSPORT = "wt"
|
|
5
|
+
}
|
|
6
|
+
export declare const enum SignalingTransportStat {
|
|
7
|
+
CONNECTED = "connected",
|
|
8
|
+
RECONNECTED = "reconnected",
|
|
9
|
+
FAILED_PINGS = "failed_pings",
|
|
10
|
+
FAILED_EXCEPTIONS = "failed_exception",
|
|
11
|
+
TIMEOUT = "timeout",
|
|
12
|
+
RESTART = "restart"
|
|
13
|
+
}
|
|
14
|
+
export declare const SOCKET_STAT: Record<SignalingTransportStat, {
|
|
15
|
+
[SignalingTransportType.WEBSOCKET]: Stat;
|
|
16
|
+
[SignalingTransportType.WEBTRANSPORT]: Stat;
|
|
17
|
+
}>;
|
package/enums/Stat.d.ts
CHANGED
|
@@ -1,44 +1,55 @@
|
|
|
1
1
|
declare const enum Stat {
|
|
2
2
|
ERROR = "callError",
|
|
3
|
-
DEVICES = "callDevices"
|
|
4
|
-
CALL_SPEC_ERROR = "callSpecError"
|
|
5
|
-
ICE_CONNECTION_STATE = "callIceConnectionState"
|
|
6
|
-
ICE_CONNECTION_TYPE = "callIceConnectionType"
|
|
7
|
-
ICE_RESTART = "callIceRestart"
|
|
8
|
-
PUSH = "callPush"
|
|
9
|
-
OUTGOING_CALL = "callStart"
|
|
10
|
-
CALL_FINISH = "call_finish"
|
|
11
|
-
OUTGOING_MULTIPARTY_CALL = "callStartMultiparty"
|
|
12
|
-
JOIN_CONVERSATION = "callJoinConversation"
|
|
13
|
-
ACCEPTED_OUTGOING = "callAcceptedOutgoing"
|
|
14
|
-
ACCEPT_INCOMING = "callAcceptIncoming"
|
|
3
|
+
DEVICES = "callDevices",// залогировать количество %d_%d
|
|
4
|
+
CALL_SPEC_ERROR = "callSpecError",// ошибки WebRTC
|
|
5
|
+
ICE_CONNECTION_STATE = "callIceConnectionState",// state
|
|
6
|
+
ICE_CONNECTION_TYPE = "callIceConnectionType",// type
|
|
7
|
+
ICE_RESTART = "callIceRestart",// без параметров
|
|
8
|
+
PUSH = "callPush",// busy / rejected / accepted
|
|
9
|
+
OUTGOING_CALL = "callStart",// video/audio
|
|
10
|
+
CALL_FINISH = "call_finish",// событие отправляемое в конце звонка
|
|
11
|
+
OUTGOING_MULTIPARTY_CALL = "callStartMultiparty",// video/audio
|
|
12
|
+
JOIN_CONVERSATION = "callJoinConversation",// video/audio
|
|
13
|
+
ACCEPTED_OUTGOING = "callAcceptedOutgoing",// video/audio
|
|
14
|
+
ACCEPT_INCOMING = "callAcceptIncoming",// video/audio
|
|
15
15
|
DECLINE_INCOMING = "callDeclineIncoming",
|
|
16
|
-
ACCEPT_CONCURRENT = "callAcceptConcurrent"
|
|
16
|
+
ACCEPT_CONCURRENT = "callAcceptConcurrent",// video/audio
|
|
17
17
|
HANGUP = "callHangup",
|
|
18
|
-
CODEC_USAGE = "codec_usage"
|
|
19
|
-
MEDIA_STATUS = "callMediaStatus",
|
|
20
|
-
DEVICE_CHANGED = "callDeviceChanged"
|
|
18
|
+
CODEC_USAGE = "codec_usage",// событие когда меняется кодек
|
|
19
|
+
MEDIA_STATUS = "callMediaStatus",// изменение video_1, audio_0
|
|
20
|
+
DEVICE_CHANGED = "callDeviceChanged",// смена камеры video/audio/screen
|
|
21
21
|
SOCKET_ACTION = "callSocketAction",
|
|
22
22
|
ADD_PARTICIPANT = "callAddParticipant",
|
|
23
23
|
REMOVE_PARTICIPANT = "callRemoveParticipant",
|
|
24
|
-
POOR_CONNECTION = "callPoorConnection"
|
|
24
|
+
POOR_CONNECTION = "callPoorConnection",// video / audio
|
|
25
25
|
TOPOLOGY_CHANGE_REQUESTED = "callTopologyChangeRequested",
|
|
26
|
-
RELAY_POLICY = "callForceRelay"
|
|
26
|
+
RELAY_POLICY = "callForceRelay",// 1 / 0
|
|
27
27
|
PAT_ALLOCATED = "patAllocate",
|
|
28
28
|
PAT_DEALLOCATED = "patDeallocate",
|
|
29
29
|
PAT_ERROR = "patError",
|
|
30
30
|
PAT_WAITING_TIME_ERROR = "patWaitingTimeError",
|
|
31
31
|
PAT_OUTDATED_RESPONSE = "patOutdatedResponse",
|
|
32
|
-
SIGNALING_CONNECTED = "signaling_connected"
|
|
33
|
-
RECONNECT = "callReconnect"
|
|
34
|
-
SCREENSHARE_FIRST_FRAME = "screen_share_first_frame"
|
|
35
|
-
SCREENSHARE_FREEZE_DURATION = "callScreenshareFreezeDuration"
|
|
32
|
+
SIGNALING_CONNECTED = "signaling_connected",// measure
|
|
33
|
+
RECONNECT = "callReconnect",// measure
|
|
34
|
+
SCREENSHARE_FIRST_FRAME = "screen_share_first_frame",// measure
|
|
35
|
+
SCREENSHARE_FREEZE_DURATION = "callScreenshareFreezeDuration",// measure
|
|
36
36
|
/** Объединение callFirstDataReceivedP2P и callFirstAudioMixDataReceived */
|
|
37
37
|
FIRST_MEDIA_RECEIVED = "first_media_received",
|
|
38
38
|
CALL_EVENTUAL_STAT = "callEventualStat",
|
|
39
39
|
CALL_DECLINED_OR_HANGED_LOCALLY = "CallDeclinedOrHangedLocally",
|
|
40
40
|
USER_FEEDBACK_RECEIVED = "UserFeedbackReceived",
|
|
41
41
|
CALL_START = "call_start",
|
|
42
|
-
|
|
42
|
+
WEBSOCKET_CONNECTED = "websocket_connected",
|
|
43
|
+
WEBSOCKET_RECONNECTED = "websocket_reconnected",
|
|
44
|
+
WEBSOCKET_FAILED_PINGS = "websocket_failed_pings",
|
|
45
|
+
WEBSOCKET_FAILED_EXCEPTION = "websocket_failed_exception",
|
|
46
|
+
WEBSOCKET_TIMEOUT = "websocket_timeout",
|
|
47
|
+
WEBSOCKET_RESTART = "websocket_restart",
|
|
48
|
+
WEBTRANSPORT_CONNECTED = "webtransport_connected",
|
|
49
|
+
WEBTRANSPORT_RECONNECTED = "webtransport_reconnected",
|
|
50
|
+
WEBTRANSPORT_FAILED_PINGS = "webtransport_failed_pings",
|
|
51
|
+
WEBTRANSPORT_FAILED_EXCEPTION = "webtransport_failed_exception",
|
|
52
|
+
WEBTRANSPORT_TIMEOUT = "webtransport_timeout",
|
|
53
|
+
WEBTRANSPORT_RESTART = "webtransport_restart"
|
|
43
54
|
}
|
|
44
55
|
export default Stat;
|
package/package.json
CHANGED
package/static/ApiTransport.d.ts
CHANGED
|
@@ -6,5 +6,5 @@ export declare function sendBeakon(method: string, params?: {
|
|
|
6
6
|
}, noSession?: boolean): Promise<void>;
|
|
7
7
|
export declare function request(method: string, params?: {
|
|
8
8
|
[key: string]: any;
|
|
9
|
-
}, noSession?: boolean, customEndpoint?: string): Promise<
|
|
9
|
+
}, noSession?: boolean, customEndpoint?: string): Promise<any>;
|
|
10
10
|
export declare function sendFormData(url: string, data: FormData): Promise<void>;
|
|
@@ -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/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;
|
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;
|
|
@@ -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 };
|