@vkontakte/calls-sdk 2.8.2-dev.420d5a9.0 → 2.8.2-dev.638a3c6.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 +63 -38
- package/abstract/BaseApi.d.ts +11 -9
- package/abstract/BaseSignaling.d.ts +11 -6
- package/calls-sdk.cjs.js +8 -8
- package/calls-sdk.esm.js +8 -8
- package/classes/Conversation.d.ts +17 -11
- package/classes/FpsMeter.d.ts +10 -0
- package/classes/SpecListener.d.ts +0 -1
- package/classes/codec/Types.d.ts +11 -1
- package/classes/screenshare/PacketHistory.d.ts +2 -2
- package/classes/screenshare/ScreenCaptureSender.d.ts +12 -3
- package/classes/screenshare/ScreenCongestionControl.d.ts +1 -1
- package/classes/screenshare/StreamBuilder.d.ts +1 -0
- package/classes/screenshare/Utils.d.ts +1 -1
- package/classes/stat/StatAggregator.d.ts +1 -1
- package/classes/stat/StatFirstMediaReceived.d.ts +14 -2
- package/classes/transport/BaseTransport.d.ts +13 -0
- package/classes/transport/DirectTransport.d.ts +7 -18
- package/classes/transport/ServerTransport.d.ts +7 -17
- package/classes/transport/Transport.d.ts +7 -3
- package/default/Api.d.ts +12 -13
- package/default/Signaling.d.ts +11 -6
- package/enums/FatalError.d.ts +1 -0
- package/enums/SignalingCommandType.d.ts +4 -2
- package/enums/SignalingNotification.d.ts +0 -1
- package/package.json +3 -3
- package/static/External.d.ts +34 -16
- package/static/Params.d.ts +38 -31
- package/static/Utils.d.ts +8 -4
- package/types/Asr.d.ts +1 -1
- package/types/Conversation.d.ts +3 -0
- package/types/ExternalId.d.ts +13 -15
- package/types/{Logger.d.ts → IEventualStatLog.d.ts} +2 -2
- package/types/MovieShare.d.ts +2 -2
- package/types/MuteStates.d.ts +1 -1
- package/types/Participant.d.ts +4 -3
- package/types/ParticipantLayout.d.ts +2 -2
- package/types/ParticipantListChunk.d.ts +1 -1
- package/types/ParticipantStreamDescription.d.ts +3 -3
- package/types/PerfStatReporter.d.ts +1 -1
- package/types/Room.d.ts +4 -0
- package/types/SignalingCommand.d.ts +2 -1
- package/types/SignalingMessage.d.ts +17 -4
- package/types/Statistics.d.ts +3 -4
- package/types/Streams.d.ts +7 -0
- package/utils/ArrayDequeue.d.ts +1 -1
- package/utils/ArrayList.d.ts +5 -2
- package/utils/FastList.d.ts +5 -2
- package/utils/IList.d.ts +5 -2
package/static/External.d.ts
CHANGED
|
@@ -17,7 +17,7 @@ import MediaSettings from '../types/MediaSettings';
|
|
|
17
17
|
import { IOnRemoteMovieData, ISharedMovieInfo, ISharedMovieState, ISharedMovieStoppedInfo } from '../types/MovieShare';
|
|
18
18
|
import MuteStates from '../types/MuteStates';
|
|
19
19
|
import { ParticipantStateMapped } from '../types/Participant';
|
|
20
|
-
import { Room, RoomParticipantUpdate, Rooms, RoomsUpdate } from '../types/Room';
|
|
20
|
+
import { IRoomId, Room, RoomParticipantUpdate, Rooms, RoomsUpdate } from '../types/Room';
|
|
21
21
|
import { DebugMessageType } from './Debug';
|
|
22
22
|
import { JSONObject } from './Json';
|
|
23
23
|
/**
|
|
@@ -135,7 +135,7 @@ declare namespace External {
|
|
|
135
135
|
* @param participants Список участников звонка
|
|
136
136
|
* @param rooms Список сессионных залов в звонке
|
|
137
137
|
*/
|
|
138
|
-
function onConversation(userId: ExternalParticipantId, mediaModifiers: MediaModifiers, muteStates: MuteStates, participants
|
|
138
|
+
function onConversation(userId: ExternalParticipantId, mediaModifiers: MediaModifiers, muteStates: MuteStates, participants: ExternalParticipant[], rooms?: Rooms): void;
|
|
139
139
|
/**
|
|
140
140
|
* Постраничные данные про участников при начале звонка
|
|
141
141
|
* @param chunk
|
|
@@ -148,7 +148,7 @@ declare namespace External {
|
|
|
148
148
|
* @param mediaSettings
|
|
149
149
|
* @param markers
|
|
150
150
|
*/
|
|
151
|
-
function onRemoteMediaSettings(userId: ExternalParticipantId, mediaSettings: MediaSettings, markers
|
|
151
|
+
function onRemoteMediaSettings(userId: ExternalParticipantId, mediaSettings: MediaSettings, markers: ExternalParticipantListMarkers | null): void;
|
|
152
152
|
/**
|
|
153
153
|
* Изменились данные собственного стрима
|
|
154
154
|
*
|
|
@@ -161,43 +161,47 @@ declare namespace External {
|
|
|
161
161
|
*
|
|
162
162
|
* @param userId
|
|
163
163
|
* @param sharedMovieInfo
|
|
164
|
+
* @param roomId
|
|
164
165
|
*/
|
|
165
|
-
function onRemoteSharedMovieInfo(userId: ExternalParticipantId, sharedMovieInfo: ISharedMovieInfo): void;
|
|
166
|
+
function onRemoteSharedMovieInfo(userId: ExternalParticipantId, sharedMovieInfo: ISharedMovieInfo, roomId?: IRoomId): void;
|
|
166
167
|
/**
|
|
167
168
|
* Полученны данные по остановленным стримам (лайв/мувик) от собеседника
|
|
168
169
|
*
|
|
169
170
|
* @param userId
|
|
170
171
|
* @param sharedMovieStoppedInfo
|
|
172
|
+
* @param roomId
|
|
171
173
|
*/
|
|
172
|
-
function onRemoteSharedMovieStoppedInfo(userId: ExternalParticipantId, sharedMovieStoppedInfo: ISharedMovieStoppedInfo): void;
|
|
174
|
+
function onRemoteSharedMovieStoppedInfo(userId: ExternalParticipantId, sharedMovieStoppedInfo: ISharedMovieStoppedInfo, roomId?: IRoomId): void;
|
|
173
175
|
/**
|
|
174
176
|
* Полученны данные по собственным стримам (лайв/мувик)
|
|
175
177
|
*
|
|
176
178
|
* @param userId
|
|
177
179
|
* @param sharedMovieInfo
|
|
180
|
+
* @param roomId
|
|
178
181
|
*/
|
|
179
|
-
function onLocalSharedMovieInfo(userId: ExternalParticipantId, sharedMovieInfo: ISharedMovieInfo): void;
|
|
182
|
+
function onLocalSharedMovieInfo(userId: ExternalParticipantId, sharedMovieInfo: ISharedMovieInfo, roomId?: IRoomId): void;
|
|
180
183
|
/**
|
|
181
184
|
* Полученны данные по собственным остановленным стримам (лайв/мувик)
|
|
182
185
|
*
|
|
183
186
|
* @param userId
|
|
184
187
|
* @param sharedMovieStoppedInfo
|
|
188
|
+
* @param roomId
|
|
185
189
|
*/
|
|
186
|
-
function onLocalSharedMovieStoppedInfo(userId: ExternalParticipantId, sharedMovieStoppedInfo: ISharedMovieStoppedInfo): void;
|
|
190
|
+
function onLocalSharedMovieStoppedInfo(userId: ExternalParticipantId, sharedMovieStoppedInfo: ISharedMovieStoppedInfo, roomId?: IRoomId): void;
|
|
187
191
|
/**
|
|
188
192
|
* Добавили участника
|
|
189
193
|
*
|
|
190
194
|
* @param userId
|
|
191
195
|
* @param markers
|
|
192
196
|
*/
|
|
193
|
-
function onParticipantAdded(userId: ExternalId, markers
|
|
197
|
+
function onParticipantAdded(userId: ExternalId, markers: ExternalParticipantListMarkers | null): void;
|
|
194
198
|
/**
|
|
195
199
|
* Участник подключился
|
|
196
200
|
*
|
|
197
201
|
* @param userId
|
|
198
202
|
* @param markers
|
|
199
203
|
*/
|
|
200
|
-
function onParticipantJoined(userId: ExternalId, markers
|
|
204
|
+
function onParticipantJoined(userId: ExternalId, markers: ExternalParticipantListMarkers | null): void;
|
|
201
205
|
/**
|
|
202
206
|
* Изменились данные состояний собеседника
|
|
203
207
|
*
|
|
@@ -205,7 +209,7 @@ declare namespace External {
|
|
|
205
209
|
* @param participantState
|
|
206
210
|
* @param markers
|
|
207
211
|
*/
|
|
208
|
-
function onRemoteParticipantState(userId: ExternalParticipantId, participantState: ParticipantStateMapped, markers
|
|
212
|
+
function onRemoteParticipantState(userId: ExternalParticipantId, participantState: ParticipantStateMapped, markers: ExternalParticipantListMarkers | null): void;
|
|
209
213
|
/**
|
|
210
214
|
* Изменился статус соединения собеседников
|
|
211
215
|
*
|
|
@@ -231,7 +235,7 @@ declare namespace External {
|
|
|
231
235
|
* @param userId
|
|
232
236
|
* @param markers
|
|
233
237
|
*/
|
|
234
|
-
function onRemoteRemoved(userId: ExternalParticipantId, markers
|
|
238
|
+
function onRemoteRemoved(userId: ExternalParticipantId, markers: ExternalParticipantListMarkers | null): void;
|
|
235
239
|
/**
|
|
236
240
|
* Изменилось состояние звонка
|
|
237
241
|
*
|
|
@@ -283,7 +287,7 @@ declare namespace External {
|
|
|
283
287
|
* @param markers
|
|
284
288
|
* @param roomId ID сессионного зала или ничего в случае основного зала
|
|
285
289
|
*/
|
|
286
|
-
function onPinnedParticipant(userId: ExternalParticipantId, unpin: boolean, markers
|
|
290
|
+
function onPinnedParticipant(userId: ExternalParticipantId, unpin: boolean, markers: ExternalParticipantListMarkers | null, roomId?: number | null): void;
|
|
287
291
|
/**
|
|
288
292
|
* Закрепляет/открепляет текущего пользователя у других собеседников
|
|
289
293
|
*
|
|
@@ -412,13 +416,21 @@ declare namespace External {
|
|
|
412
416
|
*/
|
|
413
417
|
function onAutoplayError(): void;
|
|
414
418
|
/**
|
|
415
|
-
* Изменилось состояние зала
|
|
419
|
+
* Изменилось состояние зала ожидания/зала в режиме Audience
|
|
416
420
|
*
|
|
417
421
|
* @param eventType
|
|
418
|
-
* @param totalCount Количество
|
|
422
|
+
* @param totalCount Количество ожидающих/слушателей
|
|
419
423
|
* @param firstParticipants Первые несколько ожидающих в зале
|
|
424
|
+
* @param addedParticipantIds Некоторое количество участников, добавленных в зал
|
|
425
|
+
* @param removedParticipantIds Некоторое количество участников, убранных из зала
|
|
426
|
+
*/
|
|
427
|
+
function onChatRoomUpdated(eventType: ChatRoomEventType, totalCount: number, firstParticipants: ExternalId[], addedParticipantIds: ExternalId[], removedParticipantIds: ExternalId[]): void;
|
|
428
|
+
/**
|
|
429
|
+
* Участник повышен/разжалован в зале ожидания/зале в режиме Audience
|
|
430
|
+
*
|
|
431
|
+
* @param demoted участник разжалован
|
|
420
432
|
*/
|
|
421
|
-
function
|
|
433
|
+
function onPromoted(demoted: boolean): void;
|
|
422
434
|
/**
|
|
423
435
|
* Получен микшированный аудио стрим.
|
|
424
436
|
*
|
|
@@ -429,7 +441,7 @@ declare namespace External {
|
|
|
429
441
|
* Получена новая ссылка на звонок
|
|
430
442
|
* @param joinLink токен присоединения к звонку
|
|
431
443
|
*/
|
|
432
|
-
function onJoinLinkChanged(joinLink: string): void;
|
|
444
|
+
function onJoinLinkChanged(joinLink: string | null): void;
|
|
433
445
|
/**
|
|
434
446
|
* Получено обновление по сессионным залам
|
|
435
447
|
* @param updates
|
|
@@ -492,5 +504,11 @@ declare namespace External {
|
|
|
492
504
|
*/
|
|
493
505
|
function onAsrStopped(roomId: number | null): void;
|
|
494
506
|
function onAsrTranscription(id: ExternalParticipantId, text: string, timestamp: number, duration: number): void;
|
|
507
|
+
/**
|
|
508
|
+
* Одобрено повышение пользователя в зеле ожидания/зале в режиме Audience
|
|
509
|
+
*
|
|
510
|
+
* @param adminParticipantId админ, одобривший повышение
|
|
511
|
+
*/
|
|
512
|
+
function onPromotionApproved(adminParticipantId: ExternalParticipantId): void;
|
|
495
513
|
}
|
|
496
514
|
export default External;
|
package/static/Params.d.ts
CHANGED
|
@@ -19,7 +19,7 @@ import MediaSettings from '../types/MediaSettings';
|
|
|
19
19
|
import { IOnRemoteMovieData, ISharedMovieInfo, ISharedMovieState, ISharedMovieStoppedInfo } from '../types/MovieShare';
|
|
20
20
|
import MuteStates from '../types/MuteStates';
|
|
21
21
|
import { ParticipantStateMapped } from '../types/Participant';
|
|
22
|
-
import { Room, RoomParticipantUpdate, Rooms, RoomsUpdate } from '../types/Room';
|
|
22
|
+
import { IRoomId, Room, RoomParticipantUpdate, Rooms, RoomsUpdate } from '../types/Room';
|
|
23
23
|
import AuthData from './AuthData';
|
|
24
24
|
import { DebugMessageType } from './Debug';
|
|
25
25
|
import { ParticipantStatus } from './External';
|
|
@@ -37,7 +37,7 @@ export type ParamsObject = {
|
|
|
37
37
|
* API ключ приложения
|
|
38
38
|
*/
|
|
39
39
|
apiKey: string;
|
|
40
|
-
apiEnv
|
|
40
|
+
apiEnv: 'AUTO' | 'PROD' | 'PROD_OK' | 'TEST' | 'VIDEOTEST' | string;
|
|
41
41
|
/** @hidden */
|
|
42
42
|
apiAuth?: typeof AuthData;
|
|
43
43
|
/**
|
|
@@ -116,7 +116,7 @@ export type ParamsObject = {
|
|
|
116
116
|
*
|
|
117
117
|
* _По умолчанию: `FacingMode.USER` для мобильных устройств и `null` для остальных_
|
|
118
118
|
*/
|
|
119
|
-
videoFacingMode
|
|
119
|
+
videoFacingMode: FacingMode | null;
|
|
120
120
|
/**
|
|
121
121
|
* FPS трансляции экрана
|
|
122
122
|
*
|
|
@@ -350,7 +350,7 @@ export type ParamsObject = {
|
|
|
350
350
|
* Порог задержки (мс), выше которого включается congestion control для шаринга
|
|
351
351
|
* @hidden
|
|
352
352
|
*/
|
|
353
|
-
screenShareCongestionControlThreshold: number
|
|
353
|
+
screenShareCongestionControlThreshold: number;
|
|
354
354
|
/**
|
|
355
355
|
* Включить возможность захвата звука при трансляции экрана
|
|
356
356
|
*
|
|
@@ -363,16 +363,13 @@ export type ParamsObject = {
|
|
|
363
363
|
* _По умолчанию: `false`_
|
|
364
364
|
*/
|
|
365
365
|
fastScreenShare: boolean;
|
|
366
|
-
/**
|
|
367
|
-
* Настройки api
|
|
368
|
-
*/
|
|
369
|
-
api: {
|
|
370
|
-
/** таймаут для батчинга на получение externalId */
|
|
371
|
-
userIdsByOkBatchedTimeout: number;
|
|
372
|
-
};
|
|
373
366
|
fastScreenShareFrameRate: number;
|
|
374
367
|
fastScreenShareWidth: number;
|
|
375
368
|
fastScreenShareHeight: number;
|
|
369
|
+
/**
|
|
370
|
+
* Использовать новые правила allMute для админа
|
|
371
|
+
*/
|
|
372
|
+
newMuteRules: boolean;
|
|
376
373
|
/**
|
|
377
374
|
* Получен локальный стрим с камеры/микрофона
|
|
378
375
|
*/
|
|
@@ -429,7 +426,7 @@ export type ParamsObject = {
|
|
|
429
426
|
/**
|
|
430
427
|
* Начат звонок
|
|
431
428
|
*/
|
|
432
|
-
onConversation?: (userId: ExternalParticipantId, mediaModifiers: MediaModifiers, muteStates: MuteStates, participants
|
|
429
|
+
onConversation?: (userId: ExternalParticipantId, mediaModifiers: MediaModifiers, muteStates: MuteStates, participants: ExternalParticipant[], rooms?: Rooms) => void;
|
|
433
430
|
/**
|
|
434
431
|
* Начальный список участников для постраничного звонка
|
|
435
432
|
*/
|
|
@@ -437,7 +434,7 @@ export type ParamsObject = {
|
|
|
437
434
|
/**
|
|
438
435
|
* Изменились данные стрима собеседника
|
|
439
436
|
*/
|
|
440
|
-
onRemoteMediaSettings?: (userId: ExternalParticipantId, mediaSettings: MediaSettings, markers
|
|
437
|
+
onRemoteMediaSettings?: (userId: ExternalParticipantId, mediaSettings: MediaSettings, markers: ExternalParticipantListMarkers | null) => void;
|
|
441
438
|
/**
|
|
442
439
|
* Изменились данные стрима собеседника
|
|
443
440
|
*/
|
|
@@ -445,31 +442,31 @@ export type ParamsObject = {
|
|
|
445
442
|
/**
|
|
446
443
|
* Полученны данные по стримам (лайв/мувик) от собеседника
|
|
447
444
|
*/
|
|
448
|
-
onRemoteSharedMovieInfo?: (userId: ExternalParticipantId, sharedMovieInfo: ISharedMovieInfo) => void;
|
|
445
|
+
onRemoteSharedMovieInfo?: (userId: ExternalParticipantId, sharedMovieInfo: ISharedMovieInfo, roomId?: IRoomId) => void;
|
|
449
446
|
/**
|
|
450
447
|
* Полученны данные по остановленным стримам (лайв/мувик) от собеседника
|
|
451
448
|
*/
|
|
452
|
-
onRemoteSharedMovieStoppedInfo?: (userId: ExternalParticipantId, sharedMovieStoppedInfo: ISharedMovieStoppedInfo) => void;
|
|
449
|
+
onRemoteSharedMovieStoppedInfo?: (userId: ExternalParticipantId, sharedMovieStoppedInfo: ISharedMovieStoppedInfo, roomId?: IRoomId) => void;
|
|
453
450
|
/**
|
|
454
451
|
* Полученны данные по собственным стримам (лайв/мувик)
|
|
455
452
|
*/
|
|
456
|
-
onLocalSharedMovieInfo?: (userId: ExternalParticipantId, sharedMovieInfo: ISharedMovieInfo) => void;
|
|
453
|
+
onLocalSharedMovieInfo?: (userId: ExternalParticipantId, sharedMovieInfo: ISharedMovieInfo, roomId?: IRoomId) => void;
|
|
457
454
|
/**
|
|
458
455
|
* Полученны данные по собственным остановленным стримам (лайв/мувик)
|
|
459
456
|
*/
|
|
460
|
-
onLocalSharedMovieStoppedInfo?: (userId: ExternalParticipantId, sharedMovieStoppedInfo: ISharedMovieStoppedInfo) => void;
|
|
457
|
+
onLocalSharedMovieStoppedInfo?: (userId: ExternalParticipantId, sharedMovieStoppedInfo: ISharedMovieStoppedInfo, roomId?: IRoomId) => void;
|
|
461
458
|
/**
|
|
462
459
|
* Добавили участника
|
|
463
460
|
*/
|
|
464
|
-
onParticipantAdded?: (userId: ExternalParticipantId, markers
|
|
461
|
+
onParticipantAdded?: (userId: ExternalParticipantId, markers: ExternalParticipantListMarkers | null) => void;
|
|
465
462
|
/**
|
|
466
463
|
* Участник присоединился к звонку
|
|
467
464
|
*/
|
|
468
|
-
onParticipantJoined?: (userId: ExternalParticipantId, markers
|
|
465
|
+
onParticipantJoined?: (userId: ExternalParticipantId, markers: ExternalParticipantListMarkers) => void;
|
|
469
466
|
/**
|
|
470
467
|
* Изменились данные состояний собеседника
|
|
471
468
|
*/
|
|
472
|
-
onRemoteParticipantState?: (userId: ExternalParticipantId, participantState: ParticipantStateMapped, markers
|
|
469
|
+
onRemoteParticipantState?: (userId: ExternalParticipantId, participantState: ParticipantStateMapped, markers: ExternalParticipantListMarkers | null) => void;
|
|
473
470
|
/**
|
|
474
471
|
* Изменился статус соединения собеседников
|
|
475
472
|
*/
|
|
@@ -485,7 +482,7 @@ export type ParamsObject = {
|
|
|
485
482
|
/**
|
|
486
483
|
* Пользователь отключился от звонка
|
|
487
484
|
*/
|
|
488
|
-
onRemoteRemoved?: (userId: ExternalParticipantId, markers
|
|
485
|
+
onRemoteRemoved?: (userId: ExternalParticipantId, markers: ExternalParticipantListMarkers | null) => void;
|
|
489
486
|
/**
|
|
490
487
|
* Изменилось состояние звонка
|
|
491
488
|
*/
|
|
@@ -509,7 +506,7 @@ export type ParamsObject = {
|
|
|
509
506
|
/**
|
|
510
507
|
* Закрепляет/открепляет собеседника для всех
|
|
511
508
|
*/
|
|
512
|
-
onPinnedParticipant?: (userId: ExternalParticipantId, unpin: boolean, markers
|
|
509
|
+
onPinnedParticipant?: (userId: ExternalParticipantId, unpin: boolean, markers: ExternalParticipantListMarkers | null, roomId?: number | null) => void;
|
|
513
510
|
/**
|
|
514
511
|
* Закрепляет/открепляет текущего пользователя у других собеседников
|
|
515
512
|
*/
|
|
@@ -600,13 +597,15 @@ export type ParamsObject = {
|
|
|
600
597
|
*/
|
|
601
598
|
onAutoplayError?: () => void;
|
|
602
599
|
/**
|
|
603
|
-
* Изменилось состояние зала
|
|
600
|
+
* Изменилось состояние зала ожидания/зала в режиме Audience
|
|
604
601
|
*
|
|
605
602
|
* @param eventType Тип события
|
|
606
|
-
* @param totalCount Количество
|
|
603
|
+
* @param totalCount Количество ожидающих/слушателей
|
|
607
604
|
* @param firstParticipants Первые несколько ожидающих в зале
|
|
605
|
+
* @param addedParticipantIds Некоторое количество участников, добавленных в зал
|
|
606
|
+
* @param removedParticipantIds Некоторое количество участников, убранных из зала
|
|
608
607
|
*/
|
|
609
|
-
onChatRoomUpdated?: (eventType: ChatRoomEventType, totalCount: number, firstParticipants: ExternalId[]) => void;
|
|
608
|
+
onChatRoomUpdated?: (eventType: ChatRoomEventType, totalCount: number, firstParticipants: ExternalId[], addedParticipantIds: ExternalId[], removedParticipantIds: ExternalId[]) => void;
|
|
610
609
|
/**
|
|
611
610
|
* Получен микшированный аудио стрим.
|
|
612
611
|
* @hidden
|
|
@@ -680,6 +679,18 @@ export type ParamsObject = {
|
|
|
680
679
|
* @param roomId Id Комнаты
|
|
681
680
|
*/
|
|
682
681
|
onAsrSet?: (data: IAsrData | null, roomId: number | null) => void;
|
|
682
|
+
/**
|
|
683
|
+
* Одобрено повышение пользователя в зеле ожидания/зале в режиме Audience
|
|
684
|
+
*
|
|
685
|
+
* @param adminParticipantId админ, одобривший повышение
|
|
686
|
+
*/
|
|
687
|
+
onPromotionApproved?: (adminParticipantId: ExternalParticipantId) => void;
|
|
688
|
+
/**
|
|
689
|
+
* Участник повышен/разжалован в зале ожидания/зале в режиме Audience
|
|
690
|
+
*
|
|
691
|
+
* @param demoted участник разжалован
|
|
692
|
+
*/
|
|
693
|
+
onPromoted?: (demoted: boolean) => void;
|
|
683
694
|
};
|
|
684
695
|
export default abstract class Params {
|
|
685
696
|
private static _params;
|
|
@@ -741,7 +752,6 @@ export default abstract class Params {
|
|
|
741
752
|
static set videoEffectMaxWidth(value: number);
|
|
742
753
|
static get videoEffectMaxHeight(): number;
|
|
743
754
|
static set videoEffectMaxHeight(value: number);
|
|
744
|
-
static get useVmoji(): boolean;
|
|
745
755
|
static get vmoji(): typeof Vmoji | null;
|
|
746
756
|
static set vmoji(value: typeof Vmoji | null);
|
|
747
757
|
static get vmojiRenderingOptions(): Partial<Vmoji.RenderingOptions>;
|
|
@@ -779,7 +789,7 @@ export default abstract class Params {
|
|
|
779
789
|
static get useParticipantListChunk(): boolean;
|
|
780
790
|
static get useRooms(): boolean;
|
|
781
791
|
static get participantListChunkInitIndex(): number;
|
|
782
|
-
static get participantListChunkInitCount(): number;
|
|
792
|
+
static get participantListChunkInitCount(): number | null;
|
|
783
793
|
static get serverAudioRed(): boolean;
|
|
784
794
|
static get p2pAudioRed(): boolean;
|
|
785
795
|
static get h264spsPpsIdrInKeyframe(): boolean;
|
|
@@ -790,11 +800,8 @@ export default abstract class Params {
|
|
|
790
800
|
static get fastScreenShare(): boolean;
|
|
791
801
|
static get screenShareCongestionControl(): boolean;
|
|
792
802
|
static get screenShareCongestionControlThreshold(): number;
|
|
793
|
-
static get api(): {
|
|
794
|
-
/** таймаут для батчинга на получение externalId */
|
|
795
|
-
userIdsByOkBatchedTimeout: number;
|
|
796
|
-
};
|
|
797
803
|
static get fastScreenShareWidth(): number;
|
|
798
804
|
static get fastScreenShareHeight(): number;
|
|
805
|
+
static get newMuteRules(): boolean;
|
|
799
806
|
static getScreenFrameRate(fastScreenShare: boolean): number;
|
|
800
807
|
}
|
package/static/Utils.d.ts
CHANGED
|
@@ -11,10 +11,14 @@ declare namespace Utils {
|
|
|
11
11
|
function patchRemoteSDP(sdp: string): string;
|
|
12
12
|
function getPeerIdString(peerId: SignalingMessage.PeerId): string;
|
|
13
13
|
function comparePeerId(peerId1: SignalingMessage.PeerId, peerId2: SignalingMessage.PeerId): boolean;
|
|
14
|
-
function getPeerConnectionHostInfo(pc: RTCPeerConnection): Promise<
|
|
14
|
+
function getPeerConnectionHostInfo(pc: RTCPeerConnection): Promise<{
|
|
15
|
+
type: any;
|
|
16
|
+
ip: any;
|
|
17
|
+
port: any;
|
|
18
|
+
} | null>;
|
|
15
19
|
function composeUserId(id: CompositeUserId | OkUserId, type: UserType): CompositeUserId;
|
|
16
|
-
function composeParticipantId(id: CompositeUserId | OkUserId, type: UserType, deviceIdx
|
|
17
|
-
function compose(compositeId: CompositeUserId, deviceIdx
|
|
20
|
+
function composeParticipantId(id: CompositeUserId | OkUserId, type: UserType, deviceIdx?: number): ParticipantId;
|
|
21
|
+
function compose(compositeId: CompositeUserId, deviceIdx?: number): ParticipantId;
|
|
18
22
|
function composeId(participant: SignalingMessage.Participant): ParticipantId;
|
|
19
23
|
function composeMessageId(message: SignalingMessage): ParticipantId;
|
|
20
24
|
function decomposeId(compositeId: CompositeUserId | OkUserId): {
|
|
@@ -65,7 +69,7 @@ declare namespace Utils {
|
|
|
65
69
|
*/
|
|
66
70
|
function participantMarkerCompare(marker1: ExternalParticipantListMarker | undefined, marker2: ExternalParticipantListMarker | undefined): number;
|
|
67
71
|
/** убирает все ключи со значением `V` на 1 уровне */
|
|
68
|
-
function objectFilterOutValues<T extends Record<string, V>, V = unknown>(obj: T, value?:
|
|
72
|
+
function objectFilterOutValues<T extends Record<string, V>, V = unknown>(obj: T, value?: unknown | unknown[]): Partial<T>;
|
|
69
73
|
function objectReduce<R, T extends Object>(obj: T, callback: (acc: R, value: T[keyof T], key: keyof T) => R, initialValue: R): R;
|
|
70
74
|
const setImmediate: (fn: VoidFunction) => VoidFunction;
|
|
71
75
|
function isObject(obj: unknown): obj is object;
|
package/types/Asr.d.ts
CHANGED
package/types/Conversation.d.ts
CHANGED
|
@@ -51,6 +51,7 @@ export type ConversationData = {
|
|
|
51
51
|
needRate: boolean;
|
|
52
52
|
/** @hidden */
|
|
53
53
|
recordsInfoByRoom: Map<number | null, RecordInfo | null>;
|
|
54
|
+
/** @hidden */
|
|
54
55
|
asrInfoByRoom: Map<number | null, AsrInfo | null>;
|
|
55
56
|
chatId: string | null;
|
|
56
57
|
/** @hidden */
|
|
@@ -73,4 +74,6 @@ export type ConversationData = {
|
|
|
73
74
|
waitingHall: boolean;
|
|
74
75
|
observer: boolean;
|
|
75
76
|
roomId: number | null;
|
|
77
|
+
audienceMode: boolean;
|
|
78
|
+
restricted: boolean;
|
|
76
79
|
};
|
package/types/ExternalId.d.ts
CHANGED
|
@@ -15,22 +15,16 @@ export declare enum ExternalIdType {
|
|
|
15
15
|
}
|
|
16
16
|
export type ExternalUserId = string;
|
|
17
17
|
export declare namespace ExternalIdUtils {
|
|
18
|
-
function fromIds(ids:
|
|
19
|
-
function fromId(id:
|
|
20
|
-
function fromSignaling(signalingId: SignalingMessage.ExternalId):
|
|
18
|
+
function fromIds(ids: ExternalUserId[] | ExternalId[]): ExternalId[];
|
|
19
|
+
function fromId(id: ExternalUserId, type?: ExternalIdType, deviceIdx?: number): ExternalParticipantId;
|
|
20
|
+
function fromSignaling(signalingId: SignalingMessage.ExternalId, deviceIdx?: number): ExternalParticipantId;
|
|
21
21
|
function toString(externalId: ExternalId): ExternalIdString;
|
|
22
|
-
function fromIdToString(id:
|
|
23
|
-
function fromString(stringId: ExternalIdString):
|
|
24
|
-
function compare(id1:
|
|
22
|
+
function fromIdToString(id: ExternalUserId, type?: ExternalIdType, deviceIdx?: number): ExternalIdString;
|
|
23
|
+
function fromString(stringId: ExternalIdString): ExternalParticipantId;
|
|
24
|
+
function compare(id1: ExternalParticipantId, id2: ExternalParticipantId): boolean;
|
|
25
|
+
function getDeviceIdx(externalId: ExternalId | null): number;
|
|
25
26
|
}
|
|
26
27
|
export type ExternalIdString = string;
|
|
27
|
-
export declare namespace ExternalParticipantIdUtils {
|
|
28
|
-
function fromId(id: string, type?: ExternalIdType, deviceIdx?: number): ExternalParticipantId;
|
|
29
|
-
function toString(externalId: ExternalParticipantId): ExternalParticipantIdString;
|
|
30
|
-
function fromSignaling(signalingId: SignalingMessage.ExternalId, deviceIdx: number): ExternalParticipantId;
|
|
31
|
-
function getDeviceIdx(externalId: string | ExternalParticipantId | null): number;
|
|
32
|
-
}
|
|
33
|
-
export type ExternalParticipantIdString = string;
|
|
34
28
|
/**
|
|
35
29
|
* Идентификатор внешнего пользователя
|
|
36
30
|
*/
|
|
@@ -38,7 +32,7 @@ export interface ExternalId {
|
|
|
38
32
|
/**
|
|
39
33
|
* ID пользователя
|
|
40
34
|
*/
|
|
41
|
-
id:
|
|
35
|
+
id: ExternalUserId;
|
|
42
36
|
/**
|
|
43
37
|
* Тип пользователя
|
|
44
38
|
*/
|
|
@@ -48,6 +42,10 @@ export interface ExternalId {
|
|
|
48
42
|
* @hidden
|
|
49
43
|
*/
|
|
50
44
|
observer?: boolean;
|
|
45
|
+
/**
|
|
46
|
+
* Индекс устройства (позволяет отличать участников, которые присоединяются к звонку под одной учётной записью с разных устройств)
|
|
47
|
+
*/
|
|
48
|
+
deviceIdx?: number;
|
|
51
49
|
}
|
|
52
50
|
/**
|
|
53
51
|
* Идентификатор участника звонка
|
|
@@ -94,7 +92,7 @@ export interface ExternalParticipant {
|
|
|
94
92
|
* Разрешения на включение устройств
|
|
95
93
|
*/
|
|
96
94
|
unmuteOptions: MediaOption[];
|
|
97
|
-
markers
|
|
95
|
+
markers: ExternalParticipantListMarkers | null;
|
|
98
96
|
movieShareInfos?: ISharedMovieInfo[];
|
|
99
97
|
}
|
|
100
98
|
/**
|
package/types/MovieShare.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import LiveStatus from '../enums/LiveStatus';
|
|
2
|
-
import { CompositeUserId } from './Participant';
|
|
2
|
+
import { CompositeUserId, ParticipantId } from './Participant';
|
|
3
3
|
import { MediaType } from './ParticipantStreamDescription';
|
|
4
4
|
/**
|
|
5
5
|
* Preview изображения ролика
|
|
@@ -65,7 +65,7 @@ export interface ISharedMovieState {
|
|
|
65
65
|
* ID Инициатора совместного просмотра
|
|
66
66
|
* @hidden
|
|
67
67
|
*/
|
|
68
|
-
participantId:
|
|
68
|
+
participantId: ParticipantId;
|
|
69
69
|
/**
|
|
70
70
|
* Громкость
|
|
71
71
|
*/
|
package/types/MuteStates.d.ts
CHANGED
|
@@ -13,7 +13,7 @@ export default MuteStates;
|
|
|
13
13
|
* Состояние устройств пользователя установленное админом звонка
|
|
14
14
|
*/
|
|
15
15
|
export interface IMuteParticipantParams {
|
|
16
|
-
externalId?:
|
|
16
|
+
externalId?: ExternalParticipantId | null;
|
|
17
17
|
muteStates: MuteStates;
|
|
18
18
|
requestedMedia?: MediaOption[];
|
|
19
19
|
roomId?: number | null;
|
package/types/Participant.d.ts
CHANGED
|
@@ -7,6 +7,7 @@ import { ExternalId, ExternalParticipantId, ExternalParticipantListMarkers } fro
|
|
|
7
7
|
import { ISharedMovieInfo } from './MovieShare';
|
|
8
8
|
import MuteStates from './MuteStates';
|
|
9
9
|
import ParticipantLayout from './ParticipantLayout';
|
|
10
|
+
import { StreamDescriptionString } from './ParticipantStreamDescription';
|
|
10
11
|
/**
|
|
11
12
|
* Уникально идентифицирует пользователя или группу
|
|
12
13
|
*/
|
|
@@ -47,7 +48,7 @@ export interface Participant {
|
|
|
47
48
|
externalId: ExternalParticipantId;
|
|
48
49
|
mediaSettings: MediaSettings;
|
|
49
50
|
state: ParticipantState;
|
|
50
|
-
status: ParticipantStatus
|
|
51
|
+
status: ParticipantStatus;
|
|
51
52
|
remoteStream?: MediaStream | null;
|
|
52
53
|
secondStream?: MediaStream | null;
|
|
53
54
|
remoteVideoTrack?: MediaStreamTrack | null;
|
|
@@ -59,12 +60,12 @@ export interface Participant {
|
|
|
59
60
|
participantState: ParticipantStateMapped;
|
|
60
61
|
networkRating: number;
|
|
61
62
|
lastRequestedLayouts: {
|
|
62
|
-
[key:
|
|
63
|
+
[key: StreamDescriptionString]: ParticipantLayout;
|
|
63
64
|
};
|
|
64
65
|
muteStates: MuteStates;
|
|
65
66
|
unmuteOptions: MediaOption[];
|
|
66
67
|
observedIds: CompositeUserId[];
|
|
67
|
-
markers
|
|
68
|
+
markers: ExternalParticipantListMarkers | null;
|
|
68
69
|
movieShareInfos?: ISharedMovieInfo[];
|
|
69
70
|
isInRoom?: boolean;
|
|
70
71
|
}
|
|
@@ -15,12 +15,12 @@ export type Layout = {
|
|
|
15
15
|
/**
|
|
16
16
|
* Приоритет
|
|
17
17
|
*/
|
|
18
|
-
priority
|
|
18
|
+
priority?: number;
|
|
19
19
|
/**
|
|
20
20
|
* Как видео вписано в вьюпорт, по аналогии с CSS object-fit.
|
|
21
21
|
* Поддерживаемые значения: `cv` и `cn`, что соответствует CSS `cover` и `contain`
|
|
22
22
|
*/
|
|
23
|
-
fit
|
|
23
|
+
fit?: string;
|
|
24
24
|
};
|
|
25
25
|
/**
|
|
26
26
|
* Запрос остановки стрима
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { ParticipantListMarker, ParticipantListType } from './Participant';
|
|
2
2
|
export interface ParticipantListChunkParameters {
|
|
3
3
|
listType: ParticipantListType;
|
|
4
|
-
count: number;
|
|
4
|
+
count: number | null;
|
|
5
5
|
/** Anchor in sorted list to start from. Mutually exclusive with "fromIdx" */
|
|
6
6
|
fromMarker?: ParticipantListMarker;
|
|
7
7
|
/** Position in sorted list to start from (0-based). Mutually exclusive with "fromMarker" */
|
|
@@ -7,11 +7,11 @@ export declare enum MediaType {
|
|
|
7
7
|
SCREEN = "SCREEN",
|
|
8
8
|
STREAM = "STREAM",
|
|
9
9
|
MOVIE = "MOVIE",
|
|
10
|
-
AUDIOSHARE = "AUDIOSHARE",
|
|
11
10
|
ANIMOJI = "ANIMOJI"
|
|
12
11
|
}
|
|
13
|
-
export declare function serializeParticipantStreamDescription(description: ParticipantStreamDescription):
|
|
14
|
-
export declare function parseParticipantStreamDescription(descriptionString:
|
|
12
|
+
export declare function serializeParticipantStreamDescription(description: ParticipantStreamDescription): StreamDescriptionString;
|
|
13
|
+
export declare function parseParticipantStreamDescription(descriptionString: StreamDescriptionString): ParticipantStreamDescription;
|
|
14
|
+
export type StreamDescriptionString = string;
|
|
15
15
|
export type ParticipantStreamDescription = {
|
|
16
16
|
participantId: ParticipantId;
|
|
17
17
|
mediaType: MediaType | null;
|
|
@@ -38,5 +38,5 @@ export interface CallStatReport {
|
|
|
38
38
|
export interface ICallStatLog extends Pick<CallStatReport, 'call_topology' | 'nack_sent' | 'nack_received' | 'pli_sent' | 'pli_received' | 'fir_sent' | 'fir_received' | 'frames_dropped'>, Pick<Partial<CallStatReport>, 'rtt' | 'jitter_video' | 'jitter_audio' | 'interframe_delay_variance' | 'freeze_count' | 'total_freezes_duration' | 'ss_freeze_count' | 'ss_total_freezes_duration' | 'inserted_audio_samples_for_deceleration' | 'removed_audio_samples_for_acceleration' | 'concealed_audio_samples' | 'total_audio_energy' | 'local_address' | 'local_connection_type' | 'network_type' | 'transport' | 'remote_address' | 'remote_connection_type'> {
|
|
39
39
|
concealed_silent_audio_samples?: number;
|
|
40
40
|
concealment_audio_avg_size?: number;
|
|
41
|
-
[k: string]: string | number;
|
|
41
|
+
[k: string]: string | number | undefined;
|
|
42
42
|
}
|
package/types/Room.d.ts
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
|
+
import SignalingCommandType from '../enums/SignalingCommandType';
|
|
1
2
|
import SignalingMessage from './SignalingMessage';
|
|
2
3
|
type SignalingCommand = {
|
|
3
4
|
sequence: number;
|
|
4
|
-
name:
|
|
5
|
+
name: SignalingCommandType;
|
|
5
6
|
params: object;
|
|
6
7
|
responseTimer: number;
|
|
7
8
|
resolve: (message: SignalingMessage) => void;
|