@vkontakte/calls-sdk 2.7.2-dev.876005f.0 → 2.7.2-dev.afeedc6.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 +3 -3
- package/abstract/BaseSignaling.d.ts +1 -1
- package/calls-sdk.cjs.js +8 -8
- package/calls-sdk.esm.js +8 -8
- package/classes/Conversation.d.ts +10 -1
- package/classes/transport/ServerTransport.d.ts +2 -3
- package/classes/transport/Statistics.d.ts +12 -0
- package/default/Signaling.d.ts +1 -1
- package/package.json +2 -2
- package/static/External.d.ts +4 -2
- package/static/Params.d.ts +9 -1
- package/types/Conversation.d.ts +1 -1
- package/types/Room.d.ts +4 -0
- package/types/SignalingMessage.d.ts +4 -0
|
@@ -32,6 +32,7 @@ export type ParticipantUpdateInfo = {
|
|
|
32
32
|
streamId: string;
|
|
33
33
|
rtpTimestamp: number | null;
|
|
34
34
|
sequenceNumber: number;
|
|
35
|
+
fastScreenShare: boolean;
|
|
35
36
|
};
|
|
36
37
|
export default class Conversation extends EventEmitter {
|
|
37
38
|
private readonly _api;
|
|
@@ -155,6 +156,13 @@ export default class Conversation extends EventEmitter {
|
|
|
155
156
|
* @hidden
|
|
156
157
|
*/
|
|
157
158
|
private _processRecordInfos;
|
|
159
|
+
/**
|
|
160
|
+
* Обрабатывает информацию об адмниских пинах в основном и сессионных залах
|
|
161
|
+
* @param connection
|
|
162
|
+
* @private
|
|
163
|
+
* @hidden
|
|
164
|
+
*/
|
|
165
|
+
private _processPinnedParticipants;
|
|
158
166
|
private _allocateTransport;
|
|
159
167
|
private _createSpeakerDetector;
|
|
160
168
|
private _createSpecListener;
|
|
@@ -220,7 +228,7 @@ export default class Conversation extends EventEmitter {
|
|
|
220
228
|
requestAsr(request: boolean): Promise<void>;
|
|
221
229
|
muteParticipant(participantId: ParticipantId | null, muteStates: MuteStates, requestedMedia?: MediaOption[], roomId?: number | null): Promise<void>;
|
|
222
230
|
enableFeatureForRoles(feature: ConversationFeature, roles: UserRole[]): Promise<void>;
|
|
223
|
-
pinParticipant(participantId: ParticipantId, unpin: boolean): Promise<void>;
|
|
231
|
+
pinParticipant(participantId: ParticipantId, unpin: boolean, roomId?: number | null): Promise<void>;
|
|
224
232
|
updateMediaModifiers(mediaModifiers: MediaModifiers): Promise<void>;
|
|
225
233
|
changeOptions(changes: {
|
|
226
234
|
[key in ConversationOption]?: boolean;
|
|
@@ -287,6 +295,7 @@ export default class Conversation extends EventEmitter {
|
|
|
287
295
|
private _onChatMessage;
|
|
288
296
|
private _onCustomData;
|
|
289
297
|
private _onRecordInfo;
|
|
298
|
+
private _changePinnedParticipantForRoom;
|
|
290
299
|
_changeRecordInfoForRoom(): Promise<void>;
|
|
291
300
|
private _onParticipantAnimojiChanged;
|
|
292
301
|
private _onAsrInfo;
|
|
@@ -2,7 +2,6 @@ import type { AnimojiSvgData } from '@vkontakte/calls-vmoji';
|
|
|
2
2
|
import BaseSignaling from '../../abstract/BaseSignaling';
|
|
3
3
|
import { ParticipantId } from '../../types/Participant';
|
|
4
4
|
import ServerSettings from '../../types/ServerSettings';
|
|
5
|
-
import SignalingMessage from '../../types/SignalingMessage';
|
|
6
5
|
import EventEmitter from '../EventEmitter';
|
|
7
6
|
import { MediaSource } from '../MediaSource';
|
|
8
7
|
import { TransportState } from './Transport';
|
|
@@ -83,8 +82,8 @@ export default class ServerTransport extends EventEmitter {
|
|
|
83
82
|
private _detectStaleTracks;
|
|
84
83
|
private _allocateConsumer;
|
|
85
84
|
private _acceptProducer;
|
|
86
|
-
private
|
|
87
|
-
_onSignalingNotification
|
|
85
|
+
private _handleTracks;
|
|
86
|
+
private _onSignalingNotification;
|
|
88
87
|
private _onAsrTranscription;
|
|
89
88
|
private _onProducerUpdated;
|
|
90
89
|
private _onAddTrack;
|
|
@@ -6,7 +6,19 @@ export type StatTransport = {
|
|
|
6
6
|
currentRoundTripTime: number;
|
|
7
7
|
bytesSent: number;
|
|
8
8
|
bytesReceived: number;
|
|
9
|
+
local?: ILocalIceCandidateStat;
|
|
10
|
+
remote?: IRemoteIceCandidateStat;
|
|
9
11
|
};
|
|
12
|
+
export interface IRemoteIceCandidateStat {
|
|
13
|
+
type: RTCIceCandidateType;
|
|
14
|
+
address: string;
|
|
15
|
+
port: number;
|
|
16
|
+
protocol: string;
|
|
17
|
+
}
|
|
18
|
+
export interface ILocalIceCandidateStat extends IRemoteIceCandidateStat {
|
|
19
|
+
relayProtocol: string;
|
|
20
|
+
networkType: RTCNetworkType;
|
|
21
|
+
}
|
|
10
22
|
export type StatRtp = {
|
|
11
23
|
ssrc: number;
|
|
12
24
|
type: string;
|
package/default/Signaling.d.ts
CHANGED
|
@@ -126,7 +126,7 @@ export default class Signaling extends BaseSignaling {
|
|
|
126
126
|
grantRoles(participantId: CompositeUserId, roles: UserRole[], revoke: boolean): Promise<SignalingMessage>;
|
|
127
127
|
muteParticipant(participantId: ParticipantId | null, muteStates: MuteStates, requestedMedia: MediaOption[], roomId?: number | null): Promise<SignalingMessage>;
|
|
128
128
|
enableFeatureForRoles(feature: ConversationFeature, roles: UserRole[]): Promise<SignalingMessage>;
|
|
129
|
-
pinParticipant(participantId: ParticipantId, unpin: boolean): Promise<SignalingMessage>;
|
|
129
|
+
pinParticipant(participantId: ParticipantId, unpin: boolean, roomId: number | null): Promise<SignalingMessage>;
|
|
130
130
|
updateMediaModifiers(mediaModifiers: MediaModifiers): Promise<SignalingMessage>;
|
|
131
131
|
changeOptions(changes: {
|
|
132
132
|
[key in ConversationOption]?: boolean;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vkontakte/calls-sdk",
|
|
3
|
-
"version": "2.7.2-dev.
|
|
3
|
+
"version": "2.7.2-dev.afeedc6.0",
|
|
4
4
|
"author": "vk.com",
|
|
5
5
|
"description": "Library for video calls based on the vk.com platform",
|
|
6
6
|
"homepage": "https://vk.com",
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
],
|
|
16
16
|
"dependencies": {
|
|
17
17
|
"@vkontakte/calls-video-effects": "1.1.4",
|
|
18
|
-
"@vkontakte/calls-vmoji": "1.0.5-beta.
|
|
18
|
+
"@vkontakte/calls-vmoji": "1.0.5-beta.13",
|
|
19
19
|
"@vkontakte/libvpx": "2.0.9",
|
|
20
20
|
"bit-buffer": "0.2.5",
|
|
21
21
|
"messagepack": "1.1.12",
|
package/static/External.d.ts
CHANGED
|
@@ -289,14 +289,16 @@ declare namespace External {
|
|
|
289
289
|
* @param userId Внешний ID пользователя
|
|
290
290
|
* @param unpin Открепить или закрепить
|
|
291
291
|
* @param markers
|
|
292
|
+
* @param roomId ID сессионного зала или ничего в случае основного зала
|
|
292
293
|
*/
|
|
293
|
-
function onPinnedParticipant(userId: ExternalParticipantId, unpin: boolean, markers?: ExternalParticipantListMarkers): void;
|
|
294
|
+
function onPinnedParticipant(userId: ExternalParticipantId, unpin: boolean, markers?: ExternalParticipantListMarkers, roomId?: number | null): void;
|
|
294
295
|
/**
|
|
295
296
|
* Закрепляет/открепляет текущего пользователя у других собеседников
|
|
296
297
|
*
|
|
297
298
|
* @param unpin Открепить или закрепить
|
|
299
|
+
* @param roomId ID сессионного зала или ничего в случае основного зала
|
|
298
300
|
*/
|
|
299
|
-
function onLocalPin(unpin: boolean): void;
|
|
301
|
+
function onLocalPin(unpin: boolean, roomId?: number | null): void;
|
|
300
302
|
/**
|
|
301
303
|
* Изменились опции звонка
|
|
302
304
|
*
|
package/static/Params.d.ts
CHANGED
|
@@ -152,6 +152,12 @@ export type ParamsObject = {
|
|
|
152
152
|
* Можно установить позднее методом `setVmoji`
|
|
153
153
|
*/
|
|
154
154
|
vmoji: typeof Vmoji | null;
|
|
155
|
+
/**
|
|
156
|
+
* Настройки отрисовки Vmoji.
|
|
157
|
+
*
|
|
158
|
+
* Экземпляр класса `RenderingOptions` из `@vkontakte/calls-vmoji`
|
|
159
|
+
*/
|
|
160
|
+
vmojiRenderingOptions: Partial<Vmoji.RenderingOptions> | null;
|
|
155
161
|
iceRestartWaitTime: number;
|
|
156
162
|
transportConnectionWaitTime: number;
|
|
157
163
|
/**
|
|
@@ -518,7 +524,7 @@ export type ParamsObject = {
|
|
|
518
524
|
/**
|
|
519
525
|
* Закрепляет/открепляет собеседника для всех
|
|
520
526
|
*/
|
|
521
|
-
onPinnedParticipant?: (userId: ExternalParticipantId, unpin: boolean, markers?: ExternalParticipantListMarkers) => void;
|
|
527
|
+
onPinnedParticipant?: (userId: ExternalParticipantId, unpin: boolean, markers?: ExternalParticipantListMarkers, roomId?: number | null) => void;
|
|
522
528
|
/**
|
|
523
529
|
* Закрепляет/открепляет текущего пользователя у других собеседников
|
|
524
530
|
*/
|
|
@@ -745,6 +751,8 @@ export default abstract class Params {
|
|
|
745
751
|
static get useVmoji(): boolean;
|
|
746
752
|
static get vmoji(): typeof Vmoji | null;
|
|
747
753
|
static set vmoji(value: typeof Vmoji | null);
|
|
754
|
+
static get vmojiRenderingOptions(): Partial<Vmoji.RenderingOptions>;
|
|
755
|
+
static set vmojiRenderingOptions(value: Partial<Vmoji.RenderingOptions> | null);
|
|
748
756
|
static get voiceParams(): {
|
|
749
757
|
[key: string]: number;
|
|
750
758
|
};
|
package/types/Conversation.d.ts
CHANGED
|
@@ -63,7 +63,7 @@ export type ConversationData = {
|
|
|
63
63
|
*/
|
|
64
64
|
joinLink?: string;
|
|
65
65
|
/** @hidden */
|
|
66
|
-
|
|
66
|
+
pinnedParticipantIdByRoom: Map<number | null, ParticipantId | null>;
|
|
67
67
|
mediaModifiers: MediaModifiers;
|
|
68
68
|
options: ConversationOption[];
|
|
69
69
|
muteStates: Map<number | null, MuteStates>;
|
package/types/Room.d.ts
CHANGED
|
@@ -8,6 +8,7 @@ import ParticipantState from '../enums/ParticipantState';
|
|
|
8
8
|
import RoomsEventType from '../enums/RoomsEventType';
|
|
9
9
|
import UserRole from '../enums/UserRole';
|
|
10
10
|
import UserType from '../enums/UserType';
|
|
11
|
+
import { AsrInfo } from './Asr';
|
|
11
12
|
import { IFeaturesPerRole } from './ConversationFeature';
|
|
12
13
|
import { IFeedback } from './Feedback';
|
|
13
14
|
import MediaModifiers from './MediaModifiers';
|
|
@@ -80,6 +81,7 @@ declare namespace SignalingMessage {
|
|
|
80
81
|
pinnedParticipantId: ParticipantId | null;
|
|
81
82
|
options: ConversationOption[];
|
|
82
83
|
muteStates?: MuteStates;
|
|
84
|
+
asrInfo?: AsrInfo;
|
|
83
85
|
}
|
|
84
86
|
export interface Room extends SignalingMessage {
|
|
85
87
|
id?: number;
|
|
@@ -94,6 +96,7 @@ declare namespace SignalingMessage {
|
|
|
94
96
|
timeoutMs?: number;
|
|
95
97
|
muteStates?: MuteStates;
|
|
96
98
|
recordInfo?: RecordInfo;
|
|
99
|
+
pinnedParticipantId?: CompositeUserId;
|
|
97
100
|
}
|
|
98
101
|
interface Notification extends SignalingMessage {
|
|
99
102
|
type?: string;
|
|
@@ -176,6 +179,7 @@ declare namespace SignalingMessage {
|
|
|
176
179
|
export interface PinParticipant extends Notification {
|
|
177
180
|
participantId: ParticipantId;
|
|
178
181
|
unpin?: boolean;
|
|
182
|
+
roomId?: number;
|
|
179
183
|
}
|
|
180
184
|
export interface ParticipantAdded extends Notification {
|
|
181
185
|
callerId: OkUserId;
|