@vkontakte/calls-sdk 2.8.11-dev.d88537e0.0 → 2.8.11-dev.e63f7408.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 +12 -21
- package/abstract/BaseApi.d.ts +2 -0
- package/abstract/BaseSignaling.d.ts +3 -4
- package/calls-sdk.cjs.js +9 -9
- package/calls-sdk.esm.js +5727 -5094
- package/classes/CallRegistry.d.ts +26 -0
- package/classes/Conversation.d.ts +35 -8
- package/classes/ConversationResponseValidator.d.ts +3 -0
- package/classes/MediaSource.d.ts +7 -0
- package/classes/SpecListener.d.ts +5 -0
- package/classes/codec/WorkerBase.d.ts +2 -0
- package/classes/stat/StatFirstMediaReceived.d.ts +2 -1
- package/classes/transport/DirectTransport.d.ts +3 -0
- package/classes/transport/Transport.d.ts +2 -3
- package/default/Api.d.ts +7 -0
- package/default/Signaling.d.ts +29 -45
- package/default/SignalingTransport.d.ts +68 -0
- package/enums/HangupType.d.ts +2 -1
- package/enums/SignalingNotification.d.ts +3 -1
- package/package.json +2 -2
- package/static/Capabilities.d.ts +5 -0
- package/static/External.d.ts +143 -71
- package/static/Params.d.ts +93 -83
- package/static/ParticipantConnectionStatusUtils.d.ts +16 -0
- package/types/Capabilities.d.ts +24 -0
- package/types/Participant.d.ts +12 -1
- package/types/PushData.d.ts +3 -0
- package/types/SignalingMessage.d.ts +15 -1
- package/types/WebTransport.d.ts +4 -0
package/static/Params.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { VideoEffects } from '@vkontakte/calls-video-effects';
|
|
2
|
-
import type { EffectVoiceChange
|
|
2
|
+
import type { EffectVoiceChange } from '@vkontakte/calls-audio-effects';
|
|
3
3
|
import type * as Vmoji from '@vkontakte/calls-vmoji';
|
|
4
4
|
import { IAsrData } from '../types/Asr';
|
|
5
5
|
import { ConversationData } from '../types/Conversation';
|
|
@@ -188,14 +188,6 @@ export type ParamsObject = {
|
|
|
188
188
|
* Можно установить позднее методом `setAudioEffects`
|
|
189
189
|
*/
|
|
190
190
|
audioEffects: EffectVoiceChange | null;
|
|
191
|
-
/**
|
|
192
|
-
* Namespace библиотеки VAD из `@vkontakte/calls-audio-effects`.
|
|
193
|
-
*
|
|
194
|
-
* Можно установить методом `setVad`
|
|
195
|
-
*/
|
|
196
|
-
vad: VadLib | null;
|
|
197
|
-
/** Настройки VAD (threshold, hangoverMs, enabled) */
|
|
198
|
-
vadOptions: VadControllerOptions;
|
|
199
191
|
/**
|
|
200
192
|
* Максимальная ширина видео в пикселях для видео эффекта
|
|
201
193
|
*
|
|
@@ -357,7 +349,14 @@ export type ParamsObject = {
|
|
|
357
349
|
* Включает поддержку режима WAIT_FOR_ADMIN в звонках.
|
|
358
350
|
*/
|
|
359
351
|
waitForAdminInGroupCalls: boolean;
|
|
352
|
+
/**
|
|
353
|
+
* Включает поддержку удержания звонка
|
|
354
|
+
*/
|
|
360
355
|
hold: boolean;
|
|
356
|
+
/**
|
|
357
|
+
* Максимальное количество параллельных звонков
|
|
358
|
+
*/
|
|
359
|
+
maxParallelCalls: number;
|
|
361
360
|
/**
|
|
362
361
|
* Индекс участника для первого chunk'а который придет при установке соединения с сервером
|
|
363
362
|
*
|
|
@@ -501,107 +500,113 @@ export type ParamsObject = {
|
|
|
501
500
|
* _По умолчанию: `false`_
|
|
502
501
|
*/
|
|
503
502
|
transparentAudio: boolean;
|
|
503
|
+
/**
|
|
504
|
+
* Включить получение обновлений состояния медийной сессии участников
|
|
505
|
+
*
|
|
506
|
+
* _По умолчанию: `false`_
|
|
507
|
+
*/
|
|
508
|
+
enableSessionStateUpdates: boolean;
|
|
504
509
|
/**
|
|
505
510
|
* Получен локальный стрим с камеры/микрофона
|
|
506
511
|
*/
|
|
507
|
-
onLocalStream?: (stream: MediaStream | null, mediaSettings: MediaSettings) => void;
|
|
512
|
+
onLocalStream?: (stream: MediaStream | null, mediaSettings: MediaSettings, conversationId?: string) => void;
|
|
508
513
|
/**
|
|
509
514
|
* Локальный стрим изменился
|
|
510
515
|
*/
|
|
511
|
-
onLocalStreamUpdate?: (mediaSettings: MediaSettings, kind: MediaTrackKind) => void;
|
|
516
|
+
onLocalStreamUpdate?: (mediaSettings: MediaSettings, kind: MediaTrackKind, conversationId?: string) => void;
|
|
512
517
|
/**
|
|
513
518
|
* Локальный стрим с экрана добавлен/удалён
|
|
514
519
|
*/
|
|
515
|
-
onScreenStream?: (stream: MediaStream | null, mediaSettings: MediaSettings) => void;
|
|
520
|
+
onScreenStream?: (stream: MediaStream | null, mediaSettings: MediaSettings, conversationId?: string) => void;
|
|
516
521
|
/**
|
|
517
522
|
* Локальный стрим вимоджи добавлен/удалён
|
|
518
523
|
*/
|
|
519
|
-
onVmojiStream?: (stream: MediaStream | null, mediaSettings: MediaSettings) => void;
|
|
524
|
+
onVmojiStream?: (stream: MediaStream | null, mediaSettings: MediaSettings, conversationId?: string) => void;
|
|
520
525
|
/**
|
|
521
526
|
* Произошла ошибка вимоджи
|
|
522
527
|
*/
|
|
523
|
-
onVmojiError?: (error: VmojiError) => void;
|
|
528
|
+
onVmojiError?: (error: VmojiError, conversationId?: string) => void;
|
|
524
529
|
/**
|
|
525
530
|
* Изменился статус локального соединения
|
|
526
531
|
*/
|
|
527
|
-
onLocalStatus?: (status: ParticipantStatus) => void;
|
|
532
|
+
onLocalStatus?: (status: ParticipantStatus, conversationId?: string) => void;
|
|
528
533
|
/**
|
|
529
534
|
* Получен стрим собеседника.
|
|
530
535
|
* Если сервер закончил стримить собеседника, вместо стрима будет передан null
|
|
531
536
|
*/
|
|
532
|
-
onRemoteStream?: (userId: ExternalParticipantId, stream: MediaStream | null) => void;
|
|
537
|
+
onRemoteStream?: (userId: ExternalParticipantId, stream: MediaStream | null, conversationId?: string) => void;
|
|
533
538
|
/**
|
|
534
539
|
* Cтрим собеседника приостановлен/возобновлен.
|
|
535
540
|
*/
|
|
536
|
-
onRemoteStreamSuspended?: (userId: ExternalParticipantId, mediaType: MediaType, suspended: boolean) => void;
|
|
541
|
+
onRemoteStreamSuspended?: (userId: ExternalParticipantId, mediaType: MediaType, suspended: boolean, conversationId?: string) => void;
|
|
537
542
|
/**
|
|
538
543
|
* Получен стрим с экрана собеседника.
|
|
539
544
|
* Если сервер закончил стримить экран собеседника, вместо стрима будет передан null
|
|
540
545
|
*/
|
|
541
|
-
onRemoteScreenStream?: (userId: ExternalParticipantId, stream: MediaStream | null) => void;
|
|
546
|
+
onRemoteScreenStream?: (userId: ExternalParticipantId, stream: MediaStream | null, conversationId?: string) => void;
|
|
542
547
|
/**
|
|
543
548
|
* Получен стрим вимоджи собеседника.
|
|
544
549
|
* Если сервер закончил стримить вимоджи собеседника, вместо стрима будет передан null
|
|
545
550
|
*/
|
|
546
|
-
onRemoteVmojiStream?: (userId: ExternalParticipantId, stream: MediaStream | null) => void;
|
|
551
|
+
onRemoteVmojiStream?: (userId: ExternalParticipantId, stream: MediaStream | null, conversationId?: string) => void;
|
|
547
552
|
/**
|
|
548
553
|
* Получен стрим трансляция или мувик от собеседника.
|
|
549
554
|
* Если сервер закончил стримить экран собеседника, вместо стрима будет передан null
|
|
550
555
|
*/
|
|
551
|
-
onRemoteLive?: (userId: ExternalParticipantId, data: IOnRemoteMovieData) => void;
|
|
556
|
+
onRemoteLive?: (userId: ExternalParticipantId, data: IOnRemoteMovieData, conversationId?: string) => void;
|
|
552
557
|
/**
|
|
553
558
|
* Получен собственный стрим трансляция или мувик.
|
|
554
559
|
* Если сервер закончил стримить экран собеседника, вместо стрима будет передан null
|
|
555
560
|
*/
|
|
556
|
-
onLocalLive?: (userId: ExternalParticipantId, data: IOnRemoteMovieData) => void;
|
|
561
|
+
onLocalLive?: (userId: ExternalParticipantId, data: IOnRemoteMovieData, conversationId?: string) => void;
|
|
557
562
|
/**
|
|
558
563
|
* Получено обновление стрима или лайва от собеседника.
|
|
559
564
|
*/
|
|
560
|
-
onRemoteLiveUpdate?: (userId: ExternalParticipantId, data: ISharedMovieState) => void;
|
|
565
|
+
onRemoteLiveUpdate?: (userId: ExternalParticipantId, data: ISharedMovieState, conversationId?: string) => void;
|
|
561
566
|
/**
|
|
562
567
|
* Получено обновление собственного стрима или лайва.
|
|
563
568
|
*/
|
|
564
|
-
onLocalLiveUpdate?: (userId: ExternalParticipantId, data: ISharedMovieState) => void;
|
|
569
|
+
onLocalLiveUpdate?: (userId: ExternalParticipantId, data: ISharedMovieState, conversationId?: string) => void;
|
|
565
570
|
/**
|
|
566
571
|
* Начат звонок
|
|
567
572
|
*/
|
|
568
|
-
onConversation?: (userId: ExternalParticipantId, mediaModifiers: MediaModifiers, muteStates: MuteStates, participants: ExternalParticipant[], rooms?: Rooms) => void;
|
|
573
|
+
onConversation?: (userId: ExternalParticipantId, mediaModifiers: MediaModifiers, muteStates: MuteStates, participants: ExternalParticipant[], rooms?: Rooms, conversationId?: string) => void;
|
|
569
574
|
/**
|
|
570
575
|
* Начальный список участников для постраничного звонка
|
|
571
576
|
*/
|
|
572
|
-
onConversationParticipantListChunk?: (chunk: ExternalParticipantListChunk) => void;
|
|
577
|
+
onConversationParticipantListChunk?: (chunk: ExternalParticipantListChunk, conversationId?: string) => void;
|
|
573
578
|
/**
|
|
574
579
|
* Изменились данные стрима собеседника
|
|
575
580
|
*/
|
|
576
|
-
onRemoteMediaSettings?: (userId: ExternalParticipantId, mediaSettings: MediaSettings, markers: ExternalParticipantListMarkers | null) => void;
|
|
581
|
+
onRemoteMediaSettings?: (userId: ExternalParticipantId, mediaSettings: MediaSettings, markers: ExternalParticipantListMarkers | null, conversationId?: string) => void;
|
|
577
582
|
/**
|
|
578
583
|
* Изменились данные стрима собеседника
|
|
579
584
|
*/
|
|
580
|
-
onLocalMediaSettings?: (userId: ExternalParticipantId, mediaSettings: MediaSettings) => void;
|
|
585
|
+
onLocalMediaSettings?: (userId: ExternalParticipantId, mediaSettings: MediaSettings, conversationId?: string) => void;
|
|
581
586
|
/**
|
|
582
587
|
* Полученны данные по стримам (лайв/мувик) от собеседника
|
|
583
588
|
*/
|
|
584
|
-
onRemoteSharedMovieInfo?: (userId: ExternalParticipantId, sharedMovieInfo: ISharedMovieInfo, roomId?: IRoomId) => void;
|
|
589
|
+
onRemoteSharedMovieInfo?: (userId: ExternalParticipantId, sharedMovieInfo: ISharedMovieInfo, roomId?: IRoomId, conversationId?: string) => void;
|
|
585
590
|
/**
|
|
586
591
|
* Полученны данные по остановленным стримам (лайв/мувик) от собеседника
|
|
587
592
|
*/
|
|
588
|
-
onRemoteSharedMovieStoppedInfo?: (userId: ExternalParticipantId, sharedMovieStoppedInfo: ISharedMovieStoppedInfo, roomId?: IRoomId) => void;
|
|
593
|
+
onRemoteSharedMovieStoppedInfo?: (userId: ExternalParticipantId, sharedMovieStoppedInfo: ISharedMovieStoppedInfo, roomId?: IRoomId, conversationId?: string) => void;
|
|
589
594
|
/**
|
|
590
595
|
* Полученны данные по собственным стримам (лайв/мувик)
|
|
591
596
|
*/
|
|
592
|
-
onLocalSharedMovieInfo?: (userId: ExternalParticipantId, sharedMovieInfo: ISharedMovieInfo, roomId?: IRoomId) => void;
|
|
597
|
+
onLocalSharedMovieInfo?: (userId: ExternalParticipantId, sharedMovieInfo: ISharedMovieInfo, roomId?: IRoomId, conversationId?: string) => void;
|
|
593
598
|
/**
|
|
594
599
|
* Полученны данные по собственным остановленным стримам (лайв/мувик)
|
|
595
600
|
*/
|
|
596
|
-
onLocalSharedMovieStoppedInfo?: (userId: ExternalParticipantId, sharedMovieStoppedInfo: ISharedMovieStoppedInfo, roomId?: IRoomId) => void;
|
|
601
|
+
onLocalSharedMovieStoppedInfo?: (userId: ExternalParticipantId, sharedMovieStoppedInfo: ISharedMovieStoppedInfo, roomId?: IRoomId, conversationId?: string) => void;
|
|
597
602
|
/**
|
|
598
603
|
* Добавили участника
|
|
599
604
|
*/
|
|
600
|
-
onParticipantAdded?: (userId: ExternalParticipantId, markers: ExternalParticipantListMarkers | null) => void;
|
|
605
|
+
onParticipantAdded?: (userId: ExternalParticipantId, markers: ExternalParticipantListMarkers | null, conversationId?: string) => void;
|
|
601
606
|
/**
|
|
602
607
|
* Участник присоединился к звонку
|
|
603
608
|
*/
|
|
604
|
-
onParticipantJoined?: (userId: ExternalParticipantId, markers: ExternalParticipantListMarkers) => void;
|
|
609
|
+
onParticipantJoined?: (userId: ExternalParticipantId, markers: ExternalParticipantListMarkers, conversationId?: string) => void;
|
|
605
610
|
/**
|
|
606
611
|
* Получены данные по изменению локальных состояний со стороны админа
|
|
607
612
|
* Например, принудительно опущена рука
|
|
@@ -609,19 +614,19 @@ export type ParamsObject = {
|
|
|
609
614
|
* @param participantState Полный объект состояния участника, полученный от SDK/сервера.
|
|
610
615
|
* @param global `true` – действие глобальное (для всех участников), `false` – действие локальное (только у текущего пользователя).
|
|
611
616
|
*/
|
|
612
|
-
onLocalParticipantState?: (participantState: ParticipantStateMapped, global: boolean) => void;
|
|
617
|
+
onLocalParticipantState?: (participantState: ParticipantStateMapped, global: boolean, conversationId?: string) => void;
|
|
613
618
|
/**
|
|
614
619
|
* Изменились данные состояний собеседника
|
|
615
620
|
*/
|
|
616
|
-
onRemoteParticipantState?: (userId: ExternalParticipantId, participantState: ParticipantStateMapped, markers: ExternalParticipantListMarkers | null) => void;
|
|
621
|
+
onRemoteParticipantState?: (userId: ExternalParticipantId, participantState: ParticipantStateMapped, markers: ExternalParticipantListMarkers | null, conversationId?: string) => void;
|
|
617
622
|
/**
|
|
618
623
|
* Изменились данные состояний нескольких собеседников
|
|
619
624
|
*/
|
|
620
|
-
onRemoteParticipantsState?: (stateList: ParticipantsStateList, roomId?: IRoomId) => void;
|
|
625
|
+
onRemoteParticipantsState?: (stateList: ParticipantsStateList, roomId?: IRoomId, conversationId?: string) => void;
|
|
621
626
|
/**
|
|
622
627
|
* Изменился статус соединения собеседников
|
|
623
628
|
*/
|
|
624
|
-
onRemoteStatus?: (userIds: ExternalParticipantId[], status: ParticipantStatus, data: any) => void;
|
|
629
|
+
onRemoteStatus?: (userIds: ExternalParticipantId[], status: ParticipantStatus, data: any, conversationId?: string) => void;
|
|
625
630
|
/**
|
|
626
631
|
* Разрешения на доступы были запрошены в браузере
|
|
627
632
|
*/
|
|
@@ -633,56 +638,56 @@ export type ParamsObject = {
|
|
|
633
638
|
/**
|
|
634
639
|
* Пользователь отключился от звонка
|
|
635
640
|
*/
|
|
636
|
-
onRemoteRemoved?: (userId: ExternalParticipantId, markers: ExternalParticipantListMarkers | null) => void;
|
|
641
|
+
onRemoteRemoved?: (userId: ExternalParticipantId, markers: ExternalParticipantListMarkers | null, conversationId?: string) => void;
|
|
637
642
|
/**
|
|
638
643
|
* Изменилось состояние звонка
|
|
639
644
|
*/
|
|
640
|
-
onCallState?: (isCallActive: boolean, canAddParticipants: boolean, conversation: ConversationData) => void;
|
|
645
|
+
onCallState?: (isCallActive: boolean, canAddParticipants: boolean, conversation: ConversationData, conversationId?: string) => void;
|
|
641
646
|
/**
|
|
642
647
|
* Изменилось состояние камеры или микрофона
|
|
643
648
|
*/
|
|
644
|
-
onDeviceSwitched?: (mediaOption: MediaOption, enabled: boolean) => void;
|
|
649
|
+
onDeviceSwitched?: (mediaOption: MediaOption, enabled: boolean, conversationId?: string) => void;
|
|
645
650
|
/**
|
|
646
651
|
* Изменились состояния устройств пользователя или разрешения включать камеру/микрофон
|
|
647
652
|
*/
|
|
648
|
-
onMuteStates?: (muteStates: MuteStates, unmuteOptions: MediaOption[], mediaOptions: MediaOption[], muteAll: boolean, unmute: boolean, userId: ExternalParticipantId | null, adminId: ExternalParticipantId | null, stateUpdated?: boolean, requestedMedia?: MediaOption[], roomId?: number | null) => void;
|
|
653
|
+
onMuteStates?: (muteStates: MuteStates, unmuteOptions: MediaOption[], mediaOptions: MediaOption[], muteAll: boolean, unmute: boolean, userId: ExternalParticipantId | null, adminId: ExternalParticipantId | null, stateUpdated?: boolean, requestedMedia?: MediaOption[], roomId?: number | null, conversationId?: string) => void;
|
|
649
654
|
/**
|
|
650
655
|
* Изменились роли собеседника в звонке
|
|
651
656
|
*/
|
|
652
|
-
onRolesChanged?: (userId: ExternalParticipantId, roles: UserRole[], isInitial?: boolean) => void;
|
|
657
|
+
onRolesChanged?: (userId: ExternalParticipantId, roles: UserRole[], isInitial?: boolean, conversationId?: string) => void;
|
|
653
658
|
/**
|
|
654
659
|
* Изменились свои роли в звонке
|
|
655
660
|
*/
|
|
656
|
-
onLocalRolesChanged?: (roles: UserRole[], isInitial?: boolean) => void;
|
|
661
|
+
onLocalRolesChanged?: (roles: UserRole[], isInitial?: boolean, conversationId?: string) => void;
|
|
657
662
|
/**
|
|
658
663
|
* Закрепляет/открепляет собеседника для всех
|
|
659
664
|
*/
|
|
660
|
-
onPinnedParticipant?: (userId: ExternalParticipantId, unpin: boolean, markers: ExternalParticipantListMarkers | null, roomId?: number | null) => void;
|
|
665
|
+
onPinnedParticipant?: (userId: ExternalParticipantId, unpin: boolean, markers: ExternalParticipantListMarkers | null, roomId?: number | null, conversationId?: string) => void;
|
|
661
666
|
/**
|
|
662
667
|
* Закрепляет/открепляет текущего пользователя у других собеседников
|
|
663
668
|
*/
|
|
664
|
-
onLocalPin?: (unpin: boolean) => void;
|
|
669
|
+
onLocalPin?: (unpin: boolean, conversationId?: string) => void;
|
|
665
670
|
/**
|
|
666
671
|
* Изменились опции звонка
|
|
667
672
|
*/
|
|
668
|
-
onOptionsChanged?: (options: ConversationOption[]) => void;
|
|
669
|
-
onRateNeeded?:
|
|
673
|
+
onOptionsChanged?: (options: ConversationOption[], conversationId?: string) => void;
|
|
674
|
+
onRateNeeded?: (conversationId?: string) => void;
|
|
670
675
|
/**
|
|
671
676
|
* Изменился говорящий в звонке
|
|
672
677
|
*/
|
|
673
|
-
onSpeakerChanged?: (userId: ExternalParticipantId) => void;
|
|
678
|
+
onSpeakerChanged?: (userId: ExternalParticipantId, conversationId?: string) => void;
|
|
674
679
|
/**
|
|
675
680
|
* Громкость собеседников
|
|
676
681
|
*/
|
|
677
682
|
onVolumesDetected?: (volumes: {
|
|
678
683
|
uid: ExternalParticipantId;
|
|
679
684
|
volume: number;
|
|
680
|
-
}[]) => void;
|
|
685
|
+
}[], conversationId?: string) => void;
|
|
681
686
|
/**
|
|
682
687
|
* Громкость своего микрофона
|
|
683
688
|
*/
|
|
684
689
|
onLocalVolume?: (volume: number, isMicEnabled: boolean) => void;
|
|
685
|
-
onJoinStatus?:
|
|
690
|
+
onJoinStatus?: (available: boolean, chatId: string, conversationId?: string) => void;
|
|
686
691
|
/**
|
|
687
692
|
* Звонок был завершен
|
|
688
693
|
*/
|
|
@@ -690,12 +695,12 @@ export type ParamsObject = {
|
|
|
690
695
|
/**
|
|
691
696
|
* Входящий звонок был принят мной
|
|
692
697
|
*/
|
|
693
|
-
onCallAccepted?: () => void;
|
|
698
|
+
onCallAccepted?: (conversationId?: string) => void;
|
|
694
699
|
/**
|
|
695
700
|
* Исходящий звонок был принят кем-то
|
|
696
701
|
* @param userId
|
|
697
702
|
*/
|
|
698
|
-
onAcceptedCall?: (userId: ExternalParticipantId, capabilities: ParticipantCapabilities) => void;
|
|
703
|
+
onAcceptedCall?: (userId: ExternalParticipantId, capabilities: ParticipantCapabilities, conversationId?: string) => void;
|
|
699
704
|
/**
|
|
700
705
|
* Список устройств изменился
|
|
701
706
|
*/
|
|
@@ -712,25 +717,25 @@ export type ParamsObject = {
|
|
|
712
717
|
/**
|
|
713
718
|
* Получено сообщение чата
|
|
714
719
|
*/
|
|
715
|
-
onChatMessage?: (message: string, from: ExternalParticipantId, direct: boolean) => void;
|
|
720
|
+
onChatMessage?: (message: string, from: ExternalParticipantId, direct: boolean, conversationId?: string) => void;
|
|
716
721
|
/**
|
|
717
722
|
* Получены данные от собеседника
|
|
718
723
|
*/
|
|
719
|
-
onCustomData?: (data: JSONObject, from: ExternalParticipantId, direct: boolean) => void;
|
|
724
|
+
onCustomData?: (data: JSONObject, from: ExternalParticipantId, direct: boolean, conversationId?: string) => void;
|
|
720
725
|
/**
|
|
721
726
|
* Начата трансляция/запись звонка
|
|
722
727
|
*/
|
|
723
|
-
onRecordStarted?: (initiator: ExternalParticipantId, movieId: number, startTime: number, type: 'STREAM' | 'RECORD', externalMovieId?: string, externalOwnerId?: string, roomId?: number | null) => void;
|
|
728
|
+
onRecordStarted?: (initiator: ExternalParticipantId, movieId: number, startTime: number, type: 'STREAM' | 'RECORD', externalMovieId?: string, externalOwnerId?: string, roomId?: number | null, conversationId?: string) => void;
|
|
724
729
|
/**
|
|
725
730
|
* Закончена трансляция/запись звонка
|
|
726
731
|
*/
|
|
727
|
-
onRecordStopped?: (roomId: number | null, stopBy: ExternalParticipantId | null) => void;
|
|
732
|
+
onRecordStopped?: (roomId: number | null, stopBy: ExternalParticipantId | null, conversationId?: string) => void;
|
|
728
733
|
/**
|
|
729
734
|
* Состояние своей сети
|
|
730
735
|
*
|
|
731
736
|
* @param rating Оценка качества соединения от 0 до 1
|
|
732
737
|
*/
|
|
733
|
-
onLocalNetworkStatusChanged?: (rating: number) => void;
|
|
738
|
+
onLocalNetworkStatusChanged?: (rating: number, conversationId?: string) => void;
|
|
734
739
|
/**
|
|
735
740
|
* Состояние сети участников
|
|
736
741
|
*
|
|
@@ -739,7 +744,7 @@ export type ParamsObject = {
|
|
|
739
744
|
onNetworkStatusChanged?: (status: {
|
|
740
745
|
uid: ExternalParticipantId;
|
|
741
746
|
rating: number;
|
|
742
|
-
}[]) => void;
|
|
747
|
+
}[], conversationId?: string) => void;
|
|
743
748
|
/**
|
|
744
749
|
* Получено отладочное сообщение. Работает только при выключенном режиме отладки
|
|
745
750
|
*/
|
|
@@ -767,74 +772,74 @@ export type ParamsObject = {
|
|
|
767
772
|
* @param addedParticipantIds Некоторое количество участников, добавленных в зал
|
|
768
773
|
* @param removedParticipantIds Некоторое количество участников, убранных из зала
|
|
769
774
|
*/
|
|
770
|
-
onChatRoomUpdated?: (eventType: ChatRoomEventType, totalCount: number, firstParticipants: ExternalId[], addedParticipantIds: ExternalId[], removedParticipantIds: ExternalId[]) => void;
|
|
775
|
+
onChatRoomUpdated?: (eventType: ChatRoomEventType, totalCount: number, firstParticipants: ExternalId[], addedParticipantIds: ExternalId[], removedParticipantIds: ExternalId[], conversationId?: string) => void;
|
|
771
776
|
/**
|
|
772
777
|
* Получен микшированный аудио стрим.
|
|
773
778
|
* @hidden
|
|
774
779
|
* @param stream стрим от WebRTC
|
|
775
780
|
*/
|
|
776
|
-
onRemoteMixedAudioStream?: (stream: MediaStream) => void;
|
|
781
|
+
onRemoteMixedAudioStream?: (stream: MediaStream, conversationId?: string) => void;
|
|
777
782
|
/**
|
|
778
783
|
* Получена новая ссылка на звонок
|
|
779
784
|
* @param joinLink токен присоединения к звонку
|
|
780
785
|
*/
|
|
781
|
-
onJoinLinkChanged?: (joinLink: string) => void;
|
|
786
|
+
onJoinLinkChanged?: (joinLink: string, conversationId?: string) => void;
|
|
782
787
|
/**
|
|
783
788
|
* Получено обновление списка сессионных залов
|
|
784
789
|
* @param updates список обновлений по залам
|
|
785
790
|
*/
|
|
786
|
-
onRoomsUpdated?: (updates: Partial<Record<RoomsEventType, RoomsUpdate
|
|
791
|
+
onRoomsUpdated?: (updates: Partial<Record<RoomsEventType, RoomsUpdate>>, conversationId?: string) => void;
|
|
787
792
|
/**
|
|
788
793
|
* Получено обновление сессионных зало
|
|
789
794
|
* @param eventTypes список событий
|
|
790
795
|
* @param roomId номер сессионного зала
|
|
791
796
|
* @param room сессионный зал
|
|
792
797
|
*/
|
|
793
|
-
onRoomUpdated?: (eventTypes: RoomsEventType[], roomId: number, room: Room | null, deactivate: boolean | null) => void;
|
|
798
|
+
onRoomUpdated?: (eventTypes: RoomsEventType[], roomId: number, room: Room | null, deactivate: boolean | null, conversationId?: string) => void;
|
|
794
799
|
/**
|
|
795
800
|
* Получение обновление списка участников в сессионном зале
|
|
796
801
|
* @param update обновление списка участников
|
|
797
802
|
*/
|
|
798
|
-
onRoomParticipantsUpdated?: (update: RoomParticipantUpdate) => void;
|
|
803
|
+
onRoomParticipantsUpdated?: (update: RoomParticipantUpdate, conversationId?: string) => void;
|
|
799
804
|
/**
|
|
800
805
|
* Получение информации о смене зала
|
|
801
806
|
* @param roomId номер сессионного зала
|
|
802
807
|
*/
|
|
803
|
-
onRoomSwitched?: (roomId: number | null) => void;
|
|
808
|
+
onRoomSwitched?: (roomId: number | null, conversationId?: string) => void;
|
|
804
809
|
/**
|
|
805
810
|
* Установить id сессионного зала на старте звонка
|
|
806
811
|
* @param roomId номер сессионного зала
|
|
807
812
|
*/
|
|
808
|
-
onRoomStart?: (roomId: number | null) => void;
|
|
813
|
+
onRoomStart?: (roomId: number | null, conversationId?: string) => void;
|
|
809
814
|
/**
|
|
810
815
|
* Получены новые реакции в звонке
|
|
811
816
|
* @param feedback массив с реакциями
|
|
812
817
|
*/
|
|
813
|
-
onFeedback?: (feedback: IFeedbackExternal[], roomId: number | null) => void;
|
|
818
|
+
onFeedback?: (feedback: IFeedbackExternal[], roomId: number | null, conversationId?: string) => void;
|
|
814
819
|
/**
|
|
815
820
|
* Изменился список ролей, которым доступны ConversationFeatures
|
|
816
821
|
*
|
|
817
822
|
* @param featuresPerRole Объект вида ключ: ConversationFeature = значение: UserRole[]
|
|
818
823
|
* (если ключ фичи отсутствует, или в ролях пустой массив, считаем фичу доступной для всех пользователей)
|
|
819
824
|
*/
|
|
820
|
-
onFeaturesPerRoleChanged?: (featuresPerRole: IFeaturesPerRole) => void;
|
|
825
|
+
onFeaturesPerRoleChanged?: (featuresPerRole: IFeaturesPerRole, conversationId?: string) => void;
|
|
821
826
|
/**
|
|
822
827
|
* Изменился Vmoji-аватар пользователя
|
|
823
828
|
* @param externalId Id пользователя, у которого изменился аватар
|
|
824
829
|
*/
|
|
825
|
-
onParticipantVmojiUpdate?: (externalId: ExternalParticipantId) => void;
|
|
830
|
+
onParticipantVmojiUpdate?: (externalId: ExternalParticipantId, conversationId?: string) => void;
|
|
826
831
|
/**
|
|
827
832
|
* Начата текстовая расшифровка звонка
|
|
828
833
|
* @param initiatorId Id пользователя, запустившего расшифровку звонка
|
|
829
834
|
* @param movieId Id расшифровки
|
|
830
835
|
* @param roomId Id комнаты
|
|
831
836
|
*/
|
|
832
|
-
onAsrStarted?: (initiatorId: ExternalParticipantId, movieId: number, roomId: number | null) => void;
|
|
837
|
+
onAsrStarted?: (initiatorId: ExternalParticipantId, movieId: number, roomId: number | null, conversationId?: string) => void;
|
|
833
838
|
/**
|
|
834
839
|
* Закончена текстовая расшифровка звонка
|
|
835
840
|
* @param roomId Id комнаты
|
|
836
841
|
*/
|
|
837
|
-
onAsrStopped?: (roomId: number | null) => void;
|
|
842
|
+
onAsrStopped?: (roomId: number | null, conversationId?: string) => void;
|
|
838
843
|
/**
|
|
839
844
|
* Получена расшифровка речи
|
|
840
845
|
* @param id Id пользователя, произнесшего реплику
|
|
@@ -842,47 +847,53 @@ export type ParamsObject = {
|
|
|
842
847
|
* @param timestamp Время расшифровки
|
|
843
848
|
* @param duration Длительность реплики в расшифровке
|
|
844
849
|
*/
|
|
845
|
-
onAsrTranscription?: (id: ExternalParticipantId, text: string, timestamp: number, duration: number) => void;
|
|
850
|
+
onAsrTranscription?: (id: ExternalParticipantId, text: string, timestamp: number, duration: number, conversationId?: string) => void;
|
|
846
851
|
/**
|
|
847
852
|
* Установка начальных параметров текстовой расшифровки звонка. (Используется при входе в звонок/ смене комнаты)
|
|
848
853
|
* @param data Начальная информация по ASR
|
|
849
854
|
* @param roomId Id Комнаты
|
|
850
855
|
*/
|
|
851
|
-
onAsrSet?: (data: IAsrData | null, roomId: number | null) => void;
|
|
856
|
+
onAsrSet?: (data: IAsrData | null, roomId: number | null, conversationId?: string) => void;
|
|
852
857
|
/**
|
|
853
858
|
* Админ начал/остановил совместное использование стороннего web-приложения
|
|
854
859
|
* @param userId id участника-админа
|
|
855
860
|
* @param sharedUrl url страницы
|
|
856
861
|
*/
|
|
857
|
-
onRemoteSharedUrl?: (userId: ExternalParticipantId, sharedUrl: string | undefined, roomId: IRoomId) => void;
|
|
862
|
+
onRemoteSharedUrl?: (userId: ExternalParticipantId, sharedUrl: string | undefined, roomId: IRoomId, conversationId?: string) => void;
|
|
858
863
|
/**
|
|
859
864
|
* Изменился id участника (деанонимизация)
|
|
860
865
|
* @param prevId
|
|
861
866
|
* @param newId
|
|
862
867
|
*/
|
|
863
|
-
onParticipantIdChanged?: (prevId: ExternalParticipantId, newId: ExternalParticipantId) => void;
|
|
868
|
+
onParticipantIdChanged?: (prevId: ExternalParticipantId, newId: ExternalParticipantId, conversationId?: string) => void;
|
|
864
869
|
/**
|
|
865
870
|
* Предложение включить режим автоматического отключения приёма видео
|
|
866
871
|
* в плохой сети
|
|
867
872
|
* @param bandwidth текущая полоса пропускания, kbps
|
|
868
873
|
*/
|
|
869
|
-
onVideoSuspendSuggest?: (bandwidth: number) => void;
|
|
874
|
+
onVideoSuspendSuggest?: (bandwidth: number, conversationId?: string) => void;
|
|
870
875
|
/**
|
|
871
876
|
* Одобрено повышение пользователя в зале ожидания/зале в режиме Audience
|
|
872
877
|
*
|
|
873
878
|
* @param adminParticipantId админ, одобривший повышение
|
|
874
879
|
*/
|
|
875
|
-
onPromotionApproved?: (adminParticipantId: ExternalParticipantId) => void;
|
|
880
|
+
onPromotionApproved?: (adminParticipantId: ExternalParticipantId, conversationId?: string) => void;
|
|
876
881
|
/**
|
|
877
882
|
* Участник повышен/разжалован в зале ожидания/зале в режиме Audience
|
|
878
883
|
*
|
|
879
884
|
* @param demoted участник разжалован
|
|
880
885
|
*/
|
|
881
|
-
onPromoted?: (demoted: boolean) => void;
|
|
886
|
+
onPromoted?: (demoted: boolean, conversationId?: string) => void;
|
|
887
|
+
/**
|
|
888
|
+
* Активным установлен определенный звонок
|
|
889
|
+
*
|
|
890
|
+
* @param conversationId ID звонка
|
|
891
|
+
*/
|
|
892
|
+
onCallActive?: (conversationId: string) => void;
|
|
882
893
|
/**
|
|
883
894
|
* Собеседник подключился к сигналлингу
|
|
884
895
|
*/
|
|
885
|
-
onPeerRegistered?: () => void;
|
|
896
|
+
onPeerRegistered?: (conversationId?: string) => void;
|
|
886
897
|
};
|
|
887
898
|
export default abstract class Params {
|
|
888
899
|
private static _params;
|
|
@@ -949,10 +960,6 @@ export default abstract class Params {
|
|
|
949
960
|
static get displaySurface(): DisplayCaptureSurfaceType;
|
|
950
961
|
static get audioEffects(): EffectVoiceChange | null;
|
|
951
962
|
static set audioEffects(value: EffectVoiceChange | null);
|
|
952
|
-
static get vad(): VadLib | null;
|
|
953
|
-
static set vad(value: VadLib | null);
|
|
954
|
-
static get vadOptions(): VadControllerOptions;
|
|
955
|
-
static set vadOptions(value: VadControllerOptions);
|
|
956
963
|
static get videoEffects(): VideoEffects | null;
|
|
957
964
|
static set videoEffects(value: VideoEffects | null);
|
|
958
965
|
static get videoEffectMaxWidth(): number;
|
|
@@ -996,6 +1003,7 @@ export default abstract class Params {
|
|
|
996
1003
|
static get addParticipant(): boolean;
|
|
997
1004
|
static get waitForAdminInGroupCalls(): boolean;
|
|
998
1005
|
static get hold(): boolean;
|
|
1006
|
+
static get maxParallelCalls(): number;
|
|
999
1007
|
static get participantListChunkInitIndex(): number;
|
|
1000
1008
|
static get participantListChunkInitCount(): number | null;
|
|
1001
1009
|
static get filterObservers(): boolean;
|
|
@@ -1019,6 +1027,7 @@ export default abstract class Params {
|
|
|
1019
1027
|
static get webtransport(): boolean;
|
|
1020
1028
|
static get webtransportFF(): boolean;
|
|
1021
1029
|
static get transparentAudio(): boolean;
|
|
1030
|
+
static get enableSessionStateUpdates(): boolean;
|
|
1022
1031
|
static toJSON(): {
|
|
1023
1032
|
apiKey: string;
|
|
1024
1033
|
apiEnv: string;
|
|
@@ -1054,5 +1063,6 @@ export default abstract class Params {
|
|
|
1054
1063
|
webtransport: boolean;
|
|
1055
1064
|
webtransportFF: boolean;
|
|
1056
1065
|
transparentAudio: boolean;
|
|
1066
|
+
enableSessionStateUpdates: boolean;
|
|
1057
1067
|
};
|
|
1058
1068
|
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { ParticipantConnectionStatus, ParticipantSessionState } from '../types/Participant';
|
|
2
|
+
import { ParticipantStatus } from './External';
|
|
3
|
+
import TransportState from '../enums/TransportState';
|
|
4
|
+
type StatusTransition = {
|
|
5
|
+
status: ParticipantStatus;
|
|
6
|
+
shouldNotify: boolean;
|
|
7
|
+
};
|
|
8
|
+
declare namespace ParticipantConnectionStatusUtils {
|
|
9
|
+
function create(status?: Partial<ParticipantConnectionStatus> | null): ParticipantConnectionStatus;
|
|
10
|
+
function fromTransportState(state?: TransportState): ParticipantStatus | null;
|
|
11
|
+
function computeEffective(status: ParticipantConnectionStatus): ParticipantStatus;
|
|
12
|
+
function setSessionState(status: ParticipantConnectionStatus, sessionState?: ParticipantSessionState, sessionStateConnectedBySpeaker?: boolean): StatusTransition;
|
|
13
|
+
function setTransport(status: ParticipantConnectionStatus, transport: ParticipantStatus): StatusTransition;
|
|
14
|
+
function setSessionStateApplicable(status: ParticipantConnectionStatus, applicable: boolean): StatusTransition;
|
|
15
|
+
}
|
|
16
|
+
export default ParticipantConnectionStatusUtils;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
export type TCapabilities = {
|
|
2
|
+
estimatedPerformanceIndex: number;
|
|
3
|
+
audioMix: boolean;
|
|
4
|
+
consumerUpdate: boolean;
|
|
5
|
+
producerNotificationDataChannelVersion: number;
|
|
6
|
+
producerCommandDataChannelVersion: number;
|
|
7
|
+
consumerScreenDataChannelVersion: number;
|
|
8
|
+
producerScreenDataChannelVersion: number;
|
|
9
|
+
asrDataChannelVersion: number;
|
|
10
|
+
animojiDataChannelVersion: number;
|
|
11
|
+
animojiBackendRender: boolean;
|
|
12
|
+
onDemandTracks: boolean;
|
|
13
|
+
unifiedPlan: boolean;
|
|
14
|
+
singleSession: boolean;
|
|
15
|
+
videoTracksCount: number;
|
|
16
|
+
red: boolean;
|
|
17
|
+
audioShare: boolean;
|
|
18
|
+
fastScreenShare: boolean;
|
|
19
|
+
videoSuspend: boolean;
|
|
20
|
+
simulcast: boolean;
|
|
21
|
+
consumerFastScreenShare: boolean;
|
|
22
|
+
consumerFastScreenShareQualityOnDemand: boolean;
|
|
23
|
+
transparentAudio: boolean;
|
|
24
|
+
};
|
package/types/Participant.d.ts
CHANGED
|
@@ -44,6 +44,16 @@ export interface ParticipantStateMapped {
|
|
|
44
44
|
ts: number;
|
|
45
45
|
};
|
|
46
46
|
}
|
|
47
|
+
export interface ParticipantSessionState {
|
|
48
|
+
connected: boolean;
|
|
49
|
+
}
|
|
50
|
+
export interface ParticipantConnectionStatus {
|
|
51
|
+
transport: ParticipantStatus;
|
|
52
|
+
sessionState?: ParticipantSessionState;
|
|
53
|
+
sessionStateApplicable: boolean;
|
|
54
|
+
sessionStateConnectedBySpeaker: boolean;
|
|
55
|
+
lastEffective: ParticipantStatus;
|
|
56
|
+
}
|
|
47
57
|
/**
|
|
48
58
|
* Состояния участников звонка
|
|
49
59
|
*/
|
|
@@ -63,7 +73,6 @@ export interface Participant {
|
|
|
63
73
|
externalId: ExternalParticipantId;
|
|
64
74
|
mediaSettings: MediaSettings;
|
|
65
75
|
state: ParticipantState;
|
|
66
|
-
status: ParticipantStatus;
|
|
67
76
|
remoteStream?: MediaStream | null;
|
|
68
77
|
remoteAudioTrack?: MediaStreamTrack | null;
|
|
69
78
|
secondStream?: MediaStream | null;
|
|
@@ -72,6 +81,8 @@ export interface Participant {
|
|
|
72
81
|
clientType: string;
|
|
73
82
|
roles: UserRole[];
|
|
74
83
|
participantState: ParticipantStateMapped;
|
|
84
|
+
isOnHold?: boolean;
|
|
85
|
+
connectionStatus: ParticipantConnectionStatus;
|
|
75
86
|
networkRating: number;
|
|
76
87
|
lastRequestedLayouts: {
|
|
77
88
|
[key: StreamDescriptionString]: ParticipantLayout;
|
package/types/PushData.d.ts
CHANGED
|
@@ -1,8 +1,11 @@
|
|
|
1
|
+
import IceServer from './IceServer';
|
|
1
2
|
type PushData = {
|
|
2
3
|
caller_id: string;
|
|
3
4
|
caller_client_type?: string;
|
|
4
5
|
conversation_id: string;
|
|
5
6
|
endpoint: string;
|
|
7
|
+
wt_endpoint?: string;
|
|
8
|
+
turn_server?: IceServer;
|
|
6
9
|
is_video: boolean;
|
|
7
10
|
token: string;
|
|
8
11
|
sdp_offer?: string;
|
|
@@ -19,7 +19,7 @@ import MediaModifiers from './MediaModifiers';
|
|
|
19
19
|
import MediaSettings from './MediaSettings';
|
|
20
20
|
import { ISharedMovieInfo, ISharedMovieState, ISharedMovieStoppedInfo } from './MovieShare';
|
|
21
21
|
import MuteStates from './MuteStates';
|
|
22
|
-
import { CompositeUserId, OkUserId, ParticipantId, ParticipantListMarker as ParticipantParticipantListMarker, ParticipantListMarkers, ParticipantListType as ParticipantParticipantListType } from './Participant';
|
|
22
|
+
import { CompositeUserId, OkUserId, ParticipantId, ParticipantListMarker as ParticipantParticipantListMarker, ParticipantListMarkers, ParticipantListType as ParticipantParticipantListType, ParticipantSessionState } from './Participant';
|
|
23
23
|
import { MediaType, ParticipantStreamDescription } from './ParticipantStreamDescription';
|
|
24
24
|
import { IRoomId } from './Room';
|
|
25
25
|
import VideoSettings from './VideoSettings';
|
|
@@ -89,6 +89,7 @@ declare namespace SignalingMessage {
|
|
|
89
89
|
state: Record<string, string>;
|
|
90
90
|
stateUpdateTs: Record<string, number>;
|
|
91
91
|
};
|
|
92
|
+
sessionState?: ParticipantSessionState;
|
|
92
93
|
roles?: UserRole[];
|
|
93
94
|
peerId?: PeerId;
|
|
94
95
|
restricted?: boolean;
|
|
@@ -97,6 +98,7 @@ declare namespace SignalingMessage {
|
|
|
97
98
|
markers?: ParticipantListMarkers;
|
|
98
99
|
observedIds?: CompositeUserId[];
|
|
99
100
|
movieShareInfos?: ISharedMovieInfo[];
|
|
101
|
+
onHold?: boolean;
|
|
100
102
|
}
|
|
101
103
|
export interface ParticipantListChunk extends Notification {
|
|
102
104
|
participants: (Participant & Required<Pick<Participant, 'markers'>>)[];
|
|
@@ -190,6 +192,7 @@ declare namespace SignalingMessage {
|
|
|
190
192
|
deviceIdx?: number;
|
|
191
193
|
peerId: PeerId;
|
|
192
194
|
reason: HangupType;
|
|
195
|
+
errorCode?: string;
|
|
193
196
|
markers?: ParticipantListMarkers;
|
|
194
197
|
}
|
|
195
198
|
export interface ClosedConversation extends Notification {
|
|
@@ -322,6 +325,13 @@ declare namespace SignalingMessage {
|
|
|
322
325
|
export interface SpeakerChanged extends Notification {
|
|
323
326
|
speaker: ParticipantId;
|
|
324
327
|
}
|
|
328
|
+
export interface SessionState extends Notification {
|
|
329
|
+
connected: boolean;
|
|
330
|
+
participantId: OkUserId;
|
|
331
|
+
participantType: UserType;
|
|
332
|
+
deviceIdx?: number;
|
|
333
|
+
markers?: ParticipantListMarkers;
|
|
334
|
+
}
|
|
325
335
|
export interface OptionsChanged extends Notification {
|
|
326
336
|
options: ConversationOption[];
|
|
327
337
|
}
|
|
@@ -455,6 +465,10 @@ declare namespace SignalingMessage {
|
|
|
455
465
|
export interface VideoSuspendSuggest extends Notification {
|
|
456
466
|
bandwidth: number;
|
|
457
467
|
}
|
|
468
|
+
export interface Hold extends Notification {
|
|
469
|
+
participantId: ParticipantId;
|
|
470
|
+
hold: boolean;
|
|
471
|
+
}
|
|
458
472
|
export {};
|
|
459
473
|
}
|
|
460
474
|
export default SignalingMessage;
|