@vkontakte/calls-sdk 2.8.2-dev.420d5a9.0 → 2.8.2-dev.638a3c6.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 +63 -38
- package/abstract/BaseApi.d.ts +11 -9
- package/abstract/BaseSignaling.d.ts +11 -6
- package/calls-sdk.cjs.js +8 -8
- package/calls-sdk.esm.js +8 -8
- package/classes/Conversation.d.ts +17 -11
- package/classes/FpsMeter.d.ts +10 -0
- package/classes/SpecListener.d.ts +0 -1
- package/classes/codec/Types.d.ts +11 -1
- package/classes/screenshare/PacketHistory.d.ts +2 -2
- package/classes/screenshare/ScreenCaptureSender.d.ts +12 -3
- package/classes/screenshare/ScreenCongestionControl.d.ts +1 -1
- package/classes/screenshare/StreamBuilder.d.ts +1 -0
- package/classes/screenshare/Utils.d.ts +1 -1
- package/classes/stat/StatAggregator.d.ts +1 -1
- package/classes/stat/StatFirstMediaReceived.d.ts +14 -2
- package/classes/transport/BaseTransport.d.ts +13 -0
- package/classes/transport/DirectTransport.d.ts +7 -18
- package/classes/transport/ServerTransport.d.ts +7 -17
- package/classes/transport/Transport.d.ts +7 -3
- package/default/Api.d.ts +12 -13
- package/default/Signaling.d.ts +11 -6
- package/enums/FatalError.d.ts +1 -0
- package/enums/SignalingCommandType.d.ts +4 -2
- package/enums/SignalingNotification.d.ts +0 -1
- package/package.json +3 -3
- package/static/External.d.ts +34 -16
- package/static/Params.d.ts +38 -31
- package/static/Utils.d.ts +8 -4
- package/types/Asr.d.ts +1 -1
- package/types/Conversation.d.ts +3 -0
- package/types/ExternalId.d.ts +13 -15
- package/types/{Logger.d.ts → IEventualStatLog.d.ts} +2 -2
- package/types/MovieShare.d.ts +2 -2
- package/types/MuteStates.d.ts +1 -1
- package/types/Participant.d.ts +4 -3
- package/types/ParticipantLayout.d.ts +2 -2
- package/types/ParticipantListChunk.d.ts +1 -1
- package/types/ParticipantStreamDescription.d.ts +3 -3
- package/types/PerfStatReporter.d.ts +1 -1
- package/types/Room.d.ts +4 -0
- package/types/SignalingCommand.d.ts +2 -1
- package/types/SignalingMessage.d.ts +17 -4
- package/types/Statistics.d.ts +3 -4
- package/types/Streams.d.ts +7 -0
- package/utils/ArrayDequeue.d.ts +1 -1
- package/utils/ArrayList.d.ts +5 -2
- package/utils/FastList.d.ts +5 -2
- package/utils/IList.d.ts +5 -2
package/CallsSDK.d.ts
CHANGED
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* CallsSDK
|
|
3
3
|
*/
|
|
4
|
-
import type * as Vmoji from '@vkontakte/calls-vmoji';
|
|
5
4
|
import type { IEffect, VideoEffects } from '@vkontakte/calls-video-effects';
|
|
5
|
+
import type * as Vmoji from '@vkontakte/calls-vmoji';
|
|
6
6
|
import BaseApi from './abstract/BaseApi';
|
|
7
7
|
import BaseLogger from './abstract/BaseLogger';
|
|
8
8
|
import BaseSignaling, { AddParticipantParams } from './abstract/BaseSignaling';
|
|
9
9
|
import HangupReason, { HangupReasonData } from './classes/HangupReason';
|
|
10
10
|
import { MediaTrackKind } from './classes/MediaSource';
|
|
11
|
-
import { StatResult } from './types/Statistics';
|
|
12
11
|
import { TransportTopology } from './classes/transport/Transport';
|
|
13
12
|
import Api from './default/Api';
|
|
14
13
|
import Signaling from './default/Signaling';
|
|
15
14
|
import CallDirection from './enums/CallDirection';
|
|
16
15
|
import CallType from './enums/CallType';
|
|
17
16
|
import ChatRoomEventType from './enums/ChatRoomEventType';
|
|
17
|
+
import ConversationFeature from './enums/ConversationFeature';
|
|
18
18
|
import ConversationOption from './enums/ConversationOption';
|
|
19
19
|
import FatalError from './enums/FatalError';
|
|
20
20
|
import HangupType from './enums/HangupType';
|
|
@@ -22,6 +22,7 @@ import MediaOption from './enums/MediaOption';
|
|
|
22
22
|
import MuteState from './enums/MuteState';
|
|
23
23
|
import ParticipantState from './enums/ParticipantState';
|
|
24
24
|
import RecordRole from './enums/RecordRole';
|
|
25
|
+
import RoomsEventType from './enums/RoomsEventType';
|
|
25
26
|
import SignalingCommandType from './enums/SignalingCommandType';
|
|
26
27
|
import SignalingConnectionType from './enums/SignalingConnectionType';
|
|
27
28
|
import SignalingNotification from './enums/SignalingNotification';
|
|
@@ -33,31 +34,30 @@ import { JSONArray, JSONObject, JSONType } from './static/Json';
|
|
|
33
34
|
import { ParamsObject } from './static/Params';
|
|
34
35
|
import Utils from './static/Utils';
|
|
35
36
|
import WebRTCUtils, { FacingMode } from './static/WebRTCUtils';
|
|
36
|
-
import { IAsrStartParams, IAsrStopParams
|
|
37
|
+
import { IAsrData, IAsrStartParams, IAsrStopParams } from './types/Asr';
|
|
38
|
+
import { ConversationData } from './types/Conversation';
|
|
39
|
+
import { IFeaturesPerRole } from './types/ConversationFeature';
|
|
37
40
|
import ConversationParams from './types/ConversationParams';
|
|
38
41
|
import ConversationResponse from './types/ConversationResponse';
|
|
39
42
|
import { ExternalId, ExternalIdType, ExternalParticipant, ExternalParticipantId, ExternalParticipantListChunk, ExternalParticipantListMarker, ExternalParticipantListMarkers, ExternalUserId } from './types/ExternalId';
|
|
43
|
+
import { IFeedbackExternal } from './types/Feedback';
|
|
40
44
|
import IceServer from './types/IceServer';
|
|
41
45
|
import MediaModifiers from './types/MediaModifiers';
|
|
42
46
|
import { IVideoDimentions, MediaSettings } from './types/MediaSettings';
|
|
47
|
+
import { IAddMovieParams, IMovieMetaData, IMoviePreview, IOnRemoteMovieData, ISharedMovieInfo, ISharedMovieState, ISharedMovieStateResponse, ISharedMovieStoppedInfo, IUpdateMovieData } from './types/MovieShare';
|
|
43
48
|
import MuteStates, { IMuteParticipantInternalParams, IMuteParticipantParams } from './types/MuteStates';
|
|
44
49
|
import { IGetParticipantsParameters, OkUserId, ParticipantListMarker, ParticipantListMarkers, ParticipantListType, ParticipantStateMapped } from './types/Participant';
|
|
45
50
|
import ParticipantLayout, { Layout, RequestKeyFrame, StopStream } from './types/ParticipantLayout';
|
|
46
51
|
import { ParticipantListChunkParameters } from './types/ParticipantListChunk';
|
|
47
52
|
import ParticipantPriority from './types/ParticipantPriority';
|
|
48
53
|
import { MediaType, ParticipantStreamDescription } from './types/ParticipantStreamDescription';
|
|
49
|
-
import {
|
|
50
|
-
import RoomsEventType from './enums/RoomsEventType';
|
|
54
|
+
import { IRoomId, Room, RoomParticipantUpdate, Rooms, RoomsUpdate } from './types/Room';
|
|
51
55
|
import { ScreenCaptureSettings } from './types/ScreenCaptureSettings';
|
|
52
56
|
import SignalingMessage from './types/SignalingMessage';
|
|
53
|
-
import {
|
|
54
|
-
import { IFeedbackExternal } from './types/Feedback';
|
|
55
|
-
import { ISharedMovieInfo, ISharedMovieStoppedInfo, ISharedMovieState, ISharedMovieStateResponse, IAddMovieParams, IOnRemoteMovieData, IMoviePreview, IUpdateMovieData, IMovieMetaData } from './types/MovieShare';
|
|
57
|
+
import { StatResult } from './types/Statistics';
|
|
56
58
|
import { IStartStreamData, IStopStreamData } from './types/Streams';
|
|
57
|
-
import
|
|
58
|
-
import { IFeaturesPerRole } from './types/ConversationFeature';
|
|
59
|
+
import { WaitingHallResponse } from './types/WaitingHall';
|
|
59
60
|
import { ArrayDequeue } from './utils/ArrayDequeue';
|
|
60
|
-
import { ConversationData } from './types/Conversation';
|
|
61
61
|
/**
|
|
62
62
|
* Информация о текущем браузере
|
|
63
63
|
*/
|
|
@@ -224,8 +224,8 @@ export declare function init(params: Partial<ParamsObject>): Promise<void>;
|
|
|
224
224
|
* @param requireAuthToJoin Запретить анонимам подключаться по ссылке (если поддерживается сервером)
|
|
225
225
|
* @param onlyAdminCanShareMovie Только администратор может включать совметсный просмотр
|
|
226
226
|
*/
|
|
227
|
-
export declare function callTo(externalId?:
|
|
228
|
-
export declare function callInternal(ids: OkUserId[], type: CallType, mediaOptions: MediaOption[], payload?: string, joiningAllowed?: boolean, requireAuthToJoin?: boolean, onlyAdminCanShareMovie?: boolean): Promise<ConversationData>;
|
|
227
|
+
export declare function callTo(externalId?: ExternalId | ExternalId[], mediaOptions?: MediaOption[], payload?: string, joiningAllowed?: boolean, requireAuthToJoin?: boolean, onlyAdminCanShareMovie?: boolean): Promise<ConversationData>;
|
|
228
|
+
export declare function callInternal(ids: OkUserId[], type: CallType | undefined, mediaOptions: MediaOption[], payload?: string, joiningAllowed?: boolean, requireAuthToJoin?: boolean, onlyAdminCanShareMovie?: boolean): Promise<ConversationData>;
|
|
229
229
|
/**
|
|
230
230
|
* Обработать пуш о входящем звонке
|
|
231
231
|
*
|
|
@@ -282,7 +282,7 @@ export declare function hangup(): Promise<void>;
|
|
|
282
282
|
* @param externalId Внешний ID пользователя
|
|
283
283
|
* @param params Параметры
|
|
284
284
|
*/
|
|
285
|
-
export declare function addParticipant(externalId:
|
|
285
|
+
export declare function addParticipant(externalId: ExternalId, params?: AddParticipantParams): Promise<void>;
|
|
286
286
|
export declare function addParticipantInternal(uid: OkUserId, params?: AddParticipantParams): Promise<void>;
|
|
287
287
|
/**
|
|
288
288
|
* Удалить собеседника из звонка
|
|
@@ -290,7 +290,7 @@ export declare function addParticipantInternal(uid: OkUserId, params?: AddPartic
|
|
|
290
290
|
* @param externalId Внешний ID пользователя
|
|
291
291
|
* @param ban Забанить пользователя
|
|
292
292
|
*/
|
|
293
|
-
export declare function removeParticipant(externalId:
|
|
293
|
+
export declare function removeParticipant(externalId: ExternalId, ban?: boolean): Promise<void>;
|
|
294
294
|
export declare function removeParticipantInternal(uid: OkUserId, ban?: boolean): Promise<void>;
|
|
295
295
|
/**
|
|
296
296
|
* Изменить камеру на фронтальную или заднюю (для мобильных устройств)
|
|
@@ -356,6 +356,7 @@ export declare function setLocalResolution(resolution: {
|
|
|
356
356
|
* Отрицательный приоритет выключит видео.
|
|
357
357
|
*
|
|
358
358
|
* @param priorities Список приоритетов
|
|
359
|
+
* @deprecated Use updateDisplayLayout instead
|
|
359
360
|
*/
|
|
360
361
|
export declare function changePriorities(priorities: ParticipantPriority[]): Promise<void>;
|
|
361
362
|
/**
|
|
@@ -378,8 +379,8 @@ export declare function updateDisplayLayout(layout: ParticipantLayout[]): Promis
|
|
|
378
379
|
* @param roles Список ролей
|
|
379
380
|
* @param revoke Забрать роли
|
|
380
381
|
*/
|
|
381
|
-
export declare function grantRoles(externalId:
|
|
382
|
-
export declare function grantRolesInternal(uid: OkUserId, roles: UserRole[], revoke?: boolean): Promise<void>;
|
|
382
|
+
export declare function grantRoles(externalId: ExternalId, roles: UserRole[], revoke?: boolean): Promise<void>;
|
|
383
|
+
export declare function grantRolesInternal(uid: OkUserId, deviceIdx: number, roles: UserRole[], revoke?: boolean): Promise<void>;
|
|
383
384
|
/**
|
|
384
385
|
* Выключить или выключить микрофон и/или камеру собеседнику (только если есть соответствующая роль)
|
|
385
386
|
*
|
|
@@ -395,8 +396,9 @@ export declare function muteParticipantInternal({ uid, muteStates, requestedMedi
|
|
|
395
396
|
*
|
|
396
397
|
* @param externalId Внешний ID пользователя
|
|
397
398
|
* @param unpin Открепить
|
|
399
|
+
* @param roomId Идентификатор комнаты
|
|
398
400
|
*/
|
|
399
|
-
export declare function pinParticipant(externalId:
|
|
401
|
+
export declare function pinParticipant(externalId: ExternalId, unpin?: boolean, roomId?: number | null): Promise<void>;
|
|
400
402
|
export declare function pinParticipantInternal(uid: OkUserId, unpin?: boolean, deviceIdx?: number, roomId?: number | null): Promise<void>;
|
|
401
403
|
/**
|
|
402
404
|
* Устанавливает настройки пользовательского медиа
|
|
@@ -418,7 +420,7 @@ export declare function changeConversationOptions(changes: {
|
|
|
418
420
|
* @param message Сообщение
|
|
419
421
|
* @param externalId Внешний ID пользователя (если не указано, отправит всем)
|
|
420
422
|
*/
|
|
421
|
-
export declare function chatMessage(message: string, externalId?:
|
|
423
|
+
export declare function chatMessage(message: string, externalId?: ExternalId | null): Promise<void>;
|
|
422
424
|
export declare function chatMessageInternal(message: string, uid?: OkUserId | null): Promise<void>;
|
|
423
425
|
/**
|
|
424
426
|
* Получить историю сообщений чата
|
|
@@ -432,7 +434,7 @@ export declare function chatHistory(count?: number): Promise<void>;
|
|
|
432
434
|
* @param data Данные
|
|
433
435
|
* @param externalId Внешний ID пользователя (если не указано, отправит всем)
|
|
434
436
|
*/
|
|
435
|
-
export declare function customData(data: JSONObject, externalId?:
|
|
437
|
+
export declare function customData(data: JSONObject, externalId?: ExternalId | null): Promise<void>;
|
|
436
438
|
export declare function customDataInternal(data: JSONObject, uid?: OkUserId | null, deviceIdx?: number): Promise<void>;
|
|
437
439
|
/**
|
|
438
440
|
* Создать токен комнаты для подключения по ссылке
|
|
@@ -443,8 +445,20 @@ export declare function customDataInternal(data: JSONObject, uid?: OkUserId | nu
|
|
|
443
445
|
* @returns Токен комнаты
|
|
444
446
|
*/
|
|
445
447
|
export declare function startConversation(payload?: string, requireAuthToJoin?: boolean, { onlyAdminCanShareMovie }?: {
|
|
446
|
-
onlyAdminCanShareMovie?: boolean;
|
|
448
|
+
onlyAdminCanShareMovie?: boolean | undefined;
|
|
447
449
|
}): Promise<string>;
|
|
450
|
+
/**
|
|
451
|
+
* Создать токен комнаты в режиме Audience для подключения по ссылке
|
|
452
|
+
*
|
|
453
|
+
* @param payload Дополнительные данные для передачи на сервер
|
|
454
|
+
* @param requireAuthToJoin Запретить анонимам подключаться по ссылке (если поддерживается сервером)
|
|
455
|
+
* @param startConversationParameters Дополнительные параметры для создания звонка (например onlyAdminCanShareMovie)
|
|
456
|
+
* @param speakerIds Список внешних ID пользователей, которые будут выступать в роли спикеров
|
|
457
|
+
* @returns Токен комнаты
|
|
458
|
+
*/
|
|
459
|
+
export declare function startAudienceConversation(payload: string | undefined, requireAuthToJoin: boolean | undefined, { onlyAdminCanShareMovie, }: {
|
|
460
|
+
onlyAdminCanShareMovie?: boolean | undefined;
|
|
461
|
+
} | undefined, speakerIds: ExternalUserId[]): Promise<string>;
|
|
448
462
|
/**
|
|
449
463
|
* Создать токен комнаты для подключения по ссылке к существующему звонку
|
|
450
464
|
*
|
|
@@ -482,25 +496,22 @@ export declare function forceRelayPolicy(enabled: boolean): void;
|
|
|
482
496
|
* @param groupId
|
|
483
497
|
* @param roomId
|
|
484
498
|
*/
|
|
485
|
-
export declare function startStream(isRecord?: boolean, name?: string | null, movieId?: string | null, privacy?: 'PUBLIC' | 'FRIENDS' | 'DIRECT_LINK', groupId?: string | null, roomId?: number | null): Promise<
|
|
499
|
+
export declare function startStream(isRecord?: boolean, name?: string | null, movieId?: string | null, privacy?: 'PUBLIC' | 'FRIENDS' | 'DIRECT_LINK', groupId?: string | null, roomId?: number | null): Promise<undefined>;
|
|
486
500
|
/**
|
|
487
501
|
* Завершить трансляцию звонка
|
|
488
502
|
* @param roomId
|
|
489
503
|
*/
|
|
490
|
-
export declare function stopStream(roomId?: number | null): Promise<
|
|
504
|
+
export declare function stopStream(roomId?: number | null): Promise<undefined>;
|
|
491
505
|
/**
|
|
492
506
|
* Устанавливает роль участника в запись звонка
|
|
493
507
|
* Если хотя бы у одного участника звонка выставлена роль, то в записи звонка будут
|
|
494
508
|
* видны только те участники, у кого есть роль.
|
|
495
|
-
*
|
|
496
|
-
*
|
|
497
|
-
*
|
|
498
|
-
*
|
|
499
|
-
* @param externalId Внешний ID пользователя
|
|
500
|
-
* @param role Роль, если null, то роль удалится
|
|
501
|
-
* @param roomId ID сессионного зала записи. Если null, то роль применится в основном звонке
|
|
509
|
+
* @param king участник показывается крупно в записи звонка (только один участник имеет такую роль)
|
|
510
|
+
* @param pawns участник показывается в записи звонка
|
|
511
|
+
* @param hideParticipantCount скрыть/показать количество невидимых участников
|
|
512
|
+
* @param roomId комната
|
|
502
513
|
*/
|
|
503
|
-
export declare function
|
|
514
|
+
export declare function recordSetConf(king?: ExternalId, pawns?: ExternalId[], hideParticipantCount?: boolean, roomId?: number | null): Promise<void>;
|
|
504
515
|
/**
|
|
505
516
|
* Получить информацию о трансляции звонка
|
|
506
517
|
*/
|
|
@@ -544,9 +555,9 @@ export declare function activateRooms(roomIds: number[], deactivate: boolean): P
|
|
|
544
555
|
/**
|
|
545
556
|
* Cменить сессионный зал
|
|
546
557
|
* @param toRoomId
|
|
547
|
-
* @param
|
|
558
|
+
* @param externalId
|
|
548
559
|
*/
|
|
549
|
-
export declare function switchRoom(toRoomId?: number | null,
|
|
560
|
+
export declare function switchRoom(toRoomId?: number | null, externalId?: ExternalId | null): Promise<void>;
|
|
550
561
|
/**
|
|
551
562
|
* Удалить сессионные залы
|
|
552
563
|
* @param roomIds
|
|
@@ -589,12 +600,12 @@ export declare function setAudioStream(stream: MediaStream): Promise<void>;
|
|
|
589
600
|
*
|
|
590
601
|
* @param {(string|ArrayBuffer)} svg - svg в незашифрованном (string)
|
|
591
602
|
* или зашифрованном (ArrayBuffer) виде
|
|
592
|
-
* @param {(
|
|
603
|
+
* @param {(ExternalId|null)} externalId - externalId внешнего участника звонка,
|
|
593
604
|
* не требуется для текущего участника (текущего пользователя клиента)
|
|
594
605
|
* @param {(string|null)} customKey - кастомный ключ расшифровки svg,
|
|
595
606
|
* нужен только в случае присвоения участнику чужого аватара
|
|
596
607
|
*/
|
|
597
|
-
export declare function setVmojiSvg(svg: string | ArrayBuffer, externalId?:
|
|
608
|
+
export declare function setVmojiSvg(svg: string | ArrayBuffer, externalId?: ExternalId | null, customKey?: string | null): Promise<void>;
|
|
598
609
|
/**
|
|
599
610
|
* Получить состояние зала ожидания
|
|
600
611
|
*
|
|
@@ -604,12 +615,26 @@ export declare function setVmojiSvg(svg: string | ArrayBuffer, externalId?: Exte
|
|
|
604
615
|
*/
|
|
605
616
|
export declare function getWaitingHall(pageMarker?: string | null, count?: number, backward?: boolean): Promise<WaitingHallResponse>;
|
|
606
617
|
/**
|
|
607
|
-
* Разрешить/запретить пользователю войти из зала
|
|
618
|
+
* Разрешить/запретить пользователю войти из зала ожидания/стать спикером комнаты
|
|
619
|
+
* в режиме Audience
|
|
608
620
|
*
|
|
609
621
|
* @param externalId Внешний ID пользователя
|
|
610
|
-
* @param demote Запретить
|
|
622
|
+
* @param demote Запретить вход/отобрать права спикера
|
|
611
623
|
*/
|
|
612
624
|
export declare function promoteParticipant(externalId: ExternalId, demote?: boolean): Promise<void>;
|
|
625
|
+
/**
|
|
626
|
+
* Запросить/отозвать запрос на получение права стать спикером в комнате в
|
|
627
|
+
* режиме Audience
|
|
628
|
+
*
|
|
629
|
+
* @param demote Отозвать запрос
|
|
630
|
+
*/
|
|
631
|
+
export declare function requestPromotion(demote?: boolean): Promise<void>;
|
|
632
|
+
/**
|
|
633
|
+
* Согласиться/отказаться стать спикером в комнате в режиме Audience.
|
|
634
|
+
*
|
|
635
|
+
* @param reject Отказаться стать спикером
|
|
636
|
+
*/
|
|
637
|
+
export declare function acceptPromotion(reject?: boolean): Promise<void>;
|
|
613
638
|
export declare function getParticipantListChunk(participantListChunkParameters: ParticipantListChunkParameters): Promise<ExternalParticipantListChunk>;
|
|
614
639
|
export declare function getParticipants(parameters: IGetParticipantsParameters): Promise<ExternalParticipant[]>;
|
|
615
640
|
export declare function feedback(key: string): Promise<SignalingMessage>;
|
|
@@ -636,5 +661,5 @@ export declare function requestAsr(request: boolean): Promise<void>;
|
|
|
636
661
|
* Версия SDK
|
|
637
662
|
*/
|
|
638
663
|
export declare function version(): string;
|
|
639
|
-
export type { AddParticipantParams, ConversationData, ConversationParams, ConversationResponse, ExternalId, ExternalParticipant, ExternalParticipantListChunk, ExternalParticipantListMarker, ExternalParticipantListMarkers as ExternalParticipantMarkers, ExternalParticipantId, HangupReasonData, IAsrStartParams, IAsrStopParams, IAsrData, IceServer, JSONArray, JSONObject, JSONType, Layout, MediaModifiers, MediaSettings, MuteStates, OkUserId, ParamsObject, ParticipantLayout, ParticipantListMarkers, ParticipantListType, ParticipantPriority, ParticipantStateMapped, ParticipantStreamDescription, ParticipantListChunkParameters, ParticipantListMarker, RequestKeyFrame, Rooms, IGetParticipantsParameters, ScreenCaptureSettings, SignalingMessage, StatResult, StopStream, WaitingHallResponse, IMovieMetaData, IVideoDimentions, IFeedbackExternal, ISharedMovieInfo, ISharedMovieStoppedInfo, ISharedMovieState, ISharedMovieStateResponse, IAddMovieParams, IOnRemoteMovieData, IMoviePreview, Room, RoomsUpdate, RoomParticipantUpdate, IUpdateMovieData, IFeaturesPerRole, IMuteParticipantParams, IMuteParticipantInternalParams, IStartStreamData, IStopStreamData, };
|
|
664
|
+
export type { AddParticipantParams, ConversationData, ConversationParams, ConversationResponse, ExternalId, ExternalParticipant, ExternalParticipantListChunk, ExternalParticipantListMarker, ExternalParticipantListMarkers as ExternalParticipantMarkers, ExternalParticipantId, HangupReasonData, IAsrStartParams, IAsrStopParams, IAsrData, IceServer, JSONArray, JSONObject, JSONType, Layout, MediaModifiers, MediaSettings, MuteStates, OkUserId, ParamsObject, ParticipantLayout, ParticipantListMarkers, ParticipantListType, ParticipantPriority, ParticipantStateMapped, ParticipantStreamDescription, ParticipantListChunkParameters, ParticipantListMarker, RequestKeyFrame, Rooms, IGetParticipantsParameters, ScreenCaptureSettings, SignalingMessage, StatResult, StopStream, WaitingHallResponse, IMovieMetaData, IVideoDimentions, IFeedbackExternal, ISharedMovieInfo, ISharedMovieStoppedInfo, ISharedMovieState, ISharedMovieStateResponse, IAddMovieParams, IOnRemoteMovieData, IMoviePreview, IRoomId, Room, RoomsUpdate, RoomParticipantUpdate, IUpdateMovieData, IFeaturesPerRole, IMuteParticipantParams, IMuteParticipantInternalParams, IStartStreamData, IStopStreamData, };
|
|
640
665
|
export { Api, BaseApi, BaseLogger, BaseSignaling, CallDirection, CallType, ChatRoomEventType, ConversationOption, DebugMessageType, ExternalIdType, FacingMode, FatalError, HangupReason, HangupType, MediaOption, MediaTrackKind, MediaType, MuteState, ParticipantState, ParticipantStatus, RecordRole, Signaling, SignalingCommandType, SignalingConnectionType, SignalingNotification, UserRole, UserType, TransportTopology, RoomsEventType, ConversationFeature, ArrayDequeue, };
|
package/abstract/BaseApi.d.ts
CHANGED
|
@@ -2,13 +2,13 @@ import CallType from '../enums/CallType';
|
|
|
2
2
|
import { ConversationData } from '../types/Conversation';
|
|
3
3
|
import ConversationParams from '../types/ConversationParams';
|
|
4
4
|
import ConversationResponse from '../types/ConversationResponse';
|
|
5
|
-
import { ExternalId, ExternalUserId } from '../types/ExternalId';
|
|
6
|
-
import { CompositeUserId, OkUserId } from '../types/Participant';
|
|
5
|
+
import { ExternalId, ExternalParticipantId, ExternalUserId } from '../types/ExternalId';
|
|
6
|
+
import { CompositeUserId, OkUserId, ParticipantId } from '../types/Participant';
|
|
7
7
|
export type LogItem = {
|
|
8
8
|
count?: number;
|
|
9
9
|
custom: {
|
|
10
10
|
vcid: ConversationData['id'] | null;
|
|
11
|
-
[k: string]: string | number;
|
|
11
|
+
[k: string]: string | number | null;
|
|
12
12
|
};
|
|
13
13
|
data?: string[];
|
|
14
14
|
groups?: string[];
|
|
@@ -22,10 +22,11 @@ export type LogItem = {
|
|
|
22
22
|
export default abstract class BaseApi {
|
|
23
23
|
abstract init(): void;
|
|
24
24
|
abstract authorize(): Promise<void>;
|
|
25
|
-
abstract userId(participantId:
|
|
25
|
+
abstract userId(participantId: ParticipantId): Promise<ExternalParticipantId>;
|
|
26
26
|
abstract createConversation(conversationId: string, payload?: string, requireAuthToJoin?: boolean, createConversationParameters?: {
|
|
27
27
|
onlyAdminCanShareMovie?: boolean;
|
|
28
|
-
|
|
28
|
+
audienceMode?: boolean;
|
|
29
|
+
}, speakerIds?: OkUserId[]): Promise<ConversationResponse>;
|
|
29
30
|
abstract startConversation(conversationId: string, ids?: OkUserId[], type?: CallType, isVideo?: boolean, payload?: string, joiningAllowed?: boolean, requireAuthToJoin?: boolean, createConversationParameters?: {
|
|
30
31
|
onlyAdminCanShareMovie?: boolean;
|
|
31
32
|
}): Promise<ConversationResponse>;
|
|
@@ -43,10 +44,11 @@ export default abstract class BaseApi {
|
|
|
43
44
|
abstract setUserId(userId: OkUserId): void;
|
|
44
45
|
log(items: LogItem[]): void;
|
|
45
46
|
prepareUserIds(ids: OkUserId[]): Promise<void>;
|
|
46
|
-
abstract getOkIdsByExternalIds(externalIds:
|
|
47
|
-
abstract
|
|
48
|
-
|
|
49
|
-
|
|
47
|
+
abstract getOkIdsByExternalIds(externalIds: ExternalId[]): Promise<OkUserId[]>;
|
|
48
|
+
abstract getParticipantIdsByExternalIds(externalIds: ExternalId[]): Promise<Map<ExternalId, ParticipantId>>;
|
|
49
|
+
abstract getExternalIdsByOkIds(uids: OkUserId[]): Promise<ExternalParticipantId[]>;
|
|
50
|
+
getCachedOkIdByExternalId(externalId: ExternalId): ParticipantId | null;
|
|
51
|
+
cacheExternalId(participantId: CompositeUserId, externalId: ExternalParticipantId): void;
|
|
50
52
|
hangupConversation(conversationId: string): void;
|
|
51
53
|
removeHistoryRecords(recordIds: number[]): Promise<void>;
|
|
52
54
|
cleanup(): void;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import EventEmitter from '../classes/EventEmitter';
|
|
2
2
|
import { ParticipantIdRegistry } from '../classes/ParticipantIdRegistry';
|
|
3
|
+
import { StreamDescriptionString } from '../types/ParticipantStreamDescription';
|
|
3
4
|
import { PerfStatReport } from '../types/PerfStatReporter';
|
|
4
5
|
import { TransportTopology } from '../classes/transport/Transport';
|
|
5
6
|
import ConversationFeature from '../enums/ConversationFeature';
|
|
6
7
|
import ConversationOption from '../enums/ConversationOption';
|
|
7
8
|
import MediaOption from '../enums/MediaOption';
|
|
8
|
-
import RecordRole from '../enums/RecordRole';
|
|
9
9
|
import SignalingConnectionType from '../enums/SignalingConnectionType';
|
|
10
10
|
import UserRole from '../enums/UserRole';
|
|
11
11
|
import { JSONObject } from '../static/Json';
|
|
@@ -19,7 +19,7 @@ import { CompositeUserId, ParticipantId } from '../types/Participant';
|
|
|
19
19
|
import { ParticipantLayout, RequestKeyFrame, StopStream } from '../types/ParticipantLayout';
|
|
20
20
|
import { ParticipantListChunkParameters } from '../types/ParticipantListChunk';
|
|
21
21
|
import SignalingMessage from '../types/SignalingMessage';
|
|
22
|
-
import { IStartStreamData, IStopStreamData } from '../types/Streams';
|
|
22
|
+
import { IRecordConfData, IStartStreamData, IStopStreamData } from '../types/Streams';
|
|
23
23
|
import { WaitingParticipantId } from '../types/WaitingHall';
|
|
24
24
|
import { SharingStatReport } from '../classes/screenshare/SharingStatReport';
|
|
25
25
|
/**
|
|
@@ -55,11 +55,14 @@ export default abstract class BaseSignaling extends EventEmitter {
|
|
|
55
55
|
[key: string]: number | boolean | string;
|
|
56
56
|
}): Promise<SignalingMessage>;
|
|
57
57
|
abstract acceptProducer(description: RTCSessionDescriptionInit, ssrcs: string[]): Promise<SignalingMessage>;
|
|
58
|
+
/**
|
|
59
|
+
* @deprecated Use updateDisplayLayout instead
|
|
60
|
+
*/
|
|
58
61
|
abstract changePriorities(priorities: {
|
|
59
62
|
[key: string]: number;
|
|
60
63
|
}): Promise<SignalingMessage | void>;
|
|
61
64
|
abstract updateDisplayLayout(layouts: {
|
|
62
|
-
[streamDesc:
|
|
65
|
+
[streamDesc: StreamDescriptionString]: ParticipantLayout | StopStream | RequestKeyFrame;
|
|
63
66
|
}): Promise<SignalingMessage | void>;
|
|
64
67
|
abstract addMovie(data: IAddMovieParams): Promise<SignalingMessage>;
|
|
65
68
|
abstract updateMovie(data: IUpdateMovieData): Promise<SignalingMessage>;
|
|
@@ -71,7 +74,7 @@ export default abstract class BaseSignaling extends EventEmitter {
|
|
|
71
74
|
abstract removeRooms(roomIds: number[]): Promise<SignalingMessage>;
|
|
72
75
|
abstract startStream(data: IStartStreamData): Promise<SignalingMessage>;
|
|
73
76
|
abstract stopStream(data: IStopStreamData): Promise<SignalingMessage>;
|
|
74
|
-
abstract
|
|
77
|
+
abstract recordSetConf(conf: IRecordConfData): Promise<SignalingMessage>;
|
|
75
78
|
abstract getRecordStatus(): Promise<SignalingMessage>;
|
|
76
79
|
abstract switchTopology(topology: TransportTopology, force?: boolean): Promise<SignalingMessage>;
|
|
77
80
|
abstract reportPerfStat(report: PerfStatReport): Promise<SignalingMessage>;
|
|
@@ -79,7 +82,7 @@ export default abstract class BaseSignaling extends EventEmitter {
|
|
|
79
82
|
abstract chatMessage(message: string, participantId: CompositeUserId | null): Promise<SignalingMessage>;
|
|
80
83
|
abstract chatHistory(count: number): Promise<SignalingMessage>;
|
|
81
84
|
abstract customData(data: JSONObject, participantId: ParticipantId | null): Promise<SignalingMessage>;
|
|
82
|
-
abstract grantRoles(participantId:
|
|
85
|
+
abstract grantRoles(participantId: ParticipantId, roles: UserRole[], revoke: boolean): Promise<SignalingMessage>;
|
|
83
86
|
abstract muteParticipant(participantId: ParticipantId | null, muteStates: MuteStates, requestedMedia: MediaOption[], roomId: number | null): Promise<SignalingMessage>;
|
|
84
87
|
abstract enableFeatureForRoles(feature: ConversationFeature, roles: UserRole[]): Promise<SignalingMessage>;
|
|
85
88
|
abstract pinParticipant(participantId: ParticipantId, unpin: boolean, roomId: number | null): Promise<SignalingMessage>;
|
|
@@ -89,6 +92,8 @@ export default abstract class BaseSignaling extends EventEmitter {
|
|
|
89
92
|
}): Promise<SignalingMessage>;
|
|
90
93
|
abstract getWaitingHall(fromId: WaitingParticipantId | null, count?: number, backward?: boolean): Promise<SignalingMessage>;
|
|
91
94
|
abstract promoteParticipant(participantId: CompositeUserId, demote?: boolean): Promise<SignalingMessage>;
|
|
95
|
+
abstract requestPromotion(demote: boolean): Promise<SignalingMessage>;
|
|
96
|
+
abstract acceptPromotion(reject: boolean): Promise<SignalingMessage>;
|
|
92
97
|
abstract feedback(key: string): Promise<SignalingMessage>;
|
|
93
98
|
abstract setProducerNotificationDataChannel(dataChannel: RTCDataChannel): void;
|
|
94
99
|
abstract setProducerCommandDataChannel(dataChannel: RTCDataChannel): void;
|
|
@@ -106,6 +111,6 @@ export default abstract class BaseSignaling extends EventEmitter {
|
|
|
106
111
|
setConversationId(conversationId: string): void;
|
|
107
112
|
readyToSend(isReady?: boolean): void;
|
|
108
113
|
cleanup(): void;
|
|
109
|
-
requestTestMode(consumerCommand: string, producerCommand: string): void;
|
|
114
|
+
requestTestMode(consumerCommand: string, producerCommand: string | null): void;
|
|
110
115
|
getNextCommandSequenceNumber(): number;
|
|
111
116
|
}
|