@selfcommunity/react-ui 0.10.5-alpha.2 → 0.10.5-alpha.3
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/lib/cjs/assets/deafultCover.d.ts +2 -0
- package/lib/cjs/assets/deafultCover.js +3 -0
- package/lib/cjs/assets/liveStream/event.d.ts +2 -0
- package/lib/cjs/assets/liveStream/event.js +3 -0
- package/lib/cjs/assets/liveStream/live.d.ts +2 -0
- package/lib/cjs/assets/liveStream/live.js +3 -0
- package/lib/cjs/components/BottomNavigation/BottomNavigation.d.ts +1 -1
- package/lib/cjs/components/CreateLiveStreamButton/CreateLiveStreamButton.d.ts +44 -0
- package/lib/cjs/components/CreateLiveStreamButton/CreateLiveStreamButton.js +91 -0
- package/lib/cjs/components/CreateLiveStreamButton/index.d.ts +3 -0
- package/lib/cjs/components/CreateLiveStreamButton/index.js +5 -0
- package/lib/cjs/components/CreateLiveStreamDialog/CreateLiveStreamDialog.d.ts +49 -0
- package/lib/cjs/components/CreateLiveStreamDialog/CreateLiveStreamDialog.js +103 -0
- package/lib/cjs/components/CreateLiveStreamDialog/LiveStreamSelector/LiveStreamSelector.d.ts +47 -0
- package/lib/cjs/components/CreateLiveStreamDialog/LiveStreamSelector/LiveStreamSelector.js +188 -0
- package/lib/cjs/components/CreateLiveStreamDialog/constants.d.ts +1 -0
- package/lib/cjs/components/CreateLiveStreamDialog/constants.js +4 -0
- package/lib/cjs/components/CreateLiveStreamDialog/index.d.ts +3 -0
- package/lib/cjs/components/CreateLiveStreamDialog/index.js +5 -0
- package/lib/cjs/components/CreateLiveStreamDialog/types.d.ts +8 -0
- package/lib/cjs/components/CreateLiveStreamDialog/types.js +13 -0
- package/lib/cjs/components/Editor/Editor.d.ts +1 -1
- package/lib/cjs/components/Editor/nodes/HashtagNode.d.ts +1 -1
- package/lib/cjs/components/Editor/nodes/HashtagNode.js +4 -4
- package/lib/cjs/components/Editor/nodes/ImageNode.d.ts +1 -1
- package/lib/cjs/components/Editor/nodes/ImageNode.js +6 -6
- package/lib/cjs/components/Editor/nodes/MentionNode.d.ts +1 -1
- package/lib/cjs/components/Editor/nodes/MentionNode.js +4 -4
- package/lib/cjs/components/Editor/plugins/ApiPlugin.d.ts +1 -1
- package/lib/cjs/components/Editor/plugins/MentionsPlugin.d.ts +2 -2
- package/lib/cjs/components/Editor/shared/useDecorators.d.ts +2 -2
- package/lib/cjs/components/EventForm/EventAddress.d.ts +4 -2
- package/lib/cjs/components/EventForm/EventAddress.js +54 -8
- package/lib/cjs/components/EventForm/EventForm.d.ts +12 -1
- package/lib/cjs/components/EventForm/EventForm.js +51 -13
- package/lib/cjs/components/EventForm/types.d.ts +7 -6
- package/lib/cjs/components/EventFormDialog/EventFormDialog.d.ts +1 -1
- package/lib/cjs/components/EventFormDialog/EventFormDialog.js +3 -3
- package/lib/cjs/components/EventInfoWidget/EventInfoWidget.js +1 -1
- package/lib/cjs/components/EventMediaWidget/asUploadButton.d.ts +1 -1
- package/lib/cjs/components/EventMembersWidget/types.d.ts +1 -1
- package/lib/cjs/components/Feed/Feed.d.ts +2 -2
- package/lib/cjs/components/Feed/Skeleton.d.ts +1 -1
- package/lib/cjs/components/LiveStream/LiveStream.d.ts +79 -0
- package/lib/cjs/components/LiveStream/LiveStream.js +143 -0
- package/lib/cjs/components/LiveStream/Skeleton.d.ts +46 -0
- package/lib/cjs/components/LiveStream/Skeleton.js +92 -0
- package/lib/cjs/components/LiveStream/constants.d.ts +1 -0
- package/lib/cjs/components/LiveStream/constants.js +4 -0
- package/lib/cjs/components/LiveStream/index.d.ts +4 -0
- package/lib/cjs/components/LiveStream/index.js +8 -0
- package/lib/cjs/components/LiveStreamForm/LiveStreamForm.d.ts +55 -0
- package/lib/cjs/components/LiveStreamForm/LiveStreamForm.js +192 -0
- package/lib/cjs/components/LiveStreamForm/LiveStreamFormSettings.d.ts +47 -0
- package/lib/cjs/components/LiveStreamForm/LiveStreamFormSettings.js +75 -0
- package/lib/cjs/components/LiveStreamForm/constants.d.ts +15 -0
- package/lib/cjs/components/LiveStreamForm/constants.js +18 -0
- package/lib/cjs/components/LiveStreamForm/index.d.ts +3 -0
- package/lib/cjs/components/LiveStreamForm/index.js +5 -0
- package/lib/cjs/components/LiveStreamForm/types.d.ts +11 -0
- package/lib/cjs/components/LiveStreamForm/types.js +2 -0
- package/lib/cjs/components/LiveStreamRoom/LiveStreamRoom.d.ts +85 -0
- package/lib/cjs/components/LiveStreamRoom/LiveStreamRoom.js +199 -0
- package/lib/cjs/components/LiveStreamRoom/LiveStreamVideoConference/ControlBar.d.ts +29 -0
- package/lib/cjs/components/LiveStreamRoom/LiveStreamVideoConference/ControlBar.js +62 -0
- package/lib/cjs/components/LiveStreamRoom/LiveStreamVideoConference/DisconnectButton.d.ts +10 -0
- package/lib/cjs/components/LiveStreamRoom/LiveStreamVideoConference/DisconnectButton.js +76 -0
- package/lib/cjs/components/LiveStreamRoom/LiveStreamVideoConference/FocusLayout.d.ts +21 -0
- package/lib/cjs/components/LiveStreamRoom/LiveStreamVideoConference/FocusLayout.js +33 -0
- package/lib/cjs/components/LiveStreamRoom/LiveStreamVideoConference/LiveStreamProvider.d.ts +17 -0
- package/lib/cjs/components/LiveStreamRoom/LiveStreamVideoConference/LiveStreamProvider.js +13 -0
- package/lib/cjs/components/LiveStreamRoom/LiveStreamVideoConference/LiveStreamVideoConference.d.ts +77 -0
- package/lib/cjs/components/LiveStreamRoom/LiveStreamVideoConference/LiveStreamVideoConference.js +137 -0
- package/lib/cjs/components/LiveStreamRoom/LiveStreamVideoConference/ParticipantPlaceholder.d.ts +6 -0
- package/lib/cjs/components/LiveStreamRoom/LiveStreamVideoConference/ParticipantPlaceholder.js +8 -0
- package/lib/cjs/components/LiveStreamRoom/LiveStreamVideoConference/ParticipantTile.d.ts +28 -0
- package/lib/cjs/components/LiveStreamRoom/LiveStreamVideoConference/ParticipantTile.js +65 -0
- package/lib/cjs/components/LiveStreamRoom/LiveStreamVideoConference/ParticipantTileActions.d.ts +30 -0
- package/lib/cjs/components/LiveStreamRoom/LiveStreamVideoConference/ParticipantTileActions.js +215 -0
- package/lib/cjs/components/LiveStreamRoom/LiveStreamVideoConference/ParticipantTileAvatar.d.ts +15 -0
- package/lib/cjs/components/LiveStreamRoom/LiveStreamVideoConference/ParticipantTileAvatar.js +39 -0
- package/lib/cjs/components/LiveStreamRoom/LiveStreamVideoConference/PreJoin.d.ts +55 -0
- package/lib/cjs/components/LiveStreamRoom/LiveStreamVideoConference/PreJoin.js +251 -0
- package/lib/cjs/components/LiveStreamRoom/LiveStreamVideoConference/RecordingIndicator.d.ts +5 -0
- package/lib/cjs/components/LiveStreamRoom/LiveStreamVideoConference/RecordingIndicator.js +32 -0
- package/lib/cjs/components/LiveStreamRoom/LiveStreamVideoConference/SettingsMenuToggle.d.ts +19 -0
- package/lib/cjs/components/LiveStreamRoom/LiveStreamVideoConference/SettingsMenuToggle.js +35 -0
- package/lib/cjs/components/LiveStreamRoom/LiveStreamVideoConference/TrackToggle.d.ts +23 -0
- package/lib/cjs/components/LiveStreamRoom/LiveStreamVideoConference/TrackToggle.js +31 -0
- package/lib/cjs/components/LiveStreamRoom/LiveStreamVideoConference/VideoConference.d.ts +26 -0
- package/lib/cjs/components/LiveStreamRoom/LiveStreamVideoConference/VideoConference.js +151 -0
- package/lib/cjs/components/LiveStreamRoom/LiveStreamVideoConference/constants.d.ts +3 -0
- package/lib/cjs/components/LiveStreamRoom/LiveStreamVideoConference/constants.js +6 -0
- package/lib/cjs/components/LiveStreamRoom/LiveStreamVideoConference/index.d.ts +3 -0
- package/lib/cjs/components/LiveStreamRoom/LiveStreamVideoConference/index.js +5 -0
- package/lib/cjs/components/LiveStreamRoom/LiveStreamVideoConference/useLiveStreamCheck.d.ts +7 -0
- package/lib/cjs/components/LiveStreamRoom/LiveStreamVideoConference/useLiveStreamCheck.js +195 -0
- package/lib/cjs/components/LiveStreamRoom/LiveStreamVideoConference/utils.d.ts +27 -0
- package/lib/cjs/components/LiveStreamRoom/LiveStreamVideoConference/utils.js +82 -0
- package/lib/cjs/components/LiveStreamRoom/constants.d.ts +21 -0
- package/lib/cjs/components/LiveStreamRoom/constants.js +24 -0
- package/lib/cjs/components/LiveStreamRoom/index.d.ts +3 -0
- package/lib/cjs/components/LiveStreamRoom/index.js +5 -0
- package/lib/cjs/components/LiveStreamRoom/types.d.ts +22 -0
- package/lib/cjs/components/LiveStreamRoom/types.js +8 -0
- package/lib/cjs/components/NavigationMenuIconButton/DefaultDrawerSkeleton.d.ts +1 -1
- package/lib/cjs/components/NavigationMenuIconButton/DefaultHeaderContent.d.ts +1 -1
- package/lib/cjs/components/NavigationMenuIconButton/NavigationMenuDrawer.d.ts +16 -0
- package/lib/cjs/components/NavigationMenuIconButton/NavigationMenuDrawer.js +12 -3
- package/lib/cjs/components/Notification/LiveStream/LiveStream.d.ts +15 -0
- package/lib/cjs/components/Notification/LiveStream/LiveStream.js +75 -0
- package/lib/cjs/components/Notification/LiveStream/index.d.ts +3 -0
- package/lib/cjs/components/Notification/LiveStream/index.js +5 -0
- package/lib/cjs/components/Notification/Notification.js +5 -1
- package/lib/cjs/components/OnBoardingWidget/OnBoardingWidget.js +5 -5
- package/lib/cjs/components/PlatformWidget/constants.d.ts +4 -0
- package/lib/cjs/components/PlatformWidget/constants.js +5 -1
- package/lib/cjs/components/PrivateMessageComponent/Skeleton.d.ts +1 -1
- package/lib/cjs/components/SnippetNotifications/SnippetNotifications.js +4 -0
- package/lib/cjs/components/ToastNotifications/ToastNotifications.js +6 -2
- package/lib/cjs/components/UserLiveStreamWidget/Skeleton.d.ts +2 -0
- package/lib/cjs/components/UserLiveStreamWidget/Skeleton.js +28 -0
- package/lib/cjs/components/UserLiveStreamWidget/UserLiveStreamWidget.d.ts +47 -0
- package/lib/cjs/components/UserLiveStreamWidget/UserLiveStreamWidget.js +133 -0
- package/lib/cjs/components/UserLiveStreamWidget/constants.d.ts +1 -0
- package/lib/cjs/components/UserLiveStreamWidget/constants.js +4 -0
- package/lib/cjs/components/UserLiveStreamWidget/index.d.ts +4 -0
- package/lib/cjs/components/UserLiveStreamWidget/index.js +8 -0
- package/lib/cjs/constants/LiveStream.d.ts +3 -0
- package/lib/cjs/constants/LiveStream.js +6 -0
- package/lib/cjs/index.d.ts +12 -1
- package/lib/cjs/index.js +33 -6
- package/lib/cjs/shared/CopyTextArea/index.d.ts +2 -2
- package/lib/cjs/shared/CopyTextArea/index.js +8 -2
- package/lib/cjs/shared/EventInfoDetails/index.js +10 -1
- package/lib/cjs/shared/InfiniteScroll/index.d.ts +1 -1
- package/lib/cjs/shared/LiveStreamInfoDetails/index.d.ts +17 -0
- package/lib/cjs/shared/LiveStreamInfoDetails/index.js +53 -0
- package/lib/cjs/shared/Media/File/asUploadButton.d.ts +1 -1
- package/lib/cjs/shared/Media/Link/UrlTextField/index.d.ts +1 -1
- package/lib/cjs/shared/MetadataField/MetadataField.d.ts +1 -1
- package/lib/cjs/shared/StickyBox/index.d.ts +4 -4
- package/lib/cjs/shared/UpScalingTierBadge/UpScalingTierBadge.d.ts +5 -0
- package/lib/cjs/shared/UpScalingTierBadge/UpScalingTierBadge.js +14 -0
- package/lib/cjs/shared/UpScalingTierBadge/index.d.ts +7 -0
- package/lib/cjs/shared/UpScalingTierBadge/index.js +63 -0
- package/lib/cjs/shared/UsernameTextField/index.d.ts +1 -1
- package/lib/cjs/types/composer.d.ts +1 -1
- package/lib/cjs/types/liveStream.d.ts +5 -0
- package/lib/cjs/types/liveStream.js +9 -0
- package/lib/cjs/utils/liveStream.d.ts +4 -0
- package/lib/cjs/utils/liveStream.js +25 -0
- package/lib/esm/assets/deafultCover.d.ts +2 -0
- package/lib/esm/assets/deafultCover.js +1 -0
- package/lib/esm/assets/liveStream/event.d.ts +2 -0
- package/lib/esm/assets/liveStream/event.js +1 -0
- package/lib/esm/assets/liveStream/live.d.ts +2 -0
- package/lib/esm/assets/liveStream/live.js +1 -0
- package/lib/esm/components/BottomNavigation/BottomNavigation.d.ts +1 -1
- package/lib/esm/components/CreateLiveStreamButton/CreateLiveStreamButton.d.ts +44 -0
- package/lib/esm/components/CreateLiveStreamButton/CreateLiveStreamButton.js +88 -0
- package/lib/esm/components/CreateLiveStreamButton/index.d.ts +3 -0
- package/lib/esm/components/CreateLiveStreamButton/index.js +2 -0
- package/lib/esm/components/CreateLiveStreamDialog/CreateLiveStreamDialog.d.ts +49 -0
- package/lib/esm/components/CreateLiveStreamDialog/CreateLiveStreamDialog.js +100 -0
- package/lib/esm/components/CreateLiveStreamDialog/LiveStreamSelector/LiveStreamSelector.d.ts +47 -0
- package/lib/esm/components/CreateLiveStreamDialog/LiveStreamSelector/LiveStreamSelector.js +183 -0
- package/lib/esm/components/CreateLiveStreamDialog/constants.d.ts +1 -0
- package/lib/esm/components/CreateLiveStreamDialog/constants.js +1 -0
- package/lib/esm/components/CreateLiveStreamDialog/index.d.ts +3 -0
- package/lib/esm/components/CreateLiveStreamDialog/index.js +2 -0
- package/lib/esm/components/CreateLiveStreamDialog/types.d.ts +8 -0
- package/lib/esm/components/CreateLiveStreamDialog/types.js +10 -0
- package/lib/esm/components/Editor/Editor.d.ts +1 -1
- package/lib/esm/components/Editor/nodes/HashtagNode.d.ts +1 -1
- package/lib/esm/components/Editor/nodes/HashtagNode.js +4 -4
- package/lib/esm/components/Editor/nodes/ImageNode.d.ts +1 -1
- package/lib/esm/components/Editor/nodes/ImageNode.js +6 -6
- package/lib/esm/components/Editor/nodes/MentionNode.d.ts +1 -1
- package/lib/esm/components/Editor/nodes/MentionNode.js +4 -4
- package/lib/esm/components/Editor/plugins/ApiPlugin.d.ts +1 -1
- package/lib/esm/components/Editor/plugins/MentionsPlugin.d.ts +2 -2
- package/lib/esm/components/Editor/shared/useDecorators.d.ts +2 -2
- package/lib/esm/components/EventForm/EventAddress.d.ts +4 -2
- package/lib/esm/components/EventForm/EventAddress.js +54 -8
- package/lib/esm/components/EventForm/EventForm.d.ts +12 -1
- package/lib/esm/components/EventForm/EventForm.js +51 -13
- package/lib/esm/components/EventForm/types.d.ts +7 -6
- package/lib/esm/components/EventFormDialog/EventFormDialog.d.ts +1 -1
- package/lib/esm/components/EventFormDialog/EventFormDialog.js +3 -3
- package/lib/esm/components/EventInfoWidget/EventInfoWidget.js +1 -1
- package/lib/esm/components/EventMediaWidget/asUploadButton.d.ts +1 -1
- package/lib/esm/components/EventMembersWidget/types.d.ts +1 -1
- package/lib/esm/components/Feed/Feed.d.ts +2 -2
- package/lib/esm/components/Feed/Skeleton.d.ts +1 -1
- package/lib/esm/components/LiveStream/LiveStream.d.ts +79 -0
- package/lib/esm/components/LiveStream/LiveStream.js +140 -0
- package/lib/esm/components/LiveStream/Skeleton.d.ts +46 -0
- package/lib/esm/components/LiveStream/Skeleton.js +89 -0
- package/lib/esm/components/LiveStream/constants.d.ts +1 -0
- package/lib/esm/components/LiveStream/constants.js +1 -0
- package/lib/esm/components/LiveStream/index.d.ts +4 -0
- package/lib/esm/components/LiveStream/index.js +4 -0
- package/lib/esm/components/LiveStreamForm/LiveStreamForm.d.ts +55 -0
- package/lib/esm/components/LiveStreamForm/LiveStreamForm.js +189 -0
- package/lib/esm/components/LiveStreamForm/LiveStreamFormSettings.d.ts +47 -0
- package/lib/esm/components/LiveStreamForm/LiveStreamFormSettings.js +71 -0
- package/lib/esm/components/LiveStreamForm/constants.d.ts +15 -0
- package/lib/esm/components/LiveStreamForm/constants.js +15 -0
- package/lib/esm/components/LiveStreamForm/index.d.ts +3 -0
- package/lib/esm/components/LiveStreamForm/index.js +2 -0
- package/lib/esm/components/LiveStreamForm/types.d.ts +11 -0
- package/lib/esm/components/LiveStreamForm/types.js +1 -0
- package/lib/esm/components/LiveStreamRoom/LiveStreamRoom.d.ts +85 -0
- package/lib/esm/components/LiveStreamRoom/LiveStreamRoom.js +196 -0
- package/lib/esm/components/LiveStreamRoom/LiveStreamVideoConference/ControlBar.d.ts +29 -0
- package/lib/esm/components/LiveStreamRoom/LiveStreamVideoConference/ControlBar.js +58 -0
- package/lib/esm/components/LiveStreamRoom/LiveStreamVideoConference/DisconnectButton.d.ts +10 -0
- package/lib/esm/components/LiveStreamRoom/LiveStreamVideoConference/DisconnectButton.js +73 -0
- package/lib/esm/components/LiveStreamRoom/LiveStreamVideoConference/FocusLayout.d.ts +21 -0
- package/lib/esm/components/LiveStreamRoom/LiveStreamVideoConference/FocusLayout.js +27 -0
- package/lib/esm/components/LiveStreamRoom/LiveStreamVideoConference/LiveStreamProvider.d.ts +17 -0
- package/lib/esm/components/LiveStreamRoom/LiveStreamVideoConference/LiveStreamProvider.js +9 -0
- package/lib/esm/components/LiveStreamRoom/LiveStreamVideoConference/LiveStreamVideoConference.d.ts +77 -0
- package/lib/esm/components/LiveStreamRoom/LiveStreamVideoConference/LiveStreamVideoConference.js +134 -0
- package/lib/esm/components/LiveStreamRoom/LiveStreamVideoConference/ParticipantPlaceholder.d.ts +6 -0
- package/lib/esm/components/LiveStreamRoom/LiveStreamVideoConference/ParticipantPlaceholder.js +6 -0
- package/lib/esm/components/LiveStreamRoom/LiveStreamVideoConference/ParticipantTile.d.ts +28 -0
- package/lib/esm/components/LiveStreamRoom/LiveStreamVideoConference/ParticipantTile.js +60 -0
- package/lib/esm/components/LiveStreamRoom/LiveStreamVideoConference/ParticipantTileActions.d.ts +30 -0
- package/lib/esm/components/LiveStreamRoom/LiveStreamVideoConference/ParticipantTileActions.js +212 -0
- package/lib/esm/components/LiveStreamRoom/LiveStreamVideoConference/ParticipantTileAvatar.d.ts +15 -0
- package/lib/esm/components/LiveStreamRoom/LiveStreamVideoConference/ParticipantTileAvatar.js +36 -0
- package/lib/esm/components/LiveStreamRoom/LiveStreamVideoConference/PreJoin.d.ts +55 -0
- package/lib/esm/components/LiveStreamRoom/LiveStreamVideoConference/PreJoin.js +245 -0
- package/lib/esm/components/LiveStreamRoom/LiveStreamVideoConference/RecordingIndicator.d.ts +5 -0
- package/lib/esm/components/LiveStreamRoom/LiveStreamVideoConference/RecordingIndicator.js +29 -0
- package/lib/esm/components/LiveStreamRoom/LiveStreamVideoConference/SettingsMenuToggle.d.ts +19 -0
- package/lib/esm/components/LiveStreamRoom/LiveStreamVideoConference/SettingsMenuToggle.js +30 -0
- package/lib/esm/components/LiveStreamRoom/LiveStreamVideoConference/TrackToggle.d.ts +23 -0
- package/lib/esm/components/LiveStreamRoom/LiveStreamVideoConference/TrackToggle.js +27 -0
- package/lib/esm/components/LiveStreamRoom/LiveStreamVideoConference/VideoConference.d.ts +26 -0
- package/lib/esm/components/LiveStreamRoom/LiveStreamVideoConference/VideoConference.js +147 -0
- package/lib/esm/components/LiveStreamRoom/LiveStreamVideoConference/constants.d.ts +3 -0
- package/lib/esm/components/LiveStreamRoom/LiveStreamVideoConference/constants.js +3 -0
- package/lib/esm/components/LiveStreamRoom/LiveStreamVideoConference/index.d.ts +3 -0
- package/lib/esm/components/LiveStreamRoom/LiveStreamVideoConference/index.js +2 -0
- package/lib/esm/components/LiveStreamRoom/LiveStreamVideoConference/useLiveStreamCheck.d.ts +7 -0
- package/lib/esm/components/LiveStreamRoom/LiveStreamVideoConference/useLiveStreamCheck.js +191 -0
- package/lib/esm/components/LiveStreamRoom/LiveStreamVideoConference/utils.d.ts +27 -0
- package/lib/esm/components/LiveStreamRoom/LiveStreamVideoConference/utils.js +74 -0
- package/lib/esm/components/LiveStreamRoom/constants.d.ts +21 -0
- package/lib/esm/components/LiveStreamRoom/constants.js +21 -0
- package/lib/esm/components/LiveStreamRoom/index.d.ts +3 -0
- package/lib/esm/components/LiveStreamRoom/index.js +2 -0
- package/lib/esm/components/LiveStreamRoom/types.d.ts +22 -0
- package/lib/esm/components/LiveStreamRoom/types.js +4 -0
- package/lib/esm/components/NavigationMenuIconButton/DefaultDrawerSkeleton.d.ts +1 -1
- package/lib/esm/components/NavigationMenuIconButton/DefaultHeaderContent.d.ts +1 -1
- package/lib/esm/components/NavigationMenuIconButton/NavigationMenuDrawer.d.ts +16 -0
- package/lib/esm/components/NavigationMenuIconButton/NavigationMenuDrawer.js +12 -3
- package/lib/esm/components/Notification/LiveStream/LiveStream.d.ts +15 -0
- package/lib/esm/components/Notification/LiveStream/LiveStream.js +72 -0
- package/lib/esm/components/Notification/LiveStream/index.d.ts +3 -0
- package/lib/esm/components/Notification/LiveStream/index.js +2 -0
- package/lib/esm/components/Notification/Notification.js +5 -1
- package/lib/esm/components/OnBoardingWidget/OnBoardingWidget.js +5 -5
- package/lib/esm/components/PlatformWidget/constants.d.ts +4 -0
- package/lib/esm/components/PlatformWidget/constants.js +4 -0
- package/lib/esm/components/PrivateMessageComponent/Skeleton.d.ts +1 -1
- package/lib/esm/components/SnippetNotifications/SnippetNotifications.js +4 -0
- package/lib/esm/components/ToastNotifications/ToastNotifications.js +6 -2
- package/lib/esm/components/UserLiveStreamWidget/Skeleton.d.ts +2 -0
- package/lib/esm/components/UserLiveStreamWidget/Skeleton.js +24 -0
- package/lib/esm/components/UserLiveStreamWidget/UserLiveStreamWidget.d.ts +47 -0
- package/lib/esm/components/UserLiveStreamWidget/UserLiveStreamWidget.js +130 -0
- package/lib/esm/components/UserLiveStreamWidget/constants.d.ts +1 -0
- package/lib/esm/components/UserLiveStreamWidget/constants.js +1 -0
- package/lib/esm/components/UserLiveStreamWidget/index.d.ts +4 -0
- package/lib/esm/components/UserLiveStreamWidget/index.js +4 -0
- package/lib/esm/constants/LiveStream.d.ts +3 -0
- package/lib/esm/constants/LiveStream.js +3 -0
- package/lib/esm/index.d.ts +12 -1
- package/lib/esm/index.js +13 -2
- package/lib/esm/shared/CopyTextArea/index.d.ts +2 -2
- package/lib/esm/shared/CopyTextArea/index.js +8 -2
- package/lib/esm/shared/EventInfoDetails/index.js +13 -4
- package/lib/esm/shared/InfiniteScroll/index.d.ts +1 -1
- package/lib/esm/shared/LiveStreamInfoDetails/index.d.ts +17 -0
- package/lib/esm/shared/LiveStreamInfoDetails/index.js +50 -0
- package/lib/esm/shared/Media/File/asUploadButton.d.ts +1 -1
- package/lib/esm/shared/Media/Link/UrlTextField/index.d.ts +1 -1
- package/lib/esm/shared/MetadataField/MetadataField.d.ts +1 -1
- package/lib/esm/shared/StickyBox/index.d.ts +4 -4
- package/lib/esm/shared/UpScalingTierBadge/UpScalingTierBadge.d.ts +5 -0
- package/lib/esm/shared/UpScalingTierBadge/UpScalingTierBadge.js +10 -0
- package/lib/esm/shared/UpScalingTierBadge/index.d.ts +7 -0
- package/lib/esm/shared/UpScalingTierBadge/index.js +60 -0
- package/lib/esm/shared/UsernameTextField/index.d.ts +1 -1
- package/lib/esm/types/composer.d.ts +1 -1
- package/lib/esm/types/liveStream.d.ts +5 -0
- package/lib/esm/types/liveStream.js +6 -0
- package/lib/esm/utils/liveStream.d.ts +4 -0
- package/lib/esm/utils/liveStream.js +18 -0
- package/lib/umd/653.js +2 -0
- package/lib/umd/react-ui.js +1 -19
- package/lib/umd/react-ui.js.LICENSE.txt +2 -0
- package/package.json +22 -8
- package/lib/umd/314.js +0 -2
- /package/lib/umd/{314.js.LICENSE.txt → 653.js.LICENSE.txt} +0 -0
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { __rest } from "tslib";
|
|
2
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
|
+
import { styled } from '@mui/material/styles';
|
|
4
|
+
import { useThemeProps } from '@mui/system';
|
|
5
|
+
import { Box } from '@mui/material';
|
|
6
|
+
import classNames from 'classnames';
|
|
7
|
+
import ParticipantPlaceholder from './ParticipantPlaceholder';
|
|
8
|
+
import { useSCContext } from '@selfcommunity/react-core';
|
|
9
|
+
const PREFIX = 'SCParticipantTileAvatar';
|
|
10
|
+
const classes = {
|
|
11
|
+
root: `${PREFIX}-root`
|
|
12
|
+
};
|
|
13
|
+
const Root = styled(Box, {
|
|
14
|
+
name: PREFIX,
|
|
15
|
+
slot: 'Root',
|
|
16
|
+
overridesResolver: (props, styles) => styles.root
|
|
17
|
+
})(({ theme }) => ({
|
|
18
|
+
height: 'auto !important',
|
|
19
|
+
'& img': {
|
|
20
|
+
borderRadius: '50%',
|
|
21
|
+
width: 100,
|
|
22
|
+
height: 100
|
|
23
|
+
}
|
|
24
|
+
}));
|
|
25
|
+
export default function ParticipantTileAvatar(inProps) {
|
|
26
|
+
// PROPS
|
|
27
|
+
const props = useThemeProps({
|
|
28
|
+
props: inProps,
|
|
29
|
+
name: PREFIX
|
|
30
|
+
});
|
|
31
|
+
const { className, user, participant } = props, rest = __rest(props, ["className", "user", "participant"]);
|
|
32
|
+
// CONTEXT
|
|
33
|
+
const scContext = useSCContext();
|
|
34
|
+
// RENDER
|
|
35
|
+
return (_jsx(Root, Object.assign({ className: classNames(className, classes.root) }, rest, { children: user ? (_jsx("img", { src: `${user.avatar}` })) : participant && participant.identity ? (_jsx("img", { src: `${scContext.settings.portal}/api/v2/avatar/${participant.identity}` })) : (_jsx(ParticipantPlaceholder, {})) })));
|
|
36
|
+
}
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import type { CreateLocalTracksOptions, LocalAudioTrack, LocalTrack, LocalVideoTrack } from 'livekit-client';
|
|
2
|
+
import { Track } from 'livekit-client';
|
|
3
|
+
import * as React from 'react';
|
|
4
|
+
import type { LocalUserChoices } from '@livekit/components-core';
|
|
5
|
+
/**
|
|
6
|
+
* Props for the PreJoin component.
|
|
7
|
+
* @public
|
|
8
|
+
*/
|
|
9
|
+
export interface PreJoinProps extends Omit<React.HTMLAttributes<HTMLDivElement>, 'onSubmit' | 'onError'> {
|
|
10
|
+
/** This function is called with the `LocalUserChoices` if validation is passed. */
|
|
11
|
+
onSubmit?: (values: LocalUserChoices) => void;
|
|
12
|
+
/**
|
|
13
|
+
* Provide your custom validation function. Only if validation is successful the user choices are past to the onSubmit callback.
|
|
14
|
+
*/
|
|
15
|
+
onValidate?: (values: LocalUserChoices) => boolean;
|
|
16
|
+
onError?: (error: Error) => void;
|
|
17
|
+
/** Prefill the input form with initial values. */
|
|
18
|
+
defaults?: Partial<LocalUserChoices>;
|
|
19
|
+
/** Display a debug window for your convenience. */
|
|
20
|
+
debug?: boolean;
|
|
21
|
+
joinLabel?: string;
|
|
22
|
+
micLabel?: string;
|
|
23
|
+
camLabel?: string;
|
|
24
|
+
userLabel?: string;
|
|
25
|
+
/**
|
|
26
|
+
* If true, user choices are persisted across sessions.
|
|
27
|
+
* @defaultValue true
|
|
28
|
+
* @alpha
|
|
29
|
+
*/
|
|
30
|
+
persistUserChoices?: boolean;
|
|
31
|
+
}
|
|
32
|
+
/** @alpha */
|
|
33
|
+
export declare function usePreviewTracks(options: CreateLocalTracksOptions, onError?: (err: Error) => void): LocalTrack<Track.Kind>[];
|
|
34
|
+
/** @public */
|
|
35
|
+
export declare function usePreviewDevice<T extends LocalVideoTrack | LocalAudioTrack>(enabled: boolean, deviceId: string, kind: 'videoinput' | 'audioinput'): {
|
|
36
|
+
selectedDevice: MediaDeviceInfo;
|
|
37
|
+
localTrack: T;
|
|
38
|
+
deviceError: Error;
|
|
39
|
+
};
|
|
40
|
+
/**
|
|
41
|
+
* The `PreJoin` prefab component is normally presented to the user before he enters a room.
|
|
42
|
+
* This component allows the user to check and select the preferred media device (camera und microphone).
|
|
43
|
+
* On submit the user decisions are returned, which can then be passed on to the `LiveKitRoom` so that the user enters the room with the correct media devices.
|
|
44
|
+
*
|
|
45
|
+
* @remarks
|
|
46
|
+
* This component is independent of the `LiveKitRoom` component and should not be nested within it.
|
|
47
|
+
* Because it only accesses the local media tracks this component is self-contained and works without connection to the LiveKit server.
|
|
48
|
+
*
|
|
49
|
+
* @example
|
|
50
|
+
* ```tsx
|
|
51
|
+
* <PreJoin />
|
|
52
|
+
* ```
|
|
53
|
+
* @public
|
|
54
|
+
*/
|
|
55
|
+
export declare function PreJoin({ defaults, onValidate, onSubmit, onError, debug, joinLabel, micLabel, camLabel, userLabel, persistUserChoices, ...htmlProps }: PreJoinProps): JSX.Element;
|
|
@@ -0,0 +1,245 @@
|
|
|
1
|
+
import { __awaiter, __rest } from "tslib";
|
|
2
|
+
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
3
|
+
import { createLocalAudioTrack, createLocalTracks, createLocalVideoTrack, facingModeFromLocalTrack, Track, VideoPresets, Mutex } from 'livekit-client';
|
|
4
|
+
import * as React from 'react';
|
|
5
|
+
import { log } from '@livekit/components-core';
|
|
6
|
+
import { defaultUserChoices } from '@livekit/components-core';
|
|
7
|
+
import { MediaDeviceMenu, useMediaDevices, usePersistentUserChoices } from '@livekit/components-react';
|
|
8
|
+
import { useSCUser } from '@selfcommunity/react-core';
|
|
9
|
+
import ParticipantTileAvatar from './ParticipantTileAvatar';
|
|
10
|
+
import { useEffect, useMemo } from 'react';
|
|
11
|
+
import { TrackToggle } from './TrackToggle';
|
|
12
|
+
import { useLiveStream } from './LiveStreamProvider';
|
|
13
|
+
/** @alpha */
|
|
14
|
+
export function usePreviewTracks(options, onError) {
|
|
15
|
+
const [tracks, setTracks] = React.useState();
|
|
16
|
+
const trackLock = React.useMemo(() => new Mutex(), []);
|
|
17
|
+
React.useEffect(() => {
|
|
18
|
+
let needsCleanup = false;
|
|
19
|
+
let localTracks = [];
|
|
20
|
+
trackLock.lock().then((unlock) => __awaiter(this, void 0, void 0, function* () {
|
|
21
|
+
try {
|
|
22
|
+
if (options.audio || options.video) {
|
|
23
|
+
localTracks = yield createLocalTracks(options);
|
|
24
|
+
if (needsCleanup) {
|
|
25
|
+
localTracks.forEach((tr) => tr.stop());
|
|
26
|
+
}
|
|
27
|
+
else {
|
|
28
|
+
setTracks(localTracks);
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
catch (e) {
|
|
33
|
+
if (onError && e instanceof Error) {
|
|
34
|
+
onError(e);
|
|
35
|
+
}
|
|
36
|
+
else {
|
|
37
|
+
log.error(e);
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
finally {
|
|
41
|
+
unlock();
|
|
42
|
+
}
|
|
43
|
+
}));
|
|
44
|
+
return () => {
|
|
45
|
+
needsCleanup = true;
|
|
46
|
+
localTracks.forEach((track) => {
|
|
47
|
+
track.stop();
|
|
48
|
+
});
|
|
49
|
+
};
|
|
50
|
+
}, [JSON.stringify(options), onError, trackLock]);
|
|
51
|
+
return tracks;
|
|
52
|
+
}
|
|
53
|
+
/** @public */
|
|
54
|
+
export function usePreviewDevice(enabled, deviceId, kind) {
|
|
55
|
+
const [deviceError, setDeviceError] = React.useState(null);
|
|
56
|
+
const [isCreatingTrack, setIsCreatingTrack] = React.useState(false);
|
|
57
|
+
const devices = useMediaDevices({ kind });
|
|
58
|
+
const [selectedDevice, setSelectedDevice] = React.useState(undefined);
|
|
59
|
+
const [localTrack, setLocalTrack] = React.useState();
|
|
60
|
+
const [localDeviceId, setLocalDeviceId] = React.useState(deviceId);
|
|
61
|
+
React.useEffect(() => {
|
|
62
|
+
setLocalDeviceId(deviceId);
|
|
63
|
+
}, [deviceId]);
|
|
64
|
+
const createTrack = (deviceId, kind) => __awaiter(this, void 0, void 0, function* () {
|
|
65
|
+
try {
|
|
66
|
+
const track = kind === 'videoinput'
|
|
67
|
+
? yield createLocalVideoTrack({
|
|
68
|
+
deviceId: deviceId,
|
|
69
|
+
resolution: VideoPresets.h720.resolution
|
|
70
|
+
})
|
|
71
|
+
: yield createLocalAudioTrack({ deviceId });
|
|
72
|
+
const newDeviceId = yield track.getDeviceId();
|
|
73
|
+
if (newDeviceId && deviceId !== newDeviceId) {
|
|
74
|
+
prevDeviceId.current = newDeviceId;
|
|
75
|
+
setLocalDeviceId(newDeviceId);
|
|
76
|
+
}
|
|
77
|
+
setLocalTrack(track);
|
|
78
|
+
}
|
|
79
|
+
catch (e) {
|
|
80
|
+
if (e instanceof Error) {
|
|
81
|
+
setDeviceError(e);
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
});
|
|
85
|
+
const switchDevice = (track, id) => __awaiter(this, void 0, void 0, function* () {
|
|
86
|
+
yield track.setDeviceId(id);
|
|
87
|
+
prevDeviceId.current = id;
|
|
88
|
+
});
|
|
89
|
+
const prevDeviceId = React.useRef(localDeviceId);
|
|
90
|
+
React.useEffect(() => {
|
|
91
|
+
if (enabled && !localTrack && !deviceError && !isCreatingTrack) {
|
|
92
|
+
log.debug('creating track', kind);
|
|
93
|
+
setIsCreatingTrack(true);
|
|
94
|
+
createTrack(localDeviceId, kind).finally(() => {
|
|
95
|
+
setIsCreatingTrack(false);
|
|
96
|
+
});
|
|
97
|
+
}
|
|
98
|
+
}, [enabled, localTrack, deviceError, isCreatingTrack]);
|
|
99
|
+
// switch camera device
|
|
100
|
+
React.useEffect(() => {
|
|
101
|
+
if (!localTrack) {
|
|
102
|
+
return;
|
|
103
|
+
}
|
|
104
|
+
if (!enabled) {
|
|
105
|
+
log.debug(`muting ${kind} track`);
|
|
106
|
+
localTrack.mute().then(() => log.debug(localTrack.mediaStreamTrack));
|
|
107
|
+
}
|
|
108
|
+
else if ((selectedDevice === null || selectedDevice === void 0 ? void 0 : selectedDevice.deviceId) && prevDeviceId.current !== (selectedDevice === null || selectedDevice === void 0 ? void 0 : selectedDevice.deviceId)) {
|
|
109
|
+
log.debug(`switching ${kind} device from`, prevDeviceId.current, selectedDevice.deviceId);
|
|
110
|
+
switchDevice(localTrack, selectedDevice.deviceId);
|
|
111
|
+
}
|
|
112
|
+
else {
|
|
113
|
+
log.debug(`unmuting local ${kind} track`);
|
|
114
|
+
localTrack.unmute();
|
|
115
|
+
}
|
|
116
|
+
}, [localTrack, selectedDevice, enabled, kind]);
|
|
117
|
+
React.useEffect(() => {
|
|
118
|
+
return () => {
|
|
119
|
+
if (localTrack) {
|
|
120
|
+
log.debug(`stopping local ${kind} track`);
|
|
121
|
+
localTrack.stop();
|
|
122
|
+
localTrack.mute();
|
|
123
|
+
}
|
|
124
|
+
};
|
|
125
|
+
}, []);
|
|
126
|
+
React.useEffect(() => {
|
|
127
|
+
setSelectedDevice(devices === null || devices === void 0 ? void 0 : devices.find((dev) => dev.deviceId === localDeviceId));
|
|
128
|
+
}, [localDeviceId, devices]);
|
|
129
|
+
return {
|
|
130
|
+
selectedDevice,
|
|
131
|
+
localTrack,
|
|
132
|
+
deviceError
|
|
133
|
+
};
|
|
134
|
+
}
|
|
135
|
+
/**
|
|
136
|
+
* The `PreJoin` prefab component is normally presented to the user before he enters a room.
|
|
137
|
+
* This component allows the user to check and select the preferred media device (camera und microphone).
|
|
138
|
+
* On submit the user decisions are returned, which can then be passed on to the `LiveKitRoom` so that the user enters the room with the correct media devices.
|
|
139
|
+
*
|
|
140
|
+
* @remarks
|
|
141
|
+
* This component is independent of the `LiveKitRoom` component and should not be nested within it.
|
|
142
|
+
* Because it only accesses the local media tracks this component is self-contained and works without connection to the LiveKit server.
|
|
143
|
+
*
|
|
144
|
+
* @example
|
|
145
|
+
* ```tsx
|
|
146
|
+
* <PreJoin />
|
|
147
|
+
* ```
|
|
148
|
+
* @public
|
|
149
|
+
*/
|
|
150
|
+
export function PreJoin(_a) {
|
|
151
|
+
var { defaults = {}, onValidate, onSubmit, onError, debug, joinLabel = 'Join Room', micLabel = 'Microphone', camLabel = 'Camera', userLabel = 'Username', persistUserChoices = true } = _a, htmlProps = __rest(_a, ["defaults", "onValidate", "onSubmit", "onError", "debug", "joinLabel", "micLabel", "camLabel", "userLabel", "persistUserChoices"]);
|
|
152
|
+
const { liveStream } = useLiveStream();
|
|
153
|
+
const scUserContext = useSCUser();
|
|
154
|
+
const [userChoices, setUserChoices] = React.useState(defaultUserChoices);
|
|
155
|
+
const canUseAudio = useMemo(() => { var _a; return scUserContext.user && liveStream && (liveStream.host.id === scUserContext.user.id || (liveStream && !((_a = liveStream === null || liveStream === void 0 ? void 0 : liveStream.settings) === null || _a === void 0 ? void 0 : _a.muteParticipants))); }, [scUserContext, liveStream]);
|
|
156
|
+
const canUseVideo = useMemo(() => { var _a; return scUserContext.user && liveStream && (liveStream.host.id === scUserContext.user.id || (liveStream && !((_a = liveStream === null || liveStream === void 0 ? void 0 : liveStream.settings) === null || _a === void 0 ? void 0 : _a.disableVideo))); }, [scUserContext, liveStream]);
|
|
157
|
+
// TODO: Remove and pipe `defaults` object directly into `usePersistentUserChoices` once we fully switch from type `LocalUserChoices` to `UserChoices`.
|
|
158
|
+
const partialDefaults = Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({}, (defaults.audioDeviceId !== undefined && { audioDeviceId: defaults.audioDeviceId })), (defaults.videoDeviceId !== undefined && { videoDeviceId: defaults.videoDeviceId })), (defaults.audioEnabled !== undefined && { audioEnabled: defaults.audioEnabled })), (defaults.videoEnabled !== undefined && { videoEnabled: defaults.videoEnabled })), (defaults.username !== undefined && { username: defaults.username }));
|
|
159
|
+
const { userChoices: initialUserChoices, saveAudioInputDeviceId, saveAudioInputEnabled, saveVideoInputDeviceId, saveVideoInputEnabled, saveUsername } = usePersistentUserChoices({
|
|
160
|
+
defaults: partialDefaults,
|
|
161
|
+
preventSave: !persistUserChoices,
|
|
162
|
+
preventLoad: !persistUserChoices
|
|
163
|
+
});
|
|
164
|
+
// Initialize device settings
|
|
165
|
+
const [audioEnabled, setAudioEnabled] = React.useState(initialUserChoices.audioEnabled && canUseAudio);
|
|
166
|
+
const [videoEnabled, setVideoEnabled] = React.useState(initialUserChoices.videoEnabled && canUseVideo);
|
|
167
|
+
const [audioDeviceId, setAudioDeviceId] = React.useState(initialUserChoices.audioDeviceId);
|
|
168
|
+
const [videoDeviceId, setVideoDeviceId] = React.useState(initialUserChoices.videoDeviceId);
|
|
169
|
+
const [username, setUsername] = React.useState(initialUserChoices.username);
|
|
170
|
+
// Save user choices to persistent storage.
|
|
171
|
+
React.useEffect(() => {
|
|
172
|
+
saveAudioInputEnabled(audioEnabled && canUseAudio);
|
|
173
|
+
}, [audioEnabled, saveAudioInputEnabled, canUseAudio]);
|
|
174
|
+
React.useEffect(() => {
|
|
175
|
+
saveVideoInputEnabled(videoEnabled && canUseVideo);
|
|
176
|
+
}, [videoEnabled, saveVideoInputEnabled, canUseVideo]);
|
|
177
|
+
React.useEffect(() => {
|
|
178
|
+
saveAudioInputDeviceId(audioDeviceId);
|
|
179
|
+
}, [audioDeviceId, saveAudioInputDeviceId]);
|
|
180
|
+
React.useEffect(() => {
|
|
181
|
+
saveVideoInputDeviceId(videoDeviceId);
|
|
182
|
+
}, [videoDeviceId, saveVideoInputDeviceId]);
|
|
183
|
+
React.useEffect(() => {
|
|
184
|
+
if (scUserContext.user) {
|
|
185
|
+
saveUsername(scUserContext.user.username);
|
|
186
|
+
}
|
|
187
|
+
}, [username, saveUsername, scUserContext.user]);
|
|
188
|
+
const tracks = usePreviewTracks({
|
|
189
|
+
audio: audioEnabled ? { deviceId: initialUserChoices.audioDeviceId } : false,
|
|
190
|
+
video: videoEnabled ? { deviceId: initialUserChoices.videoDeviceId } : false
|
|
191
|
+
}, onError);
|
|
192
|
+
const videoEl = React.useRef(null);
|
|
193
|
+
const videoTrack = React.useMemo(() => tracks === null || tracks === void 0 ? void 0 : tracks.filter((track) => track.kind === Track.Kind.Video)[0], [tracks]);
|
|
194
|
+
const facingMode = React.useMemo(() => {
|
|
195
|
+
if (videoTrack) {
|
|
196
|
+
const { facingMode } = facingModeFromLocalTrack(videoTrack);
|
|
197
|
+
return facingMode;
|
|
198
|
+
}
|
|
199
|
+
else {
|
|
200
|
+
return 'undefined';
|
|
201
|
+
}
|
|
202
|
+
}, [videoTrack]);
|
|
203
|
+
const audioTrack = React.useMemo(() => tracks === null || tracks === void 0 ? void 0 : tracks.filter((track) => track.kind === Track.Kind.Audio)[0], [tracks]);
|
|
204
|
+
React.useEffect(() => {
|
|
205
|
+
if (videoEl.current && videoTrack) {
|
|
206
|
+
videoTrack.unmute();
|
|
207
|
+
videoTrack.attach(videoEl.current);
|
|
208
|
+
}
|
|
209
|
+
return () => {
|
|
210
|
+
videoTrack === null || videoTrack === void 0 ? void 0 : videoTrack.detach();
|
|
211
|
+
};
|
|
212
|
+
}, [videoTrack]);
|
|
213
|
+
const [isValid, setIsValid] = React.useState();
|
|
214
|
+
const handleValidation = React.useCallback((values) => {
|
|
215
|
+
if (typeof onValidate === 'function') {
|
|
216
|
+
return onValidate(values);
|
|
217
|
+
}
|
|
218
|
+
else {
|
|
219
|
+
return values.username !== '';
|
|
220
|
+
}
|
|
221
|
+
}, [onValidate]);
|
|
222
|
+
useEffect(() => {
|
|
223
|
+
const newUserChoices = {
|
|
224
|
+
username,
|
|
225
|
+
videoEnabled,
|
|
226
|
+
videoDeviceId,
|
|
227
|
+
audioEnabled,
|
|
228
|
+
audioDeviceId
|
|
229
|
+
};
|
|
230
|
+
setUserChoices(newUserChoices);
|
|
231
|
+
setIsValid(handleValidation(newUserChoices));
|
|
232
|
+
}, [username, scUserContext.user, videoEnabled, handleValidation, audioEnabled, audioDeviceId, videoDeviceId]);
|
|
233
|
+
function handleSubmit(event) {
|
|
234
|
+
event.preventDefault();
|
|
235
|
+
if (handleValidation(userChoices)) {
|
|
236
|
+
if (typeof onSubmit === 'function') {
|
|
237
|
+
onSubmit(userChoices);
|
|
238
|
+
}
|
|
239
|
+
}
|
|
240
|
+
else {
|
|
241
|
+
log.warn('Validation failed with: ', userChoices);
|
|
242
|
+
}
|
|
243
|
+
}
|
|
244
|
+
return (_jsxs("div", Object.assign({ className: "lk-prejoin" }, htmlProps, { children: [_jsxs("div", Object.assign({ className: "lk-video-container" }, { children: [videoTrack && _jsx("video", { ref: videoEl, width: "1280", height: "720", "data-lk-facing-mode": facingMode }), (!videoTrack || !videoEnabled) && (_jsx("div", Object.assign({ className: "lk-camera-off-note" }, { children: _jsx(ParticipantTileAvatar, { user: scUserContext.user }) })))] })), _jsxs("div", Object.assign({ className: "lk-button-group-container" }, { children: [_jsxs("div", Object.assign({ className: "lk-button-group audio" }, { children: [_jsx(TrackToggle, Object.assign({ disabled: !canUseAudio, initialState: audioEnabled, source: Track.Source.Microphone, onChange: (enabled) => setAudioEnabled(enabled) }, { children: micLabel })), _jsx("div", Object.assign({ className: "lk-button-group-menu" }, { children: _jsx(MediaDeviceMenu, { initialSelection: audioDeviceId, kind: "audioinput", disabled: !audioTrack || !canUseAudio, tracks: { audioinput: audioTrack }, onActiveDeviceChange: (_, id) => setAudioDeviceId(id) }) }))] })), _jsxs("div", Object.assign({ className: "lk-button-group video" }, { children: [_jsx(TrackToggle, Object.assign({ disabled: !canUseVideo, initialState: videoEnabled, source: Track.Source.Camera, onChange: (enabled) => setVideoEnabled(enabled) }, { children: camLabel })), _jsx("div", Object.assign({ className: "lk-button-group-menu" }, { children: _jsx(MediaDeviceMenu, { initialSelection: videoDeviceId, kind: "videoinput", disabled: !videoTrack || !canUseVideo, tracks: { videoinput: videoTrack }, onActiveDeviceChange: (_, id) => setVideoDeviceId(id) }) }))] }))] })), _jsx("form", Object.assign({ className: "lk-username-container" }, { children: _jsx("button", Object.assign({ className: "lk-button lk-join-button", type: "submit", onClick: handleSubmit, disabled: !isValid }, { children: joinLabel })) })), debug && (_jsxs(_Fragment, { children: [_jsx("strong", { children: "User Choices:" }), _jsxs("ul", Object.assign({ className: "lk-list", style: { overflow: 'hidden', maxWidth: '15rem' } }, { children: [_jsxs("li", { children: ["Username: ", `${userChoices.username}`] }), _jsxs("li", { children: ["Video Enabled: ", `${userChoices.videoEnabled}`] }), _jsxs("li", { children: ["Audio Enabled: ", `${userChoices.audioEnabled}`] }), _jsxs("li", { children: ["Video Device: ", `${userChoices.videoDeviceId}`] }), _jsxs("li", { children: ["Audio Device: ", `${userChoices.audioDeviceId}`] })] }))] }))] })));
|
|
245
|
+
}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
|
+
import { useIsRecording } from '@livekit/components-react';
|
|
4
|
+
import { useEffect, useState } from 'react';
|
|
5
|
+
/**
|
|
6
|
+
* RecordingIndicator
|
|
7
|
+
* @alpha
|
|
8
|
+
*/
|
|
9
|
+
export default function RecordingIndicator() {
|
|
10
|
+
const isRecording = useIsRecording();
|
|
11
|
+
const [wasRecording, setWasRecording] = useState(false);
|
|
12
|
+
useEffect(() => {
|
|
13
|
+
if (isRecording !== wasRecording) {
|
|
14
|
+
setWasRecording(isRecording);
|
|
15
|
+
if (isRecording) {
|
|
16
|
+
window.alert('This meeting is being recorded');
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
}, [isRecording]);
|
|
20
|
+
return (_jsx("div", { style: {
|
|
21
|
+
position: 'absolute',
|
|
22
|
+
top: '0',
|
|
23
|
+
left: '0',
|
|
24
|
+
width: '100%',
|
|
25
|
+
height: '100%',
|
|
26
|
+
boxShadow: isRecording ? 'red 0px 0px 0px 3px inset' : 'none',
|
|
27
|
+
pointerEvents: 'none'
|
|
28
|
+
} }));
|
|
29
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
export interface UseSettingsToggleProps {
|
|
3
|
+
props: React.ButtonHTMLAttributes<HTMLButtonElement>;
|
|
4
|
+
}
|
|
5
|
+
/**
|
|
6
|
+
* The `useSettingsToggle` hook provides state and functions for toggling the settings menu.
|
|
7
|
+
*/
|
|
8
|
+
export declare function useSettingsToggle({ props }: UseSettingsToggleProps): {
|
|
9
|
+
mergedProps: React.ButtonHTMLAttributes<HTMLButtonElement> & {
|
|
10
|
+
className: string;
|
|
11
|
+
onClick: () => void;
|
|
12
|
+
'aria-pressed': string;
|
|
13
|
+
};
|
|
14
|
+
};
|
|
15
|
+
export type SettingsMenuToggleProps = React.ButtonHTMLAttributes<HTMLButtonElement>;
|
|
16
|
+
/**
|
|
17
|
+
* The `SettingsMenuToggle` component is a button that toggles the visibility of the `SettingsMenu` component.
|
|
18
|
+
*/
|
|
19
|
+
export declare const SettingsMenuToggle: (props: SettingsMenuToggleProps & React.RefAttributes<HTMLButtonElement>) => React.ReactNode;
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
import { mergePropsReactAria } from './utils';
|
|
4
|
+
import { useLayoutContext } from '@livekit/components-react';
|
|
5
|
+
/**
|
|
6
|
+
* The `useSettingsToggle` hook provides state and functions for toggling the settings menu.
|
|
7
|
+
*/
|
|
8
|
+
export function useSettingsToggle({ props }) {
|
|
9
|
+
const { dispatch, state } = useLayoutContext().widget;
|
|
10
|
+
const className = 'lk-button lk-settings-toggle';
|
|
11
|
+
const mergedProps = React.useMemo(() => {
|
|
12
|
+
return mergePropsReactAria(props, {
|
|
13
|
+
className,
|
|
14
|
+
onClick: () => {
|
|
15
|
+
if (dispatch)
|
|
16
|
+
dispatch({ msg: 'toggle_settings' });
|
|
17
|
+
},
|
|
18
|
+
'aria-pressed': (state === null || state === void 0 ? void 0 : state.showSettings) ? 'true' : 'false'
|
|
19
|
+
});
|
|
20
|
+
}, [props, className, dispatch, state]);
|
|
21
|
+
return { mergedProps };
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* The `SettingsMenuToggle` component is a button that toggles the visibility of the `SettingsMenu` component.
|
|
25
|
+
*/
|
|
26
|
+
export const SettingsMenuToggle =
|
|
27
|
+
/* @__PURE__ */ React.forwardRef(function SettingsMenuToggle(props, ref) {
|
|
28
|
+
const { mergedProps } = useSettingsToggle({ props });
|
|
29
|
+
return (_jsx("button", Object.assign({ ref: ref }, mergedProps, { children: props.children })));
|
|
30
|
+
});
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import type { CaptureOptionsBySource, ToggleSource } from '@livekit/components-core';
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
import { Track, TrackPublishOptions } from 'livekit-client';
|
|
4
|
+
export declare function getSourceIcon(source: Track.Source, enabled: boolean): JSX.Element;
|
|
5
|
+
export interface TrackToggleProps<T extends ToggleSource> extends Omit<React.ButtonHTMLAttributes<HTMLButtonElement>, 'onChange'> {
|
|
6
|
+
source: T;
|
|
7
|
+
showIcon?: boolean;
|
|
8
|
+
initialState?: boolean;
|
|
9
|
+
disabled?: boolean;
|
|
10
|
+
/**
|
|
11
|
+
* Function that is called when the enabled state of the toggle changes.
|
|
12
|
+
* The second function argument `isUserInitiated` is `true` if the change was initiated by a user interaction, such as a click.
|
|
13
|
+
*/
|
|
14
|
+
onChange?: (enabled: boolean, isUserInitiated: boolean) => void;
|
|
15
|
+
captureOptions?: CaptureOptionsBySource<T>;
|
|
16
|
+
publishOptions?: TrackPublishOptions;
|
|
17
|
+
onDeviceError?: (error: Error) => void;
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* With the `TrackToggle` component it is possible to mute and unmute your camera and microphone.
|
|
21
|
+
* The component uses an html button element under the hood so you can treat it like a button.
|
|
22
|
+
*/
|
|
23
|
+
export declare const TrackToggle: <T extends ToggleSource>(props: TrackToggleProps<T> & React.RefAttributes<HTMLButtonElement>) => React.ReactNode;
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { __rest } from "tslib";
|
|
2
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
+
import * as React from 'react';
|
|
4
|
+
import { Track } from 'livekit-client';
|
|
5
|
+
import { useTrackToggle, CameraIcon, CameraDisabledIcon, MicDisabledIcon, MicIcon, ScreenShareIcon, ScreenShareStopIcon } from '@livekit/components-react';
|
|
6
|
+
export function getSourceIcon(source, enabled) {
|
|
7
|
+
switch (source) {
|
|
8
|
+
case Track.Source.Microphone:
|
|
9
|
+
return enabled ? _jsx(MicIcon, {}) : _jsx(MicDisabledIcon, {});
|
|
10
|
+
case Track.Source.Camera:
|
|
11
|
+
return enabled ? _jsx(CameraIcon, {}) : _jsx(CameraDisabledIcon, {});
|
|
12
|
+
case Track.Source.ScreenShare:
|
|
13
|
+
return enabled ? _jsx(ScreenShareStopIcon, {}) : _jsx(ScreenShareIcon, {});
|
|
14
|
+
default:
|
|
15
|
+
return undefined;
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* With the `TrackToggle` component it is possible to mute and unmute your camera and microphone.
|
|
20
|
+
* The component uses an html button element under the hood so you can treat it like a button.
|
|
21
|
+
*/
|
|
22
|
+
export const TrackToggle =
|
|
23
|
+
/* @__PURE__ */ React.forwardRef(function TrackToggle(_a, ref) {
|
|
24
|
+
var { showIcon, disabled } = _a, props = __rest(_a, ["showIcon", "disabled"]);
|
|
25
|
+
const { buttonProps, enabled } = useTrackToggle(props);
|
|
26
|
+
return (_jsxs("button", Object.assign({ ref: ref }, buttonProps, { disabled: disabled }, { children: [(showIcon !== null && showIcon !== void 0 ? showIcon : true) && getSourceIcon(props.source, enabled && !disabled), props.children] })));
|
|
27
|
+
});
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import type { MessageDecoder, MessageEncoder } from '@livekit/components-core';
|
|
3
|
+
import { MessageFormatter } from '@livekit/components-react';
|
|
4
|
+
import { SCUserType } from '@selfcommunity/types';
|
|
5
|
+
export interface VideoConferenceProps {
|
|
6
|
+
className?: string;
|
|
7
|
+
chatMessageFormatter?: MessageFormatter;
|
|
8
|
+
chatMessageEncoder?: MessageEncoder;
|
|
9
|
+
chatMessageDecoder?: MessageDecoder;
|
|
10
|
+
/** @alpha */
|
|
11
|
+
SettingsComponent?: React.ComponentType;
|
|
12
|
+
speakerFocused?: SCUserType;
|
|
13
|
+
disableChat?: boolean;
|
|
14
|
+
disableMicrophone?: boolean;
|
|
15
|
+
disableCamera?: boolean;
|
|
16
|
+
disableShareScreen?: boolean;
|
|
17
|
+
hideParticipantsList?: boolean;
|
|
18
|
+
showSettings?: boolean;
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* The `VideoConference` ready-made component is your drop-in solution for a classic video conferencing application.
|
|
22
|
+
* It provides functionality such as focusing on one participant, grid view with pagination to handle large numbers
|
|
23
|
+
* of participants, basic non-persistent chat, screen sharing, and more.
|
|
24
|
+
*
|
|
25
|
+
*/
|
|
26
|
+
export declare function VideoConference(inProps: VideoConferenceProps): JSX.Element;
|
|
@@ -0,0 +1,147 @@
|
|
|
1
|
+
import { __rest } from "tslib";
|
|
2
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
+
import * as React from 'react';
|
|
4
|
+
import { isEqualTrackRef, isTrackReference, isWeb, log } from '@livekit/components-core';
|
|
5
|
+
import { RoomEvent, Track } from 'livekit-client';
|
|
6
|
+
import { CarouselLayout, Chat, ConnectionStateToast, GridLayout, LayoutContextProvider, RoomAudioRenderer, useCreateLayoutContext, useParticipants, usePinnedTracks, useTracks } from '@livekit/components-react';
|
|
7
|
+
import { ParticipantTile } from './ParticipantTile';
|
|
8
|
+
import { ControlBar } from './ControlBar';
|
|
9
|
+
import { useEffect } from 'react';
|
|
10
|
+
import { useLivestreamCheck } from './useLiveStreamCheck';
|
|
11
|
+
import { FocusLayout, FocusLayoutContainer, FocusLayoutContainerNoParticipants } from './FocusLayout';
|
|
12
|
+
import { useSCUser } from '@selfcommunity/react-core';
|
|
13
|
+
import classNames from 'classnames';
|
|
14
|
+
import { styled } from '@mui/material/styles';
|
|
15
|
+
import { Box } from '@mui/material';
|
|
16
|
+
import { useThemeProps } from '@mui/system';
|
|
17
|
+
const PREFIX = 'SCVideoConference';
|
|
18
|
+
const classes = {
|
|
19
|
+
root: `${PREFIX}-root`
|
|
20
|
+
};
|
|
21
|
+
const Root = styled(Box, {
|
|
22
|
+
name: PREFIX,
|
|
23
|
+
slot: 'Root',
|
|
24
|
+
overridesResolver: (props, styles) => styles.root
|
|
25
|
+
})(({ theme }) => ({
|
|
26
|
+
'& .lk-chat': {
|
|
27
|
+
height: '100%'
|
|
28
|
+
}
|
|
29
|
+
}));
|
|
30
|
+
/**
|
|
31
|
+
* The `VideoConference` ready-made component is your drop-in solution for a classic video conferencing application.
|
|
32
|
+
* It provides functionality such as focusing on one participant, grid view with pagination to handle large numbers
|
|
33
|
+
* of participants, basic non-persistent chat, screen sharing, and more.
|
|
34
|
+
*
|
|
35
|
+
*/
|
|
36
|
+
export function VideoConference(inProps) {
|
|
37
|
+
var _a, _b;
|
|
38
|
+
// PROPS
|
|
39
|
+
const props = useThemeProps({
|
|
40
|
+
props: inProps,
|
|
41
|
+
name: PREFIX
|
|
42
|
+
});
|
|
43
|
+
const { className, chatMessageFormatter, chatMessageDecoder, chatMessageEncoder, SettingsComponent, speakerFocused, disableChat = false, disableMicrophone = false, disableCamera = false, disableShareScreen = false, hideParticipantsList = false, showSettings } = props, rest = __rest(props, ["className", "chatMessageFormatter", "chatMessageDecoder", "chatMessageEncoder", "SettingsComponent", "speakerFocused", "disableChat", "disableMicrophone", "disableCamera", "disableShareScreen", "hideParticipantsList", "showSettings"]);
|
|
44
|
+
// STATE
|
|
45
|
+
const [widgetState, setWidgetState] = React.useState({
|
|
46
|
+
showChat: false,
|
|
47
|
+
unreadMessages: 0,
|
|
48
|
+
showSettings: showSettings || false
|
|
49
|
+
});
|
|
50
|
+
const [focusInitialized, setFocusInitialized] = React.useState(false);
|
|
51
|
+
const lastAutoFocusedScreenShareTrack = React.useRef(null);
|
|
52
|
+
// HOOKS
|
|
53
|
+
const scUserContext = useSCUser();
|
|
54
|
+
const tracks = useTracks([
|
|
55
|
+
{ source: Track.Source.Camera, withPlaceholder: true },
|
|
56
|
+
{ source: Track.Source.ScreenShare, withPlaceholder: false }
|
|
57
|
+
], { updateOnlyOn: [RoomEvent.ActiveSpeakersChanged], onlySubscribed: false });
|
|
58
|
+
const participants = useParticipants();
|
|
59
|
+
const layoutContext = useCreateLayoutContext();
|
|
60
|
+
const screenShareTracks = tracks.filter(isTrackReference).filter((track) => track.publication.source === Track.Source.ScreenShare);
|
|
61
|
+
const focusTrack = (_a = usePinnedTracks(layoutContext)) === null || _a === void 0 ? void 0 : _a[0];
|
|
62
|
+
const carouselTracks = tracks.filter((track) => !isEqualTrackRef(track, focusTrack));
|
|
63
|
+
useLivestreamCheck();
|
|
64
|
+
/**
|
|
65
|
+
* widgetUpdate
|
|
66
|
+
* @param state
|
|
67
|
+
*/
|
|
68
|
+
const widgetUpdate = (state) => {
|
|
69
|
+
log.debug('updating widget state', state);
|
|
70
|
+
setWidgetState(state);
|
|
71
|
+
};
|
|
72
|
+
/**
|
|
73
|
+
* handleFocusStateChange
|
|
74
|
+
* @param state
|
|
75
|
+
*/
|
|
76
|
+
const handleFocusStateChange = (state) => {
|
|
77
|
+
var _a, _b;
|
|
78
|
+
log.debug('updating widget state', state);
|
|
79
|
+
if (state && state.participant) {
|
|
80
|
+
const updatedFocusTrack = tracks.find((tr) => tr.participant.identity === state.participant.identity);
|
|
81
|
+
if (updatedFocusTrack) {
|
|
82
|
+
(_b = (_a = layoutContext.pin).dispatch) === null || _b === void 0 ? void 0 : _b.call(_a, { msg: 'set_pin', trackReference: updatedFocusTrack });
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
};
|
|
86
|
+
useEffect(() => {
|
|
87
|
+
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
88
|
+
// If screen share tracks are published, and no pin is set explicitly, auto set the screen share.
|
|
89
|
+
if (screenShareTracks.some((track) => track.publication.isSubscribed) && lastAutoFocusedScreenShareTrack.current === null) {
|
|
90
|
+
log.debug('Auto set screen share focus:', { newScreenShareTrack: screenShareTracks[0] });
|
|
91
|
+
(_b = (_a = layoutContext.pin).dispatch) === null || _b === void 0 ? void 0 : _b.call(_a, { msg: 'set_pin', trackReference: screenShareTracks[0] });
|
|
92
|
+
lastAutoFocusedScreenShareTrack.current = screenShareTracks[0];
|
|
93
|
+
}
|
|
94
|
+
else if (lastAutoFocusedScreenShareTrack.current &&
|
|
95
|
+
!screenShareTracks.some((track) => { var _a, _b; return track.publication.trackSid === ((_b = (_a = lastAutoFocusedScreenShareTrack.current) === null || _a === void 0 ? void 0 : _a.publication) === null || _b === void 0 ? void 0 : _b.trackSid); })) {
|
|
96
|
+
log.debug('Auto clearing screen share focus.');
|
|
97
|
+
(_d = (_c = layoutContext.pin).dispatch) === null || _d === void 0 ? void 0 : _d.call(_c, { msg: 'clear_pin' });
|
|
98
|
+
lastAutoFocusedScreenShareTrack.current = null;
|
|
99
|
+
}
|
|
100
|
+
if (focusTrack) {
|
|
101
|
+
let updatedFocusTrack;
|
|
102
|
+
const isFocusTrackParticipantExist = participants.find((pt) => pt.identity === focusTrack.participant.identity);
|
|
103
|
+
if (!isFocusTrackParticipantExist) {
|
|
104
|
+
// Focus track is relative to a participant that has left the room
|
|
105
|
+
updatedFocusTrack = tracks.find((tr) => tr.participant.identity === scUserContext.user.id.toString());
|
|
106
|
+
(_f = (_e = layoutContext.pin).dispatch) === null || _f === void 0 ? void 0 : _f.call(_e, { msg: 'set_pin', trackReference: updatedFocusTrack });
|
|
107
|
+
}
|
|
108
|
+
else if (!isTrackReference(focusTrack)) {
|
|
109
|
+
// You are not subscribet to the track
|
|
110
|
+
updatedFocusTrack = tracks.find((tr) => tr.participant.identity === focusTrack.participant.identity && tr.source === focusTrack.source);
|
|
111
|
+
if (updatedFocusTrack !== focusTrack && isTrackReference(updatedFocusTrack)) {
|
|
112
|
+
(_h = (_g = layoutContext.pin).dispatch) === null || _h === void 0 ? void 0 : _h.call(_g, { msg: 'set_pin', trackReference: updatedFocusTrack });
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
}, [
|
|
117
|
+
screenShareTracks.map((ref) => `${ref.publication.trackSid}_${ref.publication.isSubscribed}`).join(),
|
|
118
|
+
(_b = focusTrack === null || focusTrack === void 0 ? void 0 : focusTrack.publication) === null || _b === void 0 ? void 0 : _b.trackSid,
|
|
119
|
+
tracks,
|
|
120
|
+
participants,
|
|
121
|
+
speakerFocused
|
|
122
|
+
]);
|
|
123
|
+
useEffect(() => {
|
|
124
|
+
var _a, _b;
|
|
125
|
+
if (speakerFocused && !focusInitialized) {
|
|
126
|
+
const speaker = participants.find((pt) => {
|
|
127
|
+
return pt.name === speakerFocused.username;
|
|
128
|
+
});
|
|
129
|
+
if (speaker) {
|
|
130
|
+
const updatedFocusTrack = tracks.find((tr) => {
|
|
131
|
+
if (tr) {
|
|
132
|
+
return tr.participant.identity === speaker.identity;
|
|
133
|
+
}
|
|
134
|
+
return false;
|
|
135
|
+
});
|
|
136
|
+
(_b = (_a = layoutContext.pin).dispatch) === null || _b === void 0 ? void 0 : _b.call(_a, { msg: 'set_pin', trackReference: updatedFocusTrack });
|
|
137
|
+
setFocusInitialized(true);
|
|
138
|
+
}
|
|
139
|
+
}
|
|
140
|
+
}, [tracks, participants, speakerFocused]);
|
|
141
|
+
return (_jsxs(Root, Object.assign({ className: classNames(className, classes.root, 'lk-video-conference') }, rest, { children: [isWeb() && (_jsxs(LayoutContextProvider, Object.assign({ value: layoutContext, onPinChange: handleFocusStateChange, onWidgetChange: widgetUpdate }, { children: [_jsxs("div", Object.assign({ className: "lk-video-conference-inner" }, { children: [!focusTrack ? (_jsx("div", Object.assign({ className: "lk-grid-layout-wrapper" }, { children: _jsx(GridLayout, Object.assign({ tracks: tracks }, { children: _jsx(ParticipantTile, {}) })) }))) : (_jsx("div", Object.assign({ className: "lk-focus-layout-wrapper" }, { children: hideParticipantsList ? (_jsx(FocusLayoutContainerNoParticipants, { children: focusTrack && _jsx(FocusLayout, { trackRef: focusTrack }) })) : (_jsxs(FocusLayoutContainer, { children: [_jsx(CarouselLayout, Object.assign({ tracks: carouselTracks }, { children: _jsx(ParticipantTile, {}) })), focusTrack && _jsx(FocusLayout, { trackRef: focusTrack })] })) }))), _jsx(ControlBar, { controls: Object.assign({
|
|
142
|
+
chat: !disableChat,
|
|
143
|
+
microphone: !disableMicrophone,
|
|
144
|
+
camera: !disableCamera,
|
|
145
|
+
screenShare: !disableShareScreen
|
|
146
|
+
}, { settings: !!SettingsComponent }) })] })), !disableChat && (_jsx(Chat, { style: { display: widgetState.showChat ? 'grid' : 'none' }, messageFormatter: chatMessageFormatter, messageEncoder: chatMessageEncoder, messageDecoder: chatMessageDecoder })), SettingsComponent && (_jsx("div", Object.assign({ className: "lk-settings-menu-modal", style: { display: widgetState.showSettings ? 'block' : 'none' } }, { children: _jsx(SettingsComponent, {}) })))] }))), _jsx(RoomAudioRenderer, {}), _jsx(ConnectionStateToast, {})] })));
|
|
147
|
+
}
|