@vkontakte/calls-sdk 2.8.5-dev.70c56a40.0 → 2.8.5-dev.7186ce24.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 +40 -12
- package/abstract/BaseApi.d.ts +1 -1
- package/abstract/BaseSignaling.d.ts +5 -4
- package/calls-sdk.cjs.js +8 -8
- package/calls-sdk.esm.js +8 -8
- package/classes/Conversation.d.ts +20 -7
- package/classes/Logger.d.ts +3 -0
- package/classes/MediaSource.d.ts +13 -5
- package/classes/ProducerCommandSerializationService.d.ts +2 -0
- package/classes/codec/IDecoder.d.ts +1 -1
- package/classes/codec/LibVPxDecoder.d.ts +1 -1
- package/classes/codec/LibVPxEncoder.d.ts +0 -3
- package/classes/codec/WebCodecsDecoder.d.ts +1 -1
- package/classes/screenshare/StreamBuilder.d.ts +1 -0
- package/classes/transport/DirectStatReporter.d.ts +2 -1
- package/classes/transport/DirectTransport.d.ts +7 -0
- package/classes/transport/Transport.d.ts +2 -1
- package/default/Api.d.ts +1 -1
- package/default/Signaling.d.ts +5 -4
- package/enums/ConversationOption.d.ts +2 -1
- package/enums/SignalingCommandType.d.ts +3 -1
- package/enums/SignalingNotification.d.ts +3 -1
- package/package.json +3 -2
- package/static/ApiTransport.d.ts +0 -1
- package/static/External.d.ts +12 -2
- package/static/Params.d.ts +34 -30
- package/static/Utils.d.ts +3 -3
- package/static/WebRTCUtils.d.ts +6 -2
- package/types/EnableVideoSuspendSuggest.d.ts +3 -0
- package/types/Participant.d.ts +5 -0
- package/types/SignalingMessage.d.ts +21 -0
- package/types/Streams.d.ts +0 -1
- package/types/VideoSettings.d.ts +1 -1
- package/utils/Conversation.d.ts +3 -1
package/static/Utils.d.ts
CHANGED
|
@@ -7,8 +7,8 @@ export declare const PARAMETERS_SEPARATOR = ":";
|
|
|
7
7
|
export declare const DEVICE_IDX_PARAMETER = "d";
|
|
8
8
|
/** @hidden */
|
|
9
9
|
declare namespace Utils {
|
|
10
|
-
function patchLocalSDP(sdp: string, preferH264: boolean,
|
|
11
|
-
function patchRemoteSDP(sdp: string, oldDataChannelDescription: boolean, preferH264: boolean, brokenH264: boolean, preferVP9: boolean, brokenVP9Encoder: boolean): string;
|
|
10
|
+
function patchLocalSDP(sdp: string, preferH264: boolean, brokenH264Decoder: boolean, preferVP9: boolean, h264spsPpsIdrInKeyframe: boolean, isAudioNack?: boolean, preferRed?: boolean): string;
|
|
11
|
+
function patchRemoteSDP(sdp: string, oldDataChannelDescription: boolean, preferH264: boolean, brokenH264: boolean, preferVP9: boolean, brokenVP9Encoder: boolean, brokenVP9Decoder: boolean): string;
|
|
12
12
|
function getPeerIdString(peerId: SignalingMessage.PeerId): string;
|
|
13
13
|
function comparePeerId(peerId1: SignalingMessage.PeerId, peerId2: SignalingMessage.PeerId): boolean;
|
|
14
14
|
function getPeerConnectionHostInfo(pc: RTCPeerConnection): Promise<{
|
|
@@ -31,7 +31,7 @@ declare namespace Utils {
|
|
|
31
31
|
deviceIdx: number;
|
|
32
32
|
};
|
|
33
33
|
function uuid(): string;
|
|
34
|
-
function
|
|
34
|
+
function debounce(func: Function, ms: number): (this: any) => void;
|
|
35
35
|
function sdpFingerprint(sdp: string): bigint | null;
|
|
36
36
|
function delay(time: number): Promise<unknown>;
|
|
37
37
|
function applySettings(pc: RTCPeerConnection, videoSettings: VideoSettings, prevSettings: any): any;
|
package/static/WebRTCUtils.d.ts
CHANGED
|
@@ -121,13 +121,17 @@ declare namespace WebRTCUtils {
|
|
|
121
121
|
*/
|
|
122
122
|
function isScreenCapturingSupported(): boolean;
|
|
123
123
|
/**
|
|
124
|
-
* В некоторых браузерах H264 сломан
|
|
124
|
+
* В некоторых браузерах H264 decoder сломан
|
|
125
125
|
*/
|
|
126
|
-
function
|
|
126
|
+
function isBrokenH264Decoder(): boolean;
|
|
127
127
|
/**
|
|
128
128
|
* В некоторых браузерах VP9 encoder сломан
|
|
129
129
|
*/
|
|
130
130
|
function isBrokenVP9Encoder(): boolean;
|
|
131
|
+
/**
|
|
132
|
+
* В некоторых браузерах VP9 decoder сломан
|
|
133
|
+
*/
|
|
134
|
+
function isBrokenVP9Decoder(): boolean;
|
|
131
135
|
/**
|
|
132
136
|
* Изменился формат описания датаканала в SDP
|
|
133
137
|
* @link https://blog.mozilla.org/webrtc/how-to-avoid-data-channel-breaking/
|
package/types/Participant.d.ts
CHANGED
|
@@ -44,6 +44,11 @@ export interface ParticipantStateMapped {
|
|
|
44
44
|
ts: number;
|
|
45
45
|
};
|
|
46
46
|
}
|
|
47
|
+
export type ParticipantsStateList = {
|
|
48
|
+
externalId: ExternalParticipantId;
|
|
49
|
+
participantState: ParticipantStateMapped;
|
|
50
|
+
markers: ExternalParticipantListMarkers | null;
|
|
51
|
+
}[];
|
|
47
52
|
export interface Participant {
|
|
48
53
|
/**
|
|
49
54
|
* string representation
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { AnimojiVersion } from '@vkontakte/calls-vmoji';
|
|
1
2
|
import { TransportTopology } from '../classes/transport/Transport';
|
|
2
3
|
import ChatRoomEventType from '../enums/ChatRoomEventType';
|
|
3
4
|
import ConversationFeature from '../enums/ConversationFeature';
|
|
@@ -5,6 +6,7 @@ import ConversationOption from '../enums/ConversationOption';
|
|
|
5
6
|
import FatalError from '../enums/FatalError';
|
|
6
7
|
import HangupType from '../enums/HangupType';
|
|
7
8
|
import MediaOption from '../enums/MediaOption';
|
|
9
|
+
import MuteState from '../enums/MuteState';
|
|
8
10
|
import ParticipantState from '../enums/ParticipantState';
|
|
9
11
|
import RoomsEventType from '../enums/RoomsEventType';
|
|
10
12
|
import SignalingCommandType from '../enums/SignalingCommandType';
|
|
@@ -162,6 +164,7 @@ declare namespace SignalingMessage {
|
|
|
162
164
|
data: {
|
|
163
165
|
candidate?: RTCIceCandidateInit;
|
|
164
166
|
sdp?: Required<RTCSessionDescriptionInit>;
|
|
167
|
+
animojiVersion?: AnimojiVersion;
|
|
165
168
|
};
|
|
166
169
|
}
|
|
167
170
|
export interface RegisteredPeer extends Notification {
|
|
@@ -210,6 +213,17 @@ declare namespace SignalingMessage {
|
|
|
210
213
|
};
|
|
211
214
|
markers?: ParticipantListMarkers;
|
|
212
215
|
}
|
|
216
|
+
export interface ParticipantsStateChanged extends Notification {
|
|
217
|
+
participants: {
|
|
218
|
+
id: CompositeUserId;
|
|
219
|
+
participantState?: {
|
|
220
|
+
state: Record<string, string>;
|
|
221
|
+
stateUpdateTs: Record<string, number>;
|
|
222
|
+
};
|
|
223
|
+
markers?: ParticipantListMarkers;
|
|
224
|
+
}[];
|
|
225
|
+
roomId?: IRoomId;
|
|
226
|
+
}
|
|
213
227
|
export interface RolesChanged extends Notification {
|
|
214
228
|
adminId: ParticipantId;
|
|
215
229
|
participantId: ParticipantId;
|
|
@@ -319,6 +333,8 @@ declare namespace SignalingMessage {
|
|
|
319
333
|
mediaModifiers: MediaModifiers;
|
|
320
334
|
conversation: Conversation;
|
|
321
335
|
participants?: ParticipantListChunk;
|
|
336
|
+
muteState?: MuteState;
|
|
337
|
+
muteOptions?: MediaOption[];
|
|
322
338
|
}
|
|
323
339
|
export interface ChatRoomUpdated extends Notification {
|
|
324
340
|
eventType: ChatRoomEventType;
|
|
@@ -355,6 +371,8 @@ declare namespace SignalingMessage {
|
|
|
355
371
|
rooms: Room[];
|
|
356
372
|
roomId?: number;
|
|
357
373
|
};
|
|
374
|
+
muteState?: MuteState;
|
|
375
|
+
muteOptions?: MediaOption[];
|
|
358
376
|
}
|
|
359
377
|
export interface Feedback extends Notification {
|
|
360
378
|
feedback: IFeedback[];
|
|
@@ -427,6 +445,9 @@ declare namespace SignalingMessage {
|
|
|
427
445
|
decorativeParticipantId?: CompositeUserId;
|
|
428
446
|
decorativeExternalParticipantId?: ExternalId;
|
|
429
447
|
}
|
|
448
|
+
export interface VideoSuspendSuggest extends Notification {
|
|
449
|
+
bandwidth: number;
|
|
450
|
+
}
|
|
430
451
|
export {};
|
|
431
452
|
}
|
|
432
453
|
export default SignalingMessage;
|
package/types/Streams.d.ts
CHANGED
package/types/VideoSettings.d.ts
CHANGED
|
@@ -19,7 +19,7 @@ export type VideoSettings = {
|
|
|
19
19
|
* Настройка деградации - понижаем фпс или разрешение
|
|
20
20
|
* https://www.w3.org/TR/mst-content-hint/#dom-rtcdegradationpreference
|
|
21
21
|
*/
|
|
22
|
-
degradationPreference:
|
|
22
|
+
degradationPreference: RTCDegradationPreference;
|
|
23
23
|
/**
|
|
24
24
|
* Настройка временных слоев
|
|
25
25
|
* https://www.w3.org/TR/webrtc-svc/
|
package/utils/Conversation.d.ts
CHANGED
|
@@ -1,2 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import MediaOption from '../enums/MediaOption';
|
|
2
|
+
import MuteState from '../enums/MuteState';
|
|
3
|
+
import MuteStates from '../types/MuteStates';
|
|
2
4
|
export declare const getMediaOptionsByMuteState: (muteStates: MuteStates, value: MuteState) => MediaOption[];
|