@vkontakte/calls-sdk 2.5.2-dev.b16dd83.0 → 2.5.2
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 +10 -10
- package/abstract/BaseApi.d.ts +2 -2
- package/abstract/BaseSignaling.d.ts +7 -7
- package/calls-sdk.cjs.js +8 -8
- package/calls-sdk.esm.js +8 -8
- package/classes/Conversation.d.ts +14 -12
- package/classes/DebugInfo.d.ts +2 -2
- package/classes/MediaSource.d.ts +4 -2
- package/classes/SpeakerDetector.d.ts +2 -2
- package/classes/SpecListener.d.ts +3 -3
- package/classes/TabsChannel.d.ts +11 -0
- package/classes/screenshare/BaseStreamBuilder.d.ts +3 -3
- package/classes/screenshare/ScreenCaptureReceiver.d.ts +2 -2
- package/classes/screenshare/StreamBuilder.d.ts +2 -2
- package/classes/screenshare/WebmBuilder.d.ts +2 -2
- package/classes/transport/DirectTransport.d.ts +2 -2
- package/classes/transport/ServerTransport.d.ts +4 -3
- package/classes/transport/Statistics.d.ts +2 -2
- package/classes/transport/Transport.d.ts +5 -5
- package/default/Api.d.ts +3 -3
- package/default/Signaling.d.ts +7 -7
- package/enums/HangupType.d.ts +1 -0
- package/package.json +3 -3
- package/static/External.d.ts +18 -18
- package/static/Params.d.ts +26 -23
- package/static/Utils.d.ts +12 -4
- package/static/WebRTCUtils.d.ts +6 -2
- package/types/ConversationParams.d.ts +1 -0
- package/types/ConversationResponse.d.ts +4 -0
- package/types/ExternalId.d.ts +19 -2
- package/types/MuteStates.d.ts +1 -1
- package/types/Participant.d.ts +11 -3
- package/types/ParticipantLayout.d.ts +2 -2
- package/types/ParticipantPriority.d.ts +3 -3
- package/types/ParticipantStreamDescription.d.ts +2 -2
- package/types/SignalingMessage.d.ts +25 -17
package/static/Params.d.ts
CHANGED
|
@@ -7,7 +7,7 @@ import ConversationOption from '../enums/ConversationOption';
|
|
|
7
7
|
import FatalError from '../enums/FatalError';
|
|
8
8
|
import MediaOption from '../enums/MediaOption';
|
|
9
9
|
import UserRole from '../enums/UserRole';
|
|
10
|
-
import { ExternalId, ExternalParticipant } from '../types/ExternalId';
|
|
10
|
+
import { ExternalId, ExternalParticipant, ExternalParticipantId } from '../types/ExternalId';
|
|
11
11
|
import IceServer from '../types/IceServer';
|
|
12
12
|
import MediaModifiers from '../types/MediaModifiers';
|
|
13
13
|
import MediaSettings from '../types/MediaSettings';
|
|
@@ -51,6 +51,7 @@ export declare type ParamsObject = {
|
|
|
51
51
|
waitConnectionDelay: number;
|
|
52
52
|
waitResponseDelay: number;
|
|
53
53
|
waitMessageDelay: number;
|
|
54
|
+
waitAnotherTabDelay: number;
|
|
54
55
|
debugLog: boolean;
|
|
55
56
|
/**
|
|
56
57
|
* Не использовать прямое P2P соединение, чтобы не отправлять в ICE-кандидатах персональные IP-адреса
|
|
@@ -183,14 +184,14 @@ export declare type ParamsObject = {
|
|
|
183
184
|
* Принимать параллельно видео с камеры и трансляцию экрана от одного и того же участника.
|
|
184
185
|
* Работает только при приёме экрана через дата-канал.
|
|
185
186
|
*
|
|
186
|
-
* _По умолчанию: `
|
|
187
|
+
* _По умолчанию: `true`_
|
|
187
188
|
*/
|
|
188
189
|
producerScreenTrack: boolean;
|
|
189
190
|
/**
|
|
190
191
|
* Отдавать трансляцию экрана отдельным стримом.
|
|
191
192
|
* Работает только при отправке экрана через дата-канал.
|
|
192
193
|
*
|
|
193
|
-
* _По умолчанию: `
|
|
194
|
+
* _По умолчанию: `true`_
|
|
194
195
|
*/
|
|
195
196
|
consumerScreenTrack: boolean;
|
|
196
197
|
producerNotificationDataChannel: boolean;
|
|
@@ -218,10 +219,11 @@ export declare type ParamsObject = {
|
|
|
218
219
|
breakVideoPayloadTypes: boolean;
|
|
219
220
|
/**
|
|
220
221
|
* Получать список участников звонка третьим аргументом в `onConversation`
|
|
221
|
-
* @
|
|
222
|
+
* @hidden
|
|
222
223
|
*/
|
|
223
224
|
batchParticipantsOnStart: boolean;
|
|
224
225
|
participantStateMapped: boolean;
|
|
226
|
+
joinFromMultipleDevices: boolean;
|
|
225
227
|
/**
|
|
226
228
|
* Получен локальный стрим с камеры/микрофона
|
|
227
229
|
*/
|
|
@@ -242,40 +244,40 @@ export declare type ParamsObject = {
|
|
|
242
244
|
* Получен стрим собеседника.
|
|
243
245
|
* Если сервер закончил стримить собеседника, вместо стрима будет передан null
|
|
244
246
|
*/
|
|
245
|
-
onRemoteStream?: (userId:
|
|
247
|
+
onRemoteStream?: (userId: ExternalParticipantId, stream: MediaStream | null) => void;
|
|
246
248
|
/**
|
|
247
249
|
* Получен стрим с экрана собеседника.
|
|
248
250
|
* Если сервер закончил стримить экран собеседника, вместо стрима будет передан null
|
|
249
251
|
*/
|
|
250
|
-
onRemoteScreenStream?: (userId:
|
|
252
|
+
onRemoteScreenStream?: (userId: ExternalParticipantId, stream: MediaStream | null) => void;
|
|
251
253
|
/**
|
|
252
254
|
* Получен стрим трансляция или мувик от собеседника.
|
|
253
255
|
* Если сервер закончил стримить экран собеседника, вместо стрима будет передан null
|
|
254
256
|
*/
|
|
255
|
-
onRemoteLive?: (userId:
|
|
257
|
+
onRemoteLive?: (userId: ExternalParticipantId, streamId: string, stream: MediaStream | null) => void;
|
|
256
258
|
/**
|
|
257
259
|
* Начат звонок
|
|
258
260
|
*/
|
|
259
|
-
onConversation?: (userId:
|
|
261
|
+
onConversation?: (userId: ExternalParticipantId, mediaModifiers: MediaModifiers, muteStates: MuteStates, participants?: ExternalParticipant[]) => void;
|
|
260
262
|
/**
|
|
261
263
|
* Изменились данные стрима собеседника
|
|
262
264
|
*/
|
|
263
|
-
onRemoteMediaSettings?: (userId:
|
|
265
|
+
onRemoteMediaSettings?: (userId: ExternalParticipantId, mediaSettings: MediaSettings) => void;
|
|
264
266
|
/**
|
|
265
267
|
* Изменились данные состояний собеседника
|
|
266
268
|
*/
|
|
267
|
-
onRemoteParticipantState?: (userId:
|
|
269
|
+
onRemoteParticipantState?: (userId: ExternalParticipantId, participantState: {
|
|
268
270
|
[key: string]: string;
|
|
269
271
|
}) => void;
|
|
270
272
|
/**
|
|
271
273
|
* Изменился статус соединения собеседников
|
|
272
274
|
*/
|
|
273
|
-
onRemoteStatus?: (userIds:
|
|
275
|
+
onRemoteStatus?: (userIds: ExternalParticipantId[], status: ParticipantStatus, data: any) => void;
|
|
274
276
|
/**
|
|
275
277
|
* Изменился статус соединения собеседника
|
|
276
278
|
* @deprecated
|
|
277
279
|
*/
|
|
278
|
-
onParticipantStatus?: (userId:
|
|
280
|
+
onParticipantStatus?: (userId: ExternalParticipantId, status: ParticipantStatus, data: any) => void;
|
|
279
281
|
/**
|
|
280
282
|
* Разрешения на доступы были запрошены в браузере
|
|
281
283
|
*/
|
|
@@ -287,7 +289,7 @@ export declare type ParamsObject = {
|
|
|
287
289
|
/**
|
|
288
290
|
* Пользователь отключился от звонка
|
|
289
291
|
*/
|
|
290
|
-
onRemoteRemoved?: (userId:
|
|
292
|
+
onRemoteRemoved?: (userId: ExternalParticipantId) => void;
|
|
291
293
|
/**
|
|
292
294
|
* Изменилось состояние звонка
|
|
293
295
|
*/
|
|
@@ -299,11 +301,11 @@ export declare type ParamsObject = {
|
|
|
299
301
|
/**
|
|
300
302
|
* Изменились состояния устройств пользователя или разрешения включать камеру/микрофон
|
|
301
303
|
*/
|
|
302
|
-
onMuteStates?: (muteStates: MuteStates, unmuteOptions: MediaOption[], mediaOptions: MediaOption[], muteAll: boolean, unmute: boolean, userId:
|
|
304
|
+
onMuteStates?: (muteStates: MuteStates, unmuteOptions: MediaOption[], mediaOptions: MediaOption[], muteAll: boolean, unmute: boolean, userId: ExternalParticipantId | null, adminId: ExternalParticipantId | null) => void;
|
|
303
305
|
/**
|
|
304
306
|
* Изменились роли собеседника в звонке
|
|
305
307
|
*/
|
|
306
|
-
onRolesChanged?: (userId:
|
|
308
|
+
onRolesChanged?: (userId: ExternalParticipantId, roles: UserRole[]) => void;
|
|
307
309
|
/**
|
|
308
310
|
* Изменились свои роли в звонке
|
|
309
311
|
*/
|
|
@@ -311,7 +313,7 @@ export declare type ParamsObject = {
|
|
|
311
313
|
/**
|
|
312
314
|
* Закрепляет/открепляет собеседника для всех
|
|
313
315
|
*/
|
|
314
|
-
onPinnedParticipant?: (userId:
|
|
316
|
+
onPinnedParticipant?: (userId: ExternalParticipantId, unpin: boolean) => void;
|
|
315
317
|
/**
|
|
316
318
|
* Закрепляет/открепляет текущего пользователя у других собеседников
|
|
317
319
|
*/
|
|
@@ -324,12 +326,12 @@ export declare type ParamsObject = {
|
|
|
324
326
|
/**
|
|
325
327
|
* Изменился говорящий в звонке
|
|
326
328
|
*/
|
|
327
|
-
onSpeakerChanged?: (userId:
|
|
329
|
+
onSpeakerChanged?: (userId: ExternalParticipantId) => void;
|
|
328
330
|
/**
|
|
329
331
|
* Громкость собеседников
|
|
330
332
|
*/
|
|
331
333
|
onVolumesDetected?: (volumes: {
|
|
332
|
-
uid:
|
|
334
|
+
uid: ExternalParticipantId;
|
|
333
335
|
volume: number;
|
|
334
336
|
}[]) => void;
|
|
335
337
|
/**
|
|
@@ -361,15 +363,15 @@ export declare type ParamsObject = {
|
|
|
361
363
|
/**
|
|
362
364
|
* Получено сообщение чата
|
|
363
365
|
*/
|
|
364
|
-
onChatMessage?: (message: string, from:
|
|
366
|
+
onChatMessage?: (message: string, from: ExternalParticipantId, direct: boolean) => void;
|
|
365
367
|
/**
|
|
366
368
|
* Получены данные от собеседника
|
|
367
369
|
*/
|
|
368
|
-
onCustomData?: (data: JSONObject, from:
|
|
370
|
+
onCustomData?: (data: JSONObject, from: ExternalParticipantId, direct: boolean) => void;
|
|
369
371
|
/**
|
|
370
372
|
* Начата трансляция/запись звонка
|
|
371
373
|
*/
|
|
372
|
-
onRecordStarted?: (initiator:
|
|
374
|
+
onRecordStarted?: (initiator: ExternalParticipantId, movieId: number, startTime: number, type: 'STREAM' | 'RECORD', externalMovieId?: string, externalOwnerId?: string) => void;
|
|
373
375
|
/**
|
|
374
376
|
* Закончена трансляция/запись звонка
|
|
375
377
|
*/
|
|
@@ -386,7 +388,7 @@ export declare type ParamsObject = {
|
|
|
386
388
|
* @param status Оценки качества соединения участников от 0 до 1
|
|
387
389
|
*/
|
|
388
390
|
onNetworkStatusChanged?: (status: {
|
|
389
|
-
uid:
|
|
391
|
+
uid: ExternalParticipantId;
|
|
390
392
|
rating: number;
|
|
391
393
|
}[]) => void;
|
|
392
394
|
/**
|
|
@@ -420,7 +422,7 @@ export default abstract class Params {
|
|
|
420
422
|
static get appVersion(): number;
|
|
421
423
|
static get sdkVersion(): string | number | boolean;
|
|
422
424
|
static get debug(): string | number | boolean;
|
|
423
|
-
static get protocolVersion():
|
|
425
|
+
static get protocolVersion(): 5 | 6;
|
|
424
426
|
static get platform(): string;
|
|
425
427
|
static set platform(value: string);
|
|
426
428
|
static get clientType(): string;
|
|
@@ -446,6 +448,7 @@ export default abstract class Params {
|
|
|
446
448
|
static get waitConnectionDelay(): number;
|
|
447
449
|
static get waitResponseDelay(): number;
|
|
448
450
|
static get waitMessageDelay(): number;
|
|
451
|
+
static get waitAnotherTabDelay(): number;
|
|
449
452
|
static get debugLog(): boolean;
|
|
450
453
|
static get forceRelayPolicy(): boolean;
|
|
451
454
|
static set forceRelayPolicy(value: boolean);
|
package/static/Utils.d.ts
CHANGED
|
@@ -1,21 +1,29 @@
|
|
|
1
1
|
import { BigInteger } from 'big-integer';
|
|
2
2
|
import UserType from '../enums/UserType';
|
|
3
3
|
import { ExternalParticipant } from '../types/ExternalId';
|
|
4
|
-
import { CompositeUserId, OkUserId, Participant, ParticipantStateMapped } from '../types/Participant';
|
|
4
|
+
import { CompositeUserId, OkUserId, Participant, ParticipantId, ParticipantStateMapped } from '../types/Participant';
|
|
5
5
|
import SignalingMessage from '../types/SignalingMessage';
|
|
6
6
|
import VideoSettings from '../types/VideoSettings';
|
|
7
|
+
export declare const PARAMETERS_SEPARATOR = ":";
|
|
8
|
+
export declare const DEVICE_IDX_PARAMETER = "d";
|
|
7
9
|
declare namespace Utils {
|
|
8
10
|
function patchSDP(sdp: string, preferH264: boolean, brokenH264: boolean, preferVP9: boolean, isAudioNack?: boolean): string;
|
|
9
11
|
function getPeerIdString(peerId: SignalingMessage.PeerId): string;
|
|
10
12
|
function comparePeerId(peerId1: SignalingMessage.PeerId, peerId2: SignalingMessage.PeerId): boolean;
|
|
11
13
|
function getPeerConnectionHostInfo(pc: RTCPeerConnection): Promise<any>;
|
|
12
|
-
function
|
|
13
|
-
function composeParticipantId(
|
|
14
|
-
function
|
|
14
|
+
function composeUserId(id: CompositeUserId | OkUserId, type: UserType): CompositeUserId;
|
|
15
|
+
function composeParticipantId(id: CompositeUserId | OkUserId, type: UserType, deviceIdx: number): ParticipantId;
|
|
16
|
+
function compose(compositeId: CompositeUserId, deviceIdx: number): ParticipantId;
|
|
17
|
+
function composeId(participant: SignalingMessage.Participant): ParticipantId;
|
|
18
|
+
function composeMessageId(message: SignalingMessage): ParticipantId;
|
|
15
19
|
function decomposeId(compositeId: CompositeUserId | OkUserId): {
|
|
16
20
|
id: OkUserId;
|
|
17
21
|
type: UserType;
|
|
18
22
|
};
|
|
23
|
+
function decomposeParticipantId(participantId: ParticipantId): {
|
|
24
|
+
compositeUserId: CompositeUserId;
|
|
25
|
+
deviceIdx: number;
|
|
26
|
+
};
|
|
19
27
|
function uuid(): string;
|
|
20
28
|
function throttle(func: Function, ms: number): (this: any) => void;
|
|
21
29
|
function sdpFingerprint(sdp: string): BigInteger;
|
package/static/WebRTCUtils.d.ts
CHANGED
|
@@ -62,7 +62,7 @@ declare namespace WebRTCUtils {
|
|
|
62
62
|
/**
|
|
63
63
|
* Запрашивает камеру и микрофон пользователя
|
|
64
64
|
*/
|
|
65
|
-
function getUserMedia(needVideo?: boolean, needAudio?: boolean): Promise<MediaStream>;
|
|
65
|
+
function getUserMedia(needVideo?: boolean, needAudio?: boolean, needEmptyTracks?: boolean): Promise<MediaStream>;
|
|
66
66
|
/**
|
|
67
67
|
* Запрашивает трансляцию экрана пользователя
|
|
68
68
|
*/
|
|
@@ -132,7 +132,7 @@ declare namespace WebRTCUtils {
|
|
|
132
132
|
/**
|
|
133
133
|
* Версия браузера
|
|
134
134
|
*/
|
|
135
|
-
function browserVersion():
|
|
135
|
+
function browserVersion(): string;
|
|
136
136
|
/**
|
|
137
137
|
* Если браузер основан на хроме - возвращает версию
|
|
138
138
|
*/
|
|
@@ -141,5 +141,9 @@ declare namespace WebRTCUtils {
|
|
|
141
141
|
* Возвращает AudioContext
|
|
142
142
|
*/
|
|
143
143
|
function getAudioContext(): AudioContext;
|
|
144
|
+
/**
|
|
145
|
+
* Возвращает подверсию браузера (если она есть)
|
|
146
|
+
*/
|
|
147
|
+
function browserSubVersion(): string;
|
|
144
148
|
}
|
|
145
149
|
export default WebRTCUtils;
|
package/types/ExternalId.d.ts
CHANGED
|
@@ -12,6 +12,7 @@ export declare enum ExternalIdType {
|
|
|
12
12
|
ANONYM = "ANONYM",
|
|
13
13
|
GROUP = "GROUP"
|
|
14
14
|
}
|
|
15
|
+
export declare type ExternalUserId = string;
|
|
15
16
|
export declare namespace ExternalIdUtils {
|
|
16
17
|
function fromIds(ids: (string | ExternalId)[]): ExternalId[];
|
|
17
18
|
function fromId(id: string, type?: ExternalIdType): ExternalId;
|
|
@@ -22,6 +23,13 @@ export declare namespace ExternalIdUtils {
|
|
|
22
23
|
function compare(id1: ExternalId, id2: ExternalId): boolean;
|
|
23
24
|
}
|
|
24
25
|
export declare type ExternalIdString = string;
|
|
26
|
+
export declare namespace ExternalParticipantIdUtils {
|
|
27
|
+
function fromId(id: string, type?: ExternalIdType, deviceIdx?: number): ExternalParticipantId;
|
|
28
|
+
function toString(externalId: ExternalParticipantId): ExternalParticipantIdString;
|
|
29
|
+
function fromSignaling(signalingId: SignalingMessage.ExternalId, deviceIdx: number): ExternalParticipantId;
|
|
30
|
+
function getDeviceIdx(externalId: string | ExternalParticipantId | null): number;
|
|
31
|
+
}
|
|
32
|
+
export declare type ExternalParticipantIdString = string;
|
|
25
33
|
/**
|
|
26
34
|
* Идентификатор внешнего пользователя
|
|
27
35
|
*/
|
|
@@ -35,6 +43,15 @@ export interface ExternalId {
|
|
|
35
43
|
*/
|
|
36
44
|
type: ExternalIdType;
|
|
37
45
|
}
|
|
46
|
+
/**
|
|
47
|
+
* Идентификатор участника звонка
|
|
48
|
+
*/
|
|
49
|
+
export interface ExternalParticipantId extends ExternalId {
|
|
50
|
+
/**
|
|
51
|
+
* Индекс устройства (позволяет отличать участников, которые присоединяются к звонку под одной учётной записью с разных устройств)
|
|
52
|
+
*/
|
|
53
|
+
deviceIdx: number;
|
|
54
|
+
}
|
|
38
55
|
/**
|
|
39
56
|
* Участник звонка
|
|
40
57
|
*/
|
|
@@ -42,7 +59,7 @@ export interface ExternalParticipant {
|
|
|
42
59
|
/**
|
|
43
60
|
* Идентификатор пользователя
|
|
44
61
|
*/
|
|
45
|
-
uid:
|
|
62
|
+
uid: ExternalParticipantId;
|
|
46
63
|
/**
|
|
47
64
|
* Данные стрима
|
|
48
65
|
*/
|
|
@@ -56,7 +73,7 @@ export interface ExternalParticipant {
|
|
|
56
73
|
*/
|
|
57
74
|
participantState?: ParticipantStateMapped;
|
|
58
75
|
/**
|
|
59
|
-
* Состояние устройств пользователя
|
|
76
|
+
* Состояние устройств пользователя установленное админом звонка
|
|
60
77
|
*/
|
|
61
78
|
muteStates: MuteStates;
|
|
62
79
|
/**
|
package/types/MuteStates.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import MediaOption from '../enums/MediaOption';
|
|
2
2
|
import MuteState from '../enums/MuteState';
|
|
3
3
|
/**
|
|
4
|
-
* Состояние устройств пользователя
|
|
4
|
+
* Состояние устройств пользователя установленное админом звонка
|
|
5
5
|
*/
|
|
6
6
|
declare type MuteStates = {
|
|
7
7
|
[key in MediaOption]?: MuteState;
|
package/types/Participant.d.ts
CHANGED
|
@@ -3,10 +3,18 @@ import ParticipantState from '../enums/ParticipantState';
|
|
|
3
3
|
import UserRole from '../enums/UserRole';
|
|
4
4
|
import { ParticipantStatus } from '../static/External';
|
|
5
5
|
import MediaSettings from '../types/MediaSettings';
|
|
6
|
-
import {
|
|
6
|
+
import { ExternalParticipantId } from './ExternalId';
|
|
7
7
|
import MuteStates from './MuteStates';
|
|
8
8
|
import ParticipantLayout from './ParticipantLayout';
|
|
9
|
+
/**
|
|
10
|
+
* Уникально идентифицирует пользователя или группу
|
|
11
|
+
*/
|
|
9
12
|
export declare type CompositeUserId = string;
|
|
13
|
+
/**
|
|
14
|
+
* Уникально идентифицирует участника звонка
|
|
15
|
+
* (одному пользователю могут соответствовать несколько участников, в случае если пользователь зашёл в звонок с нескольких устройств)
|
|
16
|
+
*/
|
|
17
|
+
export declare type ParticipantId = string;
|
|
10
18
|
export declare type OkUserId = number;
|
|
11
19
|
/**
|
|
12
20
|
* Стейт участника звонка
|
|
@@ -18,8 +26,8 @@ export interface ParticipantStateMapped {
|
|
|
18
26
|
};
|
|
19
27
|
}
|
|
20
28
|
export interface Participant {
|
|
21
|
-
id:
|
|
22
|
-
externalId:
|
|
29
|
+
id: ParticipantId;
|
|
30
|
+
externalId: ExternalParticipantId;
|
|
23
31
|
mediaSettings: MediaSettings;
|
|
24
32
|
state: ParticipantState;
|
|
25
33
|
status: ParticipantStatus | null;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ExternalParticipantId } from './ExternalId';
|
|
2
2
|
import { MediaType } from './ParticipantStreamDescription';
|
|
3
3
|
/**
|
|
4
4
|
* Лейаут собеседника в звонке
|
|
@@ -38,7 +38,7 @@ export declare type ParticipantLayout = (Layout | StopStream) & {
|
|
|
38
38
|
/**
|
|
39
39
|
* Внешний ID пользователя
|
|
40
40
|
*/
|
|
41
|
-
uid:
|
|
41
|
+
uid: ExternalParticipantId | string;
|
|
42
42
|
/**
|
|
43
43
|
* Тип медиа (видео с камеры, картинка с экрана, лайв или мувик)
|
|
44
44
|
*/
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ExternalParticipantId } from './ExternalId';
|
|
2
2
|
/**
|
|
3
3
|
* Приоритет собеседника в звонке
|
|
4
4
|
*/
|
|
5
5
|
declare type ParticipantPriority = {
|
|
6
6
|
/**
|
|
7
|
-
* Внешний ID
|
|
7
|
+
* Внешний ID участника звонка
|
|
8
8
|
*/
|
|
9
|
-
uid:
|
|
9
|
+
uid: ExternalParticipantId | string;
|
|
10
10
|
/**
|
|
11
11
|
* Приоритет [-1..MAX_INT]
|
|
12
12
|
*/
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ParticipantId } from './Participant';
|
|
2
2
|
/**
|
|
3
3
|
* Тип пользовательского медиа
|
|
4
4
|
*/
|
|
@@ -11,7 +11,7 @@ export declare enum MediaType {
|
|
|
11
11
|
export declare function serializeParticipantStreamDescription(description: ParticipantStreamDescription): string;
|
|
12
12
|
export declare function parseParticipantStreamDescription(descriptionString: string): ParticipantStreamDescription;
|
|
13
13
|
export declare type ParticipantStreamDescription = {
|
|
14
|
-
participantId:
|
|
14
|
+
participantId: ParticipantId;
|
|
15
15
|
mediaType: MediaType | null;
|
|
16
16
|
streamName?: string;
|
|
17
17
|
};
|
|
@@ -10,12 +10,12 @@ import UserType from '../enums/UserType';
|
|
|
10
10
|
import MediaModifiers from './MediaModifiers';
|
|
11
11
|
import MediaSettings from './MediaSettings';
|
|
12
12
|
import MuteStates from './MuteStates';
|
|
13
|
-
import {
|
|
13
|
+
import { OkUserId, ParticipantId } from './Participant';
|
|
14
14
|
import VideoSettings from './VideoSettings';
|
|
15
15
|
import { WaitingParticipant } from './WaitingHall';
|
|
16
16
|
declare type SignalingMessage = Record<string, any>;
|
|
17
17
|
export declare type RecordInfo = {
|
|
18
|
-
initiator:
|
|
18
|
+
initiator: ParticipantId;
|
|
19
19
|
recordMovieId: number;
|
|
20
20
|
recordStartTime: number;
|
|
21
21
|
recordType: 'STREAM' | 'RECORD';
|
|
@@ -34,6 +34,7 @@ declare namespace SignalingMessage {
|
|
|
34
34
|
export interface Participant {
|
|
35
35
|
id: OkUserId;
|
|
36
36
|
idType?: UserType;
|
|
37
|
+
deviceIdx?: number;
|
|
37
38
|
externalId?: ExternalId;
|
|
38
39
|
state: ParticipantState;
|
|
39
40
|
responders?: OkUserId[];
|
|
@@ -61,7 +62,7 @@ declare namespace SignalingMessage {
|
|
|
61
62
|
multichatId: string | null;
|
|
62
63
|
tamtamMultichatId: string | null;
|
|
63
64
|
recordInfo: RecordInfo | null;
|
|
64
|
-
pinnedParticipantId:
|
|
65
|
+
pinnedParticipantId: ParticipantId | null;
|
|
65
66
|
options: ConversationOption[];
|
|
66
67
|
muteStates?: MuteStates;
|
|
67
68
|
}
|
|
@@ -73,12 +74,14 @@ declare namespace SignalingMessage {
|
|
|
73
74
|
export interface TransmittedData extends Notification {
|
|
74
75
|
participantId: OkUserId;
|
|
75
76
|
participantType: UserType;
|
|
77
|
+
deviceIdx?: number;
|
|
76
78
|
peerId: PeerId;
|
|
77
79
|
data: any;
|
|
78
80
|
}
|
|
79
81
|
export interface RegisteredPeer extends Notification {
|
|
80
82
|
participantId: OkUserId;
|
|
81
83
|
participantType: UserType;
|
|
84
|
+
deviceIdx?: number;
|
|
82
85
|
peerId: PeerId;
|
|
83
86
|
platform: string;
|
|
84
87
|
clientType: string;
|
|
@@ -86,12 +89,14 @@ declare namespace SignalingMessage {
|
|
|
86
89
|
export interface AcceptedCall extends Notification {
|
|
87
90
|
participantId: OkUserId;
|
|
88
91
|
participantType: UserType;
|
|
92
|
+
deviceIdx?: number;
|
|
89
93
|
peerId: PeerId;
|
|
90
94
|
mediaSettings: Partial<MediaSettings>;
|
|
91
95
|
}
|
|
92
96
|
export interface Hungup extends Notification {
|
|
93
97
|
participantId: OkUserId;
|
|
94
98
|
participantType: UserType;
|
|
99
|
+
deviceIdx?: number;
|
|
95
100
|
peerId: PeerId;
|
|
96
101
|
reason: HangupType;
|
|
97
102
|
}
|
|
@@ -101,12 +106,14 @@ declare namespace SignalingMessage {
|
|
|
101
106
|
export interface MediaSettingsChanged extends Notification {
|
|
102
107
|
participantId: OkUserId;
|
|
103
108
|
participantType: UserType;
|
|
109
|
+
deviceIdx?: number;
|
|
104
110
|
peerId: PeerId;
|
|
105
111
|
mediaSettings: Partial<MediaSettings>;
|
|
106
112
|
}
|
|
107
113
|
export interface ParticipantStateChanged extends Notification {
|
|
108
114
|
participantId: OkUserId;
|
|
109
115
|
participantType: UserType;
|
|
116
|
+
deviceIdx?: number;
|
|
110
117
|
peerId: PeerId;
|
|
111
118
|
mediaSettings: Partial<MediaSettings>;
|
|
112
119
|
participantState: {
|
|
@@ -115,13 +122,13 @@ declare namespace SignalingMessage {
|
|
|
115
122
|
};
|
|
116
123
|
}
|
|
117
124
|
export interface RolesChanged extends Notification {
|
|
118
|
-
adminId:
|
|
119
|
-
participantId:
|
|
125
|
+
adminId: ParticipantId;
|
|
126
|
+
participantId: ParticipantId;
|
|
120
127
|
roles?: UserRole[];
|
|
121
128
|
}
|
|
122
129
|
export interface MuteParticipant extends Notification {
|
|
123
|
-
adminId?:
|
|
124
|
-
participantId?:
|
|
130
|
+
adminId?: ParticipantId;
|
|
131
|
+
participantId?: ParticipantId;
|
|
125
132
|
muteStates: MuteStates;
|
|
126
133
|
unmuteOptions?: MediaOption[];
|
|
127
134
|
mediaOptions: MediaOption[];
|
|
@@ -129,7 +136,7 @@ declare namespace SignalingMessage {
|
|
|
129
136
|
muteAll?: boolean;
|
|
130
137
|
}
|
|
131
138
|
export interface PinParticipant extends Notification {
|
|
132
|
-
participantId:
|
|
139
|
+
participantId: ParticipantId;
|
|
133
140
|
unpin?: boolean;
|
|
134
141
|
}
|
|
135
142
|
export interface ParticipantAdded extends Notification {
|
|
@@ -153,6 +160,7 @@ declare namespace SignalingMessage {
|
|
|
153
160
|
topology: TransportTopology;
|
|
154
161
|
offerTo: OkUserId[];
|
|
155
162
|
offerToTypes: UserType[];
|
|
163
|
+
offerToDeviceIdxs: number[];
|
|
156
164
|
}
|
|
157
165
|
export interface RateCallData extends Notification {
|
|
158
166
|
maxRateForQuestion: number;
|
|
@@ -169,12 +177,10 @@ declare namespace SignalingMessage {
|
|
|
169
177
|
reason: string;
|
|
170
178
|
}
|
|
171
179
|
export interface RecordStarted extends Notification {
|
|
172
|
-
idType: UserType;
|
|
173
|
-
id: OkUserId;
|
|
174
180
|
recordInfo: RecordInfo;
|
|
175
181
|
}
|
|
176
182
|
export interface RecordStopped extends Notification {
|
|
177
|
-
participant:
|
|
183
|
+
participant: ParticipantId;
|
|
178
184
|
recordMovieId: number;
|
|
179
185
|
}
|
|
180
186
|
export interface ReallocCon extends Notification {
|
|
@@ -184,6 +190,7 @@ declare namespace SignalingMessage {
|
|
|
184
190
|
export interface ChatMessage extends Notification {
|
|
185
191
|
participantId: OkUserId;
|
|
186
192
|
participantType: UserType;
|
|
193
|
+
deviceIdx?: number;
|
|
187
194
|
direct: boolean;
|
|
188
195
|
message: string;
|
|
189
196
|
}
|
|
@@ -196,13 +203,13 @@ declare namespace SignalingMessage {
|
|
|
196
203
|
settings: Record<string, any>;
|
|
197
204
|
}
|
|
198
205
|
export interface StalledActivity extends Notification {
|
|
199
|
-
stalledParticipants:
|
|
206
|
+
stalledParticipants: ParticipantId[];
|
|
200
207
|
}
|
|
201
208
|
export interface AudioActivity extends Notification {
|
|
202
|
-
activeParticipants:
|
|
209
|
+
activeParticipants: ParticipantId[];
|
|
203
210
|
}
|
|
204
211
|
export interface SpeakerChanged extends Notification {
|
|
205
|
-
speaker:
|
|
212
|
+
speaker: ParticipantId;
|
|
206
213
|
}
|
|
207
214
|
export interface OptionsChanged extends Notification {
|
|
208
215
|
options: ConversationOption[];
|
|
@@ -211,7 +218,7 @@ declare namespace SignalingMessage {
|
|
|
211
218
|
statuses: Record<string, number>;
|
|
212
219
|
}
|
|
213
220
|
export interface PromotionApproved extends Notification {
|
|
214
|
-
adminId:
|
|
221
|
+
adminId: ParticipantId;
|
|
215
222
|
}
|
|
216
223
|
export interface PromoteParticipant extends Notification {
|
|
217
224
|
demote: boolean;
|
|
@@ -222,8 +229,8 @@ declare namespace SignalingMessage {
|
|
|
222
229
|
eventType: ChatRoomEventType;
|
|
223
230
|
totalCount: number;
|
|
224
231
|
firstParticipants: WaitingParticipant[];
|
|
225
|
-
addedParticipantIds:
|
|
226
|
-
removedParticipantIds:
|
|
232
|
+
addedParticipantIds: ParticipantId[];
|
|
233
|
+
removedParticipantIds: ParticipantId[];
|
|
227
234
|
feedback: Record<string, any>[];
|
|
228
235
|
}
|
|
229
236
|
export interface VideoQualityUpdate extends Notification {
|
|
@@ -235,6 +242,7 @@ declare namespace SignalingMessage {
|
|
|
235
242
|
export interface CustomData extends Notification {
|
|
236
243
|
participantId: OkUserId;
|
|
237
244
|
participantType: UserType;
|
|
245
|
+
deviceIdx?: number;
|
|
238
246
|
data: Record<string, any>;
|
|
239
247
|
}
|
|
240
248
|
export interface SwitchMicro extends Notification {
|