@vkontakte/calls-sdk 2.8.4-dev.e953776.0 → 2.8.4-dev.f08cd2d.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 +14 -9
- package/abstract/BaseApi.d.ts +17 -6
- package/abstract/BaseSignaling.d.ts +9 -5
- package/calls-sdk.cjs.js +8 -8
- package/calls-sdk.esm.js +8 -8
- package/classes/Conversation.d.ts +15 -3
- package/classes/Logger.d.ts +6 -3
- package/classes/ProducerCommandSerializationService.d.ts +4 -0
- package/classes/screenshare/ScreenCaptureSender.d.ts +3 -0
- package/classes/stat/WeightedAverage.d.ts +10 -0
- package/classes/transport/BaseTransport.d.ts +0 -1
- package/classes/transport/DirectStatReporter.d.ts +43 -0
- package/classes/transport/DirectTransport.d.ts +2 -4
- package/classes/transport/PerfStatReporter.d.ts +3 -1
- package/classes/transport/Transport.d.ts +2 -1
- package/default/Api.d.ts +10 -4
- package/default/Signaling.d.ts +12 -8
- package/enums/SignalingCommandType.d.ts +5 -1
- package/enums/SignalingNotification.d.ts +3 -1
- package/package.json +3 -3
- package/static/Debug.d.ts +1 -0
- package/static/External.d.ts +30 -9
- package/static/Params.d.ts +57 -7
- package/static/Utils.d.ts +4 -2
- package/static/WebRTCUtils.d.ts +5 -1
- package/types/AudienceMode.d.ts +1 -0
- package/types/Conversation.d.ts +8 -6
- package/types/EnableVideoSuspend.d.ts +3 -0
- package/types/ExternalId.d.ts +1 -0
- package/types/MediaSettings.d.ts +0 -9
- package/types/MuteStates.d.ts +12 -0
- package/types/NetworkStatReport.d.ts +4 -0
- package/types/Participant.d.ts +7 -0
- package/types/ParticipantStreamDescription.d.ts +2 -1
- package/types/Room.d.ts +5 -1
- package/types/SignalingCommand.d.ts +4 -4
- package/types/SignalingMessage.d.ts +52 -12
- package/types/Statistics.d.ts +4 -0
- package/types/Streams.d.ts +1 -0
- package/types/Vmoji.d.ts +5 -0
- package/types/WaitingHall.d.ts +3 -12
package/static/Params.d.ts
CHANGED
|
@@ -19,8 +19,10 @@ 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 { MediaType } from '../types/ParticipantStreamDescription';
|
|
22
23
|
import { IRoomId, Room, RoomParticipantUpdate, Rooms, RoomsUpdate } from '../types/Room';
|
|
23
24
|
import { IApiEnv } from '../types/Params';
|
|
25
|
+
import { VmojiError } from '../types/Vmoji';
|
|
24
26
|
import { DebugMessageType } from './Debug';
|
|
25
27
|
import { ParticipantStatus } from './External';
|
|
26
28
|
import { JSONObject } from './Json';
|
|
@@ -32,6 +34,8 @@ export type ParamsObject = {
|
|
|
32
34
|
/** @hidden */
|
|
33
35
|
platform: string;
|
|
34
36
|
/** @hidden */
|
|
37
|
+
clientStatsPlatform: string;
|
|
38
|
+
/** @hidden */
|
|
35
39
|
clientType: string;
|
|
36
40
|
/** @hidden */
|
|
37
41
|
externalUserType: string;
|
|
@@ -222,6 +226,17 @@ export type ParamsObject = {
|
|
|
222
226
|
perfStatReportEnabled: boolean;
|
|
223
227
|
/** @hidden */
|
|
224
228
|
callStatReportEnabled: boolean;
|
|
229
|
+
/**
|
|
230
|
+
* Включает использование обновленного API и формата
|
|
231
|
+
* логирования статистики качества аудио/видео.
|
|
232
|
+
* Требует указания clientStatsPlatform.
|
|
233
|
+
*
|
|
234
|
+
* _По умолчанию: `false`_
|
|
235
|
+
* @hidden
|
|
236
|
+
*/
|
|
237
|
+
useCallStatReportNewAPI: boolean;
|
|
238
|
+
/** @hidden */
|
|
239
|
+
networkStatReportEnabled: boolean;
|
|
225
240
|
/**
|
|
226
241
|
* Включает извлечение `remote-inbound-rtp` для использования в статистике.
|
|
227
242
|
* Используется для вычисления `video_loss` и `audio_loss`.
|
|
@@ -313,6 +328,13 @@ export type ParamsObject = {
|
|
|
313
328
|
movieShare: boolean;
|
|
314
329
|
/** @hidden */
|
|
315
330
|
breakVideoPayloadTypes: boolean;
|
|
331
|
+
/**
|
|
332
|
+
* Включить звонки контактам
|
|
333
|
+
*
|
|
334
|
+
* _По умолчанию: `false`_
|
|
335
|
+
* @hidden
|
|
336
|
+
*/
|
|
337
|
+
useCallsToContacts: boolean;
|
|
316
338
|
/**
|
|
317
339
|
* Включить постраничный вывод участников. Работает только если включено videoTracksCount (слоты)
|
|
318
340
|
*
|
|
@@ -325,6 +347,12 @@ export type ParamsObject = {
|
|
|
325
347
|
* _По умолчанию: `false`_
|
|
326
348
|
*/
|
|
327
349
|
useRooms: boolean;
|
|
350
|
+
/**
|
|
351
|
+
* Включить чат румы
|
|
352
|
+
*
|
|
353
|
+
* _По умолчанию: `false`_
|
|
354
|
+
*/
|
|
355
|
+
useChatRooms: boolean;
|
|
328
356
|
/**
|
|
329
357
|
* Индекс участника для первого chunk'а который придет при установке соединения с сервером
|
|
330
358
|
*
|
|
@@ -445,6 +473,10 @@ export type ParamsObject = {
|
|
|
445
473
|
* Локальный стрим вимоджи добавлен/удалён
|
|
446
474
|
*/
|
|
447
475
|
onVmojiStream?: (stream: MediaStream | null, mediaSettings: MediaSettings) => void;
|
|
476
|
+
/**
|
|
477
|
+
* Произошла ошибка вимоджи
|
|
478
|
+
*/
|
|
479
|
+
onVmojiError?: (error: VmojiError) => void;
|
|
448
480
|
/**
|
|
449
481
|
* Изменился статус локального соединения
|
|
450
482
|
*/
|
|
@@ -457,11 +489,7 @@ export type ParamsObject = {
|
|
|
457
489
|
/**
|
|
458
490
|
* Cтрим собеседника приостановлен/возобновлен.
|
|
459
491
|
*/
|
|
460
|
-
onRemoteStreamSuspended?: (userId: ExternalParticipantId, suspended: boolean) => void;
|
|
461
|
-
/**
|
|
462
|
-
* Стрим с экрана собеседника приостановлен/возобновлен.
|
|
463
|
-
*/
|
|
464
|
-
onRemoteScreenStreamSuspended?: (userId: ExternalParticipantId, suspended: boolean) => void;
|
|
492
|
+
onRemoteStreamSuspended?: (userId: ExternalParticipantId, mediaType: MediaType, suspended: boolean) => void;
|
|
465
493
|
/**
|
|
466
494
|
* Получен стрим с экрана собеседника.
|
|
467
495
|
* Если сервер закончил стримить экран собеседника, вместо стрима будет передан null
|
|
@@ -636,7 +664,7 @@ export type ParamsObject = {
|
|
|
636
664
|
/**
|
|
637
665
|
* Начата трансляция/запись звонка
|
|
638
666
|
*/
|
|
639
|
-
onRecordStarted?: (initiator: ExternalParticipantId, movieId: number, startTime: number, type: 'STREAM' | 'RECORD', externalMovieId?: string, externalOwnerId?: string, roomId?: number | null) => void;
|
|
667
|
+
onRecordStarted?: (initiator: ExternalParticipantId, movieId: number, startTime: number, type: 'STREAM' | 'RECORD', externalMovieId?: string, externalOwnerId?: string, externalAccessKey?: string, roomId?: number | null) => void;
|
|
640
668
|
/**
|
|
641
669
|
* Закончена трансляция/запись звонка
|
|
642
670
|
*/
|
|
@@ -760,7 +788,19 @@ export type ParamsObject = {
|
|
|
760
788
|
*/
|
|
761
789
|
onAsrSet?: (data: IAsrData | null, roomId: number | null) => void;
|
|
762
790
|
/**
|
|
763
|
-
*
|
|
791
|
+
* Админ начал/остановил совместное использование стороннего web-приложения
|
|
792
|
+
* @param userId id участника-админа
|
|
793
|
+
* @param sharedUrl url страницы
|
|
794
|
+
*/
|
|
795
|
+
onRemoteSharedUrl?: (userId: ExternalParticipantId, sharedUrl: string | undefined, roomId: IRoomId) => void;
|
|
796
|
+
/**
|
|
797
|
+
* Изменился id участника (деанонимизация)
|
|
798
|
+
* @param prevId
|
|
799
|
+
* @param newId
|
|
800
|
+
*/
|
|
801
|
+
onParticipantIdChanged?: (prevId: ExternalParticipantId, newId: ExternalParticipantId) => void;
|
|
802
|
+
/**
|
|
803
|
+
* Одобрено повышение пользователя в зале ожидания/зале в режиме Audience
|
|
764
804
|
*
|
|
765
805
|
* @param adminParticipantId админ, одобривший повышение
|
|
766
806
|
*/
|
|
@@ -771,6 +811,10 @@ export type ParamsObject = {
|
|
|
771
811
|
* @param demoted участник разжалован
|
|
772
812
|
*/
|
|
773
813
|
onPromoted?: (demoted: boolean) => void;
|
|
814
|
+
/**
|
|
815
|
+
* Собеседник подключился к сигналлингу
|
|
816
|
+
*/
|
|
817
|
+
onPeerRegistered?: () => void;
|
|
774
818
|
/**
|
|
775
819
|
* Поддержка переключения качества видео в зависимости от сети
|
|
776
820
|
* Только для режима p2p
|
|
@@ -792,6 +836,8 @@ export default abstract class Params {
|
|
|
792
836
|
static get protocolVersion(): 5 | 6;
|
|
793
837
|
static get platform(): string;
|
|
794
838
|
static set platform(value: string);
|
|
839
|
+
static get clientStatsPlatform(): string;
|
|
840
|
+
static set clientStatsPlatform(value: string);
|
|
795
841
|
static get clientType(): string;
|
|
796
842
|
static set clientType(value: string);
|
|
797
843
|
static get externalUserType(): string;
|
|
@@ -856,6 +902,8 @@ export default abstract class Params {
|
|
|
856
902
|
static get networkStatisticsInterval(): number;
|
|
857
903
|
static get perfStatReportEnabled(): boolean;
|
|
858
904
|
static get callStatReportEnabled(): boolean;
|
|
905
|
+
static get useCallStatReportNewAPI(): boolean;
|
|
906
|
+
static get networkStatReportEnabled(): boolean;
|
|
859
907
|
static get enableLogPerfStatReport(): boolean;
|
|
860
908
|
static get includeRemoteRtpsInCallStat(): boolean;
|
|
861
909
|
static get producerNotificationDataChannel(): boolean;
|
|
@@ -875,8 +923,10 @@ export default abstract class Params {
|
|
|
875
923
|
static get movieShare(): boolean;
|
|
876
924
|
static get videoTracksCount(): number;
|
|
877
925
|
static get breakVideoPayloadTypes(): boolean;
|
|
926
|
+
static get useCallsToContacts(): boolean;
|
|
878
927
|
static get useParticipantListChunk(): boolean;
|
|
879
928
|
static get useRooms(): boolean;
|
|
929
|
+
static get useChatRooms(): boolean;
|
|
880
930
|
static get participantListChunkInitIndex(): number;
|
|
881
931
|
static get participantListChunkInitCount(): number | null;
|
|
882
932
|
static get serverAudioRed(): boolean;
|
package/static/Utils.d.ts
CHANGED
|
@@ -8,18 +8,20 @@ export declare const DEVICE_IDX_PARAMETER = "d";
|
|
|
8
8
|
/** @hidden */
|
|
9
9
|
declare namespace Utils {
|
|
10
10
|
function patchLocalSDP(sdp: string, preferH264: boolean, brokenH264: boolean, preferVP9: boolean, h264spsPpsIdrInKeyframe: boolean, isAudioNack?: boolean, preferRed?: boolean): string;
|
|
11
|
-
function patchRemoteSDP(sdp: string, oldDataChannelDescription: boolean, preferH264: boolean, brokenH264: boolean, preferVP9: boolean,
|
|
11
|
+
function patchRemoteSDP(sdp: string, oldDataChannelDescription: boolean, preferH264: boolean, brokenH264: boolean, preferVP9: boolean, brokenVP9Encoder: boolean): string;
|
|
12
12
|
function getPeerIdString(peerId: SignalingMessage.PeerId): string;
|
|
13
13
|
function comparePeerId(peerId1: SignalingMessage.PeerId, peerId2: SignalingMessage.PeerId): boolean;
|
|
14
14
|
function getPeerConnectionHostInfo(pc: RTCPeerConnection): Promise<{
|
|
15
15
|
local: any;
|
|
16
16
|
remote: any;
|
|
17
17
|
}>;
|
|
18
|
-
function composeUserId(id: CompositeUserId | OkUserId, type
|
|
18
|
+
function composeUserId(id: CompositeUserId | OkUserId, type?: UserType): CompositeUserId;
|
|
19
19
|
function composeParticipantId(id: CompositeUserId | OkUserId, type: UserType, deviceIdx?: number): ParticipantId;
|
|
20
20
|
function compose(compositeId: CompositeUserId, deviceIdx?: number): ParticipantId;
|
|
21
21
|
function composeId(participant: SignalingMessage.Participant): ParticipantId;
|
|
22
|
+
function composeDecorativeId(participant: SignalingMessage.Participant): ParticipantId | undefined;
|
|
22
23
|
function composeMessageId(message: SignalingMessage): ParticipantId;
|
|
24
|
+
function extractOkId(id: OkUserId | CompositeUserId | ParticipantId): OkUserId;
|
|
23
25
|
function decomposeId(compositeId: CompositeUserId | OkUserId): {
|
|
24
26
|
id: OkUserId;
|
|
25
27
|
type: UserType;
|
package/static/WebRTCUtils.d.ts
CHANGED
|
@@ -15,6 +15,10 @@ export declare enum FacingMode {
|
|
|
15
15
|
*/
|
|
16
16
|
ENVIRONMENT = "environment"
|
|
17
17
|
}
|
|
18
|
+
/**
|
|
19
|
+
* Известные браузеры
|
|
20
|
+
*/
|
|
21
|
+
export type BrowserName = 'IE' | 'Edge' | 'Chrome' | 'Firefox' | 'Yandex' | 'Opera' | 'Sferum';
|
|
18
22
|
declare namespace WebRTCUtils {
|
|
19
23
|
/**
|
|
20
24
|
* Инициализирует устройства. До вызова этого метода бесполезно опрашивать другие публичные методы
|
|
@@ -144,7 +148,7 @@ declare namespace WebRTCUtils {
|
|
|
144
148
|
/**
|
|
145
149
|
* Имя браузера
|
|
146
150
|
*/
|
|
147
|
-
function browserName(): string;
|
|
151
|
+
function browserName(): BrowserName | string;
|
|
148
152
|
/**
|
|
149
153
|
* Версия браузера
|
|
150
154
|
*/
|
package/types/AudienceMode.d.ts
CHANGED
package/types/Conversation.d.ts
CHANGED
|
@@ -11,6 +11,7 @@ import MediaModifiers from './MediaModifiers';
|
|
|
11
11
|
import MediaSettings from './MediaSettings';
|
|
12
12
|
import MuteStates from './MuteStates';
|
|
13
13
|
import { OkUserId, Participant, ParticipantId } from './Participant';
|
|
14
|
+
import { IRoomId, RoomUrlSharingInfo } from './Room';
|
|
14
15
|
import { RecordInfo } from './SignalingMessage';
|
|
15
16
|
export interface IProcessMuteStateParams {
|
|
16
17
|
mediaOptions?: MediaOption[];
|
|
@@ -20,7 +21,7 @@ export interface IProcessMuteStateParams {
|
|
|
20
21
|
admin?: Participant | null;
|
|
21
22
|
stateUpdated?: boolean;
|
|
22
23
|
requestedMedia?: MediaOption[];
|
|
23
|
-
roomId?:
|
|
24
|
+
roomId?: IRoomId;
|
|
24
25
|
}
|
|
25
26
|
/**
|
|
26
27
|
* Данные текущего звонка
|
|
@@ -50,9 +51,9 @@ export type ConversationData = {
|
|
|
50
51
|
concurrent: boolean;
|
|
51
52
|
needRate: boolean;
|
|
52
53
|
/** @hidden */
|
|
53
|
-
recordsInfoByRoom: Map<
|
|
54
|
+
recordsInfoByRoom: Map<IRoomId, RecordInfo | null>;
|
|
54
55
|
/** @hidden */
|
|
55
|
-
asrInfoByRoom: Map<
|
|
56
|
+
asrInfoByRoom: Map<IRoomId, AsrInfo | null>;
|
|
56
57
|
chatId: string | null;
|
|
57
58
|
/** @hidden */
|
|
58
59
|
asrInfo: AsrInfo | null;
|
|
@@ -65,15 +66,16 @@ export type ConversationData = {
|
|
|
65
66
|
*/
|
|
66
67
|
joinLink?: string;
|
|
67
68
|
/** @hidden */
|
|
68
|
-
pinnedParticipantIdByRoom: Map<
|
|
69
|
+
pinnedParticipantIdByRoom: Map<IRoomId, ParticipantId | null>;
|
|
69
70
|
mediaModifiers: MediaModifiers;
|
|
70
71
|
options: ConversationOption[];
|
|
71
|
-
muteStates: Map<
|
|
72
|
+
muteStates: Map<IRoomId, MuteStates>;
|
|
72
73
|
unmuteOptions: MediaOption[];
|
|
73
74
|
networkRating: number;
|
|
74
75
|
waitingHall: boolean;
|
|
75
76
|
observer: boolean;
|
|
76
|
-
roomId:
|
|
77
|
+
roomId: IRoomId;
|
|
77
78
|
audienceMode: boolean;
|
|
78
79
|
restricted: boolean;
|
|
80
|
+
urlSharingInfoByRoom: Map<IRoomId, RoomUrlSharingInfo>;
|
|
79
81
|
};
|
package/types/ExternalId.d.ts
CHANGED
|
@@ -17,6 +17,7 @@ export type ExternalUserId = string;
|
|
|
17
17
|
export declare namespace ExternalIdUtils {
|
|
18
18
|
function fromIds(ids: ExternalUserId[] | ExternalId[]): ExternalId[];
|
|
19
19
|
function fromId(id: ExternalUserId, type?: ExternalIdType, deviceIdx?: number): ExternalParticipantId;
|
|
20
|
+
function fromSignalingParticipant(participant: SignalingMessage.Participant, useDecorative?: boolean): ExternalParticipantId | undefined;
|
|
20
21
|
function fromSignaling(signalingId: SignalingMessage.ExternalId, deviceIdx?: number): ExternalParticipantId;
|
|
21
22
|
function toString(externalId: ExternalId): ExternalIdString;
|
|
22
23
|
function fromIdToString(id: ExternalUserId, type?: ExternalIdType, deviceIdx?: number): ExternalIdString;
|
package/types/MediaSettings.d.ts
CHANGED
|
@@ -26,15 +26,6 @@ export type MediaSettings = {
|
|
|
26
26
|
* Включена ли трансляция вимоджи
|
|
27
27
|
*/
|
|
28
28
|
isAnimojiEnabled: boolean;
|
|
29
|
-
/**
|
|
30
|
-
* @hidden
|
|
31
|
-
*/
|
|
32
|
-
videoStreams: VideoStreamInfo[];
|
|
33
|
-
};
|
|
34
|
-
export type VideoStreamInfo = {
|
|
35
|
-
id: string;
|
|
36
|
-
source: string;
|
|
37
|
-
externalMovieId?: string;
|
|
38
29
|
};
|
|
39
30
|
export default MediaSettings;
|
|
40
31
|
export declare function compareMediaSettings(ms1: MediaSettings, ms2: MediaSettings): boolean;
|
package/types/MuteStates.d.ts
CHANGED
|
@@ -13,9 +13,21 @@ export default MuteStates;
|
|
|
13
13
|
* Состояние устройств пользователя установленное админом звонка
|
|
14
14
|
*/
|
|
15
15
|
export interface IMuteParticipantParams {
|
|
16
|
+
/**
|
|
17
|
+
* Внешний ID пользователя (если не указано, сработает на всех)
|
|
18
|
+
*/
|
|
16
19
|
externalId?: ExternalParticipantId | null;
|
|
20
|
+
/**
|
|
21
|
+
* Состояние устройств пользователя
|
|
22
|
+
*/
|
|
17
23
|
muteStates: MuteStates;
|
|
24
|
+
/**
|
|
25
|
+
* Попросить пользователя включить устройство
|
|
26
|
+
*/
|
|
18
27
|
requestedMedia?: MediaOption[];
|
|
28
|
+
/**
|
|
29
|
+
* ID сессионного зала, либо ничего если в основном зале
|
|
30
|
+
*/
|
|
19
31
|
roomId?: number | null;
|
|
20
32
|
}
|
|
21
33
|
export interface IMuteParticipantInternalParams {
|
package/types/Participant.d.ts
CHANGED
|
@@ -15,6 +15,7 @@ export type CompositeUserId = string;
|
|
|
15
15
|
/**
|
|
16
16
|
* Уникально идентифицирует участника звонка
|
|
17
17
|
* (одному пользователю могут соответствовать несколько участников, в случае если пользователь зашёл в звонок с нескольких устройств)
|
|
18
|
+
* Включает композитный id и постфикс с номером устройства, если он не равен 0
|
|
18
19
|
*/
|
|
19
20
|
export type ParticipantId = string;
|
|
20
21
|
export type OkUserId = number;
|
|
@@ -44,7 +45,13 @@ export interface ParticipantStateMapped {
|
|
|
44
45
|
};
|
|
45
46
|
}
|
|
46
47
|
export interface Participant {
|
|
48
|
+
/**
|
|
49
|
+
* string representation
|
|
50
|
+
*/
|
|
47
51
|
id: ParticipantId;
|
|
52
|
+
/**
|
|
53
|
+
* If user has 'decorative external id' it will be set as externalId
|
|
54
|
+
*/
|
|
48
55
|
externalId: ExternalParticipantId;
|
|
49
56
|
mediaSettings: MediaSettings;
|
|
50
57
|
state: ParticipantState;
|
|
@@ -7,7 +7,8 @@ export declare enum MediaType {
|
|
|
7
7
|
SCREEN = "SCREEN",
|
|
8
8
|
STREAM = "STREAM",
|
|
9
9
|
MOVIE = "MOVIE",
|
|
10
|
-
ANIMOJI = "ANIMOJI"
|
|
10
|
+
ANIMOJI = "ANIMOJI",
|
|
11
|
+
SHARED_URL = "SHARED_URL"
|
|
11
12
|
}
|
|
12
13
|
export declare function serializeParticipantStreamDescription(description: ParticipantStreamDescription): StreamDescriptionString;
|
|
13
14
|
export declare function parseParticipantStreamDescription(descriptionString: StreamDescriptionString): ParticipantStreamDescription;
|
package/types/Room.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ExternalParticipant, ExternalParticipantId, ExternalParticipantListChunk } from './ExternalId';
|
|
2
2
|
import MuteStates from './MuteStates';
|
|
3
|
-
import { ParticipantListMarkers } from './Participant';
|
|
3
|
+
import { ParticipantId, ParticipantListMarkers } from './Participant';
|
|
4
4
|
/**
|
|
5
5
|
* Комната
|
|
6
6
|
*/
|
|
@@ -92,3 +92,7 @@ export interface RoomParticipantUpdate {
|
|
|
92
92
|
* ID комнаты
|
|
93
93
|
*/
|
|
94
94
|
export type IRoomId = number | null;
|
|
95
|
+
export interface RoomUrlSharingInfo {
|
|
96
|
+
sharedUrl: string;
|
|
97
|
+
initiatorId: ParticipantId;
|
|
98
|
+
}
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import SignalingCommandType from '../enums/SignalingCommandType';
|
|
2
|
-
import
|
|
3
|
-
|
|
2
|
+
import { SignalingResponse, SignalingSuccessResponse } from './SignalingMessage';
|
|
3
|
+
interface SignalingCommand<T extends SignalingResponse = SignalingSuccessResponse> {
|
|
4
4
|
sequence: number;
|
|
5
5
|
name: SignalingCommandType;
|
|
6
6
|
params: object;
|
|
7
7
|
responseTimer: number;
|
|
8
8
|
needResponse: boolean;
|
|
9
|
-
resolve: (message:
|
|
9
|
+
resolve: (message: T) => void;
|
|
10
10
|
reject: (error: Error, force?: boolean) => void;
|
|
11
|
-
}
|
|
11
|
+
}
|
|
12
12
|
export default SignalingCommand;
|
|
@@ -30,6 +30,7 @@ export type RecordInfo = {
|
|
|
30
30
|
recordType: 'STREAM' | 'RECORD';
|
|
31
31
|
recordExternalMovieId?: string;
|
|
32
32
|
recordExternalOwnerId?: string;
|
|
33
|
+
recordExternalAccessKey?: string;
|
|
33
34
|
};
|
|
34
35
|
export interface SignalingResponse extends SignalingMessage {
|
|
35
36
|
response?: SignalingCommandType;
|
|
@@ -42,6 +43,15 @@ export interface SignalingSuccessResponse extends SignalingResponse {
|
|
|
42
43
|
response: SignalingCommandType;
|
|
43
44
|
sequence: number;
|
|
44
45
|
}
|
|
46
|
+
export interface GetRoomsSignalingResponse extends SignalingSuccessResponse {
|
|
47
|
+
rooms: {
|
|
48
|
+
rooms: SignalingMessage.Room[];
|
|
49
|
+
roomId?: number;
|
|
50
|
+
};
|
|
51
|
+
}
|
|
52
|
+
export interface GetParticipantsSignalingResponse extends SignalingSuccessResponse {
|
|
53
|
+
participants: SignalingMessage.Participant[];
|
|
54
|
+
}
|
|
45
55
|
declare namespace SignalingMessage {
|
|
46
56
|
export interface ExternalId {
|
|
47
57
|
type: 'UNKNOWN' | 'VK' | 'ANONYM';
|
|
@@ -59,11 +69,13 @@ declare namespace SignalingMessage {
|
|
|
59
69
|
rtpTimestamp: number | null;
|
|
60
70
|
sequenceNumber: number;
|
|
61
71
|
fastScreenShare: boolean;
|
|
62
|
-
suspend
|
|
72
|
+
suspend?: boolean;
|
|
63
73
|
};
|
|
64
74
|
export interface Participant {
|
|
65
75
|
id: OkUserId;
|
|
66
76
|
idType?: UserType;
|
|
77
|
+
decorativeUserId?: CompositeUserId;
|
|
78
|
+
decorativeExternalUserId?: ExternalId;
|
|
67
79
|
deviceIdx?: number;
|
|
68
80
|
externalId?: ExternalId;
|
|
69
81
|
state: ParticipantState;
|
|
@@ -91,7 +103,19 @@ declare namespace SignalingMessage {
|
|
|
91
103
|
countAfter: number;
|
|
92
104
|
markerFound: boolean;
|
|
93
105
|
}
|
|
94
|
-
interface
|
|
106
|
+
export interface WaitingParticipantId {
|
|
107
|
+
addedTs: number;
|
|
108
|
+
id: CompositeUserId;
|
|
109
|
+
}
|
|
110
|
+
export interface WaitingParticipant {
|
|
111
|
+
id: WaitingParticipantId;
|
|
112
|
+
externalId?: ExternalId;
|
|
113
|
+
}
|
|
114
|
+
export interface RoomUrlSharingInfo {
|
|
115
|
+
sharedUrl: string;
|
|
116
|
+
initiatorId: CompositeUserId;
|
|
117
|
+
}
|
|
118
|
+
export interface Conversation {
|
|
95
119
|
id: string;
|
|
96
120
|
state: string;
|
|
97
121
|
topology: TransportTopology;
|
|
@@ -107,21 +131,24 @@ declare namespace SignalingMessage {
|
|
|
107
131
|
options: ConversationOption[];
|
|
108
132
|
muteStates?: MuteStates;
|
|
109
133
|
asrInfo?: AsrInfo;
|
|
134
|
+
urlSharingInfo?: RoomUrlSharingInfo;
|
|
110
135
|
}
|
|
111
|
-
export interface Room
|
|
136
|
+
export interface Room {
|
|
137
|
+
active?: boolean;
|
|
138
|
+
addParticipantIds?: CompositeUserId[];
|
|
139
|
+
asrInfo?: AsrInfo;
|
|
140
|
+
countdownSec?: number;
|
|
112
141
|
id?: number;
|
|
142
|
+
muteStates?: MuteStates;
|
|
113
143
|
name?: string;
|
|
114
144
|
participantCount?: number;
|
|
115
145
|
participantIds?: CompositeUserId[];
|
|
116
|
-
addParticipantIds?: CompositeUserId[];
|
|
117
|
-
removeParticipantIds?: CompositeUserId[];
|
|
118
146
|
participants?: ParticipantListChunk;
|
|
119
|
-
active?: boolean;
|
|
120
|
-
countdownSec?: number;
|
|
121
|
-
timeoutMs?: number;
|
|
122
|
-
muteStates?: MuteStates;
|
|
123
|
-
recordInfo?: RecordInfo;
|
|
124
147
|
pinnedParticipantId?: CompositeUserId;
|
|
148
|
+
recordInfo?: RecordInfo;
|
|
149
|
+
removeParticipantIds?: CompositeUserId[];
|
|
150
|
+
timeoutMs?: number;
|
|
151
|
+
urlSharingInfo?: RoomUrlSharingInfo;
|
|
125
152
|
}
|
|
126
153
|
interface Notification extends SignalingMessage {
|
|
127
154
|
type?: string;
|
|
@@ -344,9 +371,14 @@ declare namespace SignalingMessage {
|
|
|
344
371
|
export interface SharedMovieStoppedInfo extends Notification, ISharedMovieStoppedInfo {
|
|
345
372
|
roomId?: IRoomId;
|
|
346
373
|
}
|
|
374
|
+
export interface UrlSharingInfo extends Notification {
|
|
375
|
+
initiatorId: CompositeUserId;
|
|
376
|
+
sharedUrl?: string;
|
|
377
|
+
roomId?: IRoomId;
|
|
378
|
+
}
|
|
347
379
|
export interface RoomsUpdated extends Notification {
|
|
348
380
|
updates: Partial<Record<RoomsEventType, {
|
|
349
|
-
rooms?: Room;
|
|
381
|
+
rooms?: Room[];
|
|
350
382
|
roomIds?: number[];
|
|
351
383
|
deactivated?: boolean;
|
|
352
384
|
}>>;
|
|
@@ -368,7 +400,10 @@ declare namespace SignalingMessage {
|
|
|
368
400
|
removedParticipantMarkers?: ParticipantListMarkers[];
|
|
369
401
|
}
|
|
370
402
|
export interface GetRooms extends Notification {
|
|
371
|
-
rooms:
|
|
403
|
+
rooms: {
|
|
404
|
+
rooms: Room[];
|
|
405
|
+
roomId?: number;
|
|
406
|
+
};
|
|
372
407
|
}
|
|
373
408
|
export interface FeaturesPerRoleChanged extends Notification {
|
|
374
409
|
featuresPerRole?: IFeaturesPerRole | null;
|
|
@@ -386,6 +421,11 @@ declare namespace SignalingMessage {
|
|
|
386
421
|
export interface ParticipantSourcesUpdateNotification extends Notification {
|
|
387
422
|
participantUpdateInfos: ParticipantUpdateInfo[];
|
|
388
423
|
}
|
|
424
|
+
export interface DecorativeParticipantIdChanged extends Notification {
|
|
425
|
+
participantId: CompositeUserId;
|
|
426
|
+
decorativeParticipantId?: CompositeUserId;
|
|
427
|
+
decorativeExternalParticipantId?: ExternalId;
|
|
428
|
+
}
|
|
389
429
|
export {};
|
|
390
430
|
}
|
|
391
431
|
export default SignalingMessage;
|
package/types/Statistics.d.ts
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import { TransportTopology } from '../classes/transport/Transport';
|
|
2
2
|
export type StatTransport = {
|
|
3
|
+
timestamp: number;
|
|
4
|
+
availableOutgoingBitrate: number;
|
|
3
5
|
totalRoundTripTime: number;
|
|
4
6
|
currentRoundTripTime: number;
|
|
5
7
|
bytesSent: number;
|
|
@@ -28,6 +30,8 @@ export type StatRtp = {
|
|
|
28
30
|
kind: string;
|
|
29
31
|
bytesReceived: number;
|
|
30
32
|
bytesSent: number;
|
|
33
|
+
headerBytesReceived: number;
|
|
34
|
+
headerBytesSent: number;
|
|
31
35
|
jitter: number;
|
|
32
36
|
packetsLost: number;
|
|
33
37
|
packetsReceived: number;
|
package/types/Streams.d.ts
CHANGED
package/types/Vmoji.d.ts
ADDED
package/types/WaitingHall.d.ts
CHANGED
|
@@ -1,18 +1,9 @@
|
|
|
1
1
|
import { ExternalId } from './ExternalId';
|
|
2
|
-
import { CompositeUserId } from './Participant';
|
|
3
2
|
import SignalingMessage from './SignalingMessage';
|
|
4
3
|
import { IFeedback } from './Feedback';
|
|
5
|
-
export type WaitingParticipantId = {
|
|
6
|
-
addedTs: number;
|
|
7
|
-
id: CompositeUserId;
|
|
8
|
-
};
|
|
9
|
-
export type WaitingParticipant = {
|
|
10
|
-
id: WaitingParticipantId;
|
|
11
|
-
externalId?: SignalingMessage.ExternalId;
|
|
12
|
-
};
|
|
13
4
|
export type ChatRoom = {
|
|
14
5
|
totalCount: number;
|
|
15
|
-
firstParticipants?: WaitingParticipant[];
|
|
6
|
+
firstParticipants?: SignalingMessage.WaitingParticipant[];
|
|
16
7
|
handCount?: number;
|
|
17
8
|
feedback?: IFeedback[];
|
|
18
9
|
};
|
|
@@ -24,5 +15,5 @@ export type WaitingHallResponse = {
|
|
|
24
15
|
pageMarker: string | null;
|
|
25
16
|
totalCount: number;
|
|
26
17
|
};
|
|
27
|
-
export declare function waitingParticipantIdToString(id: WaitingParticipantId): string | null;
|
|
28
|
-
export declare function waitingParticipantIdFromString(id: string): WaitingParticipantId | null;
|
|
18
|
+
export declare function waitingParticipantIdToString(id: SignalingMessage.WaitingParticipantId): string | null;
|
|
19
|
+
export declare function waitingParticipantIdFromString(id: string): SignalingMessage.WaitingParticipantId | null;
|