@vkontakte/calls-sdk 2.6.2-dev.d0c4f88.0 → 2.6.2-dev.e25d5b7.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 +31 -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/ConversationOption.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 +12 -1
- package/enums/SignalingNotification.d.ts +8 -1
- package/package.json +1 -1
- package/static/External.d.ts +35 -1
- package/static/Params.d.ts +53 -1
- 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/Feedback.d.ts +22 -0
- package/types/MediaSettings.d.ts +4 -0
- package/types/MovieShare.d.ts +18 -2
- 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 +54 -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';
|
|
13
|
+
import { IFeedbackExternal } from '../types/Feedback';
|
|
11
14
|
import MediaModifiers from '../types/MediaModifiers';
|
|
12
15
|
import MediaSettings from '../types/MediaSettings';
|
|
13
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
|
/**
|
|
@@ -113,8 +117,9 @@ declare namespace External {
|
|
|
113
117
|
* @param mediaModifiers Текущие настройки пользовательского медиа
|
|
114
118
|
* @param muteStates Состояние устройств при входе в звонок
|
|
115
119
|
* @param participants Список участников звонка (при `Params.batchParticipantsOnStart = true`)
|
|
120
|
+
* @param rooms Список комнат в звонке
|
|
116
121
|
*/
|
|
117
|
-
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;
|
|
118
123
|
/**
|
|
119
124
|
* Постраничные данные про участников при начале звонка
|
|
120
125
|
* @param chunk
|
|
@@ -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
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
|
*/
|
|
@@ -328,7 +342,7 @@ export declare type ParamsObject = {
|
|
|
328
342
|
/**
|
|
329
343
|
* Начат звонок
|
|
330
344
|
*/
|
|
331
|
-
onConversation?: (userId: ExternalParticipantId, mediaModifiers: MediaModifiers, muteStates: MuteStates, participants?: ExternalParticipant[]) => void;
|
|
345
|
+
onConversation?: (userId: ExternalParticipantId, mediaModifiers: MediaModifiers, muteStates: MuteStates, participants?: ExternalParticipant[], rooms?: Rooms) => void;
|
|
332
346
|
/**
|
|
333
347
|
* Начальный список участников для постраничного звонка
|
|
334
348
|
*/
|
|
@@ -522,6 +536,39 @@ export declare type ParamsObject = {
|
|
|
522
536
|
* @param joinLink токен присоединения к звонку
|
|
523
537
|
*/
|
|
524
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;
|
|
525
572
|
};
|
|
526
573
|
export default abstract class Params {
|
|
527
574
|
private static _params;
|
|
@@ -538,6 +585,8 @@ export default abstract class Params {
|
|
|
538
585
|
static set platform(value: string);
|
|
539
586
|
static get clientType(): string;
|
|
540
587
|
static set clientType(value: string);
|
|
588
|
+
static get externalUserType(): string;
|
|
589
|
+
static set externalUserType(value: string);
|
|
541
590
|
static get device(): string;
|
|
542
591
|
static get apiKey(): string;
|
|
543
592
|
static get apiEnv(): string;
|
|
@@ -612,6 +661,7 @@ export default abstract class Params {
|
|
|
612
661
|
static get breakVideoPayloadTypes(): boolean;
|
|
613
662
|
static get filteredMessages(): boolean;
|
|
614
663
|
static get useParticipantListChunk(): boolean;
|
|
664
|
+
static get useRooms(): boolean;
|
|
615
665
|
static get participantListChunkInitIndex(): number;
|
|
616
666
|
static get participantListChunkInitCount(): number;
|
|
617
667
|
static get serverAudioRed(): boolean;
|
|
@@ -621,4 +671,6 @@ export default abstract class Params {
|
|
|
621
671
|
static get filterObservers(): boolean;
|
|
622
672
|
static get muteMode(): boolean;
|
|
623
673
|
static get preserveAudioTracks(): boolean;
|
|
674
|
+
static get audioShareCapabilityEnabled(): boolean;
|
|
675
|
+
static get screenShareCongestionControl(): boolean;
|
|
624
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
|
@@ -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,3 +1,4 @@
|
|
|
1
|
+
import LiveStatus from '../enums/LiveStatus';
|
|
1
2
|
import { OkUserId, CompositeUserId } from './Participant';
|
|
2
3
|
import { MediaType } from './ParticipantStreamDescription';
|
|
3
4
|
export interface IMoviePreview {
|
|
@@ -13,13 +14,28 @@ export interface IAddMovieParams {
|
|
|
13
14
|
thumbnails?: IMoviePreview[];
|
|
14
15
|
};
|
|
15
16
|
}
|
|
16
|
-
export declare type ISharedMovieStateResponse = [
|
|
17
|
+
export declare type ISharedMovieStateResponse = [
|
|
18
|
+
number,
|
|
19
|
+
number,
|
|
20
|
+
boolean,
|
|
21
|
+
number,
|
|
22
|
+
boolean,
|
|
23
|
+
number
|
|
24
|
+
];
|
|
17
25
|
export interface ISharedMovieState {
|
|
18
26
|
participantId: CompositeUserId;
|
|
19
27
|
gain?: number;
|
|
20
28
|
pause?: boolean;
|
|
21
29
|
offset?: number;
|
|
22
|
-
|
|
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;
|
|
23
39
|
}
|
|
24
40
|
export interface ISharedMovieInfo {
|
|
25
41
|
movieId: OkUserId;
|
|
@@ -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;
|
|
@@ -188,6 +205,7 @@ declare namespace SignalingMessage {
|
|
|
188
205
|
}
|
|
189
206
|
export interface FeatureSetChanged extends Notification {
|
|
190
207
|
features: ConversationFeature[];
|
|
208
|
+
featuresPerRole?: IFeaturesPerRole | null;
|
|
191
209
|
}
|
|
192
210
|
export interface MultipartyChatCreated extends Notification {
|
|
193
211
|
chatId: string;
|
|
@@ -277,10 +295,17 @@ declare namespace SignalingMessage {
|
|
|
277
295
|
mediaModifiers: MediaModifiers;
|
|
278
296
|
participants?: ParticipantListChunk;
|
|
279
297
|
chatRoom?: ChatRoom;
|
|
298
|
+
rooms?: {
|
|
299
|
+
rooms: Room[];
|
|
300
|
+
roomId?: number;
|
|
301
|
+
};
|
|
280
302
|
}
|
|
281
303
|
export interface JoinLinkChanged extends Notification {
|
|
282
304
|
joinLink: string;
|
|
283
305
|
}
|
|
306
|
+
export interface Feedback extends Notification {
|
|
307
|
+
feedback: IFeedback[];
|
|
308
|
+
}
|
|
284
309
|
export interface SharedMovieState extends Notification {
|
|
285
310
|
data: ISharedMovieState[];
|
|
286
311
|
}
|
|
@@ -289,6 +314,35 @@ declare namespace SignalingMessage {
|
|
|
289
314
|
}
|
|
290
315
|
export interface SharedMovieStoppedInfo extends Notification, ISharedMovieStoppedInfo {
|
|
291
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
|
+
}
|
|
292
346
|
export {};
|
|
293
347
|
}
|
|
294
348
|
export default SignalingMessage;
|
package/types/WaitingHall.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { ExternalId } from './ExternalId';
|
|
2
2
|
import { CompositeUserId } from './Participant';
|
|
3
3
|
import SignalingMessage from './SignalingMessage';
|
|
4
|
+
import { IFeedback } from './Feedback';
|
|
4
5
|
export declare type WaitingParticipantId = {
|
|
5
6
|
addedTs: number;
|
|
6
7
|
id: CompositeUserId;
|
|
@@ -9,18 +10,11 @@ export declare type WaitingParticipant = {
|
|
|
9
10
|
id: WaitingParticipantId;
|
|
10
11
|
externalId?: SignalingMessage.ExternalId;
|
|
11
12
|
};
|
|
12
|
-
export declare type Feedback = {
|
|
13
|
-
key: string;
|
|
14
|
-
totalCount: number;
|
|
15
|
-
currentCount: number;
|
|
16
|
-
timeout: number;
|
|
17
|
-
participantIds: CompositeUserId[];
|
|
18
|
-
};
|
|
19
13
|
export declare type ChatRoom = {
|
|
20
14
|
totalCount: number;
|
|
21
15
|
firstParticipants?: WaitingParticipant[];
|
|
22
16
|
handCount?: number;
|
|
23
|
-
feedback?:
|
|
17
|
+
feedback?: IFeedback[];
|
|
24
18
|
};
|
|
25
19
|
/**
|
|
26
20
|
* Ответ на запрос `getWaitingHall`
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
export declare class ArrayDequeue<T = any> {
|
|
2
|
+
/** очередь */
|
|
3
|
+
private readonly _queue;
|
|
4
|
+
/** курсор для чтения */
|
|
5
|
+
private _readCursor;
|
|
6
|
+
/** курсор для записи */
|
|
7
|
+
private _writeCursor;
|
|
8
|
+
/** подвинуть курсор чтения */
|
|
9
|
+
private _moveReadCursor;
|
|
10
|
+
/** сколько осталось в очереди элементов */
|
|
11
|
+
private _left;
|
|
12
|
+
constructor(length: number);
|
|
13
|
+
/** возвращает длину, переданную в конструктор */
|
|
14
|
+
get length(): number;
|
|
15
|
+
/** возвращает текущую длину очереди */
|
|
16
|
+
get left(): number;
|
|
17
|
+
toArray(): T[];
|
|
18
|
+
/** добавить элемент в очередь */
|
|
19
|
+
add(element: T): void;
|
|
20
|
+
/** вычисляет значение след курсора по кругу */
|
|
21
|
+
private nextCursor;
|
|
22
|
+
/** получить следующий элемент */
|
|
23
|
+
next(): T | null;
|
|
24
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/// <reference lib="webworker" />
|
|
2
2
|
import type libvpx from '@vkontakte/libvpx';
|
|
3
|
-
declare const _default: (vpx: typeof libvpx, urlResolver: (url: string) => string) => void;
|
|
3
|
+
declare const _default: (vpx: typeof libvpx, urlResolver: (url: string) => string, useCongestionControl: boolean, maxBitrate: number) => void;
|
|
4
4
|
export default _default;
|