@vkontakte/calls-sdk 2.8.2-beta.3 → 2.8.2-beta.31
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 +73 -41
- package/abstract/BaseApi.d.ts +11 -9
- package/abstract/BaseSignaling.d.ts +15 -10
- 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 +35 -16
- 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/SpecListener.d.ts +0 -1
- package/classes/codec/IDecoder.d.ts +0 -1
- 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/WebCodecsDecoder.d.ts +0 -1
- package/classes/codec/WebCodecsEncoder.d.ts +1 -1
- package/classes/screenshare/BaseRenderer.d.ts +0 -1
- package/classes/screenshare/CanvasRenderer.d.ts +2 -0
- 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/TrackGeneratorRenderer.d.ts +0 -1
- 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/Statistics.d.ts +19 -1
- package/classes/transport/Transport.d.ts +9 -5
- package/default/Api.d.ts +14 -14
- package/default/ApiExternal.d.ts +11 -0
- package/default/Signaling.d.ts +16 -12
- package/enums/FatalError.d.ts +1 -0
- package/enums/SignalingCommandType.d.ts +5 -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 +60 -28
- package/static/Params.d.ts +72 -55
- 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 +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/RequestAsr.d.ts +3 -0
- package/types/Room.d.ts +4 -0
- package/types/SignalingCommand.d.ts +2 -1
- package/types/SignalingMessage.d.ts +25 -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,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,32 @@ 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 { IGetParticipantsParameters, OkUserId, ParticipantListMarker, ParticipantListMarkers, ParticipantListType, ParticipantStateMapped } from './types/Participant';
|
|
50
|
+
import { CompositeUserId, IGetParticipantsParameters, OkUserId, ParticipantId, ParticipantListMarker, ParticipantListMarkers, ParticipantListType, ParticipantStateMapped } from './types/Participant';
|
|
45
51
|
import ParticipantLayout, { Layout, RequestKeyFrame, StopStream } from './types/ParticipantLayout';
|
|
46
52
|
import { ParticipantListChunkParameters } from './types/ParticipantListChunk';
|
|
47
53
|
import ParticipantPriority from './types/ParticipantPriority';
|
|
48
54
|
import { MediaType, ParticipantStreamDescription } from './types/ParticipantStreamDescription';
|
|
49
|
-
import {
|
|
50
|
-
import RoomsEventType from './enums/RoomsEventType';
|
|
55
|
+
import { IRoomId, Room, RoomParticipantUpdate, Rooms, RoomsUpdate } from './types/Room';
|
|
51
56
|
import { ScreenCaptureSettings } from './types/ScreenCaptureSettings';
|
|
52
57
|
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';
|
|
58
|
+
import { StatResult } from './types/Statistics';
|
|
56
59
|
import { IStartStreamData, IStopStreamData } from './types/Streams';
|
|
57
|
-
import
|
|
58
|
-
import { IFeaturesPerRole } from './types/ConversationFeature';
|
|
60
|
+
import { WaitingHallResponse } from './types/WaitingHall';
|
|
59
61
|
import { ArrayDequeue } from './utils/ArrayDequeue';
|
|
60
|
-
import {
|
|
62
|
+
import { ApiExternal } from './default/ApiExternal';
|
|
63
|
+
import AuthData from './static/AuthData';
|
|
61
64
|
/**
|
|
62
65
|
* Информация о текущем браузере
|
|
63
66
|
*/
|
|
@@ -224,8 +227,8 @@ export declare function init(params: Partial<ParamsObject>): Promise<void>;
|
|
|
224
227
|
* @param requireAuthToJoin Запретить анонимам подключаться по ссылке (если поддерживается сервером)
|
|
225
228
|
* @param onlyAdminCanShareMovie Только администратор может включать совметсный просмотр
|
|
226
229
|
*/
|
|
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>;
|
|
230
|
+
export declare function callTo(externalId?: ExternalId | ExternalId[], mediaOptions?: MediaOption[], payload?: string, joiningAllowed?: boolean, requireAuthToJoin?: boolean, onlyAdminCanShareMovie?: boolean): Promise<ConversationData>;
|
|
231
|
+
export declare function callInternal(ids: OkUserId[], type: CallType | undefined, mediaOptions: MediaOption[], payload?: string, joiningAllowed?: boolean, requireAuthToJoin?: boolean, onlyAdminCanShareMovie?: boolean): Promise<ConversationData>;
|
|
229
232
|
/**
|
|
230
233
|
* Обработать пуш о входящем звонке
|
|
231
234
|
*
|
|
@@ -282,7 +285,7 @@ export declare function hangup(): Promise<void>;
|
|
|
282
285
|
* @param externalId Внешний ID пользователя
|
|
283
286
|
* @param params Параметры
|
|
284
287
|
*/
|
|
285
|
-
export declare function addParticipant(externalId:
|
|
288
|
+
export declare function addParticipant(externalId: ExternalId, params?: AddParticipantParams): Promise<void>;
|
|
286
289
|
export declare function addParticipantInternal(uid: OkUserId, params?: AddParticipantParams): Promise<void>;
|
|
287
290
|
/**
|
|
288
291
|
* Удалить собеседника из звонка
|
|
@@ -290,7 +293,7 @@ export declare function addParticipantInternal(uid: OkUserId, params?: AddPartic
|
|
|
290
293
|
* @param externalId Внешний ID пользователя
|
|
291
294
|
* @param ban Забанить пользователя
|
|
292
295
|
*/
|
|
293
|
-
export declare function removeParticipant(externalId:
|
|
296
|
+
export declare function removeParticipant(externalId: ExternalId, ban?: boolean): Promise<void>;
|
|
294
297
|
export declare function removeParticipantInternal(uid: OkUserId, ban?: boolean): Promise<void>;
|
|
295
298
|
/**
|
|
296
299
|
* Изменить камеру на фронтальную или заднюю (для мобильных устройств)
|
|
@@ -356,6 +359,7 @@ export declare function setLocalResolution(resolution: {
|
|
|
356
359
|
* Отрицательный приоритет выключит видео.
|
|
357
360
|
*
|
|
358
361
|
* @param priorities Список приоритетов
|
|
362
|
+
* @deprecated Use updateDisplayLayout instead
|
|
359
363
|
*/
|
|
360
364
|
export declare function changePriorities(priorities: ParticipantPriority[]): Promise<void>;
|
|
361
365
|
/**
|
|
@@ -378,8 +382,8 @@ export declare function updateDisplayLayout(layout: ParticipantLayout[]): Promis
|
|
|
378
382
|
* @param roles Список ролей
|
|
379
383
|
* @param revoke Забрать роли
|
|
380
384
|
*/
|
|
381
|
-
export declare function grantRoles(externalId:
|
|
382
|
-
export declare function grantRolesInternal(uid: OkUserId, roles: UserRole[], revoke?: boolean): Promise<void>;
|
|
385
|
+
export declare function grantRoles(externalId: ExternalId, roles: UserRole[], revoke?: boolean): Promise<void>;
|
|
386
|
+
export declare function grantRolesInternal(uid: OkUserId, deviceIdx: number, roles: UserRole[], revoke?: boolean): Promise<void>;
|
|
383
387
|
/**
|
|
384
388
|
* Выключить или выключить микрофон и/или камеру собеседнику (только если есть соответствующая роль)
|
|
385
389
|
*
|
|
@@ -395,8 +399,9 @@ export declare function muteParticipantInternal({ uid, muteStates, requestedMedi
|
|
|
395
399
|
*
|
|
396
400
|
* @param externalId Внешний ID пользователя
|
|
397
401
|
* @param unpin Открепить
|
|
402
|
+
* @param roomId Идентификатор комнаты
|
|
398
403
|
*/
|
|
399
|
-
export declare function pinParticipant(externalId:
|
|
404
|
+
export declare function pinParticipant(externalId: ExternalId, unpin?: boolean, roomId?: number | null): Promise<void>;
|
|
400
405
|
export declare function pinParticipantInternal(uid: OkUserId, unpin?: boolean, deviceIdx?: number, roomId?: number | null): Promise<void>;
|
|
401
406
|
/**
|
|
402
407
|
* Устанавливает настройки пользовательского медиа
|
|
@@ -418,7 +423,7 @@ export declare function changeConversationOptions(changes: {
|
|
|
418
423
|
* @param message Сообщение
|
|
419
424
|
* @param externalId Внешний ID пользователя (если не указано, отправит всем)
|
|
420
425
|
*/
|
|
421
|
-
export declare function chatMessage(message: string, externalId?:
|
|
426
|
+
export declare function chatMessage(message: string, externalId?: ExternalId | null): Promise<void>;
|
|
422
427
|
export declare function chatMessageInternal(message: string, uid?: OkUserId | null): Promise<void>;
|
|
423
428
|
/**
|
|
424
429
|
* Получить историю сообщений чата
|
|
@@ -432,7 +437,7 @@ export declare function chatHistory(count?: number): Promise<void>;
|
|
|
432
437
|
* @param data Данные
|
|
433
438
|
* @param externalId Внешний ID пользователя (если не указано, отправит всем)
|
|
434
439
|
*/
|
|
435
|
-
export declare function customData(data: JSONObject, externalId?:
|
|
440
|
+
export declare function customData(data: JSONObject, externalId?: ExternalId | null): Promise<void>;
|
|
436
441
|
export declare function customDataInternal(data: JSONObject, uid?: OkUserId | null, deviceIdx?: number): Promise<void>;
|
|
437
442
|
/**
|
|
438
443
|
* Создать токен комнаты для подключения по ссылке
|
|
@@ -443,8 +448,20 @@ export declare function customDataInternal(data: JSONObject, uid?: OkUserId | nu
|
|
|
443
448
|
* @returns Токен комнаты
|
|
444
449
|
*/
|
|
445
450
|
export declare function startConversation(payload?: string, requireAuthToJoin?: boolean, { onlyAdminCanShareMovie }?: {
|
|
446
|
-
onlyAdminCanShareMovie?: boolean;
|
|
451
|
+
onlyAdminCanShareMovie?: boolean | undefined;
|
|
447
452
|
}): Promise<string>;
|
|
453
|
+
/**
|
|
454
|
+
* Создать токен комнаты в режиме Audience для подключения по ссылке
|
|
455
|
+
*
|
|
456
|
+
* @param payload Дополнительные данные для передачи на сервер
|
|
457
|
+
* @param requireAuthToJoin Запретить анонимам подключаться по ссылке (если поддерживается сервером)
|
|
458
|
+
* @param startConversationParameters Дополнительные параметры для создания звонка (например onlyAdminCanShareMovie)
|
|
459
|
+
* @param speakerIds Список внешних ID пользователей, которые будут выступать в роли спикеров
|
|
460
|
+
* @returns Токен комнаты
|
|
461
|
+
*/
|
|
462
|
+
export declare function startAudienceConversation(payload: string | undefined, requireAuthToJoin: boolean | undefined, { onlyAdminCanShareMovie, }: {
|
|
463
|
+
onlyAdminCanShareMovie?: boolean | undefined;
|
|
464
|
+
} | undefined, speakerIds: ExternalUserId[]): Promise<string>;
|
|
448
465
|
/**
|
|
449
466
|
* Создать токен комнаты для подключения по ссылке к существующему звонку
|
|
450
467
|
*
|
|
@@ -482,25 +499,22 @@ export declare function forceRelayPolicy(enabled: boolean): void;
|
|
|
482
499
|
* @param groupId
|
|
483
500
|
* @param roomId
|
|
484
501
|
*/
|
|
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<
|
|
502
|
+
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
503
|
/**
|
|
487
504
|
* Завершить трансляцию звонка
|
|
488
505
|
* @param roomId
|
|
489
506
|
*/
|
|
490
|
-
export declare function stopStream(roomId?: number | null): Promise<
|
|
507
|
+
export declare function stopStream(roomId?: number | null): Promise<undefined>;
|
|
491
508
|
/**
|
|
492
509
|
* Устанавливает роль участника в запись звонка
|
|
493
510
|
* Если хотя бы у одного участника звонка выставлена роль, то в записи звонка будут
|
|
494
511
|
* видны только те участники, у кого есть роль.
|
|
495
|
-
*
|
|
496
|
-
*
|
|
497
|
-
*
|
|
498
|
-
*
|
|
499
|
-
* @param externalId Внешний ID пользователя
|
|
500
|
-
* @param role Роль, если null, то роль удалится
|
|
501
|
-
* @param roomId ID сессионного зала записи. Если null, то роль применится в основном звонке
|
|
512
|
+
* @param king участник показывается крупно в записи звонка (только один участник имеет такую роль)
|
|
513
|
+
* @param pawns участник показывается в записи звонка
|
|
514
|
+
* @param hideParticipantCount скрыть/показать количество невидимых участников
|
|
515
|
+
* @param roomId комната
|
|
502
516
|
*/
|
|
503
|
-
export declare function
|
|
517
|
+
export declare function recordSetConf(king?: ExternalId, pawns?: ExternalId[], hideParticipantCount?: boolean, roomId?: number | null): Promise<void>;
|
|
504
518
|
/**
|
|
505
519
|
* Получить информацию о трансляции звонка
|
|
506
520
|
*/
|
|
@@ -544,9 +558,9 @@ export declare function activateRooms(roomIds: number[], deactivate: boolean): P
|
|
|
544
558
|
/**
|
|
545
559
|
* Cменить сессионный зал
|
|
546
560
|
* @param toRoomId
|
|
547
|
-
* @param
|
|
561
|
+
* @param externalId
|
|
548
562
|
*/
|
|
549
|
-
export declare function switchRoom(toRoomId?: number | null,
|
|
563
|
+
export declare function switchRoom(toRoomId?: number | null, externalId?: ExternalId | null): Promise<void>;
|
|
550
564
|
/**
|
|
551
565
|
* Удалить сессионные залы
|
|
552
566
|
* @param roomIds
|
|
@@ -589,12 +603,12 @@ export declare function setAudioStream(stream: MediaStream): Promise<void>;
|
|
|
589
603
|
*
|
|
590
604
|
* @param {(string|ArrayBuffer)} svg - svg в незашифрованном (string)
|
|
591
605
|
* или зашифрованном (ArrayBuffer) виде
|
|
592
|
-
* @param {(
|
|
606
|
+
* @param {(ExternalId|null)} externalId - externalId внешнего участника звонка,
|
|
593
607
|
* не требуется для текущего участника (текущего пользователя клиента)
|
|
594
608
|
* @param {(string|null)} customKey - кастомный ключ расшифровки svg,
|
|
595
609
|
* нужен только в случае присвоения участнику чужого аватара
|
|
596
610
|
*/
|
|
597
|
-
export declare function setVmojiSvg(svg: string | ArrayBuffer, externalId?:
|
|
611
|
+
export declare function setVmojiSvg(svg: string | ArrayBuffer, externalId?: ExternalId | null, customKey?: string | null): Promise<void>;
|
|
598
612
|
/**
|
|
599
613
|
* Получить состояние зала ожидания
|
|
600
614
|
*
|
|
@@ -604,12 +618,30 @@ export declare function setVmojiSvg(svg: string | ArrayBuffer, externalId?: Exte
|
|
|
604
618
|
*/
|
|
605
619
|
export declare function getWaitingHall(pageMarker?: string | null, count?: number, backward?: boolean): Promise<WaitingHallResponse>;
|
|
606
620
|
/**
|
|
607
|
-
*
|
|
621
|
+
* Получить список слушателей, запросивших повышение в комнате в режиме Audience
|
|
622
|
+
*/
|
|
623
|
+
export declare function getAudienceModeHands(): Promise<AudienceModeHandsResponse>;
|
|
624
|
+
/**
|
|
625
|
+
* Разрешить/запретить пользователю войти из зала ожидания/стать спикером комнаты
|
|
626
|
+
* в режиме Audience
|
|
608
627
|
*
|
|
609
628
|
* @param externalId Внешний ID пользователя
|
|
610
|
-
* @param demote Запретить
|
|
629
|
+
* @param demote Запретить вход/отобрать права спикера
|
|
611
630
|
*/
|
|
612
631
|
export declare function promoteParticipant(externalId: ExternalId, demote?: boolean): Promise<void>;
|
|
632
|
+
/**
|
|
633
|
+
* Запросить/отозвать запрос на получение права стать спикером в комнате в
|
|
634
|
+
* режиме Audience
|
|
635
|
+
*
|
|
636
|
+
* @param demote Отозвать запрос
|
|
637
|
+
*/
|
|
638
|
+
export declare function requestPromotion(demote?: boolean): Promise<void>;
|
|
639
|
+
/**
|
|
640
|
+
* Согласиться/отказаться стать спикером в комнате в режиме Audience.
|
|
641
|
+
*
|
|
642
|
+
* @param reject Отказаться стать спикером
|
|
643
|
+
*/
|
|
644
|
+
export declare function acceptPromotion(reject?: boolean): Promise<void>;
|
|
613
645
|
export declare function getParticipantListChunk(participantListChunkParameters: ParticipantListChunkParameters): Promise<ExternalParticipantListChunk>;
|
|
614
646
|
export declare function getParticipants(parameters: IGetParticipantsParameters): Promise<ExternalParticipant[]>;
|
|
615
647
|
export declare function feedback(key: string): Promise<SignalingMessage>;
|
|
@@ -627,7 +659,7 @@ export declare function startAsr(params: IAsrStartParams): Promise<void>;
|
|
|
627
659
|
/**
|
|
628
660
|
* Заканчивает текстовую расшифровку звонка
|
|
629
661
|
*/
|
|
630
|
-
export declare function stopAsr(): Promise<void>;
|
|
662
|
+
export declare function stopAsr(params?: IAsrStopParams): Promise<void>;
|
|
631
663
|
/**
|
|
632
664
|
* Запрашивает/отключает реал-тайм расшифровку звонка
|
|
633
665
|
*/
|
|
@@ -636,5 +668,5 @@ export declare function requestAsr(request: boolean): Promise<void>;
|
|
|
636
668
|
* Версия SDK
|
|
637
669
|
*/
|
|
638
670
|
export declare function version(): string;
|
|
639
|
-
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, };
|
|
640
|
-
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, };
|
|
671
|
+
export type { AddParticipantParams, CompositeUserId, 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, 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, };
|
|
672
|
+
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;
|
|
@@ -1,15 +1,15 @@
|
|
|
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';
|
|
12
|
-
import { IAsrStartParams } from '../types/Asr';
|
|
12
|
+
import { IAsrStartParams, IAsrStopParams } from '../types/Asr';
|
|
13
13
|
import ConversationResponse from '../types/ConversationResponse';
|
|
14
14
|
import MediaModifiers from '../types/MediaModifiers';
|
|
15
15
|
import MediaSettings from '../types/MediaSettings';
|
|
@@ -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,23 +92,25 @@ 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>;
|
|
98
|
+
abstract getHandQueue(): Promise<SignalingMessage>;
|
|
93
99
|
abstract setProducerNotificationDataChannel(dataChannel: RTCDataChannel): void;
|
|
94
100
|
abstract setProducerCommandDataChannel(dataChannel: RTCDataChannel): void;
|
|
95
101
|
abstract useCommandDataChannel(status: boolean): void;
|
|
96
|
-
abstract setAsrDataChannel(dataChannel: RTCDataChannel): void;
|
|
97
102
|
abstract getParticipantListChunk(participantListChunkParameters: ParticipantListChunkParameters): Promise<SignalingMessage>;
|
|
98
103
|
abstract getParticipants(externalIds: SignalingMessage.ExternalId[]): Promise<SignalingMessage>;
|
|
99
104
|
abstract startAsr(params: IAsrStartParams): Promise<SignalingMessage>;
|
|
100
|
-
abstract stopAsr(): Promise<SignalingMessage>;
|
|
105
|
+
abstract stopAsr(params?: IAsrStopParams): Promise<SignalingMessage>;
|
|
101
106
|
abstract requestAsr(request: boolean): Promise<SignalingMessage>;
|
|
102
107
|
get ready(): boolean;
|
|
103
108
|
setParticipantIdRegistry(participantIdRegistry: ParticipantIdRegistry): void;
|
|
104
109
|
requestRealloc(): void;
|
|
105
110
|
setEndpoint(endpoint: string): void;
|
|
106
111
|
setConversationId(conversationId: string): void;
|
|
107
|
-
readyToSend(): void;
|
|
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
|
}
|