@vkontakte/calls-sdk 2.8.11-dev.aeebd796.0 → 2.8.11-dev.baaff52a.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 +18 -16
- package/abstract/BaseApi.d.ts +2 -3
- package/abstract/BaseSignaling.d.ts +2 -3
- package/calls-sdk.cjs.js +9 -9
- package/calls-sdk.esm.js +3801 -3266
- package/classes/AudioFix.d.ts +5 -1
- package/classes/AudioOutput.d.ts +5 -1
- package/classes/Conversation.d.ts +9 -4
- package/classes/ConversationResponseValidator.d.ts +3 -0
- package/classes/DebugInfo.d.ts +3 -0
- package/classes/DisplayLayoutRequester.d.ts +39 -0
- package/classes/ExternalIdCache.d.ts +19 -0
- package/classes/MediaSource.d.ts +5 -1
- package/classes/ParticipantIdRegistry.d.ts +3 -0
- package/classes/ProducerCommandSerializationService.d.ts +3 -0
- package/classes/SignalingActor.d.ts +3 -1
- package/classes/SpeakerDetector.d.ts +2 -1
- package/classes/SpecListener.d.ts +5 -1
- package/classes/{Logger.d.ts → StatsLogger.d.ts} +3 -10
- package/classes/VideoEffectsFpsLimiter.d.ts +3 -0
- package/classes/asr/AsrReceiver.d.ts +3 -1
- package/classes/codec/LibVPxDecoder.d.ts +3 -0
- package/classes/codec/LibVPxEncoder.d.ts +3 -1
- package/classes/codec/WebCodecsDecoder.d.ts +3 -0
- package/classes/codec/WebCodecsEncoder.d.ts +3 -1
- package/classes/codec/WorkerBase.d.ts +7 -0
- package/classes/screenshare/BaseStreamBuilder.d.ts +4 -1
- package/classes/screenshare/CanvasRenderer.d.ts +3 -1
- package/classes/screenshare/ScreenCaptureReceiver.d.ts +7 -1
- package/classes/screenshare/ScreenCaptureSender.d.ts +5 -1
- package/classes/screenshare/ScreenCongestionControl.d.ts +3 -1
- package/classes/screenshare/StreamBuilder.d.ts +5 -1
- package/classes/screenshare/TrackGeneratorRenderer.d.ts +3 -1
- package/classes/screenshare/WebmBuilder.d.ts +3 -1
- package/classes/stat/CodecStatsAggregator.d.ts +7 -7
- package/classes/stat/ConversationStats.d.ts +21 -0
- package/classes/stat/StatAggregator.d.ts +6 -6
- package/classes/stat/StatFirstMediaReceived.d.ts +6 -2
- package/classes/stat/StatPings.d.ts +9 -9
- package/classes/stat/StatScreenShareFirstFrame.d.ts +3 -1
- package/classes/stat/StatSignalingCommands.d.ts +8 -8
- package/classes/transport/BaseTransport.d.ts +1 -1
- package/classes/transport/DirectStatReporter.d.ts +3 -1
- package/classes/transport/DirectTransport.d.ts +9 -1
- package/classes/transport/PerfStatReporter.d.ts +5 -1
- package/classes/transport/ServerTransport.d.ts +10 -2
- package/classes/transport/Transport.d.ts +11 -14
- package/default/Api.d.ts +8 -11
- package/default/Signaling.d.ts +39 -45
- package/default/SignalingTransport.d.ts +68 -0
- package/enums/HangupType.d.ts +2 -1
- package/enums/TransportState.d.ts +10 -0
- package/enums/TransportTopology.d.ts +5 -0
- package/package.json +1 -1
- package/static/Capabilities.d.ts +5 -0
- package/static/Debug.d.ts +27 -8
- package/static/External.d.ts +3 -0
- package/static/Params.d.ts +14 -0
- package/static/Utils.d.ts +3 -2
- package/static/WebRTCUtils.d.ts +6 -4
- package/types/Capabilities.d.ts +24 -0
- package/types/Conversation.d.ts +1 -1
- package/types/FastStart.d.ts +1 -0
- package/types/ParticipantLayout.d.ts +33 -0
- package/types/SignalingMessage.d.ts +5 -1
- package/types/Statistics.d.ts +1 -1
- package/types/WebTransport.d.ts +4 -0
- package/utils/DebugStorage.d.ts +1 -2
- package/classes/stat/EventMetricsService.d.ts +0 -9
package/static/Params.d.ts
CHANGED
|
@@ -306,6 +306,12 @@ export type ParamsObject = {
|
|
|
306
306
|
* _По умолчанию: `30`_
|
|
307
307
|
*/
|
|
308
308
|
videoTracksCount: number;
|
|
309
|
+
/**
|
|
310
|
+
* Минимальный интервал отправки diff для requestDisplayLayout в миллисекундах.
|
|
311
|
+
*
|
|
312
|
+
* _По умолчанию: `250`_
|
|
313
|
+
*/
|
|
314
|
+
requestDisplayLayoutThrottleMs: number;
|
|
309
315
|
/** @hidden */
|
|
310
316
|
movieShare: boolean;
|
|
311
317
|
/** @hidden */
|
|
@@ -730,6 +736,12 @@ export type ParamsObject = {
|
|
|
730
736
|
* Получено отладочное сообщение. Работает только при выключенном режиме отладки
|
|
731
737
|
*/
|
|
732
738
|
onDebugMessage?: (type: DebugMessageType, ...args: any[]) => void;
|
|
739
|
+
/**
|
|
740
|
+
* Получено отладочное сообщение с контекстом звонка. Работает только при выключенном режиме отладки
|
|
741
|
+
*/
|
|
742
|
+
onDebugMessageWithContext?: (type: DebugMessageType, context: {
|
|
743
|
+
conversationId: string | null;
|
|
744
|
+
}, ...args: any[]) => void;
|
|
733
745
|
/**
|
|
734
746
|
* Статистика звонка
|
|
735
747
|
*/
|
|
@@ -963,6 +975,7 @@ export default abstract class Params {
|
|
|
963
975
|
static get audioNack(): boolean;
|
|
964
976
|
static get movieShare(): boolean;
|
|
965
977
|
static get videoTracksCount(): number;
|
|
978
|
+
static get requestDisplayLayoutThrottleMs(): number;
|
|
966
979
|
static get breakVideoPayloadTypes(): boolean;
|
|
967
980
|
static get useCallsToContacts(): boolean;
|
|
968
981
|
static get useParticipantListChunk(): boolean;
|
|
@@ -1010,6 +1023,7 @@ export default abstract class Params {
|
|
|
1010
1023
|
screenShareCongestionControl: boolean;
|
|
1011
1024
|
screenShareCongestionControlThreshold: number;
|
|
1012
1025
|
videoTracksCount: number;
|
|
1026
|
+
requestDisplayLayoutThrottleMs: number;
|
|
1013
1027
|
asrDataChannel: boolean;
|
|
1014
1028
|
videoMaxHeight: number;
|
|
1015
1029
|
videoMaxWidth: number;
|
package/static/Utils.d.ts
CHANGED
|
@@ -3,6 +3,7 @@ import { ExternalParticipant, ExternalParticipantListMarker } from '../types/Ext
|
|
|
3
3
|
import { CompositeUserId, OkUserId, Participant, ParticipantId, ParticipantStateMapped } from '../types/Participant';
|
|
4
4
|
import SignalingMessage from '../types/SignalingMessage';
|
|
5
5
|
import VideoSettings from '../types/VideoSettings';
|
|
6
|
+
import { type DebugLogger } from './Debug';
|
|
6
7
|
export declare const PARAMETERS_SEPARATOR = ":";
|
|
7
8
|
export declare const DEVICE_IDX_PARAMETER = "d";
|
|
8
9
|
/** @hidden */
|
|
@@ -36,8 +37,8 @@ declare namespace Utils {
|
|
|
36
37
|
function delay(time: number, { signal }?: {
|
|
37
38
|
signal?: AbortSignal;
|
|
38
39
|
}): Promise<void>;
|
|
39
|
-
function applySettings(pc: RTCPeerConnection, videoSettings: VideoSettings, prevSettings: any): any;
|
|
40
|
-
function applyVideoTrackSettings(videoSettings: VideoSettings, s: RTCRtpSender, track: MediaStreamTrack | null, prevSettings: any, retSettings: any): void;
|
|
40
|
+
function applySettings(pc: RTCPeerConnection, videoSettings: VideoSettings, prevSettings: any, debug?: DebugLogger): any;
|
|
41
|
+
function applyVideoTrackSettings(videoSettings: VideoSettings, s: RTCRtpSender, track: MediaStreamTrack | null, prevSettings: any, retSettings: any, debug?: DebugLogger): void;
|
|
41
42
|
/**
|
|
42
43
|
* Проверяет, есть ли в первом массиве хотя бы один элемент из второго массива
|
|
43
44
|
* @param arr Где ищем
|
package/static/WebRTCUtils.d.ts
CHANGED
|
@@ -2,6 +2,8 @@
|
|
|
2
2
|
* Вспомогательный плагин для работы с WebRTC
|
|
3
3
|
*/
|
|
4
4
|
import { IVideoDimentions } from '../types/MediaSettings';
|
|
5
|
+
import type StatsLogger from '../classes/StatsLogger';
|
|
6
|
+
import { type DebugLogger } from './Debug';
|
|
5
7
|
/**
|
|
6
8
|
* Тип камеры мобильного устройства
|
|
7
9
|
*/
|
|
@@ -83,24 +85,24 @@ declare namespace WebRTCUtils {
|
|
|
83
85
|
* @param needAudio Нужно ли аудио
|
|
84
86
|
* @param needEmptyTracks Добавлять ли в стрим пустые треки для отключенного видео/аудио
|
|
85
87
|
*/
|
|
86
|
-
function getUserMedia(needVideo?: boolean, needAudio?: boolean, needEmptyTracks?: boolean): Promise<MediaStream>;
|
|
88
|
+
function getUserMedia(needVideo?: boolean, needAudio?: boolean, needEmptyTracks?: boolean, debug?: DebugLogger, logger?: StatsLogger | null): Promise<MediaStream>;
|
|
87
89
|
/**
|
|
88
90
|
* Запрашивает трансляцию экрана пользователя с опциональным захватом звука
|
|
89
91
|
*/
|
|
90
|
-
function getScreenMedia(fastScreenShare: boolean, withAudioShare: boolean): Promise<MediaStream>;
|
|
92
|
+
function getScreenMedia(fastScreenShare: boolean, withAudioShare: boolean, debug?: DebugLogger, logger?: StatsLogger | null): Promise<MediaStream>;
|
|
91
93
|
/**
|
|
92
94
|
* Запрашивает камеру пользователя
|
|
93
95
|
*
|
|
94
96
|
* @param deviceId ID устройства
|
|
95
97
|
* @param resolution Размеры видео
|
|
96
98
|
*/
|
|
97
|
-
function getUserVideo(deviceId?: string, resolution?: IVideoDimentions): Promise<MediaStream>;
|
|
99
|
+
function getUserVideo(deviceId?: string, resolution?: IVideoDimentions, debug?: DebugLogger, logger?: StatsLogger | null): Promise<MediaStream>;
|
|
98
100
|
/**
|
|
99
101
|
* Запрашивает микрофон пользователя
|
|
100
102
|
*
|
|
101
103
|
* @param deviceId ID устройства
|
|
102
104
|
*/
|
|
103
|
-
function getUserAudio(deviceId?: string): Promise<MediaStream>;
|
|
105
|
+
function getUserAudio(deviceId?: string, debug?: DebugLogger, logger?: StatsLogger | null): Promise<MediaStream>;
|
|
104
106
|
/**
|
|
105
107
|
* Устанавливает размер видео в стриме
|
|
106
108
|
*
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
export type TCapabilities = {
|
|
2
|
+
estimatedPerformanceIndex: number;
|
|
3
|
+
audioMix: boolean;
|
|
4
|
+
consumerUpdate: boolean;
|
|
5
|
+
producerNotificationDataChannelVersion: number;
|
|
6
|
+
producerCommandDataChannelVersion: number;
|
|
7
|
+
consumerScreenDataChannelVersion: number;
|
|
8
|
+
producerScreenDataChannelVersion: number;
|
|
9
|
+
asrDataChannelVersion: number;
|
|
10
|
+
animojiDataChannelVersion: number;
|
|
11
|
+
animojiBackendRender: boolean;
|
|
12
|
+
onDemandTracks: boolean;
|
|
13
|
+
unifiedPlan: boolean;
|
|
14
|
+
singleSession: boolean;
|
|
15
|
+
videoTracksCount: number;
|
|
16
|
+
red: boolean;
|
|
17
|
+
audioShare: boolean;
|
|
18
|
+
fastScreenShare: boolean;
|
|
19
|
+
videoSuspend: boolean;
|
|
20
|
+
simulcast: boolean;
|
|
21
|
+
consumerFastScreenShare: boolean;
|
|
22
|
+
consumerFastScreenShareQualityOnDemand: boolean;
|
|
23
|
+
transparentAudio: boolean;
|
|
24
|
+
};
|
package/types/Conversation.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import TransportTopology from '../enums/TransportTopology';
|
|
2
2
|
import CallDirection from '../enums/CallDirection';
|
|
3
3
|
import CallType from '../enums/CallType';
|
|
4
4
|
import ConversationFeature from '../enums/ConversationFeature';
|
package/types/FastStart.d.ts
CHANGED
|
@@ -54,4 +54,37 @@ export type ParticipantLayout = (Layout | StopStream | RequestKeyFrame) & {
|
|
|
54
54
|
*/
|
|
55
55
|
streamName?: string;
|
|
56
56
|
};
|
|
57
|
+
/**
|
|
58
|
+
* Запрос стрима, который клиент хочет получать для отображения.
|
|
59
|
+
*/
|
|
60
|
+
export type DisplayLayoutRequest = {
|
|
61
|
+
/**
|
|
62
|
+
* Внешний ID пользователя
|
|
63
|
+
*/
|
|
64
|
+
uid: ExternalParticipantId | string;
|
|
65
|
+
/**
|
|
66
|
+
* Тип медиа (видео с камеры, картинка с экрана, лайв или мувик)
|
|
67
|
+
*/
|
|
68
|
+
mediaType: MediaType;
|
|
69
|
+
/**
|
|
70
|
+
* Ширина окошка в котором отображается видео, в пикселях
|
|
71
|
+
*/
|
|
72
|
+
width: number;
|
|
73
|
+
/**
|
|
74
|
+
* Высота окошка в котором отображается видео, в пикселях
|
|
75
|
+
*/
|
|
76
|
+
height: number;
|
|
77
|
+
/**
|
|
78
|
+
* Отображать видео как CSS object-fit: cover. По умолчанию используется contain.
|
|
79
|
+
*/
|
|
80
|
+
cover?: boolean;
|
|
81
|
+
/**
|
|
82
|
+
* Приоритет
|
|
83
|
+
*/
|
|
84
|
+
priority?: number;
|
|
85
|
+
/**
|
|
86
|
+
* ID лайва или мувика. null для камеры или скрин-шары.
|
|
87
|
+
*/
|
|
88
|
+
streamName?: string;
|
|
89
|
+
};
|
|
57
90
|
export default ParticipantLayout;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { AnimojiVersion } from '@vkontakte/calls-vmoji';
|
|
2
|
-
import
|
|
2
|
+
import TransportTopology from '../enums/TransportTopology';
|
|
3
3
|
import ChatRoomEventType from '../enums/ChatRoomEventType';
|
|
4
4
|
import ConversationFeature from '../enums/ConversationFeature';
|
|
5
5
|
import ConversationOption from '../enums/ConversationOption';
|
|
@@ -190,6 +190,7 @@ declare namespace SignalingMessage {
|
|
|
190
190
|
deviceIdx?: number;
|
|
191
191
|
peerId: PeerId;
|
|
192
192
|
reason: HangupType;
|
|
193
|
+
errorCode?: string;
|
|
193
194
|
markers?: ParticipantListMarkers;
|
|
194
195
|
}
|
|
195
196
|
export interface ClosedConversation extends Notification {
|
|
@@ -366,6 +367,9 @@ declare namespace SignalingMessage {
|
|
|
366
367
|
export interface Connection extends Notification {
|
|
367
368
|
endpoint: string;
|
|
368
369
|
conversation: Conversation;
|
|
370
|
+
conversationParams: {
|
|
371
|
+
serverTime: number;
|
|
372
|
+
};
|
|
369
373
|
isConcurrent: boolean;
|
|
370
374
|
peerId: PeerId;
|
|
371
375
|
mediaModifiers: MediaModifiers;
|
package/types/Statistics.d.ts
CHANGED
package/types/WebTransport.d.ts
CHANGED
|
@@ -7,6 +7,8 @@ declare class WebTransportEventual {
|
|
|
7
7
|
private readonly url;
|
|
8
8
|
private readonly options;
|
|
9
9
|
private readonly compression;
|
|
10
|
+
private closeRequested;
|
|
11
|
+
private closeEventEmitted;
|
|
10
12
|
private encoder;
|
|
11
13
|
private decoder;
|
|
12
14
|
onopen: ((this: WebTransportEventual, ev: Event) => any) | null;
|
|
@@ -22,6 +24,8 @@ declare class WebTransportEventual {
|
|
|
22
24
|
send(data: string): Promise<void>;
|
|
23
25
|
private createErrorEvent;
|
|
24
26
|
close(code?: number, reason?: string): void;
|
|
27
|
+
private closeConnectedTransport;
|
|
28
|
+
private emitClose;
|
|
25
29
|
static isBrowserSupported(): boolean;
|
|
26
30
|
}
|
|
27
31
|
export { WebTransportEventual as WebTransport };
|
package/utils/DebugStorage.d.ts
CHANGED
|
@@ -95,10 +95,9 @@ export type DebugLogGetParams = {
|
|
|
95
95
|
};
|
|
96
96
|
export declare function add(level: string, args: any[], sessionId?: string): CurrentLogItem;
|
|
97
97
|
export declare function init(): void;
|
|
98
|
-
export declare function
|
|
98
|
+
export declare function startConversationSession(): string;
|
|
99
99
|
export declare function setConversationId(conversationId: string | null, sessionId?: string): void;
|
|
100
100
|
export declare function list(): Promise<DebugLogSessionInfo[]>;
|
|
101
|
-
export declare function getCurrentSession(): Promise<DebugLogSessionInfo | null>;
|
|
102
101
|
export declare function get(params: DebugLogGetParams): Promise<CurrentLogItem[]>;
|
|
103
102
|
export declare function getJson(params: DebugLogGetParams): Promise<string>;
|
|
104
103
|
export declare function download(params: DebugLogGetParams): Promise<string>;
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import HangupReason from '../HangupReason';
|
|
2
|
-
import { TransportTopology } from '../transport/Transport';
|
|
3
|
-
/**
|
|
4
|
-
* Класс для работы с событийными метриками, обертка для правильной отправки событий
|
|
5
|
-
*/
|
|
6
|
-
export declare class EventMetricsService {
|
|
7
|
-
private static correctHangupReason;
|
|
8
|
-
static sendHangupEvent(reason: HangupReason, topology?: TransportTopology): void;
|
|
9
|
-
}
|