@vkontakte/calls-sdk 2.8.11-dev.3de63af6.0 → 2.8.11-dev.41bc9113.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.
@@ -306,6 +306,12 @@ export type ParamsObject = {
306
306
  * _По умолчанию: `30`_
307
307
  */
308
308
  videoTracksCount: number;
309
+ /**
310
+ * Минимальный интервал отправки diff для requestDisplayLayout в миллисекундах.
311
+ *
312
+ * _По умолчанию: `250`_
313
+ */
314
+ requestDisplayLayoutThrottleMs: number;
309
315
  /** @hidden */
310
316
  movieShare: boolean;
311
317
  /** @hidden */
@@ -343,7 +349,14 @@ export type ParamsObject = {
343
349
  * Включает поддержку режима WAIT_FOR_ADMIN в звонках.
344
350
  */
345
351
  waitForAdminInGroupCalls: boolean;
352
+ /**
353
+ * Включает поддержку удержания звонка
354
+ */
346
355
  hold: boolean;
356
+ /**
357
+ * Максимальное количество параллельных звонков
358
+ */
359
+ maxParallelCalls: number;
347
360
  /**
348
361
  * Индекс участника для первого chunk'а который придет при установке соединения с сервером
349
362
  *
@@ -490,104 +503,104 @@ export type ParamsObject = {
490
503
  /**
491
504
  * Получен локальный стрим с камеры/микрофона
492
505
  */
493
- onLocalStream?: (stream: MediaStream | null, mediaSettings: MediaSettings) => void;
506
+ onLocalStream?: (stream: MediaStream | null, mediaSettings: MediaSettings, conversationId?: string) => void;
494
507
  /**
495
508
  * Локальный стрим изменился
496
509
  */
497
- onLocalStreamUpdate?: (mediaSettings: MediaSettings, kind: MediaTrackKind) => void;
510
+ onLocalStreamUpdate?: (mediaSettings: MediaSettings, kind: MediaTrackKind, conversationId?: string) => void;
498
511
  /**
499
512
  * Локальный стрим с экрана добавлен/удалён
500
513
  */
501
- onScreenStream?: (stream: MediaStream | null, mediaSettings: MediaSettings) => void;
514
+ onScreenStream?: (stream: MediaStream | null, mediaSettings: MediaSettings, conversationId?: string) => void;
502
515
  /**
503
516
  * Локальный стрим вимоджи добавлен/удалён
504
517
  */
505
- onVmojiStream?: (stream: MediaStream | null, mediaSettings: MediaSettings) => void;
518
+ onVmojiStream?: (stream: MediaStream | null, mediaSettings: MediaSettings, conversationId?: string) => void;
506
519
  /**
507
520
  * Произошла ошибка вимоджи
508
521
  */
509
- onVmojiError?: (error: VmojiError) => void;
522
+ onVmojiError?: (error: VmojiError, conversationId?: string) => void;
510
523
  /**
511
524
  * Изменился статус локального соединения
512
525
  */
513
- onLocalStatus?: (status: ParticipantStatus) => void;
526
+ onLocalStatus?: (status: ParticipantStatus, conversationId?: string) => void;
514
527
  /**
515
528
  * Получен стрим собеседника.
516
529
  * Если сервер закончил стримить собеседника, вместо стрима будет передан null
517
530
  */
518
- onRemoteStream?: (userId: ExternalParticipantId, stream: MediaStream | null) => void;
531
+ onRemoteStream?: (userId: ExternalParticipantId, stream: MediaStream | null, conversationId?: string) => void;
519
532
  /**
520
533
  * Cтрим собеседника приостановлен/возобновлен.
521
534
  */
522
- onRemoteStreamSuspended?: (userId: ExternalParticipantId, mediaType: MediaType, suspended: boolean) => void;
535
+ onRemoteStreamSuspended?: (userId: ExternalParticipantId, mediaType: MediaType, suspended: boolean, conversationId?: string) => void;
523
536
  /**
524
537
  * Получен стрим с экрана собеседника.
525
538
  * Если сервер закончил стримить экран собеседника, вместо стрима будет передан null
526
539
  */
527
- onRemoteScreenStream?: (userId: ExternalParticipantId, stream: MediaStream | null) => void;
540
+ onRemoteScreenStream?: (userId: ExternalParticipantId, stream: MediaStream | null, conversationId?: string) => void;
528
541
  /**
529
542
  * Получен стрим вимоджи собеседника.
530
543
  * Если сервер закончил стримить вимоджи собеседника, вместо стрима будет передан null
531
544
  */
532
- onRemoteVmojiStream?: (userId: ExternalParticipantId, stream: MediaStream | null) => void;
545
+ onRemoteVmojiStream?: (userId: ExternalParticipantId, stream: MediaStream | null, conversationId?: string) => void;
533
546
  /**
534
547
  * Получен стрим трансляция или мувик от собеседника.
535
548
  * Если сервер закончил стримить экран собеседника, вместо стрима будет передан null
536
549
  */
537
- onRemoteLive?: (userId: ExternalParticipantId, data: IOnRemoteMovieData) => void;
550
+ onRemoteLive?: (userId: ExternalParticipantId, data: IOnRemoteMovieData, conversationId?: string) => void;
538
551
  /**
539
552
  * Получен собственный стрим трансляция или мувик.
540
553
  * Если сервер закончил стримить экран собеседника, вместо стрима будет передан null
541
554
  */
542
- onLocalLive?: (userId: ExternalParticipantId, data: IOnRemoteMovieData) => void;
555
+ onLocalLive?: (userId: ExternalParticipantId, data: IOnRemoteMovieData, conversationId?: string) => void;
543
556
  /**
544
557
  * Получено обновление стрима или лайва от собеседника.
545
558
  */
546
- onRemoteLiveUpdate?: (userId: ExternalParticipantId, data: ISharedMovieState) => void;
559
+ onRemoteLiveUpdate?: (userId: ExternalParticipantId, data: ISharedMovieState, conversationId?: string) => void;
547
560
  /**
548
561
  * Получено обновление собственного стрима или лайва.
549
562
  */
550
- onLocalLiveUpdate?: (userId: ExternalParticipantId, data: ISharedMovieState) => void;
563
+ onLocalLiveUpdate?: (userId: ExternalParticipantId, data: ISharedMovieState, conversationId?: string) => void;
551
564
  /**
552
565
  * Начат звонок
553
566
  */
554
- onConversation?: (userId: ExternalParticipantId, mediaModifiers: MediaModifiers, muteStates: MuteStates, participants: ExternalParticipant[], rooms?: Rooms) => void;
567
+ onConversation?: (userId: ExternalParticipantId, mediaModifiers: MediaModifiers, muteStates: MuteStates, participants: ExternalParticipant[], rooms?: Rooms, conversationId?: string) => void;
555
568
  /**
556
569
  * Начальный список участников для постраничного звонка
557
570
  */
558
- onConversationParticipantListChunk?: (chunk: ExternalParticipantListChunk) => void;
571
+ onConversationParticipantListChunk?: (chunk: ExternalParticipantListChunk, conversationId?: string) => void;
559
572
  /**
560
573
  * Изменились данные стрима собеседника
561
574
  */
562
- onRemoteMediaSettings?: (userId: ExternalParticipantId, mediaSettings: MediaSettings, markers: ExternalParticipantListMarkers | null) => void;
575
+ onRemoteMediaSettings?: (userId: ExternalParticipantId, mediaSettings: MediaSettings, markers: ExternalParticipantListMarkers | null, conversationId?: string) => void;
563
576
  /**
564
577
  * Изменились данные стрима собеседника
565
578
  */
566
- onLocalMediaSettings?: (userId: ExternalParticipantId, mediaSettings: MediaSettings) => void;
579
+ onLocalMediaSettings?: (userId: ExternalParticipantId, mediaSettings: MediaSettings, conversationId?: string) => void;
567
580
  /**
568
581
  * Полученны данные по стримам (лайв/мувик) от собеседника
569
582
  */
570
- onRemoteSharedMovieInfo?: (userId: ExternalParticipantId, sharedMovieInfo: ISharedMovieInfo, roomId?: IRoomId) => void;
583
+ onRemoteSharedMovieInfo?: (userId: ExternalParticipantId, sharedMovieInfo: ISharedMovieInfo, roomId?: IRoomId, conversationId?: string) => void;
571
584
  /**
572
585
  * Полученны данные по остановленным стримам (лайв/мувик) от собеседника
573
586
  */
574
- onRemoteSharedMovieStoppedInfo?: (userId: ExternalParticipantId, sharedMovieStoppedInfo: ISharedMovieStoppedInfo, roomId?: IRoomId) => void;
587
+ onRemoteSharedMovieStoppedInfo?: (userId: ExternalParticipantId, sharedMovieStoppedInfo: ISharedMovieStoppedInfo, roomId?: IRoomId, conversationId?: string) => void;
575
588
  /**
576
589
  * Полученны данные по собственным стримам (лайв/мувик)
577
590
  */
578
- onLocalSharedMovieInfo?: (userId: ExternalParticipantId, sharedMovieInfo: ISharedMovieInfo, roomId?: IRoomId) => void;
591
+ onLocalSharedMovieInfo?: (userId: ExternalParticipantId, sharedMovieInfo: ISharedMovieInfo, roomId?: IRoomId, conversationId?: string) => void;
579
592
  /**
580
593
  * Полученны данные по собственным остановленным стримам (лайв/мувик)
581
594
  */
582
- onLocalSharedMovieStoppedInfo?: (userId: ExternalParticipantId, sharedMovieStoppedInfo: ISharedMovieStoppedInfo, roomId?: IRoomId) => void;
595
+ onLocalSharedMovieStoppedInfo?: (userId: ExternalParticipantId, sharedMovieStoppedInfo: ISharedMovieStoppedInfo, roomId?: IRoomId, conversationId?: string) => void;
583
596
  /**
584
597
  * Добавили участника
585
598
  */
586
- onParticipantAdded?: (userId: ExternalParticipantId, markers: ExternalParticipantListMarkers | null) => void;
599
+ onParticipantAdded?: (userId: ExternalParticipantId, markers: ExternalParticipantListMarkers | null, conversationId?: string) => void;
587
600
  /**
588
601
  * Участник присоединился к звонку
589
602
  */
590
- onParticipantJoined?: (userId: ExternalParticipantId, markers: ExternalParticipantListMarkers) => void;
603
+ onParticipantJoined?: (userId: ExternalParticipantId, markers: ExternalParticipantListMarkers, conversationId?: string) => void;
591
604
  /**
592
605
  * Получены данные по изменению локальных состояний со стороны админа
593
606
  * Например, принудительно опущена рука
@@ -595,19 +608,19 @@ export type ParamsObject = {
595
608
  * @param participantState Полный объект состояния участника, полученный от SDK/сервера.
596
609
  * @param global `true` – действие глобальное (для всех участников), `false` – действие локальное (только у текущего пользователя).
597
610
  */
598
- onLocalParticipantState?: (participantState: ParticipantStateMapped, global: boolean) => void;
611
+ onLocalParticipantState?: (participantState: ParticipantStateMapped, global: boolean, conversationId?: string) => void;
599
612
  /**
600
613
  * Изменились данные состояний собеседника
601
614
  */
602
- onRemoteParticipantState?: (userId: ExternalParticipantId, participantState: ParticipantStateMapped, markers: ExternalParticipantListMarkers | null) => void;
615
+ onRemoteParticipantState?: (userId: ExternalParticipantId, participantState: ParticipantStateMapped, markers: ExternalParticipantListMarkers | null, conversationId?: string) => void;
603
616
  /**
604
617
  * Изменились данные состояний нескольких собеседников
605
618
  */
606
- onRemoteParticipantsState?: (stateList: ParticipantsStateList, roomId?: IRoomId) => void;
619
+ onRemoteParticipantsState?: (stateList: ParticipantsStateList, roomId?: IRoomId, conversationId?: string) => void;
607
620
  /**
608
621
  * Изменился статус соединения собеседников
609
622
  */
610
- onRemoteStatus?: (userIds: ExternalParticipantId[], status: ParticipantStatus, data: any) => void;
623
+ onRemoteStatus?: (userIds: ExternalParticipantId[], status: ParticipantStatus, data: any, conversationId?: string) => void;
611
624
  /**
612
625
  * Разрешения на доступы были запрошены в браузере
613
626
  */
@@ -619,56 +632,56 @@ export type ParamsObject = {
619
632
  /**
620
633
  * Пользователь отключился от звонка
621
634
  */
622
- onRemoteRemoved?: (userId: ExternalParticipantId, markers: ExternalParticipantListMarkers | null) => void;
635
+ onRemoteRemoved?: (userId: ExternalParticipantId, markers: ExternalParticipantListMarkers | null, conversationId?: string) => void;
623
636
  /**
624
637
  * Изменилось состояние звонка
625
638
  */
626
- onCallState?: (isCallActive: boolean, canAddParticipants: boolean, conversation: ConversationData) => void;
639
+ onCallState?: (isCallActive: boolean, canAddParticipants: boolean, conversation: ConversationData, conversationId?: string) => void;
627
640
  /**
628
641
  * Изменилось состояние камеры или микрофона
629
642
  */
630
- onDeviceSwitched?: (mediaOption: MediaOption, enabled: boolean) => void;
643
+ onDeviceSwitched?: (mediaOption: MediaOption, enabled: boolean, conversationId?: string) => void;
631
644
  /**
632
645
  * Изменились состояния устройств пользователя или разрешения включать камеру/микрофон
633
646
  */
634
- 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;
647
+ 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;
635
648
  /**
636
649
  * Изменились роли собеседника в звонке
637
650
  */
638
- onRolesChanged?: (userId: ExternalParticipantId, roles: UserRole[], isInitial?: boolean) => void;
651
+ onRolesChanged?: (userId: ExternalParticipantId, roles: UserRole[], isInitial?: boolean, conversationId?: string) => void;
639
652
  /**
640
653
  * Изменились свои роли в звонке
641
654
  */
642
- onLocalRolesChanged?: (roles: UserRole[], isInitial?: boolean) => void;
655
+ onLocalRolesChanged?: (roles: UserRole[], isInitial?: boolean, conversationId?: string) => void;
643
656
  /**
644
657
  * Закрепляет/открепляет собеседника для всех
645
658
  */
646
- onPinnedParticipant?: (userId: ExternalParticipantId, unpin: boolean, markers: ExternalParticipantListMarkers | null, roomId?: number | null) => void;
659
+ onPinnedParticipant?: (userId: ExternalParticipantId, unpin: boolean, markers: ExternalParticipantListMarkers | null, roomId?: number | null, conversationId?: string) => void;
647
660
  /**
648
661
  * Закрепляет/открепляет текущего пользователя у других собеседников
649
662
  */
650
- onLocalPin?: (unpin: boolean) => void;
663
+ onLocalPin?: (unpin: boolean, conversationId?: string) => void;
651
664
  /**
652
665
  * Изменились опции звонка
653
666
  */
654
- onOptionsChanged?: (options: ConversationOption[]) => void;
655
- onRateNeeded?: Function;
667
+ onOptionsChanged?: (options: ConversationOption[], conversationId?: string) => void;
668
+ onRateNeeded?: (conversationId?: string) => void;
656
669
  /**
657
670
  * Изменился говорящий в звонке
658
671
  */
659
- onSpeakerChanged?: (userId: ExternalParticipantId) => void;
672
+ onSpeakerChanged?: (userId: ExternalParticipantId, conversationId?: string) => void;
660
673
  /**
661
674
  * Громкость собеседников
662
675
  */
663
676
  onVolumesDetected?: (volumes: {
664
677
  uid: ExternalParticipantId;
665
678
  volume: number;
666
- }[]) => void;
679
+ }[], conversationId?: string) => void;
667
680
  /**
668
681
  * Громкость своего микрофона
669
682
  */
670
683
  onLocalVolume?: (volume: number, isMicEnabled: boolean) => void;
671
- onJoinStatus?: Function;
684
+ onJoinStatus?: (available: boolean, chatId: string, conversationId?: string) => void;
672
685
  /**
673
686
  * Звонок был завершен
674
687
  */
@@ -676,12 +689,12 @@ export type ParamsObject = {
676
689
  /**
677
690
  * Входящий звонок был принят мной
678
691
  */
679
- onCallAccepted?: () => void;
692
+ onCallAccepted?: (conversationId?: string) => void;
680
693
  /**
681
694
  * Исходящий звонок был принят кем-то
682
695
  * @param userId
683
696
  */
684
- onAcceptedCall?: (userId: ExternalParticipantId, capabilities: ParticipantCapabilities) => void;
697
+ onAcceptedCall?: (userId: ExternalParticipantId, capabilities: ParticipantCapabilities, conversationId?: string) => void;
685
698
  /**
686
699
  * Список устройств изменился
687
700
  */
@@ -698,25 +711,25 @@ export type ParamsObject = {
698
711
  /**
699
712
  * Получено сообщение чата
700
713
  */
701
- onChatMessage?: (message: string, from: ExternalParticipantId, direct: boolean) => void;
714
+ onChatMessage?: (message: string, from: ExternalParticipantId, direct: boolean, conversationId?: string) => void;
702
715
  /**
703
716
  * Получены данные от собеседника
704
717
  */
705
- onCustomData?: (data: JSONObject, from: ExternalParticipantId, direct: boolean) => void;
718
+ onCustomData?: (data: JSONObject, from: ExternalParticipantId, direct: boolean, conversationId?: string) => void;
706
719
  /**
707
720
  * Начата трансляция/запись звонка
708
721
  */
709
- onRecordStarted?: (initiator: ExternalParticipantId, movieId: number, startTime: number, type: 'STREAM' | 'RECORD', externalMovieId?: string, externalOwnerId?: string, roomId?: number | null) => void;
722
+ onRecordStarted?: (initiator: ExternalParticipantId, movieId: number, startTime: number, type: 'STREAM' | 'RECORD', externalMovieId?: string, externalOwnerId?: string, roomId?: number | null, conversationId?: string) => void;
710
723
  /**
711
724
  * Закончена трансляция/запись звонка
712
725
  */
713
- onRecordStopped?: (roomId: number | null, stopBy: ExternalParticipantId | null) => void;
726
+ onRecordStopped?: (roomId: number | null, stopBy: ExternalParticipantId | null, conversationId?: string) => void;
714
727
  /**
715
728
  * Состояние своей сети
716
729
  *
717
730
  * @param rating Оценка качества соединения от 0 до 1
718
731
  */
719
- onLocalNetworkStatusChanged?: (rating: number) => void;
732
+ onLocalNetworkStatusChanged?: (rating: number, conversationId?: string) => void;
720
733
  /**
721
734
  * Состояние сети участников
722
735
  *
@@ -725,7 +738,7 @@ export type ParamsObject = {
725
738
  onNetworkStatusChanged?: (status: {
726
739
  uid: ExternalParticipantId;
727
740
  rating: number;
728
- }[]) => void;
741
+ }[], conversationId?: string) => void;
729
742
  /**
730
743
  * Получено отладочное сообщение. Работает только при выключенном режиме отладки
731
744
  */
@@ -753,74 +766,74 @@ export type ParamsObject = {
753
766
  * @param addedParticipantIds Некоторое количество участников, добавленных в зал
754
767
  * @param removedParticipantIds Некоторое количество участников, убранных из зала
755
768
  */
756
- onChatRoomUpdated?: (eventType: ChatRoomEventType, totalCount: number, firstParticipants: ExternalId[], addedParticipantIds: ExternalId[], removedParticipantIds: ExternalId[]) => void;
769
+ onChatRoomUpdated?: (eventType: ChatRoomEventType, totalCount: number, firstParticipants: ExternalId[], addedParticipantIds: ExternalId[], removedParticipantIds: ExternalId[], conversationId?: string) => void;
757
770
  /**
758
771
  * Получен микшированный аудио стрим.
759
772
  * @hidden
760
773
  * @param stream стрим от WebRTC
761
774
  */
762
- onRemoteMixedAudioStream?: (stream: MediaStream) => void;
775
+ onRemoteMixedAudioStream?: (stream: MediaStream, conversationId?: string) => void;
763
776
  /**
764
777
  * Получена новая ссылка на звонок
765
778
  * @param joinLink токен присоединения к звонку
766
779
  */
767
- onJoinLinkChanged?: (joinLink: string) => void;
780
+ onJoinLinkChanged?: (joinLink: string, conversationId?: string) => void;
768
781
  /**
769
782
  * Получено обновление списка сессионных залов
770
783
  * @param updates список обновлений по залам
771
784
  */
772
- onRoomsUpdated?: (updates: Partial<Record<RoomsEventType, RoomsUpdate>>) => void;
785
+ onRoomsUpdated?: (updates: Partial<Record<RoomsEventType, RoomsUpdate>>, conversationId?: string) => void;
773
786
  /**
774
787
  * Получено обновление сессионных зало
775
788
  * @param eventTypes список событий
776
789
  * @param roomId номер сессионного зала
777
790
  * @param room сессионный зал
778
791
  */
779
- onRoomUpdated?: (eventTypes: RoomsEventType[], roomId: number, room: Room | null, deactivate: boolean | null) => void;
792
+ onRoomUpdated?: (eventTypes: RoomsEventType[], roomId: number, room: Room | null, deactivate: boolean | null, conversationId?: string) => void;
780
793
  /**
781
794
  * Получение обновление списка участников в сессионном зале
782
795
  * @param update обновление списка участников
783
796
  */
784
- onRoomParticipantsUpdated?: (update: RoomParticipantUpdate) => void;
797
+ onRoomParticipantsUpdated?: (update: RoomParticipantUpdate, conversationId?: string) => void;
785
798
  /**
786
799
  * Получение информации о смене зала
787
800
  * @param roomId номер сессионного зала
788
801
  */
789
- onRoomSwitched?: (roomId: number | null) => void;
802
+ onRoomSwitched?: (roomId: number | null, conversationId?: string) => void;
790
803
  /**
791
804
  * Установить id сессионного зала на старте звонка
792
805
  * @param roomId номер сессионного зала
793
806
  */
794
- onRoomStart?: (roomId: number | null) => void;
807
+ onRoomStart?: (roomId: number | null, conversationId?: string) => void;
795
808
  /**
796
809
  * Получены новые реакции в звонке
797
810
  * @param feedback массив с реакциями
798
811
  */
799
- onFeedback?: (feedback: IFeedbackExternal[], roomId: number | null) => void;
812
+ onFeedback?: (feedback: IFeedbackExternal[], roomId: number | null, conversationId?: string) => void;
800
813
  /**
801
814
  * Изменился список ролей, которым доступны ConversationFeatures
802
815
  *
803
816
  * @param featuresPerRole Объект вида ключ: ConversationFeature = значение: UserRole[]
804
817
  * (если ключ фичи отсутствует, или в ролях пустой массив, считаем фичу доступной для всех пользователей)
805
818
  */
806
- onFeaturesPerRoleChanged?: (featuresPerRole: IFeaturesPerRole) => void;
819
+ onFeaturesPerRoleChanged?: (featuresPerRole: IFeaturesPerRole, conversationId?: string) => void;
807
820
  /**
808
821
  * Изменился Vmoji-аватар пользователя
809
822
  * @param externalId Id пользователя, у которого изменился аватар
810
823
  */
811
- onParticipantVmojiUpdate?: (externalId: ExternalParticipantId) => void;
824
+ onParticipantVmojiUpdate?: (externalId: ExternalParticipantId, conversationId?: string) => void;
812
825
  /**
813
826
  * Начата текстовая расшифровка звонка
814
827
  * @param initiatorId Id пользователя, запустившего расшифровку звонка
815
828
  * @param movieId Id расшифровки
816
829
  * @param roomId Id комнаты
817
830
  */
818
- onAsrStarted?: (initiatorId: ExternalParticipantId, movieId: number, roomId: number | null) => void;
831
+ onAsrStarted?: (initiatorId: ExternalParticipantId, movieId: number, roomId: number | null, conversationId?: string) => void;
819
832
  /**
820
833
  * Закончена текстовая расшифровка звонка
821
834
  * @param roomId Id комнаты
822
835
  */
823
- onAsrStopped?: (roomId: number | null) => void;
836
+ onAsrStopped?: (roomId: number | null, conversationId?: string) => void;
824
837
  /**
825
838
  * Получена расшифровка речи
826
839
  * @param id Id пользователя, произнесшего реплику
@@ -828,47 +841,53 @@ export type ParamsObject = {
828
841
  * @param timestamp Время расшифровки
829
842
  * @param duration Длительность реплики в расшифровке
830
843
  */
831
- onAsrTranscription?: (id: ExternalParticipantId, text: string, timestamp: number, duration: number) => void;
844
+ onAsrTranscription?: (id: ExternalParticipantId, text: string, timestamp: number, duration: number, conversationId?: string) => void;
832
845
  /**
833
846
  * Установка начальных параметров текстовой расшифровки звонка. (Используется при входе в звонок/ смене комнаты)
834
847
  * @param data Начальная информация по ASR
835
848
  * @param roomId Id Комнаты
836
849
  */
837
- onAsrSet?: (data: IAsrData | null, roomId: number | null) => void;
850
+ onAsrSet?: (data: IAsrData | null, roomId: number | null, conversationId?: string) => void;
838
851
  /**
839
852
  * Админ начал/остановил совместное использование стороннего web-приложения
840
853
  * @param userId id участника-админа
841
854
  * @param sharedUrl url страницы
842
855
  */
843
- onRemoteSharedUrl?: (userId: ExternalParticipantId, sharedUrl: string | undefined, roomId: IRoomId) => void;
856
+ onRemoteSharedUrl?: (userId: ExternalParticipantId, sharedUrl: string | undefined, roomId: IRoomId, conversationId?: string) => void;
844
857
  /**
845
858
  * Изменился id участника (деанонимизация)
846
859
  * @param prevId
847
860
  * @param newId
848
861
  */
849
- onParticipantIdChanged?: (prevId: ExternalParticipantId, newId: ExternalParticipantId) => void;
862
+ onParticipantIdChanged?: (prevId: ExternalParticipantId, newId: ExternalParticipantId, conversationId?: string) => void;
850
863
  /**
851
864
  * Предложение включить режим автоматического отключения приёма видео
852
865
  * в плохой сети
853
866
  * @param bandwidth текущая полоса пропускания, kbps
854
867
  */
855
- onVideoSuspendSuggest?: (bandwidth: number) => void;
868
+ onVideoSuspendSuggest?: (bandwidth: number, conversationId?: string) => void;
856
869
  /**
857
870
  * Одобрено повышение пользователя в зале ожидания/зале в режиме Audience
858
871
  *
859
872
  * @param adminParticipantId админ, одобривший повышение
860
873
  */
861
- onPromotionApproved?: (adminParticipantId: ExternalParticipantId) => void;
874
+ onPromotionApproved?: (adminParticipantId: ExternalParticipantId, conversationId?: string) => void;
862
875
  /**
863
876
  * Участник повышен/разжалован в зале ожидания/зале в режиме Audience
864
877
  *
865
878
  * @param demoted участник разжалован
866
879
  */
867
- onPromoted?: (demoted: boolean) => void;
880
+ onPromoted?: (demoted: boolean, conversationId?: string) => void;
881
+ /**
882
+ * Активным установлен определенный звонок
883
+ *
884
+ * @param conversationId ID звонка
885
+ */
886
+ onCallActive?: (conversationId: string) => void;
868
887
  /**
869
888
  * Собеседник подключился к сигналлингу
870
889
  */
871
- onPeerRegistered?: () => void;
890
+ onPeerRegistered?: (conversationId?: string) => void;
872
891
  };
873
892
  export default abstract class Params {
874
893
  private static _params;
@@ -969,6 +988,7 @@ export default abstract class Params {
969
988
  static get audioNack(): boolean;
970
989
  static get movieShare(): boolean;
971
990
  static get videoTracksCount(): number;
991
+ static get requestDisplayLayoutThrottleMs(): number;
972
992
  static get breakVideoPayloadTypes(): boolean;
973
993
  static get useCallsToContacts(): boolean;
974
994
  static get useParticipantListChunk(): boolean;
@@ -977,6 +997,7 @@ export default abstract class Params {
977
997
  static get addParticipant(): boolean;
978
998
  static get waitForAdminInGroupCalls(): boolean;
979
999
  static get hold(): boolean;
1000
+ static get maxParallelCalls(): number;
980
1001
  static get participantListChunkInitIndex(): number;
981
1002
  static get participantListChunkInitCount(): number | null;
982
1003
  static get filterObservers(): boolean;
@@ -1016,6 +1037,7 @@ export default abstract class Params {
1016
1037
  screenShareCongestionControl: boolean;
1017
1038
  screenShareCongestionControlThreshold: number;
1018
1039
  videoTracksCount: number;
1040
+ requestDisplayLayoutThrottleMs: number;
1019
1041
  asrDataChannel: boolean;
1020
1042
  videoMaxHeight: number;
1021
1043
  videoMaxWidth: number;
@@ -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
+ };
@@ -31,6 +31,7 @@ export interface FastStartParams {
31
31
  conversationId: string;
32
32
  internalParams: string;
33
33
  externalIds?: ExternalId[];
34
+ payload: string;
34
35
  opponentType: CallType;
35
36
  mediaOptions: MediaOption[];
36
37
  joiningAllowed?: boolean;
@@ -72,6 +72,7 @@ export interface Participant {
72
72
  clientType: string;
73
73
  roles: UserRole[];
74
74
  participantState: ParticipantStateMapped;
75
+ isOnHold?: boolean;
75
76
  networkRating: number;
76
77
  lastRequestedLayouts: {
77
78
  [key: StreamDescriptionString]: ParticipantLayout;
@@ -54,4 +54,37 @@ export type ParticipantLayout = (Layout | StopStream | RequestKeyFrame) & {
54
54
  */
55
55
  streamName?: string;
56
56
  };
57
+ /**
58
+ * Запрос стрима, который клиент хочет получать для отображения.
59
+ */
60
+ export type DisplayLayoutRequest = {
61
+ /**
62
+ * Внешний ID пользователя
63
+ */
64
+ uid: ExternalParticipantId | string;
65
+ /**
66
+ * Тип медиа (видео с камеры, картинка с экрана, лайв или мувик)
67
+ */
68
+ mediaType: MediaType;
69
+ /**
70
+ * Ширина окошка в котором отображается видео, в пикселях
71
+ */
72
+ width: number;
73
+ /**
74
+ * Высота окошка в котором отображается видео, в пикселях
75
+ */
76
+ height: number;
77
+ /**
78
+ * Отображать видео как CSS object-fit: cover. По умолчанию используется contain.
79
+ */
80
+ cover?: boolean;
81
+ /**
82
+ * Приоритет
83
+ */
84
+ priority?: number;
85
+ /**
86
+ * ID лайва или мувика. null для камеры или скрин-шары.
87
+ */
88
+ streamName?: string;
89
+ };
57
90
  export default ParticipantLayout;
@@ -455,6 +455,10 @@ declare namespace SignalingMessage {
455
455
  export interface VideoSuspendSuggest extends Notification {
456
456
  bandwidth: number;
457
457
  }
458
+ export interface Hold extends Notification {
459
+ participantId: ParticipantId;
460
+ hold: boolean;
461
+ }
458
462
  export {};
459
463
  }
460
464
  export default SignalingMessage;