@vkontakte/calls-sdk 2.8.11-dev.aeebd796.0 → 2.8.11-dev.b9508cee.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 +29 -38
- package/abstract/BaseApi.d.ts +5 -8
- package/abstract/BaseSignaling.d.ts +5 -7
- package/calls-sdk.cjs.js +9 -9
- package/calls-sdk.esm.js +4625 -3776
- package/classes/AudioFix.d.ts +5 -1
- package/classes/AudioOutput.d.ts +5 -1
- package/classes/CallRegistry.d.ts +26 -0
- package/classes/Conversation.d.ts +45 -13
- 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 +12 -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 +10 -1
- package/classes/{Logger.d.ts → StatsLogger.d.ts} +3 -13
- 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 +12 -1
- package/classes/transport/PerfStatReporter.d.ts +5 -1
- package/classes/transport/ServerTransport.d.ts +10 -2
- package/classes/transport/Transport.d.ts +13 -14
- package/default/Api.d.ts +12 -19
- package/default/Signaling.d.ts +39 -45
- package/default/SignalingTransport.d.ts +68 -0
- package/enums/HangupType.d.ts +2 -1
- package/enums/SignalingNotification.d.ts +3 -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 +146 -71
- package/static/Params.d.ts +106 -78
- package/static/ParticipantConnectionStatusUtils.d.ts +16 -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/ExternalId.d.ts +1 -1
- package/types/FastStart.d.ts +1 -0
- package/types/Participant.d.ts +12 -1
- package/types/ParticipantLayout.d.ts +33 -0
- package/types/PushData.d.ts +3 -0
- package/types/SignalingMessage.d.ts +19 -2
- 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/types/ExternalId.d.ts
CHANGED
|
@@ -18,7 +18,7 @@ export type ExternalUserId = string;
|
|
|
18
18
|
export declare namespace ExternalIdUtils {
|
|
19
19
|
function fromIds(ids: ExternalUserId[] | ExternalId[]): ExternalId[];
|
|
20
20
|
function fromId(id: ExternalUserId, type?: ExternalIdType, deviceIdx?: number): ExternalParticipantId;
|
|
21
|
-
function fromSignalingParticipant(participant: SignalingMessage.Participant, useDecorative?: boolean): ExternalParticipantId | undefined;
|
|
21
|
+
function fromSignalingParticipant(participant: SignalingMessage.Participant, useDecorative?: boolean, fallbackToNonDecorative?: boolean): ExternalParticipantId | undefined;
|
|
22
22
|
function fromSignaling(signalingId: SignalingMessage.ExternalId, deviceIdx?: number): ExternalParticipantId;
|
|
23
23
|
function toSignaling(externalId: ExternalId): string;
|
|
24
24
|
function toString(externalId: ExternalId): ExternalIdString;
|
package/types/FastStart.d.ts
CHANGED
package/types/Participant.d.ts
CHANGED
|
@@ -44,6 +44,16 @@ export interface ParticipantStateMapped {
|
|
|
44
44
|
ts: number;
|
|
45
45
|
};
|
|
46
46
|
}
|
|
47
|
+
export interface ParticipantSessionState {
|
|
48
|
+
connected: boolean;
|
|
49
|
+
}
|
|
50
|
+
export interface ParticipantConnectionStatus {
|
|
51
|
+
transport: ParticipantStatus;
|
|
52
|
+
sessionState?: ParticipantSessionState;
|
|
53
|
+
sessionStateApplicable: boolean;
|
|
54
|
+
sessionStateConnectedBySpeaker: boolean;
|
|
55
|
+
lastEffective: ParticipantStatus;
|
|
56
|
+
}
|
|
47
57
|
/**
|
|
48
58
|
* Состояния участников звонка
|
|
49
59
|
*/
|
|
@@ -63,7 +73,6 @@ export interface Participant {
|
|
|
63
73
|
externalId: ExternalParticipantId;
|
|
64
74
|
mediaSettings: MediaSettings;
|
|
65
75
|
state: ParticipantState;
|
|
66
|
-
status: ParticipantStatus;
|
|
67
76
|
remoteStream?: MediaStream | null;
|
|
68
77
|
remoteAudioTrack?: MediaStreamTrack | null;
|
|
69
78
|
secondStream?: MediaStream | null;
|
|
@@ -72,6 +81,8 @@ export interface Participant {
|
|
|
72
81
|
clientType: string;
|
|
73
82
|
roles: UserRole[];
|
|
74
83
|
participantState: ParticipantStateMapped;
|
|
84
|
+
isOnHold?: boolean;
|
|
85
|
+
connectionStatus: ParticipantConnectionStatus;
|
|
75
86
|
networkRating: number;
|
|
76
87
|
lastRequestedLayouts: {
|
|
77
88
|
[key: StreamDescriptionString]: ParticipantLayout;
|
|
@@ -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;
|
package/types/PushData.d.ts
CHANGED
|
@@ -1,8 +1,11 @@
|
|
|
1
|
+
import IceServer from './IceServer';
|
|
1
2
|
type PushData = {
|
|
2
3
|
caller_id: string;
|
|
3
4
|
caller_client_type?: string;
|
|
4
5
|
conversation_id: string;
|
|
5
6
|
endpoint: string;
|
|
7
|
+
wt_endpoint?: string;
|
|
8
|
+
turn_server?: IceServer;
|
|
6
9
|
is_video: boolean;
|
|
7
10
|
token: string;
|
|
8
11
|
sdp_offer?: string;
|
|
@@ -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';
|
|
@@ -19,7 +19,7 @@ import MediaModifiers from './MediaModifiers';
|
|
|
19
19
|
import MediaSettings from './MediaSettings';
|
|
20
20
|
import { ISharedMovieInfo, ISharedMovieState, ISharedMovieStoppedInfo } from './MovieShare';
|
|
21
21
|
import MuteStates from './MuteStates';
|
|
22
|
-
import { CompositeUserId, OkUserId, ParticipantId, ParticipantListMarker as ParticipantParticipantListMarker, ParticipantListMarkers, ParticipantListType as ParticipantParticipantListType } from './Participant';
|
|
22
|
+
import { CompositeUserId, OkUserId, ParticipantId, ParticipantListMarker as ParticipantParticipantListMarker, ParticipantListMarkers, ParticipantListType as ParticipantParticipantListType, ParticipantSessionState } from './Participant';
|
|
23
23
|
import { MediaType, ParticipantStreamDescription } from './ParticipantStreamDescription';
|
|
24
24
|
import { IRoomId } from './Room';
|
|
25
25
|
import VideoSettings from './VideoSettings';
|
|
@@ -89,6 +89,7 @@ declare namespace SignalingMessage {
|
|
|
89
89
|
state: Record<string, string>;
|
|
90
90
|
stateUpdateTs: Record<string, number>;
|
|
91
91
|
};
|
|
92
|
+
sessionState?: ParticipantSessionState;
|
|
92
93
|
roles?: UserRole[];
|
|
93
94
|
peerId?: PeerId;
|
|
94
95
|
restricted?: boolean;
|
|
@@ -97,6 +98,7 @@ declare namespace SignalingMessage {
|
|
|
97
98
|
markers?: ParticipantListMarkers;
|
|
98
99
|
observedIds?: CompositeUserId[];
|
|
99
100
|
movieShareInfos?: ISharedMovieInfo[];
|
|
101
|
+
onHold?: boolean;
|
|
100
102
|
}
|
|
101
103
|
export interface ParticipantListChunk extends Notification {
|
|
102
104
|
participants: (Participant & Required<Pick<Participant, 'markers'>>)[];
|
|
@@ -190,6 +192,7 @@ declare namespace SignalingMessage {
|
|
|
190
192
|
deviceIdx?: number;
|
|
191
193
|
peerId: PeerId;
|
|
192
194
|
reason: HangupType;
|
|
195
|
+
errorCode?: string;
|
|
193
196
|
markers?: ParticipantListMarkers;
|
|
194
197
|
}
|
|
195
198
|
export interface ClosedConversation extends Notification {
|
|
@@ -322,6 +325,13 @@ declare namespace SignalingMessage {
|
|
|
322
325
|
export interface SpeakerChanged extends Notification {
|
|
323
326
|
speaker: ParticipantId;
|
|
324
327
|
}
|
|
328
|
+
export interface SessionState extends Notification {
|
|
329
|
+
connected: boolean;
|
|
330
|
+
participantId: OkUserId;
|
|
331
|
+
participantType: UserType;
|
|
332
|
+
deviceIdx?: number;
|
|
333
|
+
markers?: ParticipantListMarkers;
|
|
334
|
+
}
|
|
325
335
|
export interface OptionsChanged extends Notification {
|
|
326
336
|
options: ConversationOption[];
|
|
327
337
|
}
|
|
@@ -366,6 +376,9 @@ declare namespace SignalingMessage {
|
|
|
366
376
|
export interface Connection extends Notification {
|
|
367
377
|
endpoint: string;
|
|
368
378
|
conversation: Conversation;
|
|
379
|
+
conversationParams: {
|
|
380
|
+
serverTime: number;
|
|
381
|
+
};
|
|
369
382
|
isConcurrent: boolean;
|
|
370
383
|
peerId: PeerId;
|
|
371
384
|
mediaModifiers: MediaModifiers;
|
|
@@ -452,6 +465,10 @@ declare namespace SignalingMessage {
|
|
|
452
465
|
export interface VideoSuspendSuggest extends Notification {
|
|
453
466
|
bandwidth: number;
|
|
454
467
|
}
|
|
468
|
+
export interface Hold extends Notification {
|
|
469
|
+
participantId: ParticipantId;
|
|
470
|
+
hold: boolean;
|
|
471
|
+
}
|
|
455
472
|
export {};
|
|
456
473
|
}
|
|
457
474
|
export default SignalingMessage;
|
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
|
-
}
|