@vkontakte/calls-sdk 2.8.2-dev.650eaba.0 → 2.8.2-dev.66c024d.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 +78 -40
- package/abstract/BaseApi.d.ts +12 -9
- package/abstract/BaseSignaling.d.ts +13 -7
- 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 +26 -18
- 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/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/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 +7 -3
- package/constants/Rooms.d.ts +1 -0
- package/default/Api.d.ts +15 -14
- package/default/ApiExternal.d.ts +11 -0
- package/default/Signaling.d.ts +14 -9
- 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 +48 -16
- package/static/Params.d.ts +74 -36
- package/static/Utils.d.ts +8 -4
- package/types/Asr.d.ts +1 -1
- package/types/AudienceMode.d.ts +8 -0
- 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/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 +35 -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/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, IAsrStopParams
|
|
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';
|
|
58
|
+
import { StatResult } from './types/Statistics';
|
|
59
|
+
import { IStartStreamData, IStopStreamData, IPublishStreamData } from './types/Streams';
|
|
53
60
|
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
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,27 @@ 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>;
|
|
508
|
+
/**
|
|
509
|
+
* Опубликовать трансляцию звонка
|
|
510
|
+
* @param roomId
|
|
511
|
+
*/
|
|
512
|
+
export declare function publishStream(roomId?: number | null): Promise<undefined>;
|
|
491
513
|
/**
|
|
492
514
|
* Устанавливает роль участника в запись звонка
|
|
493
515
|
* Если хотя бы у одного участника звонка выставлена роль, то в записи звонка будут
|
|
494
516
|
* видны только те участники, у кого есть роль.
|
|
495
|
-
*
|
|
496
|
-
*
|
|
497
|
-
*
|
|
498
|
-
*
|
|
499
|
-
* @param externalId Внешний ID пользователя
|
|
500
|
-
* @param role Роль, если null, то роль удалится
|
|
501
|
-
* @param roomId ID сессионного зала записи. Если null, то роль применится в основном звонке
|
|
517
|
+
* @param king участник показывается крупно в записи звонка (только один участник имеет такую роль)
|
|
518
|
+
* @param pawns участник показывается в записи звонка
|
|
519
|
+
* @param hideParticipantCount скрыть/показать количество невидимых участников
|
|
520
|
+
* @param roomId комната
|
|
502
521
|
*/
|
|
503
|
-
export declare function
|
|
522
|
+
export declare function recordSetConf(king?: ExternalId, pawns?: ExternalId[], hideParticipantCount?: boolean, roomId?: number | null): Promise<void>;
|
|
504
523
|
/**
|
|
505
524
|
* Получить информацию о трансляции звонка
|
|
506
525
|
*/
|
|
@@ -544,9 +563,9 @@ export declare function activateRooms(roomIds: number[], deactivate: boolean): P
|
|
|
544
563
|
/**
|
|
545
564
|
* Cменить сессионный зал
|
|
546
565
|
* @param toRoomId
|
|
547
|
-
* @param
|
|
566
|
+
* @param externalId
|
|
548
567
|
*/
|
|
549
|
-
export declare function switchRoom(toRoomId?: number | null,
|
|
568
|
+
export declare function switchRoom(toRoomId?: number | null, externalId?: ExternalId | null): Promise<void>;
|
|
550
569
|
/**
|
|
551
570
|
* Удалить сессионные залы
|
|
552
571
|
* @param roomIds
|
|
@@ -589,12 +608,12 @@ export declare function setAudioStream(stream: MediaStream): Promise<void>;
|
|
|
589
608
|
*
|
|
590
609
|
* @param {(string|ArrayBuffer)} svg - svg в незашифрованном (string)
|
|
591
610
|
* или зашифрованном (ArrayBuffer) виде
|
|
592
|
-
* @param {(
|
|
611
|
+
* @param {(ExternalId|null)} externalId - externalId внешнего участника звонка,
|
|
593
612
|
* не требуется для текущего участника (текущего пользователя клиента)
|
|
594
613
|
* @param {(string|null)} customKey - кастомный ключ расшифровки svg,
|
|
595
614
|
* нужен только в случае присвоения участнику чужого аватара
|
|
596
615
|
*/
|
|
597
|
-
export declare function setVmojiSvg(svg: string | ArrayBuffer, externalId?:
|
|
616
|
+
export declare function setVmojiSvg(svg: string | ArrayBuffer, externalId?: ExternalId | null, customKey?: string | null): Promise<void>;
|
|
598
617
|
/**
|
|
599
618
|
* Получить состояние зала ожидания
|
|
600
619
|
*
|
|
@@ -604,15 +623,34 @@ export declare function setVmojiSvg(svg: string | ArrayBuffer, externalId?: Exte
|
|
|
604
623
|
*/
|
|
605
624
|
export declare function getWaitingHall(pageMarker?: string | null, count?: number, backward?: boolean): Promise<WaitingHallResponse>;
|
|
606
625
|
/**
|
|
607
|
-
*
|
|
626
|
+
* Получить список слушателей, запросивших повышение в комнате в режиме Audience
|
|
627
|
+
*/
|
|
628
|
+
export declare function getAudienceModeHands(): Promise<AudienceModeHandsResponse>;
|
|
629
|
+
/**
|
|
630
|
+
* Разрешить/запретить пользователю войти из зала ожидания/стать спикером комнаты
|
|
631
|
+
* в режиме Audience
|
|
608
632
|
*
|
|
609
633
|
* @param externalId Внешний ID пользователя
|
|
610
|
-
* @param demote Запретить
|
|
634
|
+
* @param demote Запретить вход/отобрать права спикера
|
|
611
635
|
*/
|
|
612
636
|
export declare function promoteParticipant(externalId: ExternalId, demote?: boolean): Promise<void>;
|
|
637
|
+
/**
|
|
638
|
+
* Запросить/отозвать запрос на получение права стать спикером в комнате в
|
|
639
|
+
* режиме Audience
|
|
640
|
+
*
|
|
641
|
+
* @param demote Отозвать запрос
|
|
642
|
+
*/
|
|
643
|
+
export declare function requestPromotion(demote?: boolean): Promise<void>;
|
|
644
|
+
/**
|
|
645
|
+
* Согласиться/отказаться стать спикером в комнате в режиме Audience.
|
|
646
|
+
*
|
|
647
|
+
* @param reject Отказаться стать спикером
|
|
648
|
+
*/
|
|
649
|
+
export declare function acceptPromotion(reject?: boolean): Promise<void>;
|
|
613
650
|
export declare function getParticipantListChunk(participantListChunkParameters: ParticipantListChunkParameters): Promise<ExternalParticipantListChunk>;
|
|
614
651
|
export declare function getParticipants(parameters: IGetParticipantsParameters): Promise<ExternalParticipant[]>;
|
|
615
652
|
export declare function feedback(key: string): Promise<SignalingMessage>;
|
|
653
|
+
export declare function userFeedbackStats(userResponse: number, reason?: string, groupCallUsersCount?: number): void;
|
|
616
654
|
export declare function enableFeatureForRoles(feature: ConversationFeature, roles: UserRole[]): Promise<void>;
|
|
617
655
|
/**
|
|
618
656
|
* Удаляет записи истории звонков
|
|
@@ -636,5 +674,5 @@ export declare function requestAsr(request: boolean): Promise<void>;
|
|
|
636
674
|
* Версия SDK
|
|
637
675
|
*/
|
|
638
676
|
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, };
|
|
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, };
|
|
677
|
+
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, 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,11 +44,13 @@ 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;
|
|
53
|
+
sendUserFeedbackStats(conversationId: string, userResponse: number, reason?: string, groupCallUsersCount?: number): void;
|
|
51
54
|
removeHistoryRecords(recordIds: number[]): Promise<void>;
|
|
52
55
|
cleanup(): void;
|
|
53
56
|
}
|
|
@@ -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 { IPublishStreamData, 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,8 @@ 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 publishStream(data: IPublishStreamData): Promise<SignalingMessage>;
|
|
78
|
+
abstract recordSetConf(conf: IRecordConfData): Promise<SignalingMessage>;
|
|
75
79
|
abstract getRecordStatus(): Promise<SignalingMessage>;
|
|
76
80
|
abstract switchTopology(topology: TransportTopology, force?: boolean): Promise<SignalingMessage>;
|
|
77
81
|
abstract reportPerfStat(report: PerfStatReport): Promise<SignalingMessage>;
|
|
@@ -79,7 +83,7 @@ export default abstract class BaseSignaling extends EventEmitter {
|
|
|
79
83
|
abstract chatMessage(message: string, participantId: CompositeUserId | null): Promise<SignalingMessage>;
|
|
80
84
|
abstract chatHistory(count: number): Promise<SignalingMessage>;
|
|
81
85
|
abstract customData(data: JSONObject, participantId: ParticipantId | null): Promise<SignalingMessage>;
|
|
82
|
-
abstract grantRoles(participantId:
|
|
86
|
+
abstract grantRoles(participantId: ParticipantId, roles: UserRole[], revoke: boolean): Promise<SignalingMessage>;
|
|
83
87
|
abstract muteParticipant(participantId: ParticipantId | null, muteStates: MuteStates, requestedMedia: MediaOption[], roomId: number | null): Promise<SignalingMessage>;
|
|
84
88
|
abstract enableFeatureForRoles(feature: ConversationFeature, roles: UserRole[]): Promise<SignalingMessage>;
|
|
85
89
|
abstract pinParticipant(participantId: ParticipantId, unpin: boolean, roomId: number | null): Promise<SignalingMessage>;
|
|
@@ -89,11 +93,13 @@ export default abstract class BaseSignaling extends EventEmitter {
|
|
|
89
93
|
}): Promise<SignalingMessage>;
|
|
90
94
|
abstract getWaitingHall(fromId: WaitingParticipantId | null, count?: number, backward?: boolean): Promise<SignalingMessage>;
|
|
91
95
|
abstract promoteParticipant(participantId: CompositeUserId, demote?: boolean): Promise<SignalingMessage>;
|
|
96
|
+
abstract requestPromotion(demote: boolean): Promise<SignalingMessage>;
|
|
97
|
+
abstract acceptPromotion(reject: boolean): Promise<SignalingMessage>;
|
|
92
98
|
abstract feedback(key: string): Promise<SignalingMessage>;
|
|
99
|
+
abstract getHandQueue(): Promise<SignalingMessage>;
|
|
93
100
|
abstract setProducerNotificationDataChannel(dataChannel: RTCDataChannel): void;
|
|
94
101
|
abstract setProducerCommandDataChannel(dataChannel: RTCDataChannel): void;
|
|
95
102
|
abstract useCommandDataChannel(status: boolean): void;
|
|
96
|
-
abstract setAsrDataChannel(dataChannel: RTCDataChannel): void;
|
|
97
103
|
abstract getParticipantListChunk(participantListChunkParameters: ParticipantListChunkParameters): Promise<SignalingMessage>;
|
|
98
104
|
abstract getParticipants(externalIds: SignalingMessage.ExternalId[]): Promise<SignalingMessage>;
|
|
99
105
|
abstract startAsr(params: IAsrStartParams): Promise<SignalingMessage>;
|
|
@@ -106,6 +112,6 @@ export default abstract class BaseSignaling extends EventEmitter {
|
|
|
106
112
|
setConversationId(conversationId: string): void;
|
|
107
113
|
readyToSend(isReady?: boolean): void;
|
|
108
114
|
cleanup(): void;
|
|
109
|
-
requestTestMode(consumerCommand: string, producerCommand: string): void;
|
|
115
|
+
requestTestMode(consumerCommand: string, producerCommand: string | null): void;
|
|
110
116
|
getNextCommandSequenceNumber(): number;
|
|
111
117
|
}
|