@vkontakte/calls-sdk 2.8.11-dev.fdf6f999.0 → 2.8.12-beta.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 +12 -24
- package/abstract/BaseApi.d.ts +4 -5
- package/abstract/BaseSignaling.d.ts +3 -4
- package/calls-sdk.cjs.js +9 -11
- package/calls-sdk.esm.js +6147 -5794
- package/classes/CallRegistry.d.ts +26 -0
- package/classes/Conversation.d.ts +48 -31
- package/classes/MediaSource.d.ts +7 -0
- package/classes/SpecListener.d.ts +5 -0
- package/classes/StatsLogger.d.ts +17 -5
- package/classes/codec/WorkerBase.d.ts +2 -0
- package/classes/stat/CallLifecycleStats.d.ts +47 -0
- package/classes/stat/ConversationStats.d.ts +5 -4
- package/classes/stat/FirstMediaSentProbe.d.ts +13 -0
- package/classes/stat/StatPings.d.ts +1 -2
- package/classes/stat/StatSignalingCommands.d.ts +1 -2
- package/classes/transport/BaseTransport.d.ts +7 -1
- package/classes/transport/DirectTransport.d.ts +6 -11
- package/classes/transport/ServerTransport.d.ts +1 -15
- package/classes/transport/Transport.d.ts +9 -21
- package/default/Api.d.ts +9 -8
- package/default/Signaling.d.ts +2 -0
- package/default/SignalingTransport.d.ts +3 -1
- package/enums/HangupType.d.ts +1 -0
- package/enums/SignalingNotification.d.ts +3 -1
- package/enums/Stat.d.ts +6 -1
- package/package.json +1 -1
- package/static/Capabilities.d.ts +5 -0
- package/static/External.d.ts +143 -76
- package/static/Params.d.ts +103 -100
- package/static/ParticipantConnectionStatusUtils.d.ts +16 -0
- package/types/Capabilities.d.ts +24 -0
- package/types/Conversation.d.ts +12 -2
- package/types/ExternalId.d.ts +1 -1
- package/types/Participant.d.ts +12 -1
- package/types/PushData.d.ts +3 -0
- package/types/SignalingMessage.d.ts +14 -1
- package/types/Statistics.d.ts +0 -4
- package/types/WebTransport.d.ts +3 -1
- package/static/DebugVideoStats.d.ts +0 -37
- package/types/VideoStreamDebug.d.ts +0 -5
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/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;
|
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;
|
|
@@ -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'>>)[];
|
|
@@ -323,6 +325,13 @@ declare namespace SignalingMessage {
|
|
|
323
325
|
export interface SpeakerChanged extends Notification {
|
|
324
326
|
speaker: ParticipantId;
|
|
325
327
|
}
|
|
328
|
+
export interface SessionState extends Notification {
|
|
329
|
+
connected: boolean;
|
|
330
|
+
participantId: OkUserId;
|
|
331
|
+
participantType: UserType;
|
|
332
|
+
deviceIdx?: number;
|
|
333
|
+
markers?: ParticipantListMarkers;
|
|
334
|
+
}
|
|
326
335
|
export interface OptionsChanged extends Notification {
|
|
327
336
|
options: ConversationOption[];
|
|
328
337
|
}
|
|
@@ -456,6 +465,10 @@ declare namespace SignalingMessage {
|
|
|
456
465
|
export interface VideoSuspendSuggest extends Notification {
|
|
457
466
|
bandwidth: number;
|
|
458
467
|
}
|
|
468
|
+
export interface Hold extends Notification {
|
|
469
|
+
participantId: ParticipantId;
|
|
470
|
+
hold: boolean;
|
|
471
|
+
}
|
|
459
472
|
export {};
|
|
460
473
|
}
|
|
461
474
|
export default SignalingMessage;
|
package/types/Statistics.d.ts
CHANGED
|
@@ -113,10 +113,6 @@ export interface StatRtp extends StatRtpOutboundVideo {
|
|
|
113
113
|
* Идентификатор пользователя, связанный с этим потоком
|
|
114
114
|
*/
|
|
115
115
|
userId?: string;
|
|
116
|
-
/**
|
|
117
|
-
* Идентификатор media track, связанный с этим RTP потоком
|
|
118
|
-
*/
|
|
119
|
-
trackId?: string;
|
|
120
116
|
/**
|
|
121
117
|
* Пропускная способность в битах в секунду
|
|
122
118
|
*/
|
package/types/WebTransport.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { WebTransportOptions } from '@fails-components/webtransport';
|
|
2
|
+
import { DebugLogger } from '../static/Debug';
|
|
2
3
|
declare class WebTransportEventual {
|
|
3
4
|
private webTransport;
|
|
4
5
|
private stream;
|
|
@@ -11,12 +12,13 @@ declare class WebTransportEventual {
|
|
|
11
12
|
private closeEventEmitted;
|
|
12
13
|
private encoder;
|
|
13
14
|
private decoder;
|
|
15
|
+
private readonly _debug;
|
|
14
16
|
onopen: ((this: WebTransportEventual, ev: Event) => any) | null;
|
|
15
17
|
onmessage: ((this: WebTransportEventual, ev: MessageEvent) => any) | null;
|
|
16
18
|
onerror: ((this: WebTransportEventual, ev: Event) => any) | null;
|
|
17
19
|
onclose: ((this: WebTransportEventual, ev: CloseEvent) => any) | null;
|
|
18
20
|
readyState: number;
|
|
19
|
-
constructor(url: string, options?: WebTransportOptions);
|
|
21
|
+
constructor(url: string, options?: WebTransportOptions, debug?: DebugLogger);
|
|
20
22
|
private getCompressionTypeFromUrl;
|
|
21
23
|
private connect;
|
|
22
24
|
private readChunks;
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
import { ExternalParticipantId } from '../types/ExternalId';
|
|
2
|
-
import type { MediaType } from '../types/ParticipantStreamDescription';
|
|
3
|
-
export declare const enum VideoStreamDebugDirection {
|
|
4
|
-
INBOUND = "inbound",
|
|
5
|
-
OUTBOUND = "outbound"
|
|
6
|
-
}
|
|
7
|
-
export type VideoStreamDebugData = {
|
|
8
|
-
mediaType: MediaType.CAMERA | MediaType.SCREEN;
|
|
9
|
-
direction: VideoStreamDebugDirection;
|
|
10
|
-
externalParticipantId: ExternalParticipantId;
|
|
11
|
-
trackId?: string;
|
|
12
|
-
mimeType?: string;
|
|
13
|
-
width?: number;
|
|
14
|
-
height?: number;
|
|
15
|
-
frameRate?: number;
|
|
16
|
-
bitrate?: number;
|
|
17
|
-
packetsLost?: number;
|
|
18
|
-
screenShareMethod?: string;
|
|
19
|
-
layers?: VideoStreamDebugLayer[];
|
|
20
|
-
};
|
|
21
|
-
export type VideoStreamDebugLayer = {
|
|
22
|
-
rid?: string;
|
|
23
|
-
ssrc?: number;
|
|
24
|
-
trackId?: string;
|
|
25
|
-
mimeType?: string;
|
|
26
|
-
width?: number;
|
|
27
|
-
height?: number;
|
|
28
|
-
frameRate?: number;
|
|
29
|
-
bitrate?: number;
|
|
30
|
-
packetsLost?: number;
|
|
31
|
-
};
|
|
32
|
-
declare namespace DebugVideoStats {
|
|
33
|
-
function format(data: VideoStreamDebugData): string;
|
|
34
|
-
function send(data: VideoStreamDebugData): void;
|
|
35
|
-
function clear(externalParticipantId: ExternalParticipantId, mediaType: MediaType.CAMERA | MediaType.SCREEN): void;
|
|
36
|
-
}
|
|
37
|
-
export default DebugVideoStats;
|