@vkontakte/calls-sdk 2.6.2-dev.c83d2bc.0 → 2.6.2-dev.cce48ad.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 -11
- 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 +32 -5
- package/classes/MediaSource.d.ts +7 -2
- package/classes/ProducerCommandSerializationService.d.ts +2 -0
- 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 +7 -3
- package/default/Signaling.d.ts +13 -2
- package/enums/ConversationFeature.d.ts +2 -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 +11 -1
- package/enums/SignalingNotification.d.ts +11 -1
- package/package.json +1 -1
- package/static/External.d.ts +90 -4
- package/static/Params.d.ts +82 -2
- package/static/WebRTCUtils.d.ts +2 -1
- package/types/Asr.d.ts +5 -0
- package/types/ConversationFeature.d.ts +3 -0
- package/types/ConversationParams.d.ts +1 -0
- package/types/ExternalId.d.ts +2 -0
- package/types/MediaSettings.d.ts +5 -1
- package/types/MovieShare.d.ts +58 -0
- package/types/Participant.d.ts +2 -0
- 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 +58 -0
- package/types/WaitingHall.d.ts +2 -8
- package/utils/ArrayDequeue.d.ts +24 -0
- package/utils/ArrayDequeue.spec.d.ts +1 -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';
|
|
11
13
|
import { IFeedbackExternal } from '../types/Feedback';
|
|
12
14
|
import MediaModifiers from '../types/MediaModifiers';
|
|
13
15
|
import MediaSettings from '../types/MediaSettings';
|
|
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,10 +77,31 @@ declare namespace External {
|
|
|
73
77
|
* Если сервер закончил стримить собеседника, вместо стрима будет передан null
|
|
74
78
|
*
|
|
75
79
|
* @param userId
|
|
76
|
-
* @param
|
|
77
|
-
|
|
80
|
+
* @param data
|
|
81
|
+
*/
|
|
82
|
+
function onRemoteLive(userId: ExternalParticipantId, data: IOnRemoteMovieData): void;
|
|
83
|
+
/**
|
|
84
|
+
* Получен собственный стрим лайв.
|
|
85
|
+
* Если сервер закончил стримить собеседника, вместо стрима будет передан null
|
|
86
|
+
*
|
|
87
|
+
* @param userId
|
|
88
|
+
* @param data
|
|
89
|
+
*/
|
|
90
|
+
function onLocalLive(userId: ExternalParticipantId, data: IOnRemoteMovieData): void;
|
|
91
|
+
/**
|
|
92
|
+
* Получено обновление стрима или лайва от собеседника.
|
|
93
|
+
*
|
|
94
|
+
* @param userId
|
|
95
|
+
* @param data
|
|
78
96
|
*/
|
|
79
|
-
function
|
|
97
|
+
function onRemoteLiveUpdate(userId: ExternalParticipantId, data: ISharedMovieState): void;
|
|
98
|
+
/**
|
|
99
|
+
* Получено обновление собственного стрима или лайва.
|
|
100
|
+
*
|
|
101
|
+
* @param userId
|
|
102
|
+
* @param data
|
|
103
|
+
*/
|
|
104
|
+
function onLocalLiveUpdate(userId: ExternalParticipantId, data: ISharedMovieState): void;
|
|
80
105
|
/**
|
|
81
106
|
* Получен стрим с экрана собеседника.
|
|
82
107
|
* Если сервер закончил стримить экран собеседника, вместо стрима будет передан null
|
|
@@ -92,8 +117,9 @@ declare namespace External {
|
|
|
92
117
|
* @param mediaModifiers Текущие настройки пользовательского медиа
|
|
93
118
|
* @param muteStates Состояние устройств при входе в звонок
|
|
94
119
|
* @param participants Список участников звонка (при `Params.batchParticipantsOnStart = true`)
|
|
120
|
+
* @param rooms Список комнат в звонке
|
|
95
121
|
*/
|
|
96
|
-
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;
|
|
97
123
|
/**
|
|
98
124
|
* Постраничные данные про участников при начале звонка
|
|
99
125
|
* @param chunk
|
|
@@ -107,6 +133,41 @@ declare namespace External {
|
|
|
107
133
|
* @param markers
|
|
108
134
|
*/
|
|
109
135
|
function onRemoteMediaSettings(userId: ExternalParticipantId, mediaSettings: MediaSettings, markers?: ExternalParticipantListMarkers): void;
|
|
136
|
+
/**
|
|
137
|
+
* Изменились данные собственного стрима
|
|
138
|
+
*
|
|
139
|
+
* @param userId
|
|
140
|
+
* @param mediaSettings
|
|
141
|
+
*/
|
|
142
|
+
function onLocalMediaSettings(userId: ExternalParticipantId, mediaSettings: MediaSettings): void;
|
|
143
|
+
/**
|
|
144
|
+
* Полученны данные по стримам (лайв/мувик) от собеседника
|
|
145
|
+
*
|
|
146
|
+
* @param userId
|
|
147
|
+
* @param sharedMovieInfo
|
|
148
|
+
*/
|
|
149
|
+
function onRemoteSharedMovieInfo(userId: ExternalParticipantId, sharedMovieInfo: ISharedMovieInfo): void;
|
|
150
|
+
/**
|
|
151
|
+
* Полученны данные по остановленным стримам (лайв/мувик) от собеседника
|
|
152
|
+
*
|
|
153
|
+
* @param userId
|
|
154
|
+
* @param sharedMovieStoppedInfo
|
|
155
|
+
*/
|
|
156
|
+
function onRemoteSharedMovieStoppedInfo(userId: ExternalParticipantId, sharedMovieStoppedInfo: ISharedMovieStoppedInfo): void;
|
|
157
|
+
/**
|
|
158
|
+
* Полученны данные по собственным стримам (лайв/мувик)
|
|
159
|
+
*
|
|
160
|
+
* @param userId
|
|
161
|
+
* @param sharedMovieInfo
|
|
162
|
+
*/
|
|
163
|
+
function onLocalSharedMovieInfo(userId: ExternalParticipantId, sharedMovieInfo: ISharedMovieInfo): void;
|
|
164
|
+
/**
|
|
165
|
+
* Полученны данные по собственным остановленным стримам (лайв/мувик)
|
|
166
|
+
*
|
|
167
|
+
* @param userId
|
|
168
|
+
* @param sharedMovieStoppedInfo
|
|
169
|
+
*/
|
|
170
|
+
function onLocalSharedMovieStoppedInfo(userId: ExternalParticipantId, sharedMovieStoppedInfo: ISharedMovieStoppedInfo): void;
|
|
110
171
|
/**
|
|
111
172
|
* Добавили участника
|
|
112
173
|
*
|
|
@@ -356,9 +417,34 @@ declare namespace External {
|
|
|
356
417
|
* @param joinLink токен присоединения к звонку
|
|
357
418
|
*/
|
|
358
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;
|
|
359
429
|
/**
|
|
360
430
|
* Получена новая реакция
|
|
361
431
|
*/
|
|
362
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;
|
|
363
449
|
}
|
|
364
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';
|
|
11
13
|
import { IFeedbackExternal } from '../types/Feedback';
|
|
12
14
|
import IceServer from '../types/IceServer';
|
|
13
15
|
import MediaModifiers from '../types/MediaModifiers';
|
|
14
16
|
import MediaSettings from '../types/MediaSettings';
|
|
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 ключ приложения
|
|
@@ -236,6 +241,10 @@ export declare type ParamsObject = {
|
|
|
236
241
|
* Включить постраничный вывод участников. Работает только если включено videoTracksCount (слоты)
|
|
237
242
|
*/
|
|
238
243
|
useParticipantListChunk: boolean;
|
|
244
|
+
/**
|
|
245
|
+
* Включить комнаты
|
|
246
|
+
*/
|
|
247
|
+
useRooms: boolean;
|
|
239
248
|
/**
|
|
240
249
|
* Индекс участника для первого chunk'а который придет при установки соединения с сервером
|
|
241
250
|
*/
|
|
@@ -281,6 +290,11 @@ export declare type ParamsObject = {
|
|
|
281
290
|
* @hidden
|
|
282
291
|
*/
|
|
283
292
|
preserveAudioTracks: boolean;
|
|
293
|
+
/**
|
|
294
|
+
* Использовать congestion control для шаринга
|
|
295
|
+
* @hidden
|
|
296
|
+
*/
|
|
297
|
+
screenShareCongestionControl: boolean;
|
|
284
298
|
/**
|
|
285
299
|
* Получен локальный стрим с камеры/микрофона
|
|
286
300
|
*/
|
|
@@ -311,11 +325,24 @@ export declare type ParamsObject = {
|
|
|
311
325
|
* Получен стрим трансляция или мувик от собеседника.
|
|
312
326
|
* Если сервер закончил стримить экран собеседника, вместо стрима будет передан null
|
|
313
327
|
*/
|
|
314
|
-
onRemoteLive?: (userId: ExternalParticipantId,
|
|
328
|
+
onRemoteLive?: (userId: ExternalParticipantId, data: IOnRemoteMovieData) => void;
|
|
329
|
+
/**
|
|
330
|
+
* Получен собственный стрим трансляция или мувик.
|
|
331
|
+
* Если сервер закончил стримить экран собеседника, вместо стрима будет передан null
|
|
332
|
+
*/
|
|
333
|
+
onLocalLive?: (userId: ExternalParticipantId, data: IOnRemoteMovieData) => void;
|
|
334
|
+
/**
|
|
335
|
+
* Получено обновление стрима или лайва от собеседника.
|
|
336
|
+
*/
|
|
337
|
+
onRemoteLiveUpdate?: (userId: ExternalParticipantId, data: ISharedMovieState) => void;
|
|
338
|
+
/**
|
|
339
|
+
* Получено обновление собственного стрима или лайва.
|
|
340
|
+
*/
|
|
341
|
+
onLocalLiveUpdate?: (userId: ExternalParticipantId, data: ISharedMovieState) => void;
|
|
315
342
|
/**
|
|
316
343
|
* Начат звонок
|
|
317
344
|
*/
|
|
318
|
-
onConversation?: (userId: ExternalParticipantId, mediaModifiers: MediaModifiers, muteStates: MuteStates, participants?: ExternalParticipant[]) => void;
|
|
345
|
+
onConversation?: (userId: ExternalParticipantId, mediaModifiers: MediaModifiers, muteStates: MuteStates, participants?: ExternalParticipant[], rooms?: Rooms) => void;
|
|
319
346
|
/**
|
|
320
347
|
* Начальный список участников для постраничного звонка
|
|
321
348
|
*/
|
|
@@ -324,6 +351,26 @@ export declare type ParamsObject = {
|
|
|
324
351
|
* Изменились данные стрима собеседника
|
|
325
352
|
*/
|
|
326
353
|
onRemoteMediaSettings?: (userId: ExternalParticipantId, mediaSettings: MediaSettings, markers?: ExternalParticipantListMarkers) => void;
|
|
354
|
+
/**
|
|
355
|
+
* Изменились данные стрима собеседника
|
|
356
|
+
*/
|
|
357
|
+
onLocalMediaSettings?: (userId: ExternalParticipantId, mediaSettings: MediaSettings) => void;
|
|
358
|
+
/**
|
|
359
|
+
* Полученны данные по стримам (лайв/мувик) от собеседника
|
|
360
|
+
*/
|
|
361
|
+
onRemoteSharedMovieInfo?: (userId: ExternalParticipantId, sharedMovieInfo: ISharedMovieInfo) => void;
|
|
362
|
+
/**
|
|
363
|
+
* Полученны данные по остановленным стримам (лайв/мувик) от собеседника
|
|
364
|
+
*/
|
|
365
|
+
onRemoteSharedMovieStoppedInfo?: (userId: ExternalParticipantId, sharedMovieStoppedInfo: ISharedMovieStoppedInfo) => void;
|
|
366
|
+
/**
|
|
367
|
+
* Полученны данные по собственным стримам (лайв/мувик)
|
|
368
|
+
*/
|
|
369
|
+
onLocalSharedMovieInfo?: (userId: ExternalParticipantId, sharedMovieInfo: ISharedMovieInfo) => void;
|
|
370
|
+
/**
|
|
371
|
+
* Полученны данные по собственным остановленным стримам (лайв/мувик)
|
|
372
|
+
*/
|
|
373
|
+
onLocalSharedMovieStoppedInfo?: (userId: ExternalParticipantId, sharedMovieStoppedInfo: ISharedMovieStoppedInfo) => void;
|
|
327
374
|
/**
|
|
328
375
|
* Добавили участника
|
|
329
376
|
*/
|
|
@@ -489,11 +536,39 @@ export declare type ParamsObject = {
|
|
|
489
536
|
* @param joinLink токен присоединения к звонку
|
|
490
537
|
*/
|
|
491
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;
|
|
492
556
|
/**
|
|
493
557
|
* Получены новые реакции в звонке
|
|
494
558
|
* @param feedback массив с реакциями
|
|
495
559
|
*/
|
|
496
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;
|
|
497
572
|
};
|
|
498
573
|
export default abstract class Params {
|
|
499
574
|
private static _params;
|
|
@@ -510,6 +585,8 @@ export default abstract class Params {
|
|
|
510
585
|
static set platform(value: string);
|
|
511
586
|
static get clientType(): string;
|
|
512
587
|
static set clientType(value: string);
|
|
588
|
+
static get externalUserType(): string;
|
|
589
|
+
static set externalUserType(value: string);
|
|
513
590
|
static get device(): string;
|
|
514
591
|
static get apiKey(): string;
|
|
515
592
|
static get apiEnv(): string;
|
|
@@ -584,6 +661,7 @@ export default abstract class Params {
|
|
|
584
661
|
static get breakVideoPayloadTypes(): boolean;
|
|
585
662
|
static get filteredMessages(): boolean;
|
|
586
663
|
static get useParticipantListChunk(): boolean;
|
|
664
|
+
static get useRooms(): boolean;
|
|
587
665
|
static get participantListChunkInitIndex(): number;
|
|
588
666
|
static get participantListChunkInitCount(): number;
|
|
589
667
|
static get serverAudioRed(): boolean;
|
|
@@ -593,4 +671,6 @@ export default abstract class Params {
|
|
|
593
671
|
static get filterObservers(): boolean;
|
|
594
672
|
static get muteMode(): boolean;
|
|
595
673
|
static get preserveAudioTracks(): boolean;
|
|
674
|
+
static get audioShareCapabilityEnabled(): boolean;
|
|
675
|
+
static get screenShareCongestionControl(): boolean;
|
|
596
676
|
}
|
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
package/types/ExternalId.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import MediaOption from '../enums/MediaOption';
|
|
2
2
|
import { ParticipantStatus } from '../static/External';
|
|
3
3
|
import MediaSettings from './MediaSettings';
|
|
4
|
+
import { ISharedMovieInfo } from './MovieShare';
|
|
4
5
|
import MuteStates from './MuteStates';
|
|
5
6
|
import { ParticipantListMarker, ParticipantListType, ParticipantStateMapped } from './Participant';
|
|
6
7
|
import SignalingMessage from './SignalingMessage';
|
|
@@ -94,6 +95,7 @@ export interface ExternalParticipant {
|
|
|
94
95
|
*/
|
|
95
96
|
unmuteOptions: MediaOption[];
|
|
96
97
|
markers?: ExternalParticipantListMarkers;
|
|
98
|
+
movieShareInfos?: ISharedMovieInfo[];
|
|
97
99
|
}
|
|
98
100
|
export interface ExternalParticipantListChunk {
|
|
99
101
|
participants: ExternalParticipant[];
|
package/types/MediaSettings.d.ts
CHANGED
|
@@ -14,12 +14,16 @@ 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 = {
|
|
20
24
|
id: string;
|
|
21
25
|
source: string;
|
|
22
|
-
|
|
26
|
+
externalMovieId?: string;
|
|
23
27
|
};
|
|
24
28
|
export default MediaSettings;
|
|
25
29
|
export declare function compareMediaSettings(ms1: MediaSettings, ms2: MediaSettings): boolean;
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import LiveStatus from '../enums/LiveStatus';
|
|
2
|
+
import { OkUserId, CompositeUserId } from './Participant';
|
|
3
|
+
import { MediaType } from './ParticipantStreamDescription';
|
|
4
|
+
export interface IMoviePreview {
|
|
5
|
+
url: string;
|
|
6
|
+
width: number;
|
|
7
|
+
height: number;
|
|
8
|
+
}
|
|
9
|
+
export interface IAddMovieParams {
|
|
10
|
+
movieId: string;
|
|
11
|
+
gain?: number;
|
|
12
|
+
metadata?: {
|
|
13
|
+
title?: string;
|
|
14
|
+
thumbnails?: IMoviePreview[];
|
|
15
|
+
};
|
|
16
|
+
}
|
|
17
|
+
export declare type ISharedMovieStateResponse = [
|
|
18
|
+
number,
|
|
19
|
+
number,
|
|
20
|
+
boolean,
|
|
21
|
+
number,
|
|
22
|
+
boolean,
|
|
23
|
+
number
|
|
24
|
+
];
|
|
25
|
+
export interface ISharedMovieState {
|
|
26
|
+
participantId: CompositeUserId;
|
|
27
|
+
gain?: number;
|
|
28
|
+
pause?: boolean;
|
|
29
|
+
offset?: number;
|
|
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;
|
|
39
|
+
}
|
|
40
|
+
export interface ISharedMovieInfo {
|
|
41
|
+
movieId: OkUserId;
|
|
42
|
+
initiatorId: CompositeUserId;
|
|
43
|
+
title: string;
|
|
44
|
+
source: MediaType;
|
|
45
|
+
externalMovieId: string;
|
|
46
|
+
duration: number;
|
|
47
|
+
thumbnails: IMoviePreview[];
|
|
48
|
+
}
|
|
49
|
+
export interface ISharedMovieStoppedInfo {
|
|
50
|
+
movieId: OkUserId;
|
|
51
|
+
initiatorId: CompositeUserId;
|
|
52
|
+
source: MediaType;
|
|
53
|
+
}
|
|
54
|
+
export interface IOnRemoteMovieData {
|
|
55
|
+
streamName: string;
|
|
56
|
+
stream: MediaStream | null;
|
|
57
|
+
mediaType: MediaType;
|
|
58
|
+
}
|
package/types/Participant.d.ts
CHANGED
|
@@ -4,6 +4,7 @@ import UserRole from '../enums/UserRole';
|
|
|
4
4
|
import { ParticipantStatus } from '../static/External';
|
|
5
5
|
import MediaSettings from '../types/MediaSettings';
|
|
6
6
|
import { ExternalId, ExternalParticipantId, ExternalParticipantListMarkers } from './ExternalId';
|
|
7
|
+
import { ISharedMovieInfo } from './MovieShare';
|
|
7
8
|
import MuteStates from './MuteStates';
|
|
8
9
|
import ParticipantLayout from './ParticipantLayout';
|
|
9
10
|
/**
|
|
@@ -55,6 +56,7 @@ export interface Participant {
|
|
|
55
56
|
unmuteOptions: MediaOption[];
|
|
56
57
|
observedIds: CompositeUserId[];
|
|
57
58
|
markers?: ExternalParticipantListMarkers;
|
|
59
|
+
movieShareInfos?: ISharedMovieInfo[];
|
|
58
60
|
}
|
|
59
61
|
export interface IGetParticipantsParameters {
|
|
60
62
|
externalIds: ExternalId[];
|
|
@@ -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,11 +5,15 @@ 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';
|
|
10
12
|
import { IFeedback } from './Feedback';
|
|
13
|
+
import { AsrInfo } from './Asr';
|
|
11
14
|
import MediaModifiers from './MediaModifiers';
|
|
12
15
|
import MediaSettings from './MediaSettings';
|
|
16
|
+
import { ISharedMovieInfo, ISharedMovieState, ISharedMovieStoppedInfo } from './MovieShare';
|
|
13
17
|
import MuteStates from './MuteStates';
|
|
14
18
|
import { CompositeUserId, OkUserId, ParticipantId, ParticipantListMarker as ParticipantParticipantListMarker, ParticipantListMarkers, ParticipantListType as ParticipantParticipantListType } from './Participant';
|
|
15
19
|
import VideoSettings from './VideoSettings';
|
|
@@ -55,6 +59,7 @@ declare namespace SignalingMessage {
|
|
|
55
59
|
unmuteOptions?: MediaOption[];
|
|
56
60
|
markers?: ParticipantListMarkers;
|
|
57
61
|
observedIds?: CompositeUserId[];
|
|
62
|
+
movieShareInfos?: ISharedMovieInfo[];
|
|
58
63
|
}
|
|
59
64
|
export interface ParticipantListChunk extends Notification {
|
|
60
65
|
participants: (Participant & Required<Pick<Participant, 'markers'>>)[];
|
|
@@ -73,10 +78,21 @@ declare namespace SignalingMessage {
|
|
|
73
78
|
multichatId: string | null;
|
|
74
79
|
tamtamMultichatId: string | null;
|
|
75
80
|
recordInfo: RecordInfo | null;
|
|
81
|
+
featuresPerRole?: IFeaturesPerRole | null;
|
|
76
82
|
pinnedParticipantId: ParticipantId | null;
|
|
77
83
|
options: ConversationOption[];
|
|
78
84
|
muteStates?: MuteStates;
|
|
79
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
|
+
}
|
|
80
96
|
interface Notification extends SignalingMessage {
|
|
81
97
|
type?: string;
|
|
82
98
|
notification?: string;
|
|
@@ -187,6 +203,7 @@ declare namespace SignalingMessage {
|
|
|
187
203
|
}
|
|
188
204
|
export interface FeatureSetChanged extends Notification {
|
|
189
205
|
features: ConversationFeature[];
|
|
206
|
+
featuresPerRole?: IFeaturesPerRole | null;
|
|
190
207
|
}
|
|
191
208
|
export interface MultipartyChatCreated extends Notification {
|
|
192
209
|
chatId: string;
|
|
@@ -276,6 +293,10 @@ declare namespace SignalingMessage {
|
|
|
276
293
|
mediaModifiers: MediaModifiers;
|
|
277
294
|
participants?: ParticipantListChunk;
|
|
278
295
|
chatRoom?: ChatRoom;
|
|
296
|
+
rooms?: {
|
|
297
|
+
rooms: Room[];
|
|
298
|
+
roomId?: number;
|
|
299
|
+
};
|
|
279
300
|
}
|
|
280
301
|
export interface JoinLinkChanged extends Notification {
|
|
281
302
|
joinLink: string;
|
|
@@ -283,6 +304,43 @@ declare namespace SignalingMessage {
|
|
|
283
304
|
export interface Feedback extends Notification {
|
|
284
305
|
feedback: IFeedback[];
|
|
285
306
|
}
|
|
307
|
+
export interface SharedMovieState extends Notification {
|
|
308
|
+
data: ISharedMovieState[];
|
|
309
|
+
}
|
|
310
|
+
export interface SharedMovieInfo extends Notification {
|
|
311
|
+
movieShareInfo: ISharedMovieInfo;
|
|
312
|
+
}
|
|
313
|
+
export interface SharedMovieStoppedInfo extends Notification, ISharedMovieStoppedInfo {
|
|
314
|
+
}
|
|
315
|
+
export interface RoomsUpdated extends Notification {
|
|
316
|
+
updates: Partial<Record<RoomsEventType, {
|
|
317
|
+
rooms?: Room;
|
|
318
|
+
roomIds?: number[];
|
|
319
|
+
deactivated?: boolean;
|
|
320
|
+
}>>;
|
|
321
|
+
}
|
|
322
|
+
export interface RoomUpdated extends Notification {
|
|
323
|
+
events: RoomsEventType[];
|
|
324
|
+
room?: Room;
|
|
325
|
+
roomId: number;
|
|
326
|
+
deactivate?: boolean;
|
|
327
|
+
}
|
|
328
|
+
export interface RoomParticipantsUpdated extends Notification {
|
|
329
|
+
roomId: number;
|
|
330
|
+
participantCount: number;
|
|
331
|
+
addedParticipantIds?: CompositeUserId[];
|
|
332
|
+
addedParticipants?: Participant[];
|
|
333
|
+
removedParticipantMarkers?: ParticipantListMarkers;
|
|
334
|
+
}
|
|
335
|
+
export interface FeaturesPerRoleChanged extends Notification {
|
|
336
|
+
featuresPerRole?: IFeaturesPerRole | null;
|
|
337
|
+
}
|
|
338
|
+
export interface AsrStarted extends Notification {
|
|
339
|
+
asrInfo: AsrInfo;
|
|
340
|
+
}
|
|
341
|
+
export interface AsrStopped extends Notification {
|
|
342
|
+
movieId: number;
|
|
343
|
+
}
|
|
286
344
|
export {};
|
|
287
345
|
}
|
|
288
346
|
export default SignalingMessage;
|