@vkontakte/calls-sdk 2.8.2-dev.f5b551c.0 → 2.8.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 +78 -41
- package/abstract/BaseApi.d.ts +11 -9
- package/abstract/BaseSignaling.d.ts +10 -8
- package/calls-sdk.cjs.js +8 -8
- package/calls-sdk.esm.js +8 -8
- package/classes/AudioOutput.d.ts +8 -3
- package/classes/Conversation.d.ts +27 -21
- package/classes/FpsMeter.d.ts +10 -0
- package/classes/MediaSource.d.ts +3 -3
- package/classes/ParticipantIdRegistry.d.ts +5 -0
- package/classes/ProducerCommandSerializationService.d.ts +2 -0
- package/classes/codec/IEncoder.d.ts +1 -1
- package/classes/codec/LibVPxEncoder.d.ts +1 -1
- package/classes/codec/Types.d.ts +12 -2
- package/classes/codec/WebCodecsEncoder.d.ts +1 -1
- package/classes/screenshare/PacketHistory.d.ts +3 -2
- package/classes/screenshare/ScreenCaptureSender.d.ts +14 -4
- package/classes/screenshare/ScreenCongestionControl.d.ts +7 -2
- 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/transport/ServerTransport.d.ts +2 -0
- package/classes/transport/Statistics.d.ts +19 -1
- package/classes/transport/Transport.d.ts +2 -1
- package/constants/Rooms.d.ts +1 -0
- package/default/Api.d.ts +14 -14
- package/default/ApiExternal.d.ts +11 -0
- package/default/Signaling.d.ts +12 -14
- package/enums/FatalError.d.ts +1 -0
- package/enums/SignalingCommandType.d.ts +6 -2
- package/enums/SignalingNotification.d.ts +2 -2
- package/package.json +3 -6
- package/static/ApiTransport.d.ts +3 -1
- package/static/AuthData.d.ts +6 -6
- package/static/External.d.ts +59 -18
- package/static/Params.d.ts +119 -42
- package/static/Utils.d.ts +8 -4
- package/types/Asr.d.ts +22 -1
- package/types/AudienceMode.d.ts +8 -0
- package/types/Conversation.d.ts +4 -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/Params.d.ts +1 -0
- package/types/Participant.d.ts +2 -2
- package/types/ParticipantLayout.d.ts +2 -2
- package/types/ParticipantListChunk.d.ts +1 -1
- package/types/ParticipantStreamDescription.d.ts +0 -1
- package/types/PerfStatReporter.d.ts +1 -1
- package/types/RequestAsr.d.ts +3 -0
- package/types/Room.d.ts +4 -0
- package/types/SignalingMessage.d.ts +34 -4
- package/types/Statistics.d.ts +3 -4
- package/types/Streams.d.ts +10 -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/classes/asr/AsrCommandSerializer.d.ts +0 -3
package/CallsSDK.d.ts
CHANGED
|
@@ -1,20 +1,21 @@
|
|
|
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 {
|
|
11
|
+
import { AudienceModeHandsResponse } from './types/AudienceMode';
|
|
12
12
|
import { TransportTopology } from './classes/transport/Transport';
|
|
13
13
|
import Api from './default/Api';
|
|
14
14
|
import Signaling from './default/Signaling';
|
|
15
15
|
import CallDirection from './enums/CallDirection';
|
|
16
16
|
import CallType from './enums/CallType';
|
|
17
17
|
import ChatRoomEventType from './enums/ChatRoomEventType';
|
|
18
|
+
import ConversationFeature from './enums/ConversationFeature';
|
|
18
19
|
import ConversationOption from './enums/ConversationOption';
|
|
19
20
|
import FatalError from './enums/FatalError';
|
|
20
21
|
import HangupType from './enums/HangupType';
|
|
@@ -22,6 +23,7 @@ import MediaOption from './enums/MediaOption';
|
|
|
22
23
|
import MuteState from './enums/MuteState';
|
|
23
24
|
import ParticipantState from './enums/ParticipantState';
|
|
24
25
|
import RecordRole from './enums/RecordRole';
|
|
26
|
+
import RoomsEventType from './enums/RoomsEventType';
|
|
25
27
|
import SignalingCommandType from './enums/SignalingCommandType';
|
|
26
28
|
import SignalingConnectionType from './enums/SignalingConnectionType';
|
|
27
29
|
import SignalingNotification from './enums/SignalingNotification';
|
|
@@ -33,31 +35,33 @@ import { JSONArray, JSONObject, JSONType } from './static/Json';
|
|
|
33
35
|
import { ParamsObject } from './static/Params';
|
|
34
36
|
import Utils from './static/Utils';
|
|
35
37
|
import WebRTCUtils, { FacingMode } from './static/WebRTCUtils';
|
|
36
|
-
import { IAsrStartParams } from './types/Asr';
|
|
38
|
+
import { IAsrData, IAsrStartParams, IAsrStopParams } from './types/Asr';
|
|
39
|
+
import { ConversationData } from './types/Conversation';
|
|
40
|
+
import { IFeaturesPerRole } from './types/ConversationFeature';
|
|
37
41
|
import ConversationParams from './types/ConversationParams';
|
|
38
42
|
import ConversationResponse from './types/ConversationResponse';
|
|
39
43
|
import { ExternalId, ExternalIdType, ExternalParticipant, ExternalParticipantId, ExternalParticipantListChunk, ExternalParticipantListMarker, ExternalParticipantListMarkers, ExternalUserId } from './types/ExternalId';
|
|
44
|
+
import { IFeedbackExternal } from './types/Feedback';
|
|
40
45
|
import IceServer from './types/IceServer';
|
|
41
46
|
import MediaModifiers from './types/MediaModifiers';
|
|
42
47
|
import { IVideoDimentions, MediaSettings } from './types/MediaSettings';
|
|
48
|
+
import { IAddMovieParams, IMovieMetaData, IMoviePreview, IOnRemoteMovieData, ISharedMovieInfo, ISharedMovieState, ISharedMovieStateResponse, ISharedMovieStoppedInfo, IUpdateMovieData } from './types/MovieShare';
|
|
43
49
|
import MuteStates, { IMuteParticipantInternalParams, IMuteParticipantParams } from './types/MuteStates';
|
|
44
|
-
import {
|
|
50
|
+
import { IApiEnv } from './types/Params';
|
|
51
|
+
import { CompositeUserId, IGetParticipantsParameters, OkUserId, ParticipantId, ParticipantListMarker, ParticipantListMarkers, ParticipantListType, ParticipantStateMapped } from './types/Participant';
|
|
45
52
|
import ParticipantLayout, { Layout, RequestKeyFrame, StopStream } from './types/ParticipantLayout';
|
|
46
53
|
import { ParticipantListChunkParameters } from './types/ParticipantListChunk';
|
|
47
54
|
import ParticipantPriority from './types/ParticipantPriority';
|
|
48
55
|
import { MediaType, ParticipantStreamDescription } from './types/ParticipantStreamDescription';
|
|
49
|
-
import {
|
|
50
|
-
import RoomsEventType from './enums/RoomsEventType';
|
|
56
|
+
import { IRoomId, Room, RoomParticipantUpdate, Rooms, RoomsUpdate } from './types/Room';
|
|
51
57
|
import { ScreenCaptureSettings } from './types/ScreenCaptureSettings';
|
|
52
58
|
import SignalingMessage from './types/SignalingMessage';
|
|
59
|
+
import { StatResult } from './types/Statistics';
|
|
60
|
+
import { IStartStreamData, IStopStreamData, IPublishStreamData } from './types/Streams';
|
|
53
61
|
import { WaitingHallResponse } from './types/WaitingHall';
|
|
54
|
-
import { IFeedbackExternal } from './types/Feedback';
|
|
55
|
-
import { ISharedMovieInfo, ISharedMovieStoppedInfo, ISharedMovieState, ISharedMovieStateResponse, IAddMovieParams, IOnRemoteMovieData, IMoviePreview, IUpdateMovieData, IMovieMetaData } from './types/MovieShare';
|
|
56
|
-
import { IStartStreamData, IStopStreamData } from './types/Streams';
|
|
57
|
-
import ConversationFeature from './enums/ConversationFeature';
|
|
58
|
-
import { IFeaturesPerRole } from './types/ConversationFeature';
|
|
59
62
|
import { ArrayDequeue } from './utils/ArrayDequeue';
|
|
60
|
-
import {
|
|
63
|
+
import { ApiExternal } from './default/ApiExternal';
|
|
64
|
+
import AuthData from './static/AuthData';
|
|
61
65
|
/**
|
|
62
66
|
* Информация о текущем браузере
|
|
63
67
|
*/
|
|
@@ -224,8 +228,8 @@ export declare function init(params: Partial<ParamsObject>): Promise<void>;
|
|
|
224
228
|
* @param requireAuthToJoin Запретить анонимам подключаться по ссылке (если поддерживается сервером)
|
|
225
229
|
* @param onlyAdminCanShareMovie Только администратор может включать совметсный просмотр
|
|
226
230
|
*/
|
|
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>;
|
|
231
|
+
export declare function callTo(externalId?: ExternalId | ExternalId[], mediaOptions?: MediaOption[], payload?: string, joiningAllowed?: boolean, requireAuthToJoin?: boolean, onlyAdminCanShareMovie?: boolean): Promise<ConversationData>;
|
|
232
|
+
export declare function callInternal(ids: OkUserId[], type: CallType | undefined, mediaOptions: MediaOption[], payload?: string, joiningAllowed?: boolean, requireAuthToJoin?: boolean, onlyAdminCanShareMovie?: boolean): Promise<ConversationData>;
|
|
229
233
|
/**
|
|
230
234
|
* Обработать пуш о входящем звонке
|
|
231
235
|
*
|
|
@@ -282,7 +286,7 @@ export declare function hangup(): Promise<void>;
|
|
|
282
286
|
* @param externalId Внешний ID пользователя
|
|
283
287
|
* @param params Параметры
|
|
284
288
|
*/
|
|
285
|
-
export declare function addParticipant(externalId:
|
|
289
|
+
export declare function addParticipant(externalId: ExternalId, params?: AddParticipantParams): Promise<void>;
|
|
286
290
|
export declare function addParticipantInternal(uid: OkUserId, params?: AddParticipantParams): Promise<void>;
|
|
287
291
|
/**
|
|
288
292
|
* Удалить собеседника из звонка
|
|
@@ -290,7 +294,7 @@ export declare function addParticipantInternal(uid: OkUserId, params?: AddPartic
|
|
|
290
294
|
* @param externalId Внешний ID пользователя
|
|
291
295
|
* @param ban Забанить пользователя
|
|
292
296
|
*/
|
|
293
|
-
export declare function removeParticipant(externalId:
|
|
297
|
+
export declare function removeParticipant(externalId: ExternalId, ban?: boolean): Promise<void>;
|
|
294
298
|
export declare function removeParticipantInternal(uid: OkUserId, ban?: boolean): Promise<void>;
|
|
295
299
|
/**
|
|
296
300
|
* Изменить камеру на фронтальную или заднюю (для мобильных устройств)
|
|
@@ -379,8 +383,8 @@ export declare function updateDisplayLayout(layout: ParticipantLayout[]): Promis
|
|
|
379
383
|
* @param roles Список ролей
|
|
380
384
|
* @param revoke Забрать роли
|
|
381
385
|
*/
|
|
382
|
-
export declare function grantRoles(externalId:
|
|
383
|
-
export declare function grantRolesInternal(uid: OkUserId, roles: UserRole[], revoke?: boolean): Promise<void>;
|
|
386
|
+
export declare function grantRoles(externalId: ExternalId, roles: UserRole[], revoke?: boolean): Promise<void>;
|
|
387
|
+
export declare function grantRolesInternal(uid: OkUserId, deviceIdx: number, roles: UserRole[], revoke?: boolean): Promise<void>;
|
|
384
388
|
/**
|
|
385
389
|
* Выключить или выключить микрофон и/или камеру собеседнику (только если есть соответствующая роль)
|
|
386
390
|
*
|
|
@@ -396,8 +400,9 @@ export declare function muteParticipantInternal({ uid, muteStates, requestedMedi
|
|
|
396
400
|
*
|
|
397
401
|
* @param externalId Внешний ID пользователя
|
|
398
402
|
* @param unpin Открепить
|
|
403
|
+
* @param roomId Идентификатор комнаты
|
|
399
404
|
*/
|
|
400
|
-
export declare function pinParticipant(externalId:
|
|
405
|
+
export declare function pinParticipant(externalId: ExternalId, unpin?: boolean, roomId?: number | null): Promise<void>;
|
|
401
406
|
export declare function pinParticipantInternal(uid: OkUserId, unpin?: boolean, deviceIdx?: number, roomId?: number | null): Promise<void>;
|
|
402
407
|
/**
|
|
403
408
|
* Устанавливает настройки пользовательского медиа
|
|
@@ -419,7 +424,7 @@ export declare function changeConversationOptions(changes: {
|
|
|
419
424
|
* @param message Сообщение
|
|
420
425
|
* @param externalId Внешний ID пользователя (если не указано, отправит всем)
|
|
421
426
|
*/
|
|
422
|
-
export declare function chatMessage(message: string, externalId?:
|
|
427
|
+
export declare function chatMessage(message: string, externalId?: ExternalId | null): Promise<void>;
|
|
423
428
|
export declare function chatMessageInternal(message: string, uid?: OkUserId | null): Promise<void>;
|
|
424
429
|
/**
|
|
425
430
|
* Получить историю сообщений чата
|
|
@@ -433,7 +438,7 @@ export declare function chatHistory(count?: number): Promise<void>;
|
|
|
433
438
|
* @param data Данные
|
|
434
439
|
* @param externalId Внешний ID пользователя (если не указано, отправит всем)
|
|
435
440
|
*/
|
|
436
|
-
export declare function customData(data: JSONObject, externalId?:
|
|
441
|
+
export declare function customData(data: JSONObject, externalId?: ExternalId | null): Promise<void>;
|
|
437
442
|
export declare function customDataInternal(data: JSONObject, uid?: OkUserId | null, deviceIdx?: number): Promise<void>;
|
|
438
443
|
/**
|
|
439
444
|
* Создать токен комнаты для подключения по ссылке
|
|
@@ -444,8 +449,20 @@ export declare function customDataInternal(data: JSONObject, uid?: OkUserId | nu
|
|
|
444
449
|
* @returns Токен комнаты
|
|
445
450
|
*/
|
|
446
451
|
export declare function startConversation(payload?: string, requireAuthToJoin?: boolean, { onlyAdminCanShareMovie }?: {
|
|
447
|
-
onlyAdminCanShareMovie?: boolean;
|
|
452
|
+
onlyAdminCanShareMovie?: boolean | undefined;
|
|
448
453
|
}): Promise<string>;
|
|
454
|
+
/**
|
|
455
|
+
* Создать токен комнаты в режиме Audience для подключения по ссылке
|
|
456
|
+
*
|
|
457
|
+
* @param payload Дополнительные данные для передачи на сервер
|
|
458
|
+
* @param requireAuthToJoin Запретить анонимам подключаться по ссылке (если поддерживается сервером)
|
|
459
|
+
* @param startConversationParameters Дополнительные параметры для создания звонка (например onlyAdminCanShareMovie)
|
|
460
|
+
* @param speakerIds Список внешних ID пользователей, которые будут выступать в роли спикеров
|
|
461
|
+
* @returns Токен комнаты
|
|
462
|
+
*/
|
|
463
|
+
export declare function startAudienceConversation(payload: string | undefined, requireAuthToJoin: boolean | undefined, { onlyAdminCanShareMovie, }: {
|
|
464
|
+
onlyAdminCanShareMovie?: boolean | undefined;
|
|
465
|
+
} | undefined, speakerIds: ExternalUserId[]): Promise<string>;
|
|
449
466
|
/**
|
|
450
467
|
* Создать токен комнаты для подключения по ссылке к существующему звонку
|
|
451
468
|
*
|
|
@@ -483,25 +500,27 @@ export declare function forceRelayPolicy(enabled: boolean): void;
|
|
|
483
500
|
* @param groupId
|
|
484
501
|
* @param roomId
|
|
485
502
|
*/
|
|
486
|
-
export declare function startStream(isRecord?: boolean, name?: string | null, movieId?: string | null, privacy?: 'PUBLIC' | 'FRIENDS' | 'DIRECT_LINK', groupId?: string | null, roomId?: number | null): Promise<
|
|
503
|
+
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>;
|
|
487
504
|
/**
|
|
488
505
|
* Завершить трансляцию звонка
|
|
489
506
|
* @param roomId
|
|
490
507
|
*/
|
|
491
|
-
export declare function stopStream(roomId?: number | null): Promise<
|
|
508
|
+
export declare function stopStream(roomId?: number | null): Promise<undefined>;
|
|
509
|
+
/**
|
|
510
|
+
* Опубликовать трансляцию звонка
|
|
511
|
+
* @param roomId
|
|
512
|
+
*/
|
|
513
|
+
export declare function publishStream(roomId?: number | null): Promise<undefined>;
|
|
492
514
|
/**
|
|
493
515
|
* Устанавливает роль участника в запись звонка
|
|
494
516
|
* Если хотя бы у одного участника звонка выставлена роль, то в записи звонка будут
|
|
495
517
|
* видны только те участники, у кого есть роль.
|
|
496
|
-
*
|
|
497
|
-
*
|
|
498
|
-
*
|
|
499
|
-
*
|
|
500
|
-
* @param externalId Внешний ID пользователя
|
|
501
|
-
* @param role Роль, если null, то роль удалится
|
|
502
|
-
* @param roomId ID сессионного зала записи. Если null, то роль применится в основном звонке
|
|
518
|
+
* @param king участник показывается крупно в записи звонка (только один участник имеет такую роль)
|
|
519
|
+
* @param pawns участник показывается в записи звонка
|
|
520
|
+
* @param hideParticipantCount скрыть/показать количество невидимых участников
|
|
521
|
+
* @param roomId комната
|
|
503
522
|
*/
|
|
504
|
-
export declare function
|
|
523
|
+
export declare function recordSetConf(king?: ExternalId, pawns?: ExternalId[], hideParticipantCount?: boolean, roomId?: number | null): Promise<void>;
|
|
505
524
|
/**
|
|
506
525
|
* Получить информацию о трансляции звонка
|
|
507
526
|
*/
|
|
@@ -545,9 +564,9 @@ export declare function activateRooms(roomIds: number[], deactivate: boolean): P
|
|
|
545
564
|
/**
|
|
546
565
|
* Cменить сессионный зал
|
|
547
566
|
* @param toRoomId
|
|
548
|
-
* @param
|
|
567
|
+
* @param externalId
|
|
549
568
|
*/
|
|
550
|
-
export declare function switchRoom(toRoomId?: number | null,
|
|
569
|
+
export declare function switchRoom(toRoomId?: number | null, externalId?: ExternalId | null): Promise<void>;
|
|
551
570
|
/**
|
|
552
571
|
* Удалить сессионные залы
|
|
553
572
|
* @param roomIds
|
|
@@ -590,12 +609,12 @@ export declare function setAudioStream(stream: MediaStream): Promise<void>;
|
|
|
590
609
|
*
|
|
591
610
|
* @param {(string|ArrayBuffer)} svg - svg в незашифрованном (string)
|
|
592
611
|
* или зашифрованном (ArrayBuffer) виде
|
|
593
|
-
* @param {(
|
|
612
|
+
* @param {(ExternalId|null)} externalId - externalId внешнего участника звонка,
|
|
594
613
|
* не требуется для текущего участника (текущего пользователя клиента)
|
|
595
614
|
* @param {(string|null)} customKey - кастомный ключ расшифровки svg,
|
|
596
615
|
* нужен только в случае присвоения участнику чужого аватара
|
|
597
616
|
*/
|
|
598
|
-
export declare function setVmojiSvg(svg: string | ArrayBuffer, externalId?:
|
|
617
|
+
export declare function setVmojiSvg(svg: string | ArrayBuffer, externalId?: ExternalId | null, customKey?: string | null): Promise<void>;
|
|
599
618
|
/**
|
|
600
619
|
* Получить состояние зала ожидания
|
|
601
620
|
*
|
|
@@ -605,12 +624,30 @@ export declare function setVmojiSvg(svg: string | ArrayBuffer, externalId?: Exte
|
|
|
605
624
|
*/
|
|
606
625
|
export declare function getWaitingHall(pageMarker?: string | null, count?: number, backward?: boolean): Promise<WaitingHallResponse>;
|
|
607
626
|
/**
|
|
608
|
-
*
|
|
627
|
+
* Получить список слушателей, запросивших повышение в комнате в режиме Audience
|
|
628
|
+
*/
|
|
629
|
+
export declare function getAudienceModeHands(): Promise<AudienceModeHandsResponse>;
|
|
630
|
+
/**
|
|
631
|
+
* Разрешить/запретить пользователю войти из зала ожидания/стать спикером комнаты
|
|
632
|
+
* в режиме Audience
|
|
609
633
|
*
|
|
610
634
|
* @param externalId Внешний ID пользователя
|
|
611
|
-
* @param demote Запретить
|
|
635
|
+
* @param demote Запретить вход/отобрать права спикера
|
|
612
636
|
*/
|
|
613
637
|
export declare function promoteParticipant(externalId: ExternalId, demote?: boolean): Promise<void>;
|
|
638
|
+
/**
|
|
639
|
+
* Запросить/отозвать запрос на получение права стать спикером в комнате в
|
|
640
|
+
* режиме Audience
|
|
641
|
+
*
|
|
642
|
+
* @param demote Отозвать запрос
|
|
643
|
+
*/
|
|
644
|
+
export declare function requestPromotion(demote?: boolean): Promise<void>;
|
|
645
|
+
/**
|
|
646
|
+
* Согласиться/отказаться стать спикером в комнате в режиме Audience.
|
|
647
|
+
*
|
|
648
|
+
* @param reject Отказаться стать спикером
|
|
649
|
+
*/
|
|
650
|
+
export declare function acceptPromotion(reject?: boolean): Promise<void>;
|
|
614
651
|
export declare function getParticipantListChunk(participantListChunkParameters: ParticipantListChunkParameters): Promise<ExternalParticipantListChunk>;
|
|
615
652
|
export declare function getParticipants(parameters: IGetParticipantsParameters): Promise<ExternalParticipant[]>;
|
|
616
653
|
export declare function feedback(key: string): Promise<SignalingMessage>;
|
|
@@ -628,7 +665,7 @@ export declare function startAsr(params: IAsrStartParams): Promise<void>;
|
|
|
628
665
|
/**
|
|
629
666
|
* Заканчивает текстовую расшифровку звонка
|
|
630
667
|
*/
|
|
631
|
-
export declare function stopAsr(): Promise<void>;
|
|
668
|
+
export declare function stopAsr(params?: IAsrStopParams): Promise<void>;
|
|
632
669
|
/**
|
|
633
670
|
* Запрашивает/отключает реал-тайм расшифровку звонка
|
|
634
671
|
*/
|
|
@@ -637,5 +674,5 @@ export declare function requestAsr(request: boolean): Promise<void>;
|
|
|
637
674
|
* Версия SDK
|
|
638
675
|
*/
|
|
639
676
|
export declare function version(): string;
|
|
640
|
-
export type { AddParticipantParams, ConversationData, ConversationParams, ConversationResponse, ExternalId, ExternalParticipant, ExternalParticipantListChunk, ExternalParticipantListMarker, ExternalParticipantListMarkers as ExternalParticipantMarkers, ExternalParticipantId, HangupReasonData, IAsrStartParams, 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, };
|
|
641
|
-
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, };
|
|
677
|
+
export type { AddParticipantParams, AudienceModeHandsResponse, CompositeUserId, ConversationData, ConversationParams, ConversationResponse, ExternalId, ExternalParticipant, ExternalParticipantListChunk, ExternalParticipantListMarker, ExternalParticipantListMarkers as ExternalParticipantMarkers, ExternalParticipantId, HangupReasonData, IApiEnv, IAsrStartParams, IAsrStopParams, IAsrData, IceServer, JSONArray, JSONObject, JSONType, Layout, MediaModifiers, MediaSettings, MuteStates, OkUserId, ParamsObject, ParticipantId, 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, IPublishStreamData, };
|
|
678
|
+
export { Api, AuthData, 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, ApiExternal, };
|
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;
|
|
@@ -6,11 +6,10 @@ import { TransportTopology } from '../classes/transport/Transport';
|
|
|
6
6
|
import ConversationFeature from '../enums/ConversationFeature';
|
|
7
7
|
import ConversationOption from '../enums/ConversationOption';
|
|
8
8
|
import MediaOption from '../enums/MediaOption';
|
|
9
|
-
import RecordRole from '../enums/RecordRole';
|
|
10
9
|
import SignalingConnectionType from '../enums/SignalingConnectionType';
|
|
11
10
|
import UserRole from '../enums/UserRole';
|
|
12
11
|
import { JSONObject } from '../static/Json';
|
|
13
|
-
import { IAsrStartParams } from '../types/Asr';
|
|
12
|
+
import { IAsrStartParams, IAsrStopParams } from '../types/Asr';
|
|
14
13
|
import ConversationResponse from '../types/ConversationResponse';
|
|
15
14
|
import MediaModifiers from '../types/MediaModifiers';
|
|
16
15
|
import MediaSettings from '../types/MediaSettings';
|
|
@@ -20,7 +19,7 @@ import { CompositeUserId, ParticipantId } from '../types/Participant';
|
|
|
20
19
|
import { ParticipantLayout, RequestKeyFrame, StopStream } from '../types/ParticipantLayout';
|
|
21
20
|
import { ParticipantListChunkParameters } from '../types/ParticipantListChunk';
|
|
22
21
|
import SignalingMessage from '../types/SignalingMessage';
|
|
23
|
-
import { IStartStreamData, IStopStreamData } from '../types/Streams';
|
|
22
|
+
import { IPublishStreamData, IRecordConfData, IStartStreamData, IStopStreamData } from '../types/Streams';
|
|
24
23
|
import { WaitingParticipantId } from '../types/WaitingHall';
|
|
25
24
|
import { SharingStatReport } from '../classes/screenshare/SharingStatReport';
|
|
26
25
|
/**
|
|
@@ -75,7 +74,8 @@ export default abstract class BaseSignaling extends EventEmitter {
|
|
|
75
74
|
abstract removeRooms(roomIds: number[]): Promise<SignalingMessage>;
|
|
76
75
|
abstract startStream(data: IStartStreamData): Promise<SignalingMessage>;
|
|
77
76
|
abstract stopStream(data: IStopStreamData): Promise<SignalingMessage>;
|
|
78
|
-
abstract
|
|
77
|
+
abstract publishStream(data: IPublishStreamData): Promise<SignalingMessage>;
|
|
78
|
+
abstract recordSetConf(conf: IRecordConfData): Promise<SignalingMessage>;
|
|
79
79
|
abstract getRecordStatus(): Promise<SignalingMessage>;
|
|
80
80
|
abstract switchTopology(topology: TransportTopology, force?: boolean): Promise<SignalingMessage>;
|
|
81
81
|
abstract reportPerfStat(report: PerfStatReport): Promise<SignalingMessage>;
|
|
@@ -83,7 +83,7 @@ export default abstract class BaseSignaling extends EventEmitter {
|
|
|
83
83
|
abstract chatMessage(message: string, participantId: CompositeUserId | null): Promise<SignalingMessage>;
|
|
84
84
|
abstract chatHistory(count: number): Promise<SignalingMessage>;
|
|
85
85
|
abstract customData(data: JSONObject, participantId: ParticipantId | null): Promise<SignalingMessage>;
|
|
86
|
-
abstract grantRoles(participantId:
|
|
86
|
+
abstract grantRoles(participantId: ParticipantId, roles: UserRole[], revoke: boolean): Promise<SignalingMessage>;
|
|
87
87
|
abstract muteParticipant(participantId: ParticipantId | null, muteStates: MuteStates, requestedMedia: MediaOption[], roomId: number | null): Promise<SignalingMessage>;
|
|
88
88
|
abstract enableFeatureForRoles(feature: ConversationFeature, roles: UserRole[]): Promise<SignalingMessage>;
|
|
89
89
|
abstract pinParticipant(participantId: ParticipantId, unpin: boolean, roomId: number | null): Promise<SignalingMessage>;
|
|
@@ -93,15 +93,17 @@ export default abstract class BaseSignaling extends EventEmitter {
|
|
|
93
93
|
}): Promise<SignalingMessage>;
|
|
94
94
|
abstract getWaitingHall(fromId: WaitingParticipantId | null, count?: number, backward?: boolean): Promise<SignalingMessage>;
|
|
95
95
|
abstract promoteParticipant(participantId: CompositeUserId, demote?: boolean): Promise<SignalingMessage>;
|
|
96
|
+
abstract requestPromotion(demote: boolean): Promise<SignalingMessage>;
|
|
97
|
+
abstract acceptPromotion(reject: boolean): Promise<SignalingMessage>;
|
|
96
98
|
abstract feedback(key: string): Promise<SignalingMessage>;
|
|
99
|
+
abstract getHandQueue(): Promise<SignalingMessage>;
|
|
97
100
|
abstract setProducerNotificationDataChannel(dataChannel: RTCDataChannel): void;
|
|
98
101
|
abstract setProducerCommandDataChannel(dataChannel: RTCDataChannel): void;
|
|
99
102
|
abstract useCommandDataChannel(status: boolean): void;
|
|
100
|
-
abstract setAsrDataChannel(dataChannel: RTCDataChannel): void;
|
|
101
103
|
abstract getParticipantListChunk(participantListChunkParameters: ParticipantListChunkParameters): Promise<SignalingMessage>;
|
|
102
104
|
abstract getParticipants(externalIds: SignalingMessage.ExternalId[]): Promise<SignalingMessage>;
|
|
103
105
|
abstract startAsr(params: IAsrStartParams): Promise<SignalingMessage>;
|
|
104
|
-
abstract stopAsr(): Promise<SignalingMessage>;
|
|
106
|
+
abstract stopAsr(params?: IAsrStopParams): Promise<SignalingMessage>;
|
|
105
107
|
abstract requestAsr(request: boolean): Promise<SignalingMessage>;
|
|
106
108
|
get ready(): boolean;
|
|
107
109
|
setParticipantIdRegistry(participantIdRegistry: ParticipantIdRegistry): void;
|
|
@@ -110,6 +112,6 @@ export default abstract class BaseSignaling extends EventEmitter {
|
|
|
110
112
|
setConversationId(conversationId: string): void;
|
|
111
113
|
readyToSend(isReady?: boolean): void;
|
|
112
114
|
cleanup(): void;
|
|
113
|
-
requestTestMode(consumerCommand: string, producerCommand: string): void;
|
|
115
|
+
requestTestMode(consumerCommand: string, producerCommand: string | null): void;
|
|
114
116
|
getNextCommandSequenceNumber(): number;
|
|
115
117
|
}
|