@vkontakte/calls-sdk 2.8.5-dev.043879f0.0 → 2.8.5-dev.2b864c42.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 +25 -8
- 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 +12 -6
- package/classes/ProducerCommandSerializationService.d.ts +2 -0
- package/classes/screenshare/StreamBuilder.d.ts +1 -0
- package/classes/transport/DirectStatReporter.d.ts +2 -1
- package/classes/transport/DirectTransport.d.ts +2 -0
- package/classes/transport/Transport.d.ts +2 -1
- package/default/Signaling.d.ts +5 -4
- package/enums/SignalingCommandType.d.ts +3 -1
- package/enums/SignalingNotification.d.ts +3 -1
- package/package.json +2 -2
- package/static/External.d.ts +10 -1
- package/static/Params.d.ts +23 -7
- package/types/EnableVideoSuspendSuggest.d.ts +3 -0
- package/types/Participant.d.ts +5 -0
- package/types/SignalingMessage.d.ts +16 -0
- package/types/Streams.d.ts +0 -1
- package/utils/Conversation.d.ts +3 -1
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import type { IEffect } from '@vkontakte/calls-video-effects';
|
|
2
|
+
import type { RGBTuple } from '@vkontakte/calls-vmoji';
|
|
2
3
|
import BaseApi from '../abstract/BaseApi';
|
|
3
4
|
import BaseLogger from '../abstract/BaseLogger';
|
|
4
|
-
import
|
|
5
|
+
import { AddParticipantParams } from '../abstract/BaseSignaling';
|
|
5
6
|
import CallType from '../enums/CallType';
|
|
6
7
|
import ConversationFeature from '../enums/ConversationFeature';
|
|
7
8
|
import ConversationOption from '../enums/ConversationOption';
|
|
@@ -61,7 +62,7 @@ export default class Conversation extends EventEmitter {
|
|
|
61
62
|
private _cooldownTimestampByStreamDescription;
|
|
62
63
|
private _cooldownQueueCleanupTimer;
|
|
63
64
|
private readonly _statFirstMediaReceived;
|
|
64
|
-
constructor(api: BaseApi,
|
|
65
|
+
constructor(api: BaseApi, externalLogger: BaseLogger | null);
|
|
65
66
|
static current(): Conversation | null;
|
|
66
67
|
static hangupAfterInit(): void;
|
|
67
68
|
static id(): string | null;
|
|
@@ -187,6 +188,7 @@ export default class Conversation extends EventEmitter {
|
|
|
187
188
|
participantId?: ParticipantId | null,
|
|
188
189
|
/** ключ расшифровки svg внешнего пользователя или кастомный ключ, не требуется для незашифрованных svg */
|
|
189
190
|
decryptionKey?: string | null): void;
|
|
191
|
+
setAnimojiFill(fill: RGBTuple | string): void;
|
|
190
192
|
setVideoStream(stream: MediaStream, isScreen?: boolean): Promise<void>;
|
|
191
193
|
setAudioStream(stream: MediaStream): Promise<void>;
|
|
192
194
|
toggleLocalVideo(enabled: boolean): Promise<void>;
|
|
@@ -195,9 +197,8 @@ export default class Conversation extends EventEmitter {
|
|
|
195
197
|
* @deprecated Use updateDisplayLayout instead
|
|
196
198
|
*/
|
|
197
199
|
changePriorities(priorities: ParticipantPriority[]): Promise<void>;
|
|
198
|
-
changeParticipantState(state:
|
|
199
|
-
|
|
200
|
-
}): Promise<void>;
|
|
200
|
+
changeParticipantState(state: Record<string, string>, compositeUserId?: CompositeUserId): Promise<void>;
|
|
201
|
+
putHandsDown(): Promise<void>;
|
|
201
202
|
requestKeyFrame(participantStreamDescription: ParticipantStreamDescription): Promise<void | SignalingMessage>;
|
|
202
203
|
requestTestMode(consumerCommand: string, producerCommand: string): Promise<void>;
|
|
203
204
|
updateDisplayLayout(layouts: ParticipantLayout[]): Promise<void>;
|
|
@@ -236,6 +237,7 @@ export default class Conversation extends EventEmitter {
|
|
|
236
237
|
pinParticipant(participantId: ParticipantId, unpin: boolean, roomId?: number | null): Promise<void>;
|
|
237
238
|
updateMediaModifiers(mediaModifiers: MediaModifiers): Promise<void>;
|
|
238
239
|
enableVideoSuspend(enabled: boolean): Promise<void>;
|
|
240
|
+
enableVideoSuspendSuggest(enabled: boolean): Promise<void>;
|
|
239
241
|
changeOptions(changes: {
|
|
240
242
|
[key in ConversationOption]?: boolean;
|
|
241
243
|
}): Promise<void>;
|
|
@@ -266,7 +268,7 @@ export default class Conversation extends EventEmitter {
|
|
|
266
268
|
activateRooms(roomIds: number[], deactivate: boolean): Promise<void>;
|
|
267
269
|
switchRoom(toRoomId: number | null, participantId?: ParticipantId): Promise<void>;
|
|
268
270
|
removeRooms(roomIds: number[]): Promise<void>;
|
|
269
|
-
startStream(isRecord?: boolean, name?: string | null, movieId?: string | null, privacy?: 'PUBLIC' | 'FRIENDS' | 'DIRECT_LINK', groupId?: string | null, roomId?: number | null
|
|
271
|
+
startStream(isRecord?: boolean, name?: string | null, movieId?: string | null, privacy?: 'PUBLIC' | 'FRIENDS' | 'DIRECT_LINK', groupId?: string | null, roomId?: number | null): Promise<undefined>;
|
|
270
272
|
stopStream(roomId?: number | null): Promise<undefined>;
|
|
271
273
|
publishStream(roomId?: number | null): Promise<undefined>;
|
|
272
274
|
recordSetConf(king?: ParticipantId, pawns?: ParticipantId[], hideParticipantCount?: boolean, roomId?: number | null): Promise<void>;
|
|
@@ -285,7 +287,9 @@ export default class Conversation extends EventEmitter {
|
|
|
285
287
|
private _onLocalMediaStreamChanged;
|
|
286
288
|
private _onScreenSharingStatus;
|
|
287
289
|
private _changeRemoteMediaSettings;
|
|
290
|
+
private _changeLocalParticipantState;
|
|
288
291
|
private _changeRemoteParticipantState;
|
|
292
|
+
private _changeMultipleParticipantState;
|
|
289
293
|
private _invokeRolesChangedCallbackIfNeeded;
|
|
290
294
|
private _onSignalingNotification;
|
|
291
295
|
private _onPromotionApproved;
|
|
@@ -298,6 +302,7 @@ export default class Conversation extends EventEmitter {
|
|
|
298
302
|
private _onClosedConversation;
|
|
299
303
|
private _onMediaSettingsChanged;
|
|
300
304
|
private _onParticipantStateChanged;
|
|
305
|
+
private _onParticipantsStateChanged;
|
|
301
306
|
private _onNeedRate;
|
|
302
307
|
private _onFeatureSetChanged;
|
|
303
308
|
private _onMultipartyChatCreated;
|
|
@@ -373,6 +378,7 @@ export default class Conversation extends EventEmitter {
|
|
|
373
378
|
/** получили из сингналинга сообщение о реакции пользователей */
|
|
374
379
|
private _onFeedback;
|
|
375
380
|
private _onDecorativeParticipantIdChanged;
|
|
381
|
+
private _onVideoSuspendSuggest;
|
|
376
382
|
private _isMe;
|
|
377
383
|
private _getMuteStatesForRoomId;
|
|
378
384
|
private _getMuteStatesForCurrentRoom;
|
|
@@ -2,6 +2,7 @@ import { NetworkStatReport } from '../types/NetworkStatReport';
|
|
|
2
2
|
import ParticipantLayout, { RequestKeyFrame, StopStream } from '../types/ParticipantLayout';
|
|
3
3
|
import { RequestAsr } from '../types/RequestAsr';
|
|
4
4
|
import { EnableVideoSuspend } from '../types/EnableVideoSuspend';
|
|
5
|
+
import { EnableVideoSuspendSuggest } from '../types/EnableVideoSuspendSuggest';
|
|
5
6
|
import SignalingMessage from '../types/SignalingMessage';
|
|
6
7
|
import { PerfStatReport } from '../types/PerfStatReporter';
|
|
7
8
|
import { SharingStatReport } from './screenshare/SharingStatReport';
|
|
@@ -19,6 +20,7 @@ export declare class ProducerCommandSerializationService {
|
|
|
19
20
|
serializeRequestAsr(sequenceNumber: number, params: RequestAsr): ArrayBuffer;
|
|
20
21
|
serializeNetworkStatReport(sequenceNumber: number, report: NetworkStatReport): ArrayBuffer;
|
|
21
22
|
serializeEnableVideoSuspend(sequenceNumber: number, params: EnableVideoSuspend): ArrayBuffer;
|
|
23
|
+
serializeEnableVideoSuspendSuggest(sequenceNumber: number, params: EnableVideoSuspendSuggest): ArrayBuffer;
|
|
22
24
|
deserializeCommandResponse(data: BufferSource | Blob): Promise<SignalingMessage | undefined>;
|
|
23
25
|
private deserializeUpdateDisplayLayoutResponse;
|
|
24
26
|
private deserializeReportPerfStatResponse;
|
|
@@ -4,6 +4,7 @@ export default class StreamBuilder extends BaseStreamBuilder {
|
|
|
4
4
|
private readonly _renderer;
|
|
5
5
|
private readonly _decoder;
|
|
6
6
|
private _decoderReady;
|
|
7
|
+
private _decoderBusy;
|
|
7
8
|
private _decoderQueue;
|
|
8
9
|
private readonly _fpsMeter;
|
|
9
10
|
constructor(participantId: ParticipantId, onStream: IOnStream, onStat: IOnStat);
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import
|
|
1
|
+
import BaseSignaling from '../../abstract/BaseSignaling';
|
|
2
|
+
import { StatResult } from '../../types/Statistics';
|
|
2
3
|
import EventEmitter from '../EventEmitter';
|
|
3
4
|
import { WeightedAverage } from '../stat/WeightedAverage';
|
|
4
5
|
interface NetworkStat {
|
|
@@ -13,6 +13,7 @@ export default class DirectTransport extends BaseTransport {
|
|
|
13
13
|
private _animojiDataChannel;
|
|
14
14
|
private _animojiReceiver;
|
|
15
15
|
private _animojiSender;
|
|
16
|
+
private _remoteAnimojiVersion;
|
|
16
17
|
private _isOpen;
|
|
17
18
|
private _remotePeerId;
|
|
18
19
|
private _statInterval;
|
|
@@ -49,6 +50,7 @@ export default class DirectTransport extends BaseTransport {
|
|
|
49
50
|
private _addIceCandidate;
|
|
50
51
|
private _setRemoteCandidates;
|
|
51
52
|
private _setRemoteDescription;
|
|
53
|
+
private _processAnimojiProtocolVersion;
|
|
52
54
|
private _onAddTrack;
|
|
53
55
|
private _handleIceCandidate;
|
|
54
56
|
private _onSignalingStateChange;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { AnimojiSvgData } from '@vkontakte/calls-vmoji';
|
|
1
|
+
import type { AnimojiSvgData, RGBTuple } 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';
|
|
@@ -65,6 +65,7 @@ export declare class Transport extends EventEmitter {
|
|
|
65
65
|
getState(): TransportState | undefined;
|
|
66
66
|
getStates(): Record<string, TransportState>;
|
|
67
67
|
setAnimojiSvg(participantId: ParticipantId, svgData: AnimojiSvgData): void;
|
|
68
|
+
setAnimojiFill(fill: RGBTuple | string): void;
|
|
68
69
|
private _setStates;
|
|
69
70
|
private _setLocalState;
|
|
70
71
|
private _onSignalingNotification;
|
package/default/Signaling.d.ts
CHANGED
|
@@ -82,12 +82,11 @@ export default class Signaling extends BaseSignaling {
|
|
|
82
82
|
hangup(reason: string): Promise<SignalingMessage | void>;
|
|
83
83
|
sendCandidate(participantId: ParticipantId, candidate: RTCIceCandidate): Promise<SignalingMessage>;
|
|
84
84
|
requestTestMode(consumerCommand: string, producerCommand: string | null): Promise<SignalingMessage>;
|
|
85
|
-
sendSdp(participantId: ParticipantId, sdp: RTCSessionDescriptionInit): Promise<SignalingMessage>;
|
|
85
|
+
sendSdp(participantId: ParticipantId, sdp: RTCSessionDescriptionInit, extraPayload?: Record<string, any>): Promise<SignalingMessage>;
|
|
86
86
|
acceptCall(mediaSettings: MediaSettings): Promise<SignalingMessage>;
|
|
87
87
|
changeMediaSettings(mediaSettings: MediaSettings): Promise<SignalingMessage>;
|
|
88
|
-
changeParticipantState(state:
|
|
89
|
-
|
|
90
|
-
}): Promise<SignalingMessage>;
|
|
88
|
+
changeParticipantState(state: Record<string, string>, compositeUserId?: CompositeUserId): Promise<SignalingMessage>;
|
|
89
|
+
putHandsDown(): Promise<SignalingMessage>;
|
|
91
90
|
addParticipant(participantId: CompositeUserId, params?: AddParticipantParams): Promise<SignalingMessage>;
|
|
92
91
|
removeParticipant(participantId: CompositeUserId, ban?: boolean): Promise<SignalingMessage>;
|
|
93
92
|
allocateConsumer(description: RTCSessionDescription | null, capabilities: {
|
|
@@ -132,6 +131,7 @@ export default class Signaling extends BaseSignaling {
|
|
|
132
131
|
pinParticipant(participantId: ParticipantId, unpin: boolean, roomId: number | null): Promise<SignalingMessage>;
|
|
133
132
|
updateMediaModifiers(mediaModifiers: MediaModifiers): Promise<SignalingMessage>;
|
|
134
133
|
enableVideoSuspend(enabled: boolean): Promise<SignalingMessage>;
|
|
134
|
+
enableVideoSuspendSuggest(enabled: boolean): Promise<SignalingMessage>;
|
|
135
135
|
changeOptions(changes: {
|
|
136
136
|
[key in ConversationOption]?: boolean;
|
|
137
137
|
}): Promise<SignalingMessage>;
|
|
@@ -154,6 +154,7 @@ export default class Signaling extends BaseSignaling {
|
|
|
154
154
|
readyToSend(isReady?: boolean): void;
|
|
155
155
|
getParticipantListChunk(participantListChunkParameters: ParticipantListChunkParameters): Promise<SignalingMessage>;
|
|
156
156
|
getParticipants(externalIds: SignalingMessage.ExternalId[]): Promise<GetParticipantsSignalingResponse>;
|
|
157
|
+
getPeerId(): number | null;
|
|
157
158
|
startAsr(params: IAsrStartParams): Promise<SignalingMessage>;
|
|
158
159
|
stopAsr(params?: IAsrStopParams): Promise<SignalingMessage>;
|
|
159
160
|
requestAsr(request: boolean): Promise<SignalingMessage>;
|
|
@@ -53,6 +53,8 @@ declare enum SignalingCommandType {
|
|
|
53
53
|
REQUEST_PROMOTION = "request-promotion",
|
|
54
54
|
ACCEPT_PROMOTION = "accept-promotion",
|
|
55
55
|
GET_HAND_QUEUE = "get-hand-queue",
|
|
56
|
-
ENABLE_VIDEO_SUSPEND = "enable-video-suspend"
|
|
56
|
+
ENABLE_VIDEO_SUSPEND = "enable-video-suspend",
|
|
57
|
+
ENABLE_VIDEO_SUSPEND_SUGGEST = "enable-video-suspend-suggest",
|
|
58
|
+
PUT_HANDS_DOWN = "put-hands-down"
|
|
57
59
|
}
|
|
58
60
|
export default SignalingCommandType;
|
|
@@ -7,6 +7,7 @@ declare enum SignalingNotification {
|
|
|
7
7
|
CLOSED_CONVERSATION = "closed-conversation",
|
|
8
8
|
MEDIA_SETTINGS_CHANGED = "media-settings-changed",
|
|
9
9
|
PARTICIPANT_STATE_CHANGED = "participant-state-changed",
|
|
10
|
+
PARTICIPANTS_STATE_CHANGED = "participants-state-changed",
|
|
10
11
|
RATE_CALL_DATA = "rate-call-data",
|
|
11
12
|
FEATURE_SET_CHANGED = "feature-set-changed",
|
|
12
13
|
TOPOLOGY_CHANGED = "topology-changed",
|
|
@@ -48,6 +49,7 @@ declare enum SignalingNotification {
|
|
|
48
49
|
PARTICIPANT_ANIMOJI_CHANGED = "participant-animoji-changed",
|
|
49
50
|
ASR_STARTED = "asr-started",
|
|
50
51
|
ASR_STOPPED = "asr-stopped",
|
|
51
|
-
DECORATIVE_PARTICIPANT_ID_CHANGED = "decorative-participant-id-changed"
|
|
52
|
+
DECORATIVE_PARTICIPANT_ID_CHANGED = "decorative-participant-id-changed",
|
|
53
|
+
VIDEO_SUSPEND_SUGGEST = "video-suspend-suggest"
|
|
52
54
|
}
|
|
53
55
|
export default SignalingNotification;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vkontakte/calls-sdk",
|
|
3
|
-
"version": "2.8.5-dev.
|
|
3
|
+
"version": "2.8.5-dev.2b864c42.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": "2.2.3-beta.2",
|
|
18
|
-
"@vkontakte/calls-vmoji": "1.0.
|
|
18
|
+
"@vkontakte/calls-vmoji": "1.0.10-beta.6",
|
|
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
|
@@ -17,7 +17,7 @@ import MediaModifiers from '../types/MediaModifiers';
|
|
|
17
17
|
import MediaSettings from '../types/MediaSettings';
|
|
18
18
|
import { IOnRemoteMovieData, ISharedMovieInfo, ISharedMovieState, ISharedMovieStoppedInfo } from '../types/MovieShare';
|
|
19
19
|
import MuteStates from '../types/MuteStates';
|
|
20
|
-
import { ParticipantStateMapped } from '../types/Participant';
|
|
20
|
+
import { ParticipantsStateList, ParticipantStateMapped } from '../types/Participant';
|
|
21
21
|
import { IRoomId, Room, RoomParticipantUpdate, Rooms, RoomsUpdate } from '../types/Room';
|
|
22
22
|
import { VmojiError } from '../types/Vmoji';
|
|
23
23
|
import { DebugMessageType } from './Debug';
|
|
@@ -226,6 +226,7 @@ declare namespace External {
|
|
|
226
226
|
* @param markers
|
|
227
227
|
*/
|
|
228
228
|
function onParticipantJoined(userId: ExternalId, markers: ExternalParticipantListMarkers | null): void;
|
|
229
|
+
function onLocalParticipantState(participantState: ParticipantStateMapped): void;
|
|
229
230
|
/**
|
|
230
231
|
* Изменились данные состояний собеседника
|
|
231
232
|
*
|
|
@@ -234,6 +235,13 @@ declare namespace External {
|
|
|
234
235
|
* @param markers
|
|
235
236
|
*/
|
|
236
237
|
function onRemoteParticipantState(userId: ExternalParticipantId, participantState: ParticipantStateMapped, markers: ExternalParticipantListMarkers | null): void;
|
|
238
|
+
/**
|
|
239
|
+
* Изменились данные состояний нескольких собеседников
|
|
240
|
+
*
|
|
241
|
+
* @param stateList
|
|
242
|
+
* @param roomId
|
|
243
|
+
*/
|
|
244
|
+
function onRemoteParticipantsState(stateList: ParticipantsStateList, roomId?: IRoomId): void;
|
|
237
245
|
/**
|
|
238
246
|
* Изменился статус соединения собеседников
|
|
239
247
|
*
|
|
@@ -539,6 +547,7 @@ declare namespace External {
|
|
|
539
547
|
* @param newId
|
|
540
548
|
*/
|
|
541
549
|
function onParticipantIdChanged(prevId: ExternalParticipantId, newId: ExternalParticipantId): void;
|
|
550
|
+
function onVideoSuspendSuggest(bandwidth: number): void;
|
|
542
551
|
/**
|
|
543
552
|
* Одобрено повышение пользователя в зеле ожидания/зале в режиме Audience
|
|
544
553
|
*
|
package/static/Params.d.ts
CHANGED
|
@@ -18,7 +18,7 @@ import MediaModifiers from '../types/MediaModifiers';
|
|
|
18
18
|
import MediaSettings from '../types/MediaSettings';
|
|
19
19
|
import { IOnRemoteMovieData, ISharedMovieInfo, ISharedMovieState, ISharedMovieStoppedInfo } from '../types/MovieShare';
|
|
20
20
|
import MuteStates from '../types/MuteStates';
|
|
21
|
-
import { ParticipantStateMapped } from '../types/Participant';
|
|
21
|
+
import { ParticipantsStateList, ParticipantStateMapped } from '../types/Participant';
|
|
22
22
|
import { MediaType } from '../types/ParticipantStreamDescription';
|
|
23
23
|
import { IRoomId, Room, RoomParticipantUpdate, Rooms, RoomsUpdate } from '../types/Room';
|
|
24
24
|
import { IApiEnv } from '../types/Params';
|
|
@@ -178,11 +178,12 @@ export type ParamsObject = {
|
|
|
178
178
|
*/
|
|
179
179
|
vmoji: typeof Vmoji | null;
|
|
180
180
|
/**
|
|
181
|
-
* Настройки
|
|
182
|
-
*
|
|
183
|
-
* Экземпляр класса `RenderingOptions` из [`@vkontakte/calls-vmoji`](https://npmjs.com/package/@vkontakte/calls-vmoji)
|
|
181
|
+
* Настройки Vmoji
|
|
184
182
|
*/
|
|
185
|
-
|
|
183
|
+
vmojiOptions: {
|
|
184
|
+
protocolVersion: Vmoji.AnimojiVersion;
|
|
185
|
+
renderingOptions: Partial<Vmoji.RenderingOptions>;
|
|
186
|
+
} | null;
|
|
186
187
|
/** @hidden */
|
|
187
188
|
iceRestartWaitTime: number;
|
|
188
189
|
/** @hidden */
|
|
@@ -564,10 +565,19 @@ export type ParamsObject = {
|
|
|
564
565
|
* Участник присоединился к звонку
|
|
565
566
|
*/
|
|
566
567
|
onParticipantJoined?: (userId: ExternalParticipantId, markers: ExternalParticipantListMarkers) => void;
|
|
568
|
+
/**
|
|
569
|
+
* Получены данные по изменению локальных состояний со стороны админа
|
|
570
|
+
* Например, принудительно опущена рука
|
|
571
|
+
*/
|
|
572
|
+
onLocalParticipantState?: (participantState: ParticipantStateMapped) => void;
|
|
567
573
|
/**
|
|
568
574
|
* Изменились данные состояний собеседника
|
|
569
575
|
*/
|
|
570
576
|
onRemoteParticipantState?: (userId: ExternalParticipantId, participantState: ParticipantStateMapped, markers: ExternalParticipantListMarkers | null) => void;
|
|
577
|
+
/**
|
|
578
|
+
* Изменились данные состояний нескольких собеседников
|
|
579
|
+
*/
|
|
580
|
+
onRemoteParticipantsState?: (stateList: ParticipantsStateList, roomId?: IRoomId) => void;
|
|
571
581
|
/**
|
|
572
582
|
* Изменился статус соединения собеседников
|
|
573
583
|
*/
|
|
@@ -805,6 +815,12 @@ export type ParamsObject = {
|
|
|
805
815
|
* @param newId
|
|
806
816
|
*/
|
|
807
817
|
onParticipantIdChanged?: (prevId: ExternalParticipantId, newId: ExternalParticipantId) => void;
|
|
818
|
+
/**
|
|
819
|
+
* Предложение включить режим автоматического отключения приёма видео
|
|
820
|
+
* в плохой сети
|
|
821
|
+
* @param bandwidth текущая полоса пропускания, kbps
|
|
822
|
+
*/
|
|
823
|
+
onVideoSuspendSuggest?: (bandwidth: number) => void;
|
|
808
824
|
/**
|
|
809
825
|
* Одобрено повышение пользователя в зале ожидания/зале в режиме Audience
|
|
810
826
|
*
|
|
@@ -893,8 +909,8 @@ export default abstract class Params {
|
|
|
893
909
|
static set videoEffectMaxHeight(value: number);
|
|
894
910
|
static get vmoji(): typeof Vmoji | null;
|
|
895
911
|
static set vmoji(value: typeof Vmoji | null);
|
|
896
|
-
static get
|
|
897
|
-
static set
|
|
912
|
+
static get vmojiOptions(): NonNullable<ParamsObject['vmojiOptions']>;
|
|
913
|
+
static set vmojiOptions(value: ParamsObject['vmojiOptions']);
|
|
898
914
|
static get voiceParams(): {
|
|
899
915
|
[key: string]: number;
|
|
900
916
|
};
|
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';
|
|
@@ -162,6 +163,7 @@ declare namespace SignalingMessage {
|
|
|
162
163
|
data: {
|
|
163
164
|
candidate?: RTCIceCandidateInit;
|
|
164
165
|
sdp?: Required<RTCSessionDescriptionInit>;
|
|
166
|
+
animojiVersion?: AnimojiVersion;
|
|
165
167
|
};
|
|
166
168
|
}
|
|
167
169
|
export interface RegisteredPeer extends Notification {
|
|
@@ -210,6 +212,17 @@ declare namespace SignalingMessage {
|
|
|
210
212
|
};
|
|
211
213
|
markers?: ParticipantListMarkers;
|
|
212
214
|
}
|
|
215
|
+
export interface ParticipantsStateChanged extends Notification {
|
|
216
|
+
participants: {
|
|
217
|
+
id: CompositeUserId;
|
|
218
|
+
participantState?: {
|
|
219
|
+
state: Record<string, string>;
|
|
220
|
+
stateUpdateTs: Record<string, number>;
|
|
221
|
+
};
|
|
222
|
+
markers?: ParticipantListMarkers;
|
|
223
|
+
}[];
|
|
224
|
+
roomId?: IRoomId;
|
|
225
|
+
}
|
|
213
226
|
export interface RolesChanged extends Notification {
|
|
214
227
|
adminId: ParticipantId;
|
|
215
228
|
participantId: ParticipantId;
|
|
@@ -427,6 +440,9 @@ declare namespace SignalingMessage {
|
|
|
427
440
|
decorativeParticipantId?: CompositeUserId;
|
|
428
441
|
decorativeExternalParticipantId?: ExternalId;
|
|
429
442
|
}
|
|
443
|
+
export interface VideoSuspendSuggest extends Notification {
|
|
444
|
+
bandwidth: number;
|
|
445
|
+
}
|
|
430
446
|
export {};
|
|
431
447
|
}
|
|
432
448
|
export default SignalingMessage;
|
package/types/Streams.d.ts
CHANGED
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[];
|