@vkontakte/calls-sdk 2.6.2-dev.0d61671.0 → 2.6.2-dev.10785ca.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 +66 -13
- package/abstract/BaseApi.d.ts +7 -3
- package/abstract/BaseSignaling.d.ts +13 -2
- package/calls-sdk.cjs.js +8 -8
- package/calls-sdk.esm.js +8 -8
- package/classes/Conversation.d.ts +35 -6
- package/classes/MediaSource.d.ts +7 -2
- package/classes/ProducerCommandSerializationService.d.ts +3 -1
- package/classes/codec/IEncoder.d.ts +3 -0
- package/classes/codec/LibVPxEncoder.d.ts +4 -1
- package/classes/codec/Types.d.ts +6 -1
- package/classes/codec/WebCodecsEncoder.d.ts +4 -1
- package/classes/screenshare/PacketHistory.d.ts +30 -0
- package/classes/screenshare/PacketHistory.test.d.ts +1 -0
- package/classes/screenshare/ScreenCaptureSender.d.ts +15 -1
- package/classes/screenshare/ScreenCongestionControl.d.ts +25 -0
- package/classes/screenshare/SharingStatReport.d.ts +6 -0
- package/classes/screenshare/Utils.d.ts +5 -0
- package/classes/transport/ServerTransport.d.ts +2 -0
- package/default/Api.d.ts +8 -3
- package/default/Api.test.d.ts +1 -0
- package/default/Signaling.d.ts +13 -2
- package/enums/ConversationFeature.d.ts +2 -1
- package/enums/ConversationOption.d.ts +3 -1
- package/enums/HangupType.d.ts +3 -1
- package/enums/LiveStatus.d.ts +7 -0
- package/enums/MediaOption.d.ts +3 -1
- package/enums/RoomsEventType.d.ts +6 -0
- package/enums/SignalingCommandType.d.ts +12 -1
- package/enums/SignalingNotification.d.ts +8 -1
- package/package.json +1 -1
- package/static/External.d.ts +43 -9
- package/static/Params.d.ts +69 -5
- package/static/Utils.d.ts +3 -1
- package/static/WebRTCUtils.d.ts +2 -1
- package/types/Asr.d.ts +5 -0
- package/types/Conversation.d.ts +12 -0
- package/types/ConversationFeature.d.ts +3 -0
- package/types/ConversationParams.d.ts +1 -0
- package/types/Feedback.d.ts +22 -0
- package/types/MediaSettings.d.ts +4 -0
- package/types/MovieShare.d.ts +33 -7
- package/types/ParticipantListChunk.d.ts +2 -0
- package/types/ParticipantStreamDescription.d.ts +2 -1
- package/types/Room.d.ts +71 -0
- package/types/SignalingMessage.d.ts +56 -0
- package/types/WaitingHall.d.ts +2 -8
- package/utils/ArrayDequeue.d.ts +24 -0
- package/utils/ArrayDequeue.spec.d.ts +1 -0
- package/utils/Conversation.d.ts +2 -0
- package/worker/LibVPxEncoderWorker.d.ts +1 -1
package/static/External.d.ts
CHANGED
|
@@ -6,13 +6,17 @@ import ChatRoomEventType from '../enums/ChatRoomEventType';
|
|
|
6
6
|
import ConversationOption from '../enums/ConversationOption';
|
|
7
7
|
import FatalError from '../enums/FatalError';
|
|
8
8
|
import MediaOption from '../enums/MediaOption';
|
|
9
|
+
import RoomsEventType from '../enums/RoomsEventType';
|
|
9
10
|
import UserRole from '../enums/UserRole';
|
|
11
|
+
import { IFeaturesPerRole } from '../types/ConversationFeature';
|
|
10
12
|
import { ExternalId, ExternalParticipant, ExternalParticipantId, ExternalParticipantListChunk, ExternalParticipantListMarkers } from '../types/ExternalId';
|
|
13
|
+
import { IFeedbackExternal } from '../types/Feedback';
|
|
11
14
|
import MediaModifiers from '../types/MediaModifiers';
|
|
12
15
|
import MediaSettings from '../types/MediaSettings';
|
|
13
|
-
import { ISharedMovieInfo, ISharedMovieState, ISharedMovieStoppedInfo } from '../types/MovieShare';
|
|
16
|
+
import { IOnRemoteMovieData, ISharedMovieInfo, ISharedMovieState, ISharedMovieStoppedInfo } from '../types/MovieShare';
|
|
14
17
|
import MuteStates from '../types/MuteStates';
|
|
15
18
|
import { ParticipantStateMapped } from '../types/Participant';
|
|
19
|
+
import { Room, RoomParticipantUpdate, Rooms, RoomsUpdate } from '../types/Room';
|
|
16
20
|
import { DebugMessageType } from './Debug';
|
|
17
21
|
import { JSONObject } from './Json';
|
|
18
22
|
/**
|
|
@@ -73,19 +77,17 @@ declare namespace External {
|
|
|
73
77
|
* Если сервер закончил стримить собеседника, вместо стрима будет передан null
|
|
74
78
|
*
|
|
75
79
|
* @param userId
|
|
76
|
-
* @param
|
|
77
|
-
* @param stream
|
|
80
|
+
* @param data
|
|
78
81
|
*/
|
|
79
|
-
function onRemoteLive(userId: ExternalParticipantId,
|
|
82
|
+
function onRemoteLive(userId: ExternalParticipantId, data: IOnRemoteMovieData): void;
|
|
80
83
|
/**
|
|
81
84
|
* Получен собственный стрим лайв.
|
|
82
85
|
* Если сервер закончил стримить собеседника, вместо стрима будет передан null
|
|
83
86
|
*
|
|
84
87
|
* @param userId
|
|
85
|
-
* @param
|
|
86
|
-
* @param stream
|
|
88
|
+
* @param data
|
|
87
89
|
*/
|
|
88
|
-
function onLocalLive(userId: ExternalParticipantId,
|
|
90
|
+
function onLocalLive(userId: ExternalParticipantId, data: IOnRemoteMovieData): void;
|
|
89
91
|
/**
|
|
90
92
|
* Получено обновление стрима или лайва от собеседника.
|
|
91
93
|
*
|
|
@@ -115,8 +117,9 @@ declare namespace External {
|
|
|
115
117
|
* @param mediaModifiers Текущие настройки пользовательского медиа
|
|
116
118
|
* @param muteStates Состояние устройств при входе в звонок
|
|
117
119
|
* @param participants Список участников звонка (при `Params.batchParticipantsOnStart = true`)
|
|
120
|
+
* @param rooms Список комнат в звонке
|
|
118
121
|
*/
|
|
119
|
-
function onConversation(userId: ExternalParticipantId, mediaModifiers: MediaModifiers, muteStates: MuteStates, participants?: ExternalParticipant[]): void;
|
|
122
|
+
function onConversation(userId: ExternalParticipantId, mediaModifiers: MediaModifiers, muteStates: MuteStates, participants?: ExternalParticipant[], rooms?: Rooms): void;
|
|
120
123
|
/**
|
|
121
124
|
* Постраничные данные про участников при начале звонка
|
|
122
125
|
* @param chunk
|
|
@@ -246,8 +249,10 @@ declare namespace External {
|
|
|
246
249
|
* @param unmute Разрешение включить устройство
|
|
247
250
|
* @param userId Пользователь, для которого изменились разрешения или `null` для текущего пользователя
|
|
248
251
|
* @param adminId Пользователь, который изменил разрешения
|
|
252
|
+
* @param stateUpdated Если `true`, значит глобальное/персональное состояние изменилось и поля `muteStates`/`unmuteOptions` содержат обновления, если `false`, значит, эти поля не имеют значения
|
|
253
|
+
* @param requestedMedia Какие устройства попросили влючить участника
|
|
249
254
|
*/
|
|
250
|
-
function onMuteStates(muteStates: MuteStates, unmuteOptions: MediaOption[], mediaOptions: MediaOption[], muteAll?: boolean, unmute?: boolean, userId?: ExternalParticipantId | null, adminId?: ExternalParticipantId | null): void;
|
|
255
|
+
function onMuteStates(muteStates: MuteStates, unmuteOptions: MediaOption[], mediaOptions: MediaOption[], muteAll?: boolean, unmute?: boolean, userId?: ExternalParticipantId | null, adminId?: ExternalParticipantId | null, stateUpdated?: boolean, requestedMedia?: MediaOption[]): void;
|
|
251
256
|
/**
|
|
252
257
|
* Изменились роли собеседника в звонке
|
|
253
258
|
*
|
|
@@ -412,5 +417,34 @@ declare namespace External {
|
|
|
412
417
|
* @param joinLink токен присоединения к звонку
|
|
413
418
|
*/
|
|
414
419
|
function onJoinLinkChanged(joinLink: string): void;
|
|
420
|
+
/**
|
|
421
|
+
*/
|
|
422
|
+
function onRoomsUpdated(updates: Partial<Record<RoomsEventType, RoomsUpdate>>): void;
|
|
423
|
+
/**
|
|
424
|
+
*/
|
|
425
|
+
function onRoomUpdated(eventTypes: RoomsEventType[], roomId: number, room: Room | null, deactivate: boolean | null): void;
|
|
426
|
+
/**
|
|
427
|
+
*/
|
|
428
|
+
function onRoomParticipantsUpdated(update: RoomParticipantUpdate): void;
|
|
429
|
+
/**
|
|
430
|
+
* Получена новая реакция
|
|
431
|
+
*/
|
|
432
|
+
function onFeedback(feedback: IFeedbackExternal[]): void;
|
|
433
|
+
/**
|
|
434
|
+
* Изменилось состояние пермиссий фич в звонке
|
|
435
|
+
*
|
|
436
|
+
* @param featuresPerRole Информация о доступных фичах по ролям
|
|
437
|
+
*/
|
|
438
|
+
function onFeaturesPerRoleChanged(featuresPerRole: IFeaturesPerRole): void;
|
|
439
|
+
/**
|
|
440
|
+
* Начата текстовая расшифровка звонка
|
|
441
|
+
* @param initiatorId Id пользователя, запустившего расшифровку звонка
|
|
442
|
+
* @param movieId Id расшифровки
|
|
443
|
+
*/
|
|
444
|
+
function onAsrStarted(initiatorId: ExternalParticipantId, movieId: number): void;
|
|
445
|
+
/**
|
|
446
|
+
* Закончена текстовая расшифровка звонка
|
|
447
|
+
*/
|
|
448
|
+
function onAsrStopped(): void;
|
|
415
449
|
}
|
|
416
450
|
export default External;
|
package/static/Params.d.ts
CHANGED
|
@@ -6,14 +6,18 @@ import ChatRoomEventType from '../enums/ChatRoomEventType';
|
|
|
6
6
|
import ConversationOption from '../enums/ConversationOption';
|
|
7
7
|
import FatalError from '../enums/FatalError';
|
|
8
8
|
import MediaOption from '../enums/MediaOption';
|
|
9
|
+
import RoomsEventType from '../enums/RoomsEventType';
|
|
9
10
|
import UserRole from '../enums/UserRole';
|
|
11
|
+
import { IFeaturesPerRole } from '../types/ConversationFeature';
|
|
10
12
|
import { ExternalId, ExternalParticipant, ExternalParticipantId, ExternalParticipantListChunk, ExternalParticipantListMarkers } from '../types/ExternalId';
|
|
13
|
+
import { IFeedbackExternal } from '../types/Feedback';
|
|
11
14
|
import IceServer from '../types/IceServer';
|
|
12
15
|
import MediaModifiers from '../types/MediaModifiers';
|
|
13
16
|
import MediaSettings from '../types/MediaSettings';
|
|
14
|
-
import { ISharedMovieInfo, ISharedMovieState, ISharedMovieStoppedInfo } from '../types/MovieShare';
|
|
17
|
+
import { IOnRemoteMovieData, ISharedMovieInfo, ISharedMovieState, ISharedMovieStoppedInfo } from '../types/MovieShare';
|
|
15
18
|
import MuteStates from '../types/MuteStates';
|
|
16
19
|
import { ParticipantStateMapped } from '../types/Participant';
|
|
20
|
+
import { Room, RoomParticipantUpdate, Rooms, RoomsUpdate } from '../types/Room';
|
|
17
21
|
import AuthData from './AuthData';
|
|
18
22
|
import { DebugMessageType } from './Debug';
|
|
19
23
|
import { ParticipantStatus } from './External';
|
|
@@ -25,6 +29,7 @@ import { FacingMode } from './WebRTCUtils';
|
|
|
25
29
|
export declare type ParamsObject = {
|
|
26
30
|
platform: string;
|
|
27
31
|
clientType: string;
|
|
32
|
+
externalUserType: string;
|
|
28
33
|
device: string;
|
|
29
34
|
/**
|
|
30
35
|
* API ключ приложения
|
|
@@ -44,6 +49,11 @@ export declare type ParamsObject = {
|
|
|
44
49
|
* Домен, чтобы попасть в тестовую группу. Для тестирования экспериментальных улучшений существуют отдельные сервера, чтобы собирать фидбек и уже потом раскатывать на всех юзеров. Если передать сюда специальный ключ, то конверсейшн будет обрабатываться на таком сервере.
|
|
45
50
|
*/
|
|
46
51
|
domain: string;
|
|
52
|
+
/**
|
|
53
|
+
* Домен, куда будет ходить Ok api за данными
|
|
54
|
+
* @hidden
|
|
55
|
+
*/
|
|
56
|
+
externalDomain: string;
|
|
47
57
|
iceServers: IceServer[];
|
|
48
58
|
wssBase: string;
|
|
49
59
|
wssToken: string;
|
|
@@ -231,6 +241,10 @@ export declare type ParamsObject = {
|
|
|
231
241
|
* Включить постраничный вывод участников. Работает только если включено videoTracksCount (слоты)
|
|
232
242
|
*/
|
|
233
243
|
useParticipantListChunk: boolean;
|
|
244
|
+
/**
|
|
245
|
+
* Включить комнаты
|
|
246
|
+
*/
|
|
247
|
+
useRooms: boolean;
|
|
234
248
|
/**
|
|
235
249
|
* Индекс участника для первого chunk'а который придет при установки соединения с сервером
|
|
236
250
|
*/
|
|
@@ -248,6 +262,11 @@ export declare type ParamsObject = {
|
|
|
248
262
|
* Включать RED-extension (redundancy) для p2p звонков
|
|
249
263
|
*/
|
|
250
264
|
p2pAudioRed: boolean;
|
|
265
|
+
/**
|
|
266
|
+
* Добавлять флаг spsPpsIdrInKeyframe для h264 кодека. В результате ключевые фреймы без sps и pps
|
|
267
|
+
* не используются как ключевые. Решает проблему с артефактами на видео в случае потерь пакетов.
|
|
268
|
+
*/
|
|
269
|
+
h264spsPpsIdrInKeyframe: boolean;
|
|
251
270
|
/**
|
|
252
271
|
* Получать список участников звонка третьим аргументом в `onConversation`
|
|
253
272
|
* @hidden
|
|
@@ -271,6 +290,11 @@ export declare type ParamsObject = {
|
|
|
271
290
|
* @hidden
|
|
272
291
|
*/
|
|
273
292
|
preserveAudioTracks: boolean;
|
|
293
|
+
/**
|
|
294
|
+
* Использовать congestion control для шаринга
|
|
295
|
+
* @hidden
|
|
296
|
+
*/
|
|
297
|
+
screenShareCongestionControl: boolean;
|
|
274
298
|
/**
|
|
275
299
|
* Получен локальный стрим с камеры/микрофона
|
|
276
300
|
*/
|
|
@@ -301,12 +325,12 @@ export declare type ParamsObject = {
|
|
|
301
325
|
* Получен стрим трансляция или мувик от собеседника.
|
|
302
326
|
* Если сервер закончил стримить экран собеседника, вместо стрима будет передан null
|
|
303
327
|
*/
|
|
304
|
-
onRemoteLive?: (userId: ExternalParticipantId,
|
|
328
|
+
onRemoteLive?: (userId: ExternalParticipantId, data: IOnRemoteMovieData) => void;
|
|
305
329
|
/**
|
|
306
330
|
* Получен собственный стрим трансляция или мувик.
|
|
307
331
|
* Если сервер закончил стримить экран собеседника, вместо стрима будет передан null
|
|
308
332
|
*/
|
|
309
|
-
onLocalLive?: (userId: ExternalParticipantId,
|
|
333
|
+
onLocalLive?: (userId: ExternalParticipantId, data: IOnRemoteMovieData) => void;
|
|
310
334
|
/**
|
|
311
335
|
* Получено обновление стрима или лайва от собеседника.
|
|
312
336
|
*/
|
|
@@ -318,7 +342,7 @@ export declare type ParamsObject = {
|
|
|
318
342
|
/**
|
|
319
343
|
* Начат звонок
|
|
320
344
|
*/
|
|
321
|
-
onConversation?: (userId: ExternalParticipantId, mediaModifiers: MediaModifiers, muteStates: MuteStates, participants?: ExternalParticipant[]) => void;
|
|
345
|
+
onConversation?: (userId: ExternalParticipantId, mediaModifiers: MediaModifiers, muteStates: MuteStates, participants?: ExternalParticipant[], rooms?: Rooms) => void;
|
|
322
346
|
/**
|
|
323
347
|
* Начальный список участников для постраничного звонка
|
|
324
348
|
*/
|
|
@@ -391,7 +415,7 @@ export declare type ParamsObject = {
|
|
|
391
415
|
/**
|
|
392
416
|
* Изменились состояния устройств пользователя или разрешения включать камеру/микрофон
|
|
393
417
|
*/
|
|
394
|
-
onMuteStates?: (muteStates: MuteStates, unmuteOptions: MediaOption[], mediaOptions: MediaOption[], muteAll: boolean, unmute: boolean, userId: ExternalParticipantId | null, adminId: ExternalParticipantId | null) => void;
|
|
418
|
+
onMuteStates?: (muteStates: MuteStates, unmuteOptions: MediaOption[], mediaOptions: MediaOption[], muteAll: boolean, unmute: boolean, userId: ExternalParticipantId | null, adminId: ExternalParticipantId | null, stateUpdated?: boolean, requestedMedia?: MediaOption[]) => void;
|
|
395
419
|
/**
|
|
396
420
|
* Изменились роли собеседника в звонке
|
|
397
421
|
*/
|
|
@@ -512,6 +536,39 @@ export declare type ParamsObject = {
|
|
|
512
536
|
* @param joinLink токен присоединения к звонку
|
|
513
537
|
*/
|
|
514
538
|
onJoinLinkChanged?: (joinLink: string) => void;
|
|
539
|
+
/**
|
|
540
|
+
* Получено обновление списка комнат
|
|
541
|
+
* @param updates список обновлений по комнатам
|
|
542
|
+
*/
|
|
543
|
+
onRoomsUpdated?: (updates: Partial<Record<RoomsEventType, RoomsUpdate>>) => void;
|
|
544
|
+
/**
|
|
545
|
+
* Получено обновление комнаты
|
|
546
|
+
* @param eventTypes список событий
|
|
547
|
+
* @param roomId номер комнаты
|
|
548
|
+
* @param room комната
|
|
549
|
+
*/
|
|
550
|
+
onRoomUpdated?: (eventTypes: RoomsEventType[], roomId: number, room: Room | null, deactivate: boolean | null) => void;
|
|
551
|
+
/**
|
|
552
|
+
* Получение обновление списка участников в комнате
|
|
553
|
+
* @param update обновление списка участников
|
|
554
|
+
*/
|
|
555
|
+
onRoomParticipantsUpdated?: (update: RoomParticipantUpdate) => void;
|
|
556
|
+
/**
|
|
557
|
+
* Получены новые реакции в звонке
|
|
558
|
+
* @param feedback массив с реакциями
|
|
559
|
+
*/
|
|
560
|
+
onFeedback?: (feedback: IFeedbackExternal[]) => void;
|
|
561
|
+
/**
|
|
562
|
+
* Включать capability c аудио шарой
|
|
563
|
+
*/
|
|
564
|
+
audioShareCapabilityEnabled: boolean;
|
|
565
|
+
/**
|
|
566
|
+
* Изменился список ролей, которым доступны ConversationFeatures
|
|
567
|
+
*
|
|
568
|
+
* @param featuresPerRole Объект вида ключ: ConversationFeature = значение: UserRole[]
|
|
569
|
+
* (если ключ фичи отсутствует, или в ролях пустой массив, считаем фичу доступной для всех пользователей)
|
|
570
|
+
*/
|
|
571
|
+
onFeaturesPerRoleChanged?: (featuresPerRole: IFeaturesPerRole) => void;
|
|
515
572
|
};
|
|
516
573
|
export default abstract class Params {
|
|
517
574
|
private static _params;
|
|
@@ -528,6 +585,8 @@ export default abstract class Params {
|
|
|
528
585
|
static set platform(value: string);
|
|
529
586
|
static get clientType(): string;
|
|
530
587
|
static set clientType(value: string);
|
|
588
|
+
static get externalUserType(): string;
|
|
589
|
+
static set externalUserType(value: string);
|
|
531
590
|
static get device(): string;
|
|
532
591
|
static get apiKey(): string;
|
|
533
592
|
static get apiEnv(): string;
|
|
@@ -537,6 +596,7 @@ export default abstract class Params {
|
|
|
537
596
|
static get anonymToken(): string;
|
|
538
597
|
static set anonymToken(value: string);
|
|
539
598
|
static get domain(): string;
|
|
599
|
+
static get externalDomain(): string;
|
|
540
600
|
static get iceServers(): IceServer[];
|
|
541
601
|
static set iceServers(value: IceServer[]);
|
|
542
602
|
static get wssBase(): string;
|
|
@@ -601,12 +661,16 @@ export default abstract class Params {
|
|
|
601
661
|
static get breakVideoPayloadTypes(): boolean;
|
|
602
662
|
static get filteredMessages(): boolean;
|
|
603
663
|
static get useParticipantListChunk(): boolean;
|
|
664
|
+
static get useRooms(): boolean;
|
|
604
665
|
static get participantListChunkInitIndex(): number;
|
|
605
666
|
static get participantListChunkInitCount(): number;
|
|
606
667
|
static get serverAudioRed(): boolean;
|
|
607
668
|
static get p2pAudioRed(): boolean;
|
|
669
|
+
static get h264spsPpsIdrInKeyframe(): boolean;
|
|
608
670
|
static get batchParticipantsOnStart(): boolean;
|
|
609
671
|
static get filterObservers(): boolean;
|
|
610
672
|
static get muteMode(): boolean;
|
|
611
673
|
static get preserveAudioTracks(): boolean;
|
|
674
|
+
static get audioShareCapabilityEnabled(): boolean;
|
|
675
|
+
static get screenShareCongestionControl(): boolean;
|
|
612
676
|
}
|
package/static/Utils.d.ts
CHANGED
|
@@ -6,7 +6,7 @@ import VideoSettings from '../types/VideoSettings';
|
|
|
6
6
|
export declare const PARAMETERS_SEPARATOR = ":";
|
|
7
7
|
export declare const DEVICE_IDX_PARAMETER = "d";
|
|
8
8
|
declare namespace Utils {
|
|
9
|
-
function patchSDP(sdp: string, preferH264: boolean, brokenH264: boolean, preferVP9: boolean, isAudioNack?: boolean, preferRed?: boolean): string;
|
|
9
|
+
function patchSDP(sdp: string, preferH264: boolean, brokenH264: boolean, preferVP9: boolean, h264spsPpsIdrInKeyframe: boolean, isAudioNack?: boolean, preferRed?: boolean): string;
|
|
10
10
|
function getPeerIdString(peerId: SignalingMessage.PeerId): string;
|
|
11
11
|
function comparePeerId(peerId1: SignalingMessage.PeerId, peerId2: SignalingMessage.PeerId): boolean;
|
|
12
12
|
function getPeerConnectionHostInfo(pc: RTCPeerConnection): Promise<any>;
|
|
@@ -62,5 +62,7 @@ declare namespace Utils {
|
|
|
62
62
|
function participantMarkerCompare(marker1: ExternalParticipantListMarker | undefined, marker2: ExternalParticipantListMarker | undefined): number;
|
|
63
63
|
/** убирает все ключи со значением `V` на 1 уровне */
|
|
64
64
|
function objectFilterOutValues<T extends Record<string, V>, V = unknown>(obj: T, value?: V | V[]): Partial<T>;
|
|
65
|
+
function objectReduce<R, T extends Object>(obj: T, callback: (acc: R, value: T[keyof T], key: keyof T) => R, initialValue: R): R;
|
|
66
|
+
const setImmediate: (fn: VoidFunction) => VoidFunction;
|
|
65
67
|
}
|
|
66
68
|
export default Utils;
|
package/static/WebRTCUtils.d.ts
CHANGED
|
@@ -66,7 +66,7 @@ declare namespace WebRTCUtils {
|
|
|
66
66
|
/**
|
|
67
67
|
* Запрашивает трансляцию экрана пользователя
|
|
68
68
|
*/
|
|
69
|
-
function getScreenMedia(): Promise<MediaStream>;
|
|
69
|
+
function getScreenMedia(withAudioShare: boolean): Promise<MediaStream>;
|
|
70
70
|
/**
|
|
71
71
|
* Запрашивает камеру пользователя
|
|
72
72
|
*
|
|
@@ -146,5 +146,6 @@ declare namespace WebRTCUtils {
|
|
|
146
146
|
* Возвращает подверсию браузера (если она есть)
|
|
147
147
|
*/
|
|
148
148
|
function browserSubVersion(): string;
|
|
149
|
+
function isAudioShareSupported(): boolean;
|
|
149
150
|
}
|
|
150
151
|
export default WebRTCUtils;
|
package/types/Asr.d.ts
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import MediaOption from '../enums/MediaOption';
|
|
2
|
+
import MediaSettings from './MediaSettings';
|
|
3
|
+
import { Participant } from './Participant';
|
|
4
|
+
export interface IProcessMuteStateParams {
|
|
5
|
+
mediaOptions?: MediaOption[];
|
|
6
|
+
muteAll?: boolean;
|
|
7
|
+
unmute?: boolean;
|
|
8
|
+
serverSettings?: MediaSettings | null;
|
|
9
|
+
admin?: Participant | null;
|
|
10
|
+
stateUpdated?: boolean;
|
|
11
|
+
requestedMedia?: MediaOption[];
|
|
12
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { CompositeUserId } from './Participant';
|
|
2
|
+
import { ExternalParticipantId } from './ExternalId';
|
|
3
|
+
interface IFeedbackItem {
|
|
4
|
+
participantId: CompositeUserId;
|
|
5
|
+
/** event timestamps for this participant, chronologically */
|
|
6
|
+
times: number[];
|
|
7
|
+
}
|
|
8
|
+
export interface IFeedbackItemExternal extends Omit<IFeedbackItem, 'participantId'> {
|
|
9
|
+
participantId: ExternalParticipantId;
|
|
10
|
+
}
|
|
11
|
+
export interface IFeedback {
|
|
12
|
+
/** feedback ID; key values should be negotiated by clients themselves, like in ParticipantState, and have just the same restrictions; on backend the values of these keys are not bound in any way to those in ParticipantState */
|
|
13
|
+
key: string;
|
|
14
|
+
/** total amount of reactions of this type from the start of this call */
|
|
15
|
+
totalCount: number;
|
|
16
|
+
/** list of items containing initiator & all related data, if any */
|
|
17
|
+
items: IFeedbackItem[];
|
|
18
|
+
}
|
|
19
|
+
export interface IFeedbackExternal extends Omit<IFeedback, 'items'> {
|
|
20
|
+
items: IFeedbackItemExternal[];
|
|
21
|
+
}
|
|
22
|
+
export {};
|
package/types/MediaSettings.d.ts
CHANGED
|
@@ -14,6 +14,10 @@ export declare type MediaSettings = {
|
|
|
14
14
|
* Включена ли трансляция экрана
|
|
15
15
|
*/
|
|
16
16
|
isScreenSharingEnabled: boolean;
|
|
17
|
+
/**
|
|
18
|
+
* Включена ли трансляция звука
|
|
19
|
+
*/
|
|
20
|
+
isAudioSharingEnabled: boolean;
|
|
17
21
|
videoStreams: VideoStreamInfo[];
|
|
18
22
|
};
|
|
19
23
|
export declare type VideoStreamInfo = {
|
package/types/MovieShare.d.ts
CHANGED
|
@@ -1,16 +1,41 @@
|
|
|
1
|
+
import LiveStatus from '../enums/LiveStatus';
|
|
1
2
|
import { OkUserId, CompositeUserId } from './Participant';
|
|
2
3
|
import { MediaType } from './ParticipantStreamDescription';
|
|
4
|
+
export interface IMoviePreview {
|
|
5
|
+
url: string;
|
|
6
|
+
width: number;
|
|
7
|
+
height: number;
|
|
8
|
+
}
|
|
3
9
|
export interface IAddMovieParams {
|
|
4
10
|
movieId: string;
|
|
5
11
|
gain?: number;
|
|
12
|
+
metadata?: {
|
|
13
|
+
title?: string;
|
|
14
|
+
thumbnails?: IMoviePreview[];
|
|
15
|
+
};
|
|
6
16
|
}
|
|
7
|
-
export declare type ISharedMovieStateResponse = [
|
|
17
|
+
export declare type ISharedMovieStateResponse = [
|
|
18
|
+
number,
|
|
19
|
+
number,
|
|
20
|
+
boolean,
|
|
21
|
+
number,
|
|
22
|
+
boolean,
|
|
23
|
+
number
|
|
24
|
+
];
|
|
8
25
|
export interface ISharedMovieState {
|
|
9
26
|
participantId: CompositeUserId;
|
|
10
27
|
gain?: number;
|
|
11
28
|
pause?: boolean;
|
|
12
29
|
offset?: number;
|
|
13
|
-
|
|
30
|
+
mute?: boolean;
|
|
31
|
+
liveStatus?: LiveStatus;
|
|
32
|
+
}
|
|
33
|
+
export interface IUpdateMovieData {
|
|
34
|
+
movieId: string;
|
|
35
|
+
gain?: number;
|
|
36
|
+
pause?: boolean;
|
|
37
|
+
offset?: number;
|
|
38
|
+
mute?: boolean;
|
|
14
39
|
}
|
|
15
40
|
export interface ISharedMovieInfo {
|
|
16
41
|
movieId: OkUserId;
|
|
@@ -19,14 +44,15 @@ export interface ISharedMovieInfo {
|
|
|
19
44
|
source: MediaType;
|
|
20
45
|
externalMovieId: string;
|
|
21
46
|
duration: number;
|
|
22
|
-
|
|
23
|
-
thumbnailMedium: string;
|
|
24
|
-
thumbnailBig: string;
|
|
25
|
-
thumbnailHigh: string;
|
|
26
|
-
thumbnailHd: string;
|
|
47
|
+
thumbnails: IMoviePreview[];
|
|
27
48
|
}
|
|
28
49
|
export interface ISharedMovieStoppedInfo {
|
|
29
50
|
movieId: OkUserId;
|
|
30
51
|
initiatorId: CompositeUserId;
|
|
31
52
|
source: MediaType;
|
|
32
53
|
}
|
|
54
|
+
export interface IOnRemoteMovieData {
|
|
55
|
+
streamName: string;
|
|
56
|
+
stream: MediaStream | null;
|
|
57
|
+
mediaType: MediaType;
|
|
58
|
+
}
|
|
@@ -10,4 +10,6 @@ export interface ParticipantListChunkParameters {
|
|
|
10
10
|
backward?: boolean;
|
|
11
11
|
/** If true then resulting chunk will start from Participant with specified marker, if such Participant (still) exists */
|
|
12
12
|
includeMarker?: boolean;
|
|
13
|
+
/** optional, id of the room to get chunk for, main call if unspecified */
|
|
14
|
+
roomId?: number;
|
|
13
15
|
}
|
|
@@ -6,7 +6,8 @@ export declare enum MediaType {
|
|
|
6
6
|
CAMERA = "CAMERA",
|
|
7
7
|
SCREEN = "SCREEN",
|
|
8
8
|
STREAM = "STREAM",
|
|
9
|
-
MOVIE = "MOVIE"
|
|
9
|
+
MOVIE = "MOVIE",
|
|
10
|
+
AUDIOSHARE = "AUDIOSHARE"
|
|
10
11
|
}
|
|
11
12
|
export declare function serializeParticipantStreamDescription(description: ParticipantStreamDescription): string;
|
|
12
13
|
export declare function parseParticipantStreamDescription(descriptionString: string): ParticipantStreamDescription;
|
package/types/Room.d.ts
ADDED
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
import { ExternalParticipantId, ExternalParticipantListChunk } from './ExternalId';
|
|
2
|
+
import { Participant, ParticipantListMarkers } from './Participant';
|
|
3
|
+
export interface Room {
|
|
4
|
+
id: number;
|
|
5
|
+
/**
|
|
6
|
+
* name of this room
|
|
7
|
+
*/
|
|
8
|
+
name: string;
|
|
9
|
+
/**
|
|
10
|
+
* count of participants (read/write, optional)
|
|
11
|
+
*/
|
|
12
|
+
participantCount: number;
|
|
13
|
+
/**
|
|
14
|
+
* ids of all participants (read/write, optional)
|
|
15
|
+
*/
|
|
16
|
+
participantIds: ExternalParticipantId[];
|
|
17
|
+
/**
|
|
18
|
+
* ids of participants to be added to this room (read/write, optional)
|
|
19
|
+
*/
|
|
20
|
+
addParticipantIds?: ExternalParticipantId[];
|
|
21
|
+
/**
|
|
22
|
+
* ids of participants to be removed from this room (read/write, optional)
|
|
23
|
+
*/
|
|
24
|
+
removeParticipantIds?: ExternalParticipantId[];
|
|
25
|
+
/**
|
|
26
|
+
* if participant requested then contains first chunk of participants in this rooms
|
|
27
|
+
* (if client fails to support chunks, then contains all participant in this room)
|
|
28
|
+
* (read, optional)
|
|
29
|
+
*/
|
|
30
|
+
participants?: ExternalParticipantListChunk;
|
|
31
|
+
/**
|
|
32
|
+
* if this room is active (read/write, optional)
|
|
33
|
+
*/
|
|
34
|
+
active?: boolean;
|
|
35
|
+
}
|
|
36
|
+
/**
|
|
37
|
+
* Initial rooms state
|
|
38
|
+
*/
|
|
39
|
+
export interface Rooms {
|
|
40
|
+
rooms: Room[];
|
|
41
|
+
/**
|
|
42
|
+
* current room id of participant. if null then the partipant is in the main call
|
|
43
|
+
*/
|
|
44
|
+
roomId?: number;
|
|
45
|
+
}
|
|
46
|
+
export interface RoomsUpdate {
|
|
47
|
+
rooms?: Room[];
|
|
48
|
+
roomIds?: number[];
|
|
49
|
+
deactivated?: boolean;
|
|
50
|
+
}
|
|
51
|
+
export interface RoomParticipantUpdate {
|
|
52
|
+
roomId: number;
|
|
53
|
+
/**
|
|
54
|
+
* total number of participants in the room
|
|
55
|
+
*/
|
|
56
|
+
participantCount: number;
|
|
57
|
+
/**
|
|
58
|
+
* ids of added participants, always present (if any) so participants would be able
|
|
59
|
+
* to identify their presence in particular room
|
|
60
|
+
*/
|
|
61
|
+
addedParticipantIds?: ExternalParticipantId[];
|
|
62
|
+
/**
|
|
63
|
+
* optional, data for added participants
|
|
64
|
+
*/
|
|
65
|
+
addedParticipants?: Participant[];
|
|
66
|
+
/**
|
|
67
|
+
* optional, depending on the context may contain either markers
|
|
68
|
+
* for all (sorted) lists available or be empty (if client fails to support chunked participants)
|
|
69
|
+
*/
|
|
70
|
+
removedParticipantMarkers?: ParticipantListMarkers;
|
|
71
|
+
}
|
|
@@ -5,8 +5,12 @@ import ConversationOption from '../enums/ConversationOption';
|
|
|
5
5
|
import HangupType from '../enums/HangupType';
|
|
6
6
|
import MediaOption from '../enums/MediaOption';
|
|
7
7
|
import ParticipantState from '../enums/ParticipantState';
|
|
8
|
+
import RoomsEventType from '../enums/RoomsEventType';
|
|
8
9
|
import UserRole from '../enums/UserRole';
|
|
9
10
|
import UserType from '../enums/UserType';
|
|
11
|
+
import { IFeaturesPerRole } from './ConversationFeature';
|
|
12
|
+
import { IFeedback } from './Feedback';
|
|
13
|
+
import { AsrInfo } from './Asr';
|
|
10
14
|
import MediaModifiers from './MediaModifiers';
|
|
11
15
|
import MediaSettings from './MediaSettings';
|
|
12
16
|
import { ISharedMovieInfo, ISharedMovieState, ISharedMovieStoppedInfo } from './MovieShare';
|
|
@@ -74,10 +78,23 @@ declare namespace SignalingMessage {
|
|
|
74
78
|
multichatId: string | null;
|
|
75
79
|
tamtamMultichatId: string | null;
|
|
76
80
|
recordInfo: RecordInfo | null;
|
|
81
|
+
featuresPerRole?: IFeaturesPerRole | null;
|
|
77
82
|
pinnedParticipantId: ParticipantId | null;
|
|
78
83
|
options: ConversationOption[];
|
|
79
84
|
muteStates?: MuteStates;
|
|
80
85
|
}
|
|
86
|
+
export interface Room extends SignalingMessage {
|
|
87
|
+
id?: number;
|
|
88
|
+
name?: string;
|
|
89
|
+
participantCount?: number;
|
|
90
|
+
participantIds?: CompositeUserId[];
|
|
91
|
+
addParticipantIds?: CompositeUserId[];
|
|
92
|
+
removeParticipantIds?: CompositeUserId[];
|
|
93
|
+
participants?: ParticipantListChunk;
|
|
94
|
+
active?: boolean;
|
|
95
|
+
countdownSec?: number;
|
|
96
|
+
timeoutMs?: number;
|
|
97
|
+
}
|
|
81
98
|
interface Notification extends SignalingMessage {
|
|
82
99
|
type?: string;
|
|
83
100
|
notification?: string;
|
|
@@ -150,6 +167,8 @@ declare namespace SignalingMessage {
|
|
|
150
167
|
muteStates: MuteStates;
|
|
151
168
|
unmuteOptions?: MediaOption[];
|
|
152
169
|
mediaOptions: MediaOption[];
|
|
170
|
+
requestedMedia?: MediaOption[];
|
|
171
|
+
stateUpdated?: boolean;
|
|
153
172
|
unmute?: boolean;
|
|
154
173
|
muteAll?: boolean;
|
|
155
174
|
}
|
|
@@ -186,6 +205,7 @@ declare namespace SignalingMessage {
|
|
|
186
205
|
}
|
|
187
206
|
export interface FeatureSetChanged extends Notification {
|
|
188
207
|
features: ConversationFeature[];
|
|
208
|
+
featuresPerRole?: IFeaturesPerRole | null;
|
|
189
209
|
}
|
|
190
210
|
export interface MultipartyChatCreated extends Notification {
|
|
191
211
|
chatId: string;
|
|
@@ -275,10 +295,17 @@ declare namespace SignalingMessage {
|
|
|
275
295
|
mediaModifiers: MediaModifiers;
|
|
276
296
|
participants?: ParticipantListChunk;
|
|
277
297
|
chatRoom?: ChatRoom;
|
|
298
|
+
rooms?: {
|
|
299
|
+
rooms: Room[];
|
|
300
|
+
roomId?: number;
|
|
301
|
+
};
|
|
278
302
|
}
|
|
279
303
|
export interface JoinLinkChanged extends Notification {
|
|
280
304
|
joinLink: string;
|
|
281
305
|
}
|
|
306
|
+
export interface Feedback extends Notification {
|
|
307
|
+
feedback: IFeedback[];
|
|
308
|
+
}
|
|
282
309
|
export interface SharedMovieState extends Notification {
|
|
283
310
|
data: ISharedMovieState[];
|
|
284
311
|
}
|
|
@@ -287,6 +314,35 @@ declare namespace SignalingMessage {
|
|
|
287
314
|
}
|
|
288
315
|
export interface SharedMovieStoppedInfo extends Notification, ISharedMovieStoppedInfo {
|
|
289
316
|
}
|
|
317
|
+
export interface RoomsUpdated extends Notification {
|
|
318
|
+
updates: Partial<Record<RoomsEventType, {
|
|
319
|
+
rooms?: Room;
|
|
320
|
+
roomIds?: number[];
|
|
321
|
+
deactivated?: boolean;
|
|
322
|
+
}>>;
|
|
323
|
+
}
|
|
324
|
+
export interface RoomUpdated extends Notification {
|
|
325
|
+
events: RoomsEventType[];
|
|
326
|
+
room?: Room;
|
|
327
|
+
roomId: number;
|
|
328
|
+
deactivate?: boolean;
|
|
329
|
+
}
|
|
330
|
+
export interface RoomParticipantsUpdated extends Notification {
|
|
331
|
+
roomId: number;
|
|
332
|
+
participantCount: number;
|
|
333
|
+
addedParticipantIds?: CompositeUserId[];
|
|
334
|
+
addedParticipants?: Participant[];
|
|
335
|
+
removedParticipantMarkers?: ParticipantListMarkers;
|
|
336
|
+
}
|
|
337
|
+
export interface FeaturesPerRoleChanged extends Notification {
|
|
338
|
+
featuresPerRole?: IFeaturesPerRole | null;
|
|
339
|
+
}
|
|
340
|
+
export interface AsrStarted extends Notification {
|
|
341
|
+
asrInfo: AsrInfo;
|
|
342
|
+
}
|
|
343
|
+
export interface AsrStopped extends Notification {
|
|
344
|
+
movieId: number;
|
|
345
|
+
}
|
|
290
346
|
export {};
|
|
291
347
|
}
|
|
292
348
|
export default SignalingMessage;
|