@vkontakte/calls-sdk 2.8.11-dev.611d028c.0 → 2.8.11-dev.67f8ff62.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.
@@ -100,6 +100,11 @@ export type ParamsObject = {
100
100
  waitMessageDelay: number;
101
101
  /** @hidden */
102
102
  waitAnotherTabDelay: number;
103
+ /**
104
+ * Время ожидания регистрации вызываемого абонента после запуска исходящего звонка, ms.
105
+ * Если параметр не задан или равен 0, ожидание не ограничивается.
106
+ */
107
+ calleeUnavailableWaitingTime?: number;
103
108
  /** @hidden */
104
109
  debugLog: boolean;
105
110
  /** @hidden */
@@ -256,13 +261,6 @@ export type ParamsObject = {
256
261
  perfStatReportEnabled: boolean;
257
262
  /** @hidden */
258
263
  callStatReportEnabled: boolean;
259
- /**
260
- * Включает логирование событий продуктовой статистики.
261
- *
262
- * _По умолчанию: `false`_
263
- * @hidden
264
- */
265
- clientEventsLoggingEnabled: boolean;
266
264
  /**
267
265
  * Отдавать приоритет кодеку H264 для исходящего видео
268
266
  *
@@ -349,7 +347,14 @@ export type ParamsObject = {
349
347
  * Включает поддержку режима WAIT_FOR_ADMIN в звонках.
350
348
  */
351
349
  waitForAdminInGroupCalls: boolean;
350
+ /**
351
+ * Включает поддержку удержания звонка
352
+ */
352
353
  hold: boolean;
354
+ /**
355
+ * Максимальное количество параллельных звонков
356
+ */
357
+ maxParallelCalls: number;
353
358
  /**
354
359
  * Индекс участника для первого chunk'а который придет при установке соединения с сервером
355
360
  *
@@ -493,107 +498,113 @@ export type ParamsObject = {
493
498
  * _По умолчанию: `false`_
494
499
  */
495
500
  transparentAudio: boolean;
501
+ /**
502
+ * Включить получение обновлений состояния медийной сессии участников
503
+ *
504
+ * _По умолчанию: `false`_
505
+ */
506
+ enableSessionStateUpdates: boolean;
496
507
  /**
497
508
  * Получен локальный стрим с камеры/микрофона
498
509
  */
499
- onLocalStream?: (stream: MediaStream | null, mediaSettings: MediaSettings) => void;
510
+ onLocalStream?: (stream: MediaStream | null, mediaSettings: MediaSettings, conversationId?: string) => void;
500
511
  /**
501
512
  * Локальный стрим изменился
502
513
  */
503
- onLocalStreamUpdate?: (mediaSettings: MediaSettings, kind: MediaTrackKind) => void;
514
+ onLocalStreamUpdate?: (mediaSettings: MediaSettings, kind: MediaTrackKind, conversationId?: string) => void;
504
515
  /**
505
516
  * Локальный стрим с экрана добавлен/удалён
506
517
  */
507
- onScreenStream?: (stream: MediaStream | null, mediaSettings: MediaSettings) => void;
518
+ onScreenStream?: (stream: MediaStream | null, mediaSettings: MediaSettings, conversationId?: string) => void;
508
519
  /**
509
520
  * Локальный стрим вимоджи добавлен/удалён
510
521
  */
511
- onVmojiStream?: (stream: MediaStream | null, mediaSettings: MediaSettings) => void;
522
+ onVmojiStream?: (stream: MediaStream | null, mediaSettings: MediaSettings, conversationId?: string) => void;
512
523
  /**
513
524
  * Произошла ошибка вимоджи
514
525
  */
515
- onVmojiError?: (error: VmojiError) => void;
526
+ onVmojiError?: (error: VmojiError, conversationId?: string) => void;
516
527
  /**
517
528
  * Изменился статус локального соединения
518
529
  */
519
- onLocalStatus?: (status: ParticipantStatus) => void;
530
+ onLocalStatus?: (status: ParticipantStatus, conversationId?: string) => void;
520
531
  /**
521
532
  * Получен стрим собеседника.
522
533
  * Если сервер закончил стримить собеседника, вместо стрима будет передан null
523
534
  */
524
- onRemoteStream?: (userId: ExternalParticipantId, stream: MediaStream | null) => void;
535
+ onRemoteStream?: (userId: ExternalParticipantId, stream: MediaStream | null, conversationId?: string) => void;
525
536
  /**
526
537
  * Cтрим собеседника приостановлен/возобновлен.
527
538
  */
528
- onRemoteStreamSuspended?: (userId: ExternalParticipantId, mediaType: MediaType, suspended: boolean) => void;
539
+ onRemoteStreamSuspended?: (userId: ExternalParticipantId, mediaType: MediaType, suspended: boolean, conversationId?: string) => void;
529
540
  /**
530
541
  * Получен стрим с экрана собеседника.
531
542
  * Если сервер закончил стримить экран собеседника, вместо стрима будет передан null
532
543
  */
533
- onRemoteScreenStream?: (userId: ExternalParticipantId, stream: MediaStream | null) => void;
544
+ onRemoteScreenStream?: (userId: ExternalParticipantId, stream: MediaStream | null, conversationId?: string) => void;
534
545
  /**
535
546
  * Получен стрим вимоджи собеседника.
536
547
  * Если сервер закончил стримить вимоджи собеседника, вместо стрима будет передан null
537
548
  */
538
- onRemoteVmojiStream?: (userId: ExternalParticipantId, stream: MediaStream | null) => void;
549
+ onRemoteVmojiStream?: (userId: ExternalParticipantId, stream: MediaStream | null, conversationId?: string) => void;
539
550
  /**
540
551
  * Получен стрим трансляция или мувик от собеседника.
541
552
  * Если сервер закончил стримить экран собеседника, вместо стрима будет передан null
542
553
  */
543
- onRemoteLive?: (userId: ExternalParticipantId, data: IOnRemoteMovieData) => void;
554
+ onRemoteLive?: (userId: ExternalParticipantId, data: IOnRemoteMovieData, conversationId?: string) => void;
544
555
  /**
545
556
  * Получен собственный стрим трансляция или мувик.
546
557
  * Если сервер закончил стримить экран собеседника, вместо стрима будет передан null
547
558
  */
548
- onLocalLive?: (userId: ExternalParticipantId, data: IOnRemoteMovieData) => void;
559
+ onLocalLive?: (userId: ExternalParticipantId, data: IOnRemoteMovieData, conversationId?: string) => void;
549
560
  /**
550
561
  * Получено обновление стрима или лайва от собеседника.
551
562
  */
552
- onRemoteLiveUpdate?: (userId: ExternalParticipantId, data: ISharedMovieState) => void;
563
+ onRemoteLiveUpdate?: (userId: ExternalParticipantId, data: ISharedMovieState, conversationId?: string) => void;
553
564
  /**
554
565
  * Получено обновление собственного стрима или лайва.
555
566
  */
556
- onLocalLiveUpdate?: (userId: ExternalParticipantId, data: ISharedMovieState) => void;
567
+ onLocalLiveUpdate?: (userId: ExternalParticipantId, data: ISharedMovieState, conversationId?: string) => void;
557
568
  /**
558
569
  * Начат звонок
559
570
  */
560
- onConversation?: (userId: ExternalParticipantId, mediaModifiers: MediaModifiers, muteStates: MuteStates, participants: ExternalParticipant[], rooms?: Rooms) => void;
571
+ onConversation?: (userId: ExternalParticipantId, mediaModifiers: MediaModifiers, muteStates: MuteStates, participants: ExternalParticipant[], rooms?: Rooms, conversationId?: string) => void;
561
572
  /**
562
573
  * Начальный список участников для постраничного звонка
563
574
  */
564
- onConversationParticipantListChunk?: (chunk: ExternalParticipantListChunk) => void;
575
+ onConversationParticipantListChunk?: (chunk: ExternalParticipantListChunk, conversationId?: string) => void;
565
576
  /**
566
577
  * Изменились данные стрима собеседника
567
578
  */
568
- onRemoteMediaSettings?: (userId: ExternalParticipantId, mediaSettings: MediaSettings, markers: ExternalParticipantListMarkers | null) => void;
579
+ onRemoteMediaSettings?: (userId: ExternalParticipantId, mediaSettings: MediaSettings, markers: ExternalParticipantListMarkers | null, conversationId?: string) => void;
569
580
  /**
570
581
  * Изменились данные стрима собеседника
571
582
  */
572
- onLocalMediaSettings?: (userId: ExternalParticipantId, mediaSettings: MediaSettings) => void;
583
+ onLocalMediaSettings?: (userId: ExternalParticipantId, mediaSettings: MediaSettings, conversationId?: string) => void;
573
584
  /**
574
585
  * Полученны данные по стримам (лайв/мувик) от собеседника
575
586
  */
576
- onRemoteSharedMovieInfo?: (userId: ExternalParticipantId, sharedMovieInfo: ISharedMovieInfo, roomId?: IRoomId) => void;
587
+ onRemoteSharedMovieInfo?: (userId: ExternalParticipantId, sharedMovieInfo: ISharedMovieInfo, roomId?: IRoomId, conversationId?: string) => void;
577
588
  /**
578
589
  * Полученны данные по остановленным стримам (лайв/мувик) от собеседника
579
590
  */
580
- onRemoteSharedMovieStoppedInfo?: (userId: ExternalParticipantId, sharedMovieStoppedInfo: ISharedMovieStoppedInfo, roomId?: IRoomId) => void;
591
+ onRemoteSharedMovieStoppedInfo?: (userId: ExternalParticipantId, sharedMovieStoppedInfo: ISharedMovieStoppedInfo, roomId?: IRoomId, conversationId?: string) => void;
581
592
  /**
582
593
  * Полученны данные по собственным стримам (лайв/мувик)
583
594
  */
584
- onLocalSharedMovieInfo?: (userId: ExternalParticipantId, sharedMovieInfo: ISharedMovieInfo, roomId?: IRoomId) => void;
595
+ onLocalSharedMovieInfo?: (userId: ExternalParticipantId, sharedMovieInfo: ISharedMovieInfo, roomId?: IRoomId, conversationId?: string) => void;
585
596
  /**
586
597
  * Полученны данные по собственным остановленным стримам (лайв/мувик)
587
598
  */
588
- onLocalSharedMovieStoppedInfo?: (userId: ExternalParticipantId, sharedMovieStoppedInfo: ISharedMovieStoppedInfo, roomId?: IRoomId) => void;
599
+ onLocalSharedMovieStoppedInfo?: (userId: ExternalParticipantId, sharedMovieStoppedInfo: ISharedMovieStoppedInfo, roomId?: IRoomId, conversationId?: string) => void;
589
600
  /**
590
601
  * Добавили участника
591
602
  */
592
- onParticipantAdded?: (userId: ExternalParticipantId, markers: ExternalParticipantListMarkers | null) => void;
603
+ onParticipantAdded?: (userId: ExternalParticipantId, markers: ExternalParticipantListMarkers | null, conversationId?: string) => void;
593
604
  /**
594
605
  * Участник присоединился к звонку
595
606
  */
596
- onParticipantJoined?: (userId: ExternalParticipantId, markers: ExternalParticipantListMarkers) => void;
607
+ onParticipantJoined?: (userId: ExternalParticipantId, markers: ExternalParticipantListMarkers, conversationId?: string) => void;
597
608
  /**
598
609
  * Получены данные по изменению локальных состояний со стороны админа
599
610
  * Например, принудительно опущена рука
@@ -601,19 +612,19 @@ export type ParamsObject = {
601
612
  * @param participantState Полный объект состояния участника, полученный от SDK/сервера.
602
613
  * @param global `true` – действие глобальное (для всех участников), `false` – действие локальное (только у текущего пользователя).
603
614
  */
604
- onLocalParticipantState?: (participantState: ParticipantStateMapped, global: boolean) => void;
615
+ onLocalParticipantState?: (participantState: ParticipantStateMapped, global: boolean, conversationId?: string) => void;
605
616
  /**
606
617
  * Изменились данные состояний собеседника
607
618
  */
608
- onRemoteParticipantState?: (userId: ExternalParticipantId, participantState: ParticipantStateMapped, markers: ExternalParticipantListMarkers | null) => void;
619
+ onRemoteParticipantState?: (userId: ExternalParticipantId, participantState: ParticipantStateMapped, markers: ExternalParticipantListMarkers | null, conversationId?: string) => void;
609
620
  /**
610
621
  * Изменились данные состояний нескольких собеседников
611
622
  */
612
- onRemoteParticipantsState?: (stateList: ParticipantsStateList, roomId?: IRoomId) => void;
623
+ onRemoteParticipantsState?: (stateList: ParticipantsStateList, roomId?: IRoomId, conversationId?: string) => void;
613
624
  /**
614
625
  * Изменился статус соединения собеседников
615
626
  */
616
- onRemoteStatus?: (userIds: ExternalParticipantId[], status: ParticipantStatus, data: any) => void;
627
+ onRemoteStatus?: (userIds: ExternalParticipantId[], status: ParticipantStatus, data: any, conversationId?: string) => void;
617
628
  /**
618
629
  * Разрешения на доступы были запрошены в браузере
619
630
  */
@@ -625,56 +636,56 @@ export type ParamsObject = {
625
636
  /**
626
637
  * Пользователь отключился от звонка
627
638
  */
628
- onRemoteRemoved?: (userId: ExternalParticipantId, markers: ExternalParticipantListMarkers | null) => void;
639
+ onRemoteRemoved?: (userId: ExternalParticipantId, markers: ExternalParticipantListMarkers | null, conversationId?: string) => void;
629
640
  /**
630
641
  * Изменилось состояние звонка
631
642
  */
632
- onCallState?: (isCallActive: boolean, canAddParticipants: boolean, conversation: ConversationData) => void;
643
+ onCallState?: (isCallActive: boolean, canAddParticipants: boolean, conversation: ConversationData, conversationId?: string) => void;
633
644
  /**
634
645
  * Изменилось состояние камеры или микрофона
635
646
  */
636
- onDeviceSwitched?: (mediaOption: MediaOption, enabled: boolean) => void;
647
+ onDeviceSwitched?: (mediaOption: MediaOption, enabled: boolean, conversationId?: string) => void;
637
648
  /**
638
649
  * Изменились состояния устройств пользователя или разрешения включать камеру/микрофон
639
650
  */
640
- 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;
651
+ 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;
641
652
  /**
642
653
  * Изменились роли собеседника в звонке
643
654
  */
644
- onRolesChanged?: (userId: ExternalParticipantId, roles: UserRole[], isInitial?: boolean) => void;
655
+ onRolesChanged?: (userId: ExternalParticipantId, roles: UserRole[], isInitial?: boolean, conversationId?: string) => void;
645
656
  /**
646
657
  * Изменились свои роли в звонке
647
658
  */
648
- onLocalRolesChanged?: (roles: UserRole[], isInitial?: boolean) => void;
659
+ onLocalRolesChanged?: (roles: UserRole[], isInitial?: boolean, conversationId?: string) => void;
649
660
  /**
650
661
  * Закрепляет/открепляет собеседника для всех
651
662
  */
652
- onPinnedParticipant?: (userId: ExternalParticipantId, unpin: boolean, markers: ExternalParticipantListMarkers | null, roomId?: number | null) => void;
663
+ onPinnedParticipant?: (userId: ExternalParticipantId, unpin: boolean, markers: ExternalParticipantListMarkers | null, roomId?: number | null, conversationId?: string) => void;
653
664
  /**
654
665
  * Закрепляет/открепляет текущего пользователя у других собеседников
655
666
  */
656
- onLocalPin?: (unpin: boolean) => void;
667
+ onLocalPin?: (unpin: boolean, conversationId?: string) => void;
657
668
  /**
658
669
  * Изменились опции звонка
659
670
  */
660
- onOptionsChanged?: (options: ConversationOption[]) => void;
661
- onRateNeeded?: Function;
671
+ onOptionsChanged?: (options: ConversationOption[], conversationId?: string) => void;
672
+ onRateNeeded?: (conversationId?: string) => void;
662
673
  /**
663
674
  * Изменился говорящий в звонке
664
675
  */
665
- onSpeakerChanged?: (userId: ExternalParticipantId) => void;
676
+ onSpeakerChanged?: (userId: ExternalParticipantId, conversationId?: string) => void;
666
677
  /**
667
678
  * Громкость собеседников
668
679
  */
669
680
  onVolumesDetected?: (volumes: {
670
681
  uid: ExternalParticipantId;
671
682
  volume: number;
672
- }[]) => void;
683
+ }[], conversationId?: string) => void;
673
684
  /**
674
685
  * Громкость своего микрофона
675
686
  */
676
687
  onLocalVolume?: (volume: number, isMicEnabled: boolean) => void;
677
- onJoinStatus?: Function;
688
+ onJoinStatus?: (available: boolean, chatId: string, conversationId?: string) => void;
678
689
  /**
679
690
  * Звонок был завершен
680
691
  */
@@ -682,12 +693,12 @@ export type ParamsObject = {
682
693
  /**
683
694
  * Входящий звонок был принят мной
684
695
  */
685
- onCallAccepted?: () => void;
696
+ onCallAccepted?: (conversationId?: string) => void;
686
697
  /**
687
698
  * Исходящий звонок был принят кем-то
688
699
  * @param userId
689
700
  */
690
- onAcceptedCall?: (userId: ExternalParticipantId, capabilities: ParticipantCapabilities) => void;
701
+ onAcceptedCall?: (userId: ExternalParticipantId, capabilities: ParticipantCapabilities, conversationId?: string) => void;
691
702
  /**
692
703
  * Список устройств изменился
693
704
  */
@@ -704,25 +715,25 @@ export type ParamsObject = {
704
715
  /**
705
716
  * Получено сообщение чата
706
717
  */
707
- onChatMessage?: (message: string, from: ExternalParticipantId, direct: boolean) => void;
718
+ onChatMessage?: (message: string, from: ExternalParticipantId, direct: boolean, conversationId?: string) => void;
708
719
  /**
709
720
  * Получены данные от собеседника
710
721
  */
711
- onCustomData?: (data: JSONObject, from: ExternalParticipantId, direct: boolean) => void;
722
+ onCustomData?: (data: JSONObject, from: ExternalParticipantId, direct: boolean, conversationId?: string) => void;
712
723
  /**
713
724
  * Начата трансляция/запись звонка
714
725
  */
715
- onRecordStarted?: (initiator: ExternalParticipantId, movieId: number, startTime: number, type: 'STREAM' | 'RECORD', externalMovieId?: string, externalOwnerId?: string, roomId?: number | null) => void;
726
+ onRecordStarted?: (initiator: ExternalParticipantId, movieId: number, startTime: number, type: 'STREAM' | 'RECORD', externalMovieId?: string, externalOwnerId?: string, roomId?: number | null, conversationId?: string) => void;
716
727
  /**
717
728
  * Закончена трансляция/запись звонка
718
729
  */
719
- onRecordStopped?: (roomId: number | null, stopBy: ExternalParticipantId | null) => void;
730
+ onRecordStopped?: (roomId: number | null, stopBy: ExternalParticipantId | null, conversationId?: string) => void;
720
731
  /**
721
732
  * Состояние своей сети
722
733
  *
723
734
  * @param rating Оценка качества соединения от 0 до 1
724
735
  */
725
- onLocalNetworkStatusChanged?: (rating: number) => void;
736
+ onLocalNetworkStatusChanged?: (rating: number, conversationId?: string) => void;
726
737
  /**
727
738
  * Состояние сети участников
728
739
  *
@@ -731,7 +742,7 @@ export type ParamsObject = {
731
742
  onNetworkStatusChanged?: (status: {
732
743
  uid: ExternalParticipantId;
733
744
  rating: number;
734
- }[]) => void;
745
+ }[], conversationId?: string) => void;
735
746
  /**
736
747
  * Получено отладочное сообщение. Работает только при выключенном режиме отладки
737
748
  */
@@ -759,74 +770,74 @@ export type ParamsObject = {
759
770
  * @param addedParticipantIds Некоторое количество участников, добавленных в зал
760
771
  * @param removedParticipantIds Некоторое количество участников, убранных из зала
761
772
  */
762
- onChatRoomUpdated?: (eventType: ChatRoomEventType, totalCount: number, firstParticipants: ExternalId[], addedParticipantIds: ExternalId[], removedParticipantIds: ExternalId[]) => void;
773
+ onChatRoomUpdated?: (eventType: ChatRoomEventType, totalCount: number, firstParticipants: ExternalId[], addedParticipantIds: ExternalId[], removedParticipantIds: ExternalId[], conversationId?: string) => void;
763
774
  /**
764
775
  * Получен микшированный аудио стрим.
765
776
  * @hidden
766
777
  * @param stream стрим от WebRTC
767
778
  */
768
- onRemoteMixedAudioStream?: (stream: MediaStream) => void;
779
+ onRemoteMixedAudioStream?: (stream: MediaStream, conversationId?: string) => void;
769
780
  /**
770
781
  * Получена новая ссылка на звонок
771
782
  * @param joinLink токен присоединения к звонку
772
783
  */
773
- onJoinLinkChanged?: (joinLink: string) => void;
784
+ onJoinLinkChanged?: (joinLink: string, conversationId?: string) => void;
774
785
  /**
775
786
  * Получено обновление списка сессионных залов
776
787
  * @param updates список обновлений по залам
777
788
  */
778
- onRoomsUpdated?: (updates: Partial<Record<RoomsEventType, RoomsUpdate>>) => void;
789
+ onRoomsUpdated?: (updates: Partial<Record<RoomsEventType, RoomsUpdate>>, conversationId?: string) => void;
779
790
  /**
780
791
  * Получено обновление сессионных зало
781
792
  * @param eventTypes список событий
782
793
  * @param roomId номер сессионного зала
783
794
  * @param room сессионный зал
784
795
  */
785
- onRoomUpdated?: (eventTypes: RoomsEventType[], roomId: number, room: Room | null, deactivate: boolean | null) => void;
796
+ onRoomUpdated?: (eventTypes: RoomsEventType[], roomId: number, room: Room | null, deactivate: boolean | null, conversationId?: string) => void;
786
797
  /**
787
798
  * Получение обновление списка участников в сессионном зале
788
799
  * @param update обновление списка участников
789
800
  */
790
- onRoomParticipantsUpdated?: (update: RoomParticipantUpdate) => void;
801
+ onRoomParticipantsUpdated?: (update: RoomParticipantUpdate, conversationId?: string) => void;
791
802
  /**
792
803
  * Получение информации о смене зала
793
804
  * @param roomId номер сессионного зала
794
805
  */
795
- onRoomSwitched?: (roomId: number | null) => void;
806
+ onRoomSwitched?: (roomId: number | null, conversationId?: string) => void;
796
807
  /**
797
808
  * Установить id сессионного зала на старте звонка
798
809
  * @param roomId номер сессионного зала
799
810
  */
800
- onRoomStart?: (roomId: number | null) => void;
811
+ onRoomStart?: (roomId: number | null, conversationId?: string) => void;
801
812
  /**
802
813
  * Получены новые реакции в звонке
803
814
  * @param feedback массив с реакциями
804
815
  */
805
- onFeedback?: (feedback: IFeedbackExternal[], roomId: number | null) => void;
816
+ onFeedback?: (feedback: IFeedbackExternal[], roomId: number | null, conversationId?: string) => void;
806
817
  /**
807
818
  * Изменился список ролей, которым доступны ConversationFeatures
808
819
  *
809
820
  * @param featuresPerRole Объект вида ключ: ConversationFeature = значение: UserRole[]
810
821
  * (если ключ фичи отсутствует, или в ролях пустой массив, считаем фичу доступной для всех пользователей)
811
822
  */
812
- onFeaturesPerRoleChanged?: (featuresPerRole: IFeaturesPerRole) => void;
823
+ onFeaturesPerRoleChanged?: (featuresPerRole: IFeaturesPerRole, conversationId?: string) => void;
813
824
  /**
814
825
  * Изменился Vmoji-аватар пользователя
815
826
  * @param externalId Id пользователя, у которого изменился аватар
816
827
  */
817
- onParticipantVmojiUpdate?: (externalId: ExternalParticipantId) => void;
828
+ onParticipantVmojiUpdate?: (externalId: ExternalParticipantId, conversationId?: string) => void;
818
829
  /**
819
830
  * Начата текстовая расшифровка звонка
820
831
  * @param initiatorId Id пользователя, запустившего расшифровку звонка
821
832
  * @param movieId Id расшифровки
822
833
  * @param roomId Id комнаты
823
834
  */
824
- onAsrStarted?: (initiatorId: ExternalParticipantId, movieId: number, roomId: number | null) => void;
835
+ onAsrStarted?: (initiatorId: ExternalParticipantId, movieId: number, roomId: number | null, conversationId?: string) => void;
825
836
  /**
826
837
  * Закончена текстовая расшифровка звонка
827
838
  * @param roomId Id комнаты
828
839
  */
829
- onAsrStopped?: (roomId: number | null) => void;
840
+ onAsrStopped?: (roomId: number | null, conversationId?: string) => void;
830
841
  /**
831
842
  * Получена расшифровка речи
832
843
  * @param id Id пользователя, произнесшего реплику
@@ -834,47 +845,53 @@ export type ParamsObject = {
834
845
  * @param timestamp Время расшифровки
835
846
  * @param duration Длительность реплики в расшифровке
836
847
  */
837
- onAsrTranscription?: (id: ExternalParticipantId, text: string, timestamp: number, duration: number) => void;
848
+ onAsrTranscription?: (id: ExternalParticipantId, text: string, timestamp: number, duration: number, conversationId?: string) => void;
838
849
  /**
839
850
  * Установка начальных параметров текстовой расшифровки звонка. (Используется при входе в звонок/ смене комнаты)
840
851
  * @param data Начальная информация по ASR
841
852
  * @param roomId Id Комнаты
842
853
  */
843
- onAsrSet?: (data: IAsrData | null, roomId: number | null) => void;
854
+ onAsrSet?: (data: IAsrData | null, roomId: number | null, conversationId?: string) => void;
844
855
  /**
845
856
  * Админ начал/остановил совместное использование стороннего web-приложения
846
857
  * @param userId id участника-админа
847
858
  * @param sharedUrl url страницы
848
859
  */
849
- onRemoteSharedUrl?: (userId: ExternalParticipantId, sharedUrl: string | undefined, roomId: IRoomId) => void;
860
+ onRemoteSharedUrl?: (userId: ExternalParticipantId, sharedUrl: string | undefined, roomId: IRoomId, conversationId?: string) => void;
850
861
  /**
851
862
  * Изменился id участника (деанонимизация)
852
863
  * @param prevId
853
864
  * @param newId
854
865
  */
855
- onParticipantIdChanged?: (prevId: ExternalParticipantId, newId: ExternalParticipantId) => void;
866
+ onParticipantIdChanged?: (prevId: ExternalParticipantId, newId: ExternalParticipantId, conversationId?: string) => void;
856
867
  /**
857
868
  * Предложение включить режим автоматического отключения приёма видео
858
869
  * в плохой сети
859
870
  * @param bandwidth текущая полоса пропускания, kbps
860
871
  */
861
- onVideoSuspendSuggest?: (bandwidth: number) => void;
872
+ onVideoSuspendSuggest?: (bandwidth: number, conversationId?: string) => void;
862
873
  /**
863
874
  * Одобрено повышение пользователя в зале ожидания/зале в режиме Audience
864
875
  *
865
876
  * @param adminParticipantId админ, одобривший повышение
866
877
  */
867
- onPromotionApproved?: (adminParticipantId: ExternalParticipantId) => void;
878
+ onPromotionApproved?: (adminParticipantId: ExternalParticipantId, conversationId?: string) => void;
868
879
  /**
869
880
  * Участник повышен/разжалован в зале ожидания/зале в режиме Audience
870
881
  *
871
882
  * @param demoted участник разжалован
872
883
  */
873
- onPromoted?: (demoted: boolean) => void;
884
+ onPromoted?: (demoted: boolean, conversationId?: string) => void;
885
+ /**
886
+ * Активным установлен определенный звонок
887
+ *
888
+ * @param conversationId ID звонка
889
+ */
890
+ onCallActive?: (conversationId: string) => void;
874
891
  /**
875
892
  * Собеседник подключился к сигналлингу
876
893
  */
877
- onPeerRegistered?: () => void;
894
+ onPeerRegistered?: (conversationId?: string) => void;
878
895
  };
879
896
  export default abstract class Params {
880
897
  private static _params;
@@ -925,6 +942,7 @@ export default abstract class Params {
925
942
  static get waitResponseDelay(): number;
926
943
  static get waitMessageDelay(): number;
927
944
  static get waitAnotherTabDelay(): number;
945
+ static get calleeUnavailableWaitingTime(): number | undefined;
928
946
  static get debugLog(): boolean;
929
947
  static get forceRelayPolicy(): boolean;
930
948
  static set forceRelayPolicy(value: boolean);
@@ -964,7 +982,6 @@ export default abstract class Params {
964
982
  static get networkStatisticsInterval(): number;
965
983
  static get perfStatReportEnabled(): boolean;
966
984
  static get callStatReportEnabled(): boolean;
967
- static get clientEventsLoggingEnabled(): boolean;
968
985
  static get enableLogPerfStatReport(): boolean;
969
986
  static get asrDataChannel(): boolean;
970
987
  static get consumerScreenDataChannelPacketSize(): number;
@@ -984,6 +1001,7 @@ export default abstract class Params {
984
1001
  static get addParticipant(): boolean;
985
1002
  static get waitForAdminInGroupCalls(): boolean;
986
1003
  static get hold(): boolean;
1004
+ static get maxParallelCalls(): number;
987
1005
  static get participantListChunkInitIndex(): number;
988
1006
  static get participantListChunkInitCount(): number | null;
989
1007
  static get filterObservers(): boolean;
@@ -1007,6 +1025,7 @@ export default abstract class Params {
1007
1025
  static get webtransport(): boolean;
1008
1026
  static get webtransportFF(): boolean;
1009
1027
  static get transparentAudio(): boolean;
1028
+ static get enableSessionStateUpdates(): boolean;
1010
1029
  static toJSON(): {
1011
1030
  apiKey: string;
1012
1031
  apiEnv: string;
@@ -1042,5 +1061,6 @@ export default abstract class Params {
1042
1061
  webtransport: boolean;
1043
1062
  webtransportFF: boolean;
1044
1063
  transparentAudio: boolean;
1064
+ enableSessionStateUpdates: boolean;
1045
1065
  };
1046
1066
  }
@@ -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;
@@ -18,7 +18,7 @@ export type ExternalUserId = string;
18
18
  export declare namespace ExternalIdUtils {
19
19
  function fromIds(ids: ExternalUserId[] | ExternalId[]): ExternalId[];
20
20
  function fromId(id: ExternalUserId, type?: ExternalIdType, deviceIdx?: number): ExternalParticipantId;
21
- function fromSignalingParticipant(participant: SignalingMessage.Participant, useDecorative?: boolean, fallbackToNonDecorative?: boolean): ExternalParticipantId | undefined;
21
+ function fromSignalingParticipant(participant: SignalingMessage.Participant, useDecorative?: boolean): ExternalParticipantId | undefined;
22
22
  function fromSignaling(signalingId: SignalingMessage.ExternalId, deviceIdx?: number): ExternalParticipantId;
23
23
  function toSignaling(externalId: ExternalId): string;
24
24
  function toString(externalId: ExternalId): ExternalIdString;
@@ -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;
@@ -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'>>)[];
@@ -323,6 +325,13 @@ declare namespace SignalingMessage {
323
325
  export interface SpeakerChanged extends Notification {
324
326
  speaker: ParticipantId;
325
327
  }
328
+ export interface SessionState extends Notification {
329
+ connected: boolean;
330
+ participantId: OkUserId;
331
+ participantType: UserType;
332
+ deviceIdx?: number;
333
+ markers?: ParticipantListMarkers;
334
+ }
326
335
  export interface OptionsChanged extends Notification {
327
336
  options: ConversationOption[];
328
337
  }
@@ -456,6 +465,10 @@ declare namespace SignalingMessage {
456
465
  export interface VideoSuspendSuggest extends Notification {
457
466
  bandwidth: number;
458
467
  }
468
+ export interface Hold extends Notification {
469
+ participantId: ParticipantId;
470
+ hold: boolean;
471
+ }
459
472
  export {};
460
473
  }
461
474
  export default SignalingMessage;