@100mslive/roomkit-react 0.1.8 → 0.1.9-alpha.0
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/{HLSView-DDGPZHA2.js → HLSView-U53QN3AC.js} +3 -3
- package/dist/Modal/Dialog.d.ts +402 -1706
- package/dist/Prebuilt/App.d.ts +5 -0
- package/dist/Prebuilt/AppContext.d.ts +1 -0
- package/dist/Prebuilt/AppStateContext.d.ts +16 -0
- package/dist/Prebuilt/components/ConferenceScreen.d.ts +2 -0
- package/dist/Prebuilt/components/Footer/PollsToggle.d.ts +2 -0
- package/dist/Prebuilt/components/LeaveScreen.d.ts +2 -0
- package/dist/Prebuilt/components/MwebLandscapePrompt.d.ts +2 -0
- package/dist/Prebuilt/components/Notifications/AutoplayBlockedModal.d.ts +2 -0
- package/dist/Prebuilt/components/Notifications/HLSFailureModal.d.ts +2 -0
- package/dist/Prebuilt/components/Notifications/InitErrorModal.d.ts +2 -0
- package/dist/Prebuilt/components/Notifications/Notifications.d.ts +2 -0
- package/dist/Prebuilt/components/Notifications/PeerNotifications.d.ts +1 -0
- package/dist/Prebuilt/components/Notifications/PermissionErrorModal.d.ts +2 -0
- package/dist/Prebuilt/components/Notifications/ReconnectNotifications.d.ts +2 -0
- package/dist/Prebuilt/components/Notifications/TrackBulkUnmuteModal.d.ts +2 -0
- package/dist/Prebuilt/components/Notifications/TrackNotifications.d.ts +1 -0
- package/dist/Prebuilt/components/Notifications/TrackUnmuteModal.d.ts +2 -0
- package/dist/Prebuilt/components/Polls/Polls.d.ts +2 -0
- package/dist/Prebuilt/components/Preview/PreviewJoin.d.ts +1 -2
- package/dist/Prebuilt/components/Preview/PreviewScreen.d.ts +2 -0
- package/dist/Prebuilt/components/hooks/useRedirectToLeave.d.ts +1 -1
- package/dist/{VirtualBackground-UVZJVOA2.js → VirtualBackground-PMLQPJB6.js} +3 -5
- package/dist/{VirtualBackground-UVZJVOA2.js.map → VirtualBackground-PMLQPJB6.js.map} +1 -1
- package/dist/chunk-ANQRGVIX.js +14441 -0
- package/dist/chunk-ANQRGVIX.js.map +7 -0
- package/dist/{chunk-6SQTFOK6.js → chunk-XQ2NRKIW.js} +66 -3
- package/dist/{chunk-6SQTFOK6.js.map → chunk-XQ2NRKIW.js.map} +4 -4
- package/dist/context/DialogContext.d.ts +6 -0
- package/dist/hooks/useDialogContainerSelector.d.ts +1 -0
- package/dist/index.cjs.js +10944 -9974
- package/dist/index.cjs.js.map +4 -4
- package/dist/index.d.ts +1 -0
- package/dist/index.js +6 -2
- package/dist/meta.cjs.json +3871 -3188
- package/dist/meta.esbuild.json +4303 -3728
- package/dist/utils/animations.d.ts +11 -0
- package/package.json +6 -7
- package/src/Modal/Dialog.tsx +31 -3
- package/src/Prebuilt/App.tsx +46 -99
- package/src/Prebuilt/AppContext.tsx +4 -0
- package/src/Prebuilt/AppStateContext.tsx +71 -0
- package/src/Prebuilt/common/constants.js +35 -0
- package/src/Prebuilt/common/utils.js +47 -0
- package/src/Prebuilt/components/AppData/AppData.jsx +5 -0
- package/src/Prebuilt/components/AppData/useSidepane.js +23 -1
- package/src/Prebuilt/components/AppData/useUISettings.js +48 -4
- package/src/Prebuilt/components/{conference.jsx → ConferenceScreen.tsx} +30 -43
- package/src/Prebuilt/components/Footer/Footer.tsx +5 -0
- package/src/Prebuilt/components/Footer/PaginatedParticipants.tsx +63 -32
- package/src/Prebuilt/components/Footer/ParticipantList.jsx +2 -1
- package/src/Prebuilt/components/Footer/PollsToggle.tsx +22 -0
- package/src/Prebuilt/components/Footer/RoleAccordion.tsx +2 -2
- package/src/Prebuilt/components/Header/StreamActions.tsx +5 -3
- package/src/Prebuilt/components/Leave/DesktopLeaveRoom.tsx +4 -5
- package/src/Prebuilt/components/Leave/LeaveRoom.tsx +0 -4
- package/src/Prebuilt/components/{PostLeave.jsx → LeaveScreen.tsx} +6 -13
- package/src/Prebuilt/components/MoreSettings/ChangeNameModal.jsx +2 -3
- package/src/Prebuilt/components/MoreSettings/EmbedUrl.jsx +2 -3
- package/src/Prebuilt/components/MoreSettings/SplitComponents/MwebOptions.tsx +18 -1
- package/src/Prebuilt/components/{MwebLandscapePrompt.jsx → MwebLandscapePrompt.tsx} +10 -11
- package/src/Prebuilt/components/Notifications/{AutoplayBlockedModal.jsx → AutoplayBlockedModal.tsx} +2 -1
- package/src/Prebuilt/components/Notifications/{HLSFailureModal.jsx → HLSFailureModal.tsx} +10 -8
- package/src/Prebuilt/components/Notifications/{InitErrorModal.jsx → InitErrorModal.tsx} +5 -2
- package/src/Prebuilt/components/Notifications/{Notifications.jsx → Notifications.tsx} +41 -27
- package/src/Prebuilt/components/Notifications/{PeerNotifications.jsx → PeerNotifications.tsx} +3 -0
- package/src/Prebuilt/components/Notifications/{PermissionErrorModal.jsx → PermissionErrorModal.tsx} +6 -4
- package/src/Prebuilt/components/Notifications/{ReconnectNotifications.jsx → ReconnectNotifications.tsx} +11 -6
- package/src/Prebuilt/components/Notifications/{TrackBulkUnmuteModal.jsx → TrackBulkUnmuteModal.tsx} +9 -3
- package/src/Prebuilt/components/Notifications/{TrackUnmuteModal.jsx → TrackUnmuteModal.tsx} +9 -3
- package/src/Prebuilt/components/Notifications/index.tsx +1 -0
- package/src/Prebuilt/components/Polls/CreatePollQuiz/PollsQuizMenu.jsx +229 -0
- package/src/Prebuilt/components/Polls/CreatePollQuiz/Timer.jsx +71 -0
- package/src/Prebuilt/components/Polls/CreateQuestions/CreateQuestions.jsx +132 -0
- package/src/Prebuilt/components/Polls/CreateQuestions/DeleteQuestionModal.jsx +66 -0
- package/src/Prebuilt/components/Polls/CreateQuestions/QuestionForm.jsx +251 -0
- package/src/Prebuilt/components/Polls/CreateQuestions/SavedQuestion.jsx +57 -0
- package/src/Prebuilt/components/Polls/Polls.tsx +28 -0
- package/src/Prebuilt/components/Polls/Voting/PollResultSummary.jsx +125 -0
- package/src/Prebuilt/components/Polls/Voting/QuestionCard.jsx +249 -0
- package/src/Prebuilt/components/Polls/Voting/StandardVoting.jsx +40 -0
- package/src/Prebuilt/components/Polls/Voting/TimedVoting.jsx +36 -0
- package/src/Prebuilt/components/Polls/Voting/Voting.jsx +99 -0
- package/src/Prebuilt/components/Polls/common/MultipleChoiceOptions.jsx +101 -0
- package/src/Prebuilt/components/Polls/common/OptionInputWithDelete.jsx +25 -0
- package/src/Prebuilt/components/Polls/common/SingleChoiceOptions.jsx +125 -0
- package/src/Prebuilt/components/Polls/common/StatusIndicator.jsx +47 -0
- package/src/Prebuilt/components/Polls/common/VoteCount.jsx +28 -0
- package/src/Prebuilt/components/Polls/common/VoteProgress.jsx +17 -0
- package/src/Prebuilt/components/Polls/common/VoterList.jsx +22 -0
- package/src/Prebuilt/components/Polls/common/Votes.jsx +72 -0
- package/src/Prebuilt/components/Preview/PreviewForm.tsx +3 -2
- package/src/Prebuilt/components/Preview/PreviewJoin.tsx +32 -27
- package/src/Prebuilt/components/Preview/{PreviewContainer.tsx → PreviewScreen.tsx} +2 -19
- package/src/Prebuilt/components/RaiseHand.jsx +1 -1
- package/src/Prebuilt/components/RoleChangeModal.jsx +2 -3
- package/src/Prebuilt/components/RoleChangeRequest/RequestPrompt.tsx +2 -3
- package/src/Prebuilt/components/Settings/SettingsModal.jsx +2 -3
- package/src/Prebuilt/components/Settings/StartRecording.jsx +15 -4
- package/src/Prebuilt/components/SidePaneTabs.tsx +1 -1
- package/src/Prebuilt/components/StatsForNerds.jsx +2 -3
- package/src/Prebuilt/components/Streaming/Common.jsx +31 -21
- package/src/Prebuilt/components/VideoLayouts/ScreenshareLayout.tsx +8 -9
- package/src/Prebuilt/components/VideoTile.jsx +37 -33
- package/src/Prebuilt/components/hooks/useAutoStartStreaming.tsx +3 -3
- package/src/Prebuilt/components/hooks/useRedirectToLeave.tsx +9 -17
- package/src/Prebuilt/components/pdfAnnotator/pdfFileOptions.jsx +2 -3
- package/src/Prebuilt/components/pdfAnnotator/submitPdf.jsx +1 -1
- package/src/Prebuilt/components/pdfAnnotator/uploadedFile.jsx +2 -3
- package/src/Prebuilt/layouts/EmbedView.jsx +47 -60
- package/src/Prebuilt/layouts/PDFView.jsx +49 -99
- package/src/Prebuilt/layouts/SidePane.tsx +8 -4
- package/src/Prebuilt/layouts/VideoStreamingSection.tsx +2 -2
- package/src/Prebuilt/primitives/DialogContent.jsx +4 -5
- package/src/context/DialogContext.tsx +13 -0
- package/src/hooks/useDialogContainerSelector.tsx +7 -0
- package/src/index.ts +1 -0
- package/src/utils/animations.ts +6 -0
- package/dist/Prebuilt/components/Notifications/HeadlessEndRoomListener.d.ts +0 -2
- package/dist/Prebuilt/components/PrebuiltDialogPortal.d.ts +0 -4
- package/dist/Prebuilt/components/PrebuiltTileElements.d.ts +0 -2198
- package/dist/Prebuilt/components/Preview/PreviewContainer.d.ts +0 -3
- package/dist/chunk-HUMNPIYI.js +0 -70
- package/dist/chunk-HUMNPIYI.js.map +0 -7
- package/dist/chunk-PRM33R4R.js +0 -7160
- package/dist/chunk-PRM33R4R.js.map +0 -7
- package/dist/conference-N7S47TDK.js +0 -6602
- package/dist/conference-N7S47TDK.js.map +0 -7
- package/src/Prebuilt/components/GoLiveButton.jsx +0 -42
- package/src/Prebuilt/components/Notifications/HeadlessEndRoomListener.tsx +0 -23
- package/src/Prebuilt/components/PrebuiltDialogPortal.tsx +0 -6
- package/src/Prebuilt/components/PrebuiltTileElements.tsx +0 -5
- package/src/Prebuilt/components/Streaming/HLSStreaming.jsx +0 -220
- package/src/Prebuilt/components/Streaming/RTMPStreaming.jsx +0 -334
- package/src/Prebuilt/components/Streaming/StreamingLanding.jsx +0 -76
- /package/dist/{HLSView-DDGPZHA2.js.map → HLSView-U53QN3AC.js.map} +0 -0
- /package/{src/Prebuilt/components/Notifications/index.jsx → dist/Prebuilt/components/Notifications/index.d.ts} +0 -0
- /package/src/Prebuilt/components/Notifications/{TrackNotifications.jsx → TrackNotifications.tsx} +0 -0
@@ -1,7 +0,0 @@
|
|
1
|
-
{
|
2
|
-
"version": 3,
|
3
|
-
"sources": ["../src/Prebuilt/components/conference.jsx", "../src/Prebuilt/components/Footer/Footer.tsx", "../src/Prebuilt/components/EmojiReaction.jsx", "../src/Prebuilt/components/Footer/EmojiCard.jsx", "../src/Prebuilt/components/hooks/useDropdownList.jsx", "../src/Prebuilt/components/Leave/LeaveRoom.tsx", "../src/Prebuilt/components/Leave/DesktopLeaveRoom.tsx", "../src/Prebuilt/components/Leave/EndSessionContent.tsx", "../src/Prebuilt/components/Leave/LeaveAtoms.tsx", "../src/Prebuilt/components/Leave/LeaveCard.tsx", "../src/Prebuilt/components/Leave/LeaveSessionContent.tsx", "../src/Prebuilt/components/Leave/MwebLeaveRoom.tsx", "../src/Prebuilt/components/MoreSettings/MoreSettings.tsx", "../src/Prebuilt/components/MoreSettings/SplitComponents/DesktopOptions.tsx", "../src/Prebuilt/components/PIP/index.jsx", "../src/Prebuilt/components/PIP/PIPComponent.jsx", "../src/Prebuilt/components/PIP/SetupMediaSession.js", "../src/Prebuilt/components/RoleChangeModal.jsx", "../src/Prebuilt/components/Settings/StartRecording.jsx", "../src/Prebuilt/components/Streaming/ResolutionInput.jsx", "../src/Prebuilt/components/Streaming/RTMPStreaming.jsx", "../src/Prebuilt/components/Streaming/Common.jsx", "../src/Prebuilt/components/StatsForNerds.jsx", "../src/Prebuilt/components/MoreSettings/BulkRoleChangeModal.jsx", "../src/Prebuilt/components/MoreSettings/FullScreenItem.jsx", "../src/Prebuilt/components/hooks/useFullscreen.js", "../src/Prebuilt/components/MoreSettings/MuteAllModal.jsx", "../src/Prebuilt/components/MoreSettings/MuteAllContent.jsx", "../src/Prebuilt/components/MoreSettings/SplitComponents/MwebOptions.tsx", "../src/Prebuilt/components/MoreSettings/ChangeNameModal.jsx", "../src/Prebuilt/components/MoreSettings/ChangeNameContent.jsx", "../src/Prebuilt/components/RaiseHand.jsx", "../src/Prebuilt/components/ScreenShareToggle.jsx", "../src/Prebuilt/components/pdfAnnotator/shareScreenOptions.jsx", "../src/Prebuilt/components/ShareMenuIcon.jsx", "../src/Prebuilt/components/pdfAnnotator/pdfFileOptions.jsx", "../src/Prebuilt/components/pdfAnnotator/pdfHeader.jsx", "../src/Prebuilt/components/pdfAnnotator/submitPdf.jsx", "../src/Prebuilt/components/pdfAnnotator/uploadedFile.jsx", "../src/Prebuilt/components/pdfAnnotator/pdfInfo.jsx", "../src/Prebuilt/components/Footer/ChatToggle.tsx", "../src/Prebuilt/components/Footer/ParticipantList.jsx", "../src/Prebuilt/components/Footer/RoleAccordion.tsx", "../src/Prebuilt/components/Footer/RoleOptions.tsx", "../src/Prebuilt/components/Notifications/HLSFailureModal.jsx", "../src/Prebuilt/components/RoleChangeRequest/RoleChangeRequestModal.tsx", "../src/Prebuilt/components/RoleChangeRequest/RequestPrompt.tsx", "../src/Prebuilt/layouts/VideoStreamingSection.tsx", "../src/Prebuilt/components/VideoLayouts/GridLayout.tsx", "../src/Prebuilt/components/VideoLayouts/EqualProminence.tsx", "../src/Prebuilt/components/InsetTile.tsx", "../src/Prebuilt/components/VideoTile.jsx", "../src/Prebuilt/components/TileMenu/TileMenu.jsx", "../src/Prebuilt/components/TileMenu/TileMenuContent.jsx", "../src/Prebuilt/components/peerTileUtils.jsx", "../src/Prebuilt/components/hooks/useVideoTileLayout.ts", "../src/Prebuilt/components/Pagination.tsx", "../src/Prebuilt/components/VideoLayouts/Grid.tsx", "../src/Prebuilt/components/hooks/useTileLayout.tsx", "../src/Prebuilt/components/VideoLayouts/RoleProminence.tsx", "../src/Prebuilt/components/SecondaryTiles.tsx", "../src/Prebuilt/components/VideoLayouts/ProminenceLayout.tsx", "../src/Prebuilt/components/hooks/useRoleProminencePeers.tsx", "../src/Prebuilt/components/VideoLayouts/ScreenshareLayout.tsx", "../src/Prebuilt/components/ScreenshareTile.jsx", "../src/Prebuilt/components/ScreenshareDisplay.jsx", "../src/Prebuilt/common/PeersSorter.ts", "../src/Prebuilt/layouts/EmbedView.jsx", "../src/Prebuilt/layouts/PDFView.jsx", "../src/Prebuilt/layouts/SidePane.tsx", "../src/Prebuilt/components/SidePaneTabs.tsx", "../src/Prebuilt/components/Chat/Chat.jsx", "../src/Prebuilt/components/Chat/ChatBody.jsx", "../src/Prebuilt/components/hooks/useSetPinnedMessage.js", "../src/Prebuilt/components/Chat/useUnreadCount.js", "../src/Prebuilt/components/Chat/ChatFooter.tsx", "../src/Prebuilt/components/AppData/useChatState.js", "../src/Prebuilt/components/Chat/useEmojiPickerStyles.js", "../src/Prebuilt/components/Footer/PaginatedParticipants.tsx", "../src/Prebuilt/components/Streaming/StreamingLanding.jsx", "../src/Prebuilt/components/Streaming/HLSStreaming.jsx", "../src/Prebuilt/layouts/WaitingView.jsx"],
|
4
|
-
"sourcesContent": ["import React, { useEffect, useRef, useState } from 'react';\nimport { useNavigate, useParams } from 'react-router-dom';\nimport { usePrevious } from 'react-use';\nimport {\n HMSRoomState,\n selectAppData,\n selectIsConnectedToRoom,\n selectRoomState,\n useHMSActions,\n useHMSStore,\n} from '@100mslive/react-sdk';\nimport { Footer } from './Footer/Footer';\nimport { HLSFailureModal } from './Notifications/HLSFailureModal';\nimport { ActivatedPIP } from './PIP/PIPComponent';\nimport { PictureInPicture } from './PIP/PIPManager';\nimport { RoleChangeRequestModal } from './RoleChangeRequest/RoleChangeRequestModal';\nimport { Box, Flex } from '../../Layout';\nimport { useHMSPrebuiltContext } from '../AppContext';\nimport { VideoStreamingSection } from '../layouts/VideoStreamingSection';\nimport FullPageProgress from './FullPageProgress';\nimport { Header } from './Header';\nimport {\n useRoomLayoutConferencingScreen,\n useRoomLayoutPreviewScreen,\n} from '../provider/roomLayoutProvider/hooks/useRoomLayoutScreen';\nimport { useAuthToken, useSetAppDataByKey } from './AppData/useUISettings';\nimport { APP_DATA, isAndroid, isIOS, isIPadOS } from '../common/constants';\n\nconst Conference = () => {\n const navigate = useNavigate();\n const { roomId, role } = useParams();\n const { userName, endpoints, onJoin: onJoinFunc } = useHMSPrebuiltContext();\n const screenProps = useRoomLayoutConferencingScreen();\n const { isPreviewScreenEnabled } = useRoomLayoutPreviewScreen();\n const roomState = useHMSStore(selectRoomState);\n const prevState = usePrevious(roomState);\n const isConnectedToRoom = useHMSStore(selectIsConnectedToRoom);\n const hmsActions = useHMSActions();\n const [hideControls, setHideControls] = useState(false);\n const dropdownList = useHMSStore(selectAppData(APP_DATA.dropdownList));\n const authTokenInAppData = useAuthToken();\n const headerRef = useRef();\n const footerRef = useRef();\n const isMobileDevice = isAndroid || isIOS || isIPadOS;\n const dropdownListRef = useRef();\n const [isHLSStarted] = useSetAppDataByKey(APP_DATA.hlsStarted);\n const toggleControls = () => {\n if (dropdownListRef.current?.length === 0 && isMobileDevice) {\n setHideControls(value => !value);\n }\n };\n const autoRoomJoined = useRef(isPreviewScreenEnabled);\n\n useEffect(() => {\n let timeout = null;\n dropdownListRef.current = dropdownList || [];\n if (dropdownListRef.current.length === 0) {\n clearTimeout(timeout);\n timeout = setTimeout(() => {\n if (dropdownListRef.current.length === 0) {\n setHideControls(isMobileDevice);\n }\n }, 5000);\n }\n return () => {\n clearTimeout(timeout);\n };\n }, [dropdownList, hideControls, isMobileDevice]);\n\n useEffect(() => {\n if (!roomId) {\n navigate(`/`);\n return;\n }\n if (!isPreviewScreenEnabled) {\n return;\n }\n if (\n !prevState &&\n !(roomState === HMSRoomState.Connecting || roomState === HMSRoomState.Reconnecting || isConnectedToRoom)\n ) {\n if (role) navigate(`/preview/${roomId || ''}/${role}`);\n else navigate(`/preview/${roomId || ''}`);\n }\n }, [isConnectedToRoom, prevState, roomState, navigate, role, roomId, isPreviewScreenEnabled]);\n\n useEffect(() => {\n if (\n authTokenInAppData &&\n !isConnectedToRoom &&\n !isPreviewScreenEnabled &&\n roomState !== HMSRoomState.Connecting &&\n !autoRoomJoined.current\n ) {\n hmsActions\n .join({\n userName,\n authToken: authTokenInAppData,\n initEndpoint: endpoints?.init,\n initialSettings: {\n isAudioMuted: !isPreviewScreenEnabled,\n isVideoMuted: !isPreviewScreenEnabled,\n speakerAutoSelectionBlacklist: ['Yeti Stereo Microphone'],\n },\n })\n .catch(console.error);\n autoRoomJoined.current = true;\n }\n }, [authTokenInAppData, endpoints?.init, hmsActions, isConnectedToRoom, isPreviewScreenEnabled, roomState, userName]);\n\n useEffect(() => {\n onJoinFunc?.();\n return () => {\n PictureInPicture.stop().catch(error => console.error('stopping pip', error));\n };\n }, []);\n\n if (!isConnectedToRoom && ![HMSRoomState.Reconnecting, HMSRoomState.Disconnected].includes(roomState)) {\n return <FullPageProgress text={roomState === HMSRoomState.Connecting ? 'Joining...' : ''} />;\n }\n\n return (\n <>\n {isHLSStarted ? (\n <Box css={{ position: 'fixed', zIndex: 100, w: '100%', h: '100%', left: 0, top: 0 }}>\n <FullPageProgress text=\"Starting live stream...\" css={{ opacity: 0.8, bg: '$background_dim' }} />\n </Box>\n ) : null}\n <Flex css={{ size: '100%', overflow: 'hidden' }} direction=\"column\">\n {!screenProps.hideSections.includes('header') && (\n <Box\n ref={headerRef}\n css={{\n h: '$18',\n transition: 'margin 0.3s ease-in-out',\n marginTop: hideControls ? `-${headerRef.current?.clientHeight}px` : 'none',\n '@md': {\n h: '$17',\n },\n }}\n data-testid=\"header\"\n >\n <Header elements={screenProps.elements} screenType={screenProps.screenType} />\n </Box>\n )}\n <Box\n css={{\n w: '100%',\n flex: '1 1 0',\n minHeight: 0,\n px: screenProps?.elements?.video_tile_layout?.grid?.edge_to_edge ? 0 : '$10', // TODO: padding to be controlled by section/element\n paddingBottom: 'env(safe-area-inset-bottom)',\n '@lg': {\n px: 0,\n },\n }}\n id=\"conferencing\"\n data-testid=\"conferencing\"\n onClick={toggleControls}\n >\n <VideoStreamingSection\n screenType={screenProps.screenType}\n elements={screenProps.elements}\n hideControls={hideControls}\n />\n </Box>\n {!screenProps.hideSections.includes('footer') && (\n <Box\n ref={footerRef}\n css={{\n flexShrink: 0,\n maxHeight: '$24',\n transition: 'margin 0.3s ease-in-out',\n bg: '$background_dim',\n marginBottom: hideControls ? `-${footerRef.current?.clientHeight}px` : undefined,\n '@md': {\n maxHeight: 'unset',\n bg: screenProps.screenType === 'hls_live_streaming' ? 'transparent' : '$background_dim',\n },\n }}\n data-testid=\"footer\"\n >\n <Footer elements={screenProps.elements} screenType={screenProps.screenType} />\n </Box>\n )}\n <RoleChangeRequestModal />\n <HLSFailureModal />\n <ActivatedPIP />\n </Flex>\n </>\n );\n};\n\nexport default Conference;\n", "import React, { Suspense, useEffect } from 'react';\nimport { useMedia } from 'react-use';\nimport {\n ConferencingScreen,\n DefaultConferencingScreen_Elements,\n HLSLiveStreamingScreen_Elements,\n} from '@100mslive/types-prebuilt';\nimport { Chat_ChatState } from '@100mslive/types-prebuilt/elements/chat';\nimport { useAVToggle } from '@100mslive/react-sdk';\nimport { config as cssConfig, Footer as AppFooter } from '../../..';\n// @ts-ignore: No implicit Any\nimport { AudioVideoToggle } from '../AudioVideoToggle';\n// @ts-ignore: No implicit Any\nimport { EmojiReaction } from '../EmojiReaction';\n// @ts-ignore: No implicit Any\nimport { LeaveRoom } from '../Leave/LeaveRoom';\n// @ts-ignore: No implicit Any\nimport { MoreSettings } from '../MoreSettings/MoreSettings';\n// @ts-ignore: No implicit Any\nimport { RaiseHand } from '../RaiseHand';\n// @ts-ignore: No implicit Any\nimport { ScreenshareToggle } from '../ScreenShareToggle';\n// @ts-ignore: No implicit Any\nimport { ChatToggle } from './ChatToggle';\n// @ts-ignore: No implicit Any\nimport { ParticipantCount } from './ParticipantList';\n// @ts-ignore: No implicit Any\nimport { useIsSidepaneTypeOpen, useSidepaneToggle } from '../AppData/useSidepane';\n// @ts-ignore: No implicit Any\nimport { SIDE_PANE_OPTIONS } from '../../common/constants';\n// @ts-ignore: No implicit Any\nconst VirtualBackground = React.lazy(() => import('../../plugins/VirtualBackground/VirtualBackground'));\n\nexport const Footer = ({\n screenType,\n elements,\n}: {\n screenType: keyof ConferencingScreen;\n elements: DefaultConferencingScreen_Elements | HLSLiveStreamingScreen_Elements;\n}) => {\n const isMobile = useMedia(cssConfig.media.md);\n const isOverlayChat = !!elements?.chat?.is_overlay;\n const openByDefault = elements?.chat?.initial_state === Chat_ChatState.CHAT_STATE_OPEN;\n\n const { toggleAudio, toggleVideo } = useAVToggle();\n const noAVPermissions = !(toggleAudio || toggleVideo);\n const isChatOpen = useIsSidepaneTypeOpen(SIDE_PANE_OPTIONS.CHAT);\n const toggleChat = useSidepaneToggle(SIDE_PANE_OPTIONS.CHAT);\n\n useEffect(() => {\n if (!isChatOpen && openByDefault) {\n toggleChat();\n }\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [toggleChat, openByDefault]);\n\n return (\n <AppFooter.Root\n css={{\n flexWrap: 'nowrap',\n '@md': {\n justifyContent: 'center',\n gap: '$10',\n position: 'relative',\n // To prevent it from showing over the sidepane if chat type is not overlay\n zIndex: isOverlayChat && isChatOpen ? 20 : 1,\n },\n }}\n >\n <AppFooter.Left\n css={{\n '@md': {\n w: 'unset',\n p: '0',\n gap: '$10',\n },\n }}\n >\n {isMobile ? <LeaveRoom screenType={screenType} /> : null}\n <AudioVideoToggle />\n {isMobile ? null : (\n <Suspense fallback={<></>}>\n <VirtualBackground />\n </Suspense>\n )}\n </AppFooter.Left>\n <AppFooter.Center\n css={{\n '@md': {\n w: 'unset',\n gap: '$10',\n },\n }}\n >\n {isMobile ? (\n <>\n {noAVPermissions ? <RaiseHand /> : null}\n {elements?.chat && <ChatToggle />}\n <MoreSettings elements={elements} screenType={screenType} />\n </>\n ) : (\n <>\n <ScreenshareToggle />\n <RaiseHand />\n {elements?.emoji_reactions && <EmojiReaction />}\n <LeaveRoom screenType={screenType} />\n </>\n )}\n </AppFooter.Center>\n <AppFooter.Right>\n {!isMobile && elements?.chat && <ChatToggle />}\n {elements?.participant_list && <ParticipantCount />}\n <MoreSettings elements={elements} screenType={screenType} />\n </AppFooter.Right>\n </AppFooter.Root>\n );\n};\n", "import React, { Fragment, useState } from 'react';\nimport { useMedia } from 'react-use';\nimport data from '@emoji-mart/data/sets/14/apple.json';\nimport { init } from 'emoji-mart';\nimport {\n selectAvailableRoleNames,\n selectIsConnectedToRoom,\n selectLocalPeerID,\n useCustomEvent,\n // useHMSActions,\n useHMSStore,\n // useRecordingStreaming,\n} from '@100mslive/react-sdk';\nimport { EmojiIcon } from '@100mslive/react-icons';\nimport { EmojiCard } from './Footer/EmojiCard';\n// import { ToastManager } from './Toast/ToastManager';\nimport { Dropdown } from '../../Dropdown';\nimport { Box } from '../../Layout';\nimport { config as cssConfig } from '../../Theme';\nimport { Tooltip } from '../../Tooltip';\nimport IconButton from '../IconButton';\nimport { useDropdownList } from './hooks/useDropdownList';\nimport { EMOJI_REACTION_TYPE } from '../common/constants';\n\ninit({ data });\n\nexport const EmojiReaction = () => {\n const [open, setOpen] = useState(false);\n const isConnected = useHMSStore(selectIsConnectedToRoom);\n useDropdownList({ open: open, name: 'EmojiReaction' });\n // const hmsActions = useHMSActions();\n const roles = useHMSStore(selectAvailableRoleNames);\n const localPeerId = useHMSStore(selectLocalPeerID);\n // const { isStreamingOn } = useRecordingStreaming();\n const isMobile = useMedia(cssConfig.media.md);\n\n const { sendEvent } = useCustomEvent({\n type: EMOJI_REACTION_TYPE,\n });\n\n const sendReaction = async emojiId => {\n const data = {\n type: EMOJI_REACTION_TYPE,\n emojiId: emojiId,\n senderId: localPeerId,\n };\n // TODO: RT find a way to figure out hls-viewer roles\n sendEvent(data, { roleNames: roles });\n window.showFlyingEmoji?.({ emojiId, senderId: localPeerId });\n /* if (isStreamingOn) {\n try {\n await hmsActions.sendHLSTimedMetadata([\n {\n payload: JSON.stringify(data),\n duration: 2,\n },\n ]);\n } catch (error) {\n console.log(error);\n ToastManager.addToast({ title: error.message });\n }\n } */\n };\n\n if (!isConnected) {\n return null;\n }\n return isMobile ? (\n <EmojiCard sendReaction={sendReaction} />\n ) : (\n <Fragment>\n <Dropdown.Root open={open} onOpenChange={setOpen}>\n <Dropdown.Trigger asChild data-testid=\"emoji_reaction_btn\">\n <IconButton>\n <Tooltip title=\"Emoji reaction\">\n <Box>\n <EmojiIcon />\n </Box>\n </Tooltip>\n </IconButton>\n </Dropdown.Trigger>\n <Dropdown.Content sideOffset={5} align=\"center\" css={{ p: '$8', bg: '$surface_default' }}>\n <EmojiCard sendReaction={sendReaction} />\n </Dropdown.Content>\n </Dropdown.Root>\n </Fragment>\n );\n};\n", "import React from 'react';\nimport { Flex } from '../../../Layout';\nimport { styled } from '../../../Theme';\n\n// When changing emojis in the grid, keep in mind that the payload used in sendHLSTimedMetadata has a limit of 100 characters. Using bigger emoji Ids can cause the limit to be exceeded.\nconst emojiReactionList = [\n [{ emojiId: '+1' }, { emojiId: '-1' }, { emojiId: 'wave' }, { emojiId: 'clap' }, { emojiId: 'fire' }],\n [{ emojiId: 'tada' }, { emojiId: 'heart_eyes' }, { emojiId: 'joy' }, { emojiId: 'open_mouth' }, { emojiId: 'sob' }],\n];\n\nexport const EmojiCard = ({ sendReaction }) => {\n return emojiReactionList.map((emojiLine, index) => (\n <Flex key={index} justify=\"between\" css={{ mb: '$8' }}>\n {emojiLine.map(emoji => (\n <EmojiContainer key={emoji.emojiId} onClick={() => sendReaction(emoji.emojiId)}>\n <em-emoji id={emoji.emojiId} size=\"100%\" set=\"apple\"></em-emoji>\n </EmojiContainer>\n ))}\n </Flex>\n ));\n};\n\nconst EmojiContainer = styled('span', {\n position: 'relative',\n cursor: 'pointer',\n width: '$16',\n height: '$16',\n p: '$4',\n '&:hover': {\n p: '7px',\n bg: '$surface_brighter',\n borderRadius: '$1',\n },\n});\n", "import { useEffect } from 'react';\nimport { useSetAppDataByKey } from '../AppData/useUISettings';\nimport { APP_DATA } from '../../common/constants';\n\nexport const useDropdownList = ({ name, open }) => {\n const [dropdownList = [], setDropdownList] = useSetAppDataByKey(APP_DATA.dropdownList);\n\n useEffect(() => {\n if (open) {\n if (!dropdownList.includes(name)) {\n setDropdownList([...dropdownList, name]);\n }\n } else {\n const index = dropdownList.indexOf(name);\n if (index >= 0) {\n const newDropdownList = [...dropdownList];\n newDropdownList.splice(index, 1);\n setDropdownList(newDropdownList);\n }\n }\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [open, name]);\n};\n", "import React from 'react';\nimport { useMedia } from 'react-use';\nimport { ConferencingScreen } from '@100mslive/types-prebuilt';\nimport {\n HMSPeer,\n HMSRole,\n selectHLSState,\n selectIsConnectedToRoom,\n selectPeersByCondition,\n selectPermissions,\n selectRolesMap,\n useHMSActions,\n useHMSStore,\n} from '@100mslive/react-sdk';\nimport { config as cssConfig } from '../../../Theme';\n// @ts-ignore: No implicit Any\n// @ts-ignore: No implicit Any\nimport { ToastManager } from '../Toast/ToastManager';\nimport { DesktopLeaveRoom } from './DesktopLeaveRoom';\nimport { MwebLeaveRoom } from './MwebLeaveRoom';\nimport { useRedirectToLeave } from '../hooks/useRedirectToLeave';\n\nexport const LeaveRoom = ({ screenType }: { screenType: keyof ConferencingScreen }) => {\n const isConnected = useHMSStore(selectIsConnectedToRoom);\n const permissions = useHMSStore(selectPermissions);\n const isMobile = useMedia(cssConfig.media.md);\n const rolesMap: Record<string, HMSRole> = useHMSStore(selectRolesMap);\n const streamingPermissionRoles = Object.keys(rolesMap).filter(roleName => {\n const roleObj = rolesMap[roleName];\n return roleObj.permissions.hlsStreaming;\n });\n const peersWithStreamingRights = useHMSStore(\n selectPeersByCondition((peer: HMSPeer) => streamingPermissionRoles.includes(peer.roleName || '')),\n );\n const hlsState = useHMSStore(selectHLSState);\n const hmsActions = useHMSActions();\n const { redirectToLeave } = useRedirectToLeave();\n\n const stopStream = async () => {\n try {\n console.log('Stopping HLS stream');\n await hmsActions.stopHLSStreaming();\n ToastManager.addToast({ title: 'Stopping the stream' });\n } catch (e) {\n console.error('Error stopping stream', e);\n ToastManager.addToast({ title: 'Error in stopping the stream', type: 'error' });\n }\n };\n const endRoom = () => {\n hmsActions.endRoom(false, 'End Room');\n redirectToLeave();\n };\n\n const leaveRoom = async ({ endstream = false }) => {\n if (endstream || (hlsState.running && peersWithStreamingRights.length === 1)) {\n await stopStream();\n }\n hmsActions.leave();\n redirectToLeave();\n };\n\n if (!permissions || !isConnected) {\n return null;\n }\n return isMobile ? (\n <MwebLeaveRoom leaveRoom={leaveRoom} screenType={screenType} endRoom={endRoom} />\n ) : (\n <DesktopLeaveRoom leaveRoom={leaveRoom} screenType={screenType} endRoom={endRoom} />\n );\n};\n", "import React, { Fragment, useState } from 'react';\nimport { ConferencingScreen } from '@100mslive/types-prebuilt';\n// @ts-ignore: No implicit Any\nimport { selectIsConnectedToRoom, selectPermissions, useHMSStore, useRecordingStreaming } from '@100mslive/react-sdk';\n// @ts-ignore: No implicit Any\nimport { ExitIcon, StopIcon, VerticalMenuIcon } from '@100mslive/react-icons';\nimport { Dropdown } from '../../../Dropdown';\nimport { Box, Flex } from '../../../Layout';\nimport { Dialog } from '../../../Modal';\nimport { Tooltip } from '../../../Tooltip';\nimport { PrebuiltDialogPortal } from '../PrebuiltDialogPortal';\nimport { EndSessionContent } from './EndSessionContent';\nimport { LeaveIconButton, MenuTriggerButton } from './LeaveAtoms';\nimport { LeaveCard } from './LeaveCard';\nimport { LeaveSessionContent } from './LeaveSessionContent';\n// @ts-ignore: No implicit Any\nimport { useDropdownList } from '../hooks/useDropdownList';\n\nexport const DesktopLeaveRoom = ({\n leaveRoom,\n screenType,\n endRoom,\n}: {\n leaveRoom: (args: { endstream: boolean }) => void;\n screenType: keyof ConferencingScreen;\n endRoom: () => void;\n}) => {\n const [open, setOpen] = useState(false);\n const [showLeaveRoomAlert, setShowLeaveRoomAlert] = useState(false);\n const [showEndStreamAlert, setShowEndStreamAlert] = useState(false);\n const isConnected = useHMSStore(selectIsConnectedToRoom);\n const permissions = useHMSStore(selectPermissions);\n const { isStreamingOn } = useRecordingStreaming();\n const showStream = screenType !== 'hls_live_streaming' && isStreamingOn;\n const showLeaveOptions = (permissions?.hlsStreaming && isStreamingOn) || permissions?.endRoom;\n\n useDropdownList({ open: open || showEndStreamAlert || showLeaveRoomAlert, name: 'LeaveRoom' });\n\n if (!permissions || !isConnected) {\n return null;\n }\n\n return (\n <Fragment>\n {showLeaveOptions ? (\n <Flex>\n <LeaveIconButton\n key=\"LeaveRoom\"\n data-testid=\"leave_room_btn\"\n css={{\n borderTopRightRadius: 0,\n borderBottomRightRadius: 0,\n }}\n onClick={() => setShowLeaveRoomAlert(true)}\n >\n <Tooltip title=\"Leave Room\">\n <Box>\n <ExitIcon style={{ transform: 'rotate(180deg)' }} />\n </Box>\n </Tooltip>\n </LeaveIconButton>\n <Dropdown.Root open={open} onOpenChange={setOpen} modal={false}>\n <Dropdown.Trigger\n asChild\n css={{\n '&[data-state=\"open\"]': {\n bg: '$alert_error_dim',\n },\n }}\n >\n <MenuTriggerButton data-testid=\"leave_end_dropdown_trigger\">\n <VerticalMenuIcon />\n </MenuTriggerButton>\n </Dropdown.Trigger>\n <Dropdown.Content css={{ p: 0, w: '$100' }} alignOffset={-50} sideOffset={10}>\n <Dropdown.Item\n css={{\n bg: '$surface_dim',\n color: '$on_surface_medium',\n '&:hover': { bg: '$surface_default', color: '$on_surface_high' },\n }}\n onClick={() => leaveRoom({ endstream: false })}\n data-testid=\"just_leave_btn\"\n >\n <LeaveCard\n title={showStream ? 'Leave Stream' : 'Leave Session'}\n subtitle={`Others will continue after you leave. You can join the ${\n showStream ? 'stream' : 'session'\n } again.`}\n bg=\"\"\n titleColor=\"$on_surface_high\"\n icon={<ExitIcon height={24} width={24} style={{ transform: 'rotate(180deg)' }} />}\n onClick={() => leaveRoom({ endstream: false })}\n css={{ p: 0 }}\n />\n </Dropdown.Item>\n\n <Dropdown.Item\n css={{\n bg: '$alert_error_dim',\n color: '$alert_error_bright',\n '&:hover': { bg: '$alert_error_dim', color: '$alert_error_brighter' },\n }}\n data-testid=\"end_room_btn\"\n >\n <LeaveCard\n title={showStream ? 'End Stream' : 'End Session'}\n subtitle={`The ${\n showStream ? 'stream' : 'session'\n } will end for everyone. You can't undo this action.`}\n bg=\"\"\n titleColor=\"$alert_error_brighter\"\n icon={<StopIcon height={24} width={24} />}\n onClick={() => {\n setOpen(false);\n setShowEndStreamAlert(true);\n }}\n css={{ p: 0 }}\n />\n </Dropdown.Item>\n </Dropdown.Content>\n </Dropdown.Root>\n </Flex>\n ) : (\n <LeaveIconButton\n onClick={() => {\n setShowLeaveRoomAlert(true);\n }}\n key=\"LeaveRoom\"\n data-testid=\"leave_room_btn\"\n >\n <Tooltip title=\"Leave Room\">\n <Box>\n <ExitIcon style={{ transform: 'rotate(180deg)' }} />\n </Box>\n </Tooltip>\n </LeaveIconButton>\n )}\n\n <Dialog.Root open={showEndStreamAlert} modal={false}>\n <PrebuiltDialogPortal>\n <Dialog.Overlay />\n <Dialog.Content css={{ w: 'min(420px, 90%)', p: '$8', bg: '$surface_dim' }}>\n <EndSessionContent\n setShowEndStreamAlert={setShowEndStreamAlert}\n leaveRoom={isStreamingOn ? leaveRoom : endRoom}\n isStreamingOn={isStreamingOn}\n isModal\n />\n </Dialog.Content>\n </PrebuiltDialogPortal>\n </Dialog.Root>\n\n <Dialog.Root open={showLeaveRoomAlert} modal={false}>\n <PrebuiltDialogPortal>\n <Dialog.Overlay />\n <Dialog.Content css={{ w: 'min(420px, 90%)', p: '$8', bg: '$surface_dim' }}>\n <LeaveSessionContent setShowLeaveRoomAlert={setShowLeaveRoomAlert} leaveRoom={leaveRoom} isModal />\n </Dialog.Content>\n </PrebuiltDialogPortal>\n </Dialog.Root>\n </Fragment>\n );\n};\n", "import React from 'react';\nimport { AlertTriangleIcon, CrossIcon } from '@100mslive/react-icons';\nimport { Button } from '../../../Button';\nimport { Box, Flex } from '../../../Layout';\nimport { Text } from '../../../Text';\n\nexport const EndSessionContent = ({\n setShowEndStreamAlert,\n leaveRoom,\n isModal = false,\n isStreamingOn = false,\n}: {\n setShowEndStreamAlert: (value: boolean) => void;\n leaveRoom: (args: { endstream: boolean }) => void;\n isModal?: boolean;\n isStreamingOn: boolean;\n}) => {\n return (\n <Box>\n <Flex\n css={{\n color: '$alert_error_default',\n display: 'flex',\n alignItems: 'center',\n }}\n >\n <AlertTriangleIcon style={{ marginRight: '0.5rem' }} />\n <Text variant=\"lg\" css={{ color: 'inherit', fontWeight: '$semiBold' }}>\n End {isStreamingOn ? 'Stream' : 'Session'}\n </Text>\n {isModal ? null : (\n <Box css={{ color: '$on_surface_high', ml: 'auto' }} onClick={() => setShowEndStreamAlert(false)}>\n <CrossIcon />\n </Box>\n )}\n </Flex>\n <Text variant=\"sm\" css={{ color: '$on_surface_medium', mb: '$8', mt: '$4' }}>\n The {isStreamingOn ? 'stream' : 'session'} will end for everyone. You can't undo this action.\n </Text>\n <Flex align=\"center\" justify=\"between\" css={{ w: '100%', gap: '$8' }}>\n <Button\n outlined\n variant=\"standard\"\n css={{ w: '100%', '@md': { display: 'none' } }}\n onClick={() => setShowEndStreamAlert(false)}\n >\n Cancel\n </Button>\n <Button\n variant=\"danger\"\n css={{ w: '100%' }}\n onClick={async () => {\n await leaveRoom({ endstream: true });\n setShowEndStreamAlert(false);\n }}\n id=\"stopStream\"\n data-testid=\"stop_stream_btn\"\n >\n End {isStreamingOn ? 'Stream' : 'Session'}\n </Button>\n </Flex>\n </Box>\n );\n};\n", "import { IconButton } from '../../../IconButton';\nimport { styled } from '../../../Theme';\n\nexport const LeaveIconButton = styled(IconButton, {\n color: '$on_primary_high',\n h: '$14',\n px: '$4',\n r: '$1',\n bg: '$alert_error_default',\n '&:not([disabled]):hover': {\n bg: '$alert_error_bright',\n },\n '&:not([disabled]):active': {\n bg: '$alert_error_default',\n },\n '@md': {\n mx: 0,\n },\n});\n\nexport const MenuTriggerButton = styled(LeaveIconButton, {\n borderLeft: '1px solid $alert_error_dim',\n borderTopLeftRadius: 0,\n borderBottomLeftRadius: 0,\n px: '$2',\n});\n", "import React from 'react';\nimport { Box, Flex } from '../../../Layout';\nimport { Text } from '../../../Text';\nimport { CSS } from '../../../Theme';\n\nexport const LeaveCard = ({\n icon,\n title,\n subtitle,\n onClick,\n bg,\n titleColor,\n css = {},\n}: {\n icon: React.JSX.Element;\n title: string;\n subtitle: string;\n onClick: () => void;\n titleColor: string;\n bg: string;\n css?: CSS;\n}) => {\n return (\n <Flex css={{ p: '$10', flexGrow: 1, gap: '$8', bg, ...css }} onClick={onClick}>\n <Box css={{ color: titleColor }}>{icon}</Box>\n <Box css={{ gap: '$2' }}>\n <Text variant=\"lg\" css={{ color: titleColor }}>\n {title}\n </Text>\n <Text variant=\"sm\" css={{ c: 'inherit' }}>\n {subtitle}\n </Text>\n </Box>\n </Flex>\n );\n};\n", "import React from 'react';\nimport { AlertTriangleIcon, CrossIcon } from '@100mslive/react-icons';\nimport { Button } from '../../../Button';\nimport { Box, Flex } from '../../../Layout';\nimport { Text } from '../../../Text';\n\nexport const LeaveSessionContent = ({\n setShowLeaveRoomAlert,\n leaveRoom,\n isModal = false,\n}: {\n setShowLeaveRoomAlert: (value: boolean) => void;\n leaveRoom: (args: { endstream: boolean }) => void;\n isModal?: boolean;\n}) => {\n return (\n <Box>\n <Flex\n css={{\n color: '$alert_error_default',\n display: 'flex',\n alignItems: 'center',\n }}\n >\n <AlertTriangleIcon style={{ marginRight: '0.5rem' }} />\n <Text variant=\"lg\" css={{ color: 'inherit', fontWeight: '$semiBold' }}>\n Leave\n </Text>\n {isModal ? null : (\n <Box css={{ color: '$on_surface_high', ml: 'auto' }} onClick={() => setShowLeaveRoomAlert(false)}>\n <CrossIcon />\n </Box>\n )}\n </Flex>\n <Text variant=\"sm\" css={{ color: '$on_surface_low', mb: '$8', mt: '$4' }}>\n Others will continue after you leave. You can join the session again.\n </Text>\n <Flex align=\"center\" justify=\"between\" css={{ w: '100%', gap: '$8' }}>\n <Button\n outlined\n variant=\"standard\"\n css={{ w: '100%', '@md': { display: 'none' } }}\n onClick={() => setShowLeaveRoomAlert(false)}\n >\n Cancel\n </Button>\n <Button\n variant=\"danger\"\n css={{ w: '100%' }}\n onClick={() => leaveRoom({ endstream: false })}\n id=\"leaveRoom\"\n data-testid=\"leave_room\"\n >\n Leave Session\n </Button>\n </Flex>\n </Box>\n );\n};\n", "import React, { Fragment, useState } from 'react';\nimport { ConferencingScreen } from '@100mslive/types-prebuilt';\n// @ts-ignore: No implicit Any\nimport { selectIsConnectedToRoom, selectPermissions, useHMSStore, useRecordingStreaming } from '@100mslive/react-sdk';\n// @ts-ignore: No implicit Any\nimport { ExitIcon, StopIcon } from '@100mslive/react-icons';\nimport { Box } from '../../../Layout';\nimport { Sheet } from '../../../Sheet';\nimport { Tooltip } from '../../../Tooltip';\nimport { EndSessionContent } from './EndSessionContent';\nimport { LeaveIconButton } from './LeaveAtoms';\nimport { LeaveCard } from './LeaveCard';\nimport { LeaveSessionContent } from './LeaveSessionContent';\n// @ts-ignore: No implicit Any\nimport { useDropdownList } from '../hooks/useDropdownList';\n\nexport const MwebLeaveRoom = ({\n leaveRoom,\n screenType,\n endRoom,\n}: {\n leaveRoom: (args: { endstream: boolean }) => void;\n screenType: keyof ConferencingScreen;\n endRoom: () => void;\n}) => {\n const [open, setOpen] = useState(false);\n const [showLeaveRoomAlert, setShowLeaveRoomAlert] = useState(false);\n const [showEndStreamAlert, setShowEndStreamAlert] = useState(false);\n const isConnected = useHMSStore(selectIsConnectedToRoom);\n const permissions = useHMSStore(selectPermissions);\n const { isStreamingOn } = useRecordingStreaming();\n const showStream = screenType !== 'hls_live_streaming' && isStreamingOn;\n const showLeaveOptions = (permissions?.hlsStreaming && isStreamingOn) || permissions?.endRoom;\n\n useDropdownList({ open, name: 'LeaveRoom' });\n\n if (!permissions || !isConnected) {\n return null;\n }\n\n return (\n <Fragment>\n {showLeaveOptions ? (\n <Sheet.Root open={open} onOpenChange={setOpen}>\n <Sheet.Trigger asChild>\n <LeaveIconButton\n key=\"LeaveRoom\"\n data-testid=\"leave_room_btn\"\n css={{\n borderTopRightRadius: '$1',\n borderBottomRightRadius: '$1',\n }}\n >\n <Tooltip title=\"Leave Room\">\n <Box>\n <ExitIcon style={{ transform: 'rotate(180deg)' }} />\n </Box>\n </Tooltip>\n </LeaveIconButton>\n </Sheet.Trigger>\n <Sheet.Content>\n <LeaveCard\n title={showStream ? 'Leave Stream' : 'Leave Session'}\n subtitle={`Others will continue after you leave. You can join the ${\n showStream ? 'stream' : 'session'\n } again.`}\n bg=\"$surface_default\"\n titleColor=\"$on_surface_high\"\n icon={<ExitIcon height={24} width={24} style={{ transform: 'rotate(180deg)' }} />}\n onClick={() => leaveRoom({ endstream: false })}\n css={{ pt: 0, mt: '$10', color: '$on_surface_low', '&:hover': { color: '$on_surface_high' } }}\n />\n\n <LeaveCard\n title={showStream ? 'End Stream' : 'End Session'}\n subtitle={`The will end the ${\n showStream ? 'stream' : 'session'\n } for everyone. You can't undo this action.`}\n bg=\"$alert_error_dim\"\n titleColor=\"$alert_error_brighter\"\n css={{ color: '$alert_error_bright', '&:hover': { color: '$alert_error_brighter' } }}\n icon={<StopIcon height={24} width={24} />}\n onClick={() => {\n setOpen(false);\n setShowEndStreamAlert(true);\n }}\n />\n </Sheet.Content>\n </Sheet.Root>\n ) : (\n <LeaveIconButton key=\"LeaveRoom\" data-testid=\"leave_room_btn\" onClick={() => setShowLeaveRoomAlert(true)}>\n <Tooltip title=\"Leave Room\">\n <Box>\n <ExitIcon style={{ transform: 'rotate(180deg)' }} />\n </Box>\n </Tooltip>\n </LeaveIconButton>\n )}\n <Sheet.Root open={showEndStreamAlert} onOpenChange={setShowEndStreamAlert}>\n <Sheet.Content css={{ bg: '$surface_dim', p: '$10', pb: '$12' }}>\n <EndSessionContent\n setShowEndStreamAlert={setShowEndStreamAlert}\n leaveRoom={isStreamingOn ? leaveRoom : endRoom}\n isStreamingOn={isStreamingOn}\n />\n </Sheet.Content>\n </Sheet.Root>\n\n <Sheet.Root open={showLeaveRoomAlert} onOpenChange={setShowLeaveRoomAlert}>\n <Sheet.Content css={{ bg: '$surface_dim', p: '$10', pb: '$12' }}>\n <LeaveSessionContent setShowLeaveRoomAlert={setShowLeaveRoomAlert} leaveRoom={leaveRoom} />\n </Sheet.Content>\n </Sheet.Root>\n </Fragment>\n );\n};\n", "import React from 'react';\nimport { useMedia } from 'react-use';\nimport {\n ConferencingScreen,\n DefaultConferencingScreen_Elements,\n HLSLiveStreamingScreen_Elements,\n} from '@100mslive/types-prebuilt';\n// @ts-ignore: No implicit Any\nimport { DesktopOptions } from './SplitComponents/DesktopOptions';\n// @ts-ignore: No implicit Any\nimport { MwebOptions } from './SplitComponents/MwebOptions';\nimport { config as cssConfig } from '../../..';\n\nexport const MoreSettings = ({\n elements,\n screenType,\n}: {\n elements: DefaultConferencingScreen_Elements | HLSLiveStreamingScreen_Elements;\n screenType: keyof ConferencingScreen;\n}) => {\n const isMobile = useMedia(cssConfig.media.md);\n return isMobile ? (\n <MwebOptions elements={elements} screenType={screenType} />\n ) : (\n <DesktopOptions elements={elements} screenType={screenType} />\n );\n};\n", "import React, { Fragment, useState } from 'react';\nimport { HMSHLSPlayer } from '@100mslive/hls-player';\nimport {\n ConferencingScreen,\n DefaultConferencingScreen_Elements,\n HLSLiveStreamingScreen_Elements,\n} from '@100mslive/types-prebuilt';\nimport { selectAppData, selectLocalPeerID, useHMSActions, useHMSStore } from '@100mslive/react-sdk';\nimport { BrbIcon, CheckIcon, DragHandleIcon, InfoIcon, PipIcon, SettingsIcon } from '@100mslive/react-icons';\nimport { Checkbox, Dropdown, Flex, Text, Tooltip } from '../../../..';\n// @ts-ignore: No implicit any\nimport IconButton from '../../../IconButton';\n// @ts-ignore: No implicit any\nimport { PIP } from '../../PIP';\n// @ts-ignore: No implicit any\nimport { PictureInPicture } from '../../PIP/PIPManager';\n// @ts-ignore: No implicit any\nimport { RoleChangeModal } from '../../RoleChangeModal';\n// @ts-ignore: No implicit any\nimport SettingsModal from '../../Settings/SettingsModal';\n// @ts-ignore: No implicit any\nimport StartRecording from '../../Settings/StartRecording';\n// @ts-ignore: No implicit any\nimport { StatsForNerds } from '../../StatsForNerds';\n// @ts-ignore: No implicit any\nimport { BulkRoleChangeModal } from '../BulkRoleChangeModal';\n// @ts-ignore: No implicit any\nimport { FullScreenItem } from '../FullScreenItem';\n// @ts-ignore: No implicit any\nimport { MuteAllModal } from '../MuteAllModal';\n// @ts-ignore: No implicit any\nimport { useDropdownList } from '../../hooks/useDropdownList';\n// @ts-ignore: No implicit any\nimport { useMyMetadata } from '../../hooks/useMetadata';\n// @ts-ignore: No implicit any\nimport { APP_DATA, isMacOS } from '../../../common/constants';\n\nconst MODALS = {\n CHANGE_NAME: 'changeName',\n SELF_ROLE_CHANGE: 'selfRoleChange',\n MORE_SETTINGS: 'moreSettings',\n START_RECORDING: 'startRecording',\n DEVICE_SETTINGS: 'deviceSettings',\n STATS_FOR_NERDS: 'statsForNerds',\n BULK_ROLE_CHANGE: 'bulkRoleChange',\n MUTE_ALL: 'muteAll',\n EMBED_URL: 'embedUrl',\n};\n\nexport const DesktopOptions = ({\n elements,\n screenType,\n}: {\n elements: DefaultConferencingScreen_Elements & HLSLiveStreamingScreen_Elements;\n screenType: keyof ConferencingScreen;\n}) => {\n const localPeerId = useHMSStore(selectLocalPeerID);\n const hmsActions = useHMSActions();\n const enablHlsStats = useHMSStore(selectAppData(APP_DATA.hlsStats));\n const [openModals, setOpenModals] = useState(new Set());\n const { isBRBOn, toggleBRB } = useMyMetadata();\n const isPipOn = PictureInPicture.isOn();\n const isBRBEnabled = !!elements?.brb;\n\n useDropdownList({ open: openModals.size > 0, name: 'MoreSettings' });\n\n const updateState = (modalName: string, value: boolean) => {\n setOpenModals(modals => {\n const copy = new Set(modals);\n if (value) {\n // avoiding extra set state trigger which removes currently open dialog by clearing set.\n copy.clear();\n copy.add(modalName);\n } else {\n copy.delete(modalName);\n }\n return copy;\n });\n };\n\n return (\n <Fragment>\n <Dropdown.Root\n open={openModals.has(MODALS.MORE_SETTINGS)}\n onOpenChange={value => updateState(MODALS.MORE_SETTINGS, value)}\n modal={false}\n >\n <Tooltip title=\"More options\">\n <Dropdown.Trigger asChild data-testid=\"more_settings_btn\">\n <IconButton>\n <DragHandleIcon />\n </IconButton>\n </Dropdown.Trigger>\n </Tooltip>\n\n <Dropdown.Content\n sideOffset={5}\n align=\"end\"\n css={{\n py: '$0',\n maxHeight: 'unset',\n '@md': { w: '$64' },\n \"div[role='separator']:first-child\": {\n display: 'none',\n },\n }}\n >\n {isBRBEnabled && screenType !== 'hls_live_streaming' ? (\n <Dropdown.Item onClick={toggleBRB} data-testid=\"brb_btn\">\n <BrbIcon />\n <Text variant=\"sm\" css={{ ml: '$4', color: '$on_surface_high' }}>\n Be Right Back\n </Text>\n <Flex justify=\"end\" css={{ color: '$on_surface_high', flexGrow: '1' }}>\n {isBRBOn ? <CheckIcon /> : null}\n </Flex>\n </Dropdown.Item>\n ) : null}\n\n {screenType !== 'hls_live_streaming' ? (\n <Dropdown.Item>\n <PIP\n content={\n <Flex css={{ w: '100%' }}>\n <PipIcon />\n <Text variant=\"sm\" css={{ ml: '$4' }}>\n {isPipOn ? 'Disable' : 'Enable'} Picture-in-Picture\n </Text>\n </Flex>\n }\n />\n </Dropdown.Item>\n ) : null}\n\n <FullScreenItem />\n {/* {isAllowedToPublish.screen && isEmbedEnabled && (\n <EmbedUrl setShowOpenUrl={() => updateState(MODALS.EMBED_URL, true)} />\n )} */}\n\n <Dropdown.ItemSeparator css={{ mx: 0 }} />\n\n <Dropdown.Item onClick={() => updateState(MODALS.DEVICE_SETTINGS, true)} data-testid=\"device_settings_btn\">\n <SettingsIcon />\n <Text variant=\"sm\" css={{ ml: '$4' }}>\n Settings\n </Text>\n </Dropdown.Item>\n\n {screenType === 'hls_live_streaming' ? (\n HMSHLSPlayer.isSupported() ? (\n <Dropdown.Item\n onClick={() => hmsActions.setAppData(APP_DATA.hlsStats, !enablHlsStats)}\n data-testid=\"hls_stats\"\n >\n <Checkbox.Root\n css={{ margin: '$2' }}\n checked={enablHlsStats}\n onCheckedChange={() => hmsActions.setAppData(APP_DATA.hlsStats, !enablHlsStats)}\n >\n <Checkbox.Indicator>\n <CheckIcon width={16} height={16} />\n </Checkbox.Indicator>\n </Checkbox.Root>\n <Flex justify=\"between\" css={{ width: '100%' }}>\n <Text variant=\"sm\" css={{ ml: '$4' }}>\n Show HLS Stats\n </Text>\n\n <Text variant=\"sm\" css={{ ml: '$4' }}>\n {`${isMacOS ? '\u2318' : 'ctrl'} + ]`}\n </Text>\n </Flex>\n </Dropdown.Item>\n ) : null\n ) : (\n <Dropdown.Item onClick={() => updateState(MODALS.STATS_FOR_NERDS, true)} data-testid=\"stats_for_nreds_btn\">\n <InfoIcon />\n <Text variant=\"sm\" css={{ ml: '$4' }}>\n Stats for Nerds\n </Text>\n </Dropdown.Item>\n )}\n </Dropdown.Content>\n </Dropdown.Root>\n {openModals.has(MODALS.BULK_ROLE_CHANGE) && (\n <BulkRoleChangeModal onOpenChange={(value: boolean) => updateState(MODALS.BULK_ROLE_CHANGE, value)} />\n )}\n {openModals.has(MODALS.MUTE_ALL) && (\n <MuteAllModal onOpenChange={(value: boolean) => updateState(MODALS.MUTE_ALL, value)} />\n )}\n\n {openModals.has(MODALS.START_RECORDING) && (\n <StartRecording open onOpenChange={(value: boolean) => updateState(MODALS.START_RECORDING, value)} />\n )}\n {openModals.has(MODALS.DEVICE_SETTINGS) && (\n <SettingsModal\n open\n onOpenChange={(value: boolean) => updateState(MODALS.DEVICE_SETTINGS, value)}\n screenType={screenType}\n />\n )}\n {openModals.has(MODALS.STATS_FOR_NERDS) && (\n <StatsForNerds open onOpenChange={(value: boolean) => updateState(MODALS.STATS_FOR_NERDS, value)} />\n )}\n {openModals.has(MODALS.SELF_ROLE_CHANGE) && (\n <RoleChangeModal\n peerId={localPeerId}\n onOpenChange={(value: boolean) => updateState(MODALS.SELF_ROLE_CHANGE, value)}\n />\n )}\n {/* {openModals.has(MODALS.EMBED_URL) && (\n <EmbedUrlModal onOpenChange={value => updateState(MODALS.EMBED_URL, value)} />\n )} */}\n </Fragment>\n );\n};\n", "import React from 'react';\nimport PIPComponent from './PIPComponent';\n\nexport const PIP = ({ content = null }) => {\n return <PIPComponent content={content} />;\n};\n", "import React, { useCallback, useEffect, useState } from 'react';\nimport { selectPeers, selectTracksMap, useHMSActions, useHMSStore, useHMSVanillaStore } from '@100mslive/react-sdk';\nimport { PipIcon } from '@100mslive/react-icons';\nimport { Flex, Tooltip } from '../../../';\nimport IconButton from '../../IconButton';\nimport { PictureInPicture } from './PIPManager';\nimport { MediaSession } from './SetupMediaSession';\nimport { usePinnedTrack } from '../AppData/useUISettings';\n\n/**\n * shows a button which when clicked shows some videos in PIP, clicking\n * again turns it off.\n */\nconst PIPComponent = ({ content = null }) => {\n const [isPipOn, setIsPipOn] = useState(PictureInPicture.isOn());\n const hmsActions = useHMSActions();\n const store = useHMSVanillaStore();\n\n const onPipToggle = useCallback(() => {\n if (!isPipOn) {\n PictureInPicture.start(hmsActions, setIsPipOn).catch(err => console.error('error in starting pip', err));\n MediaSession.setup(hmsActions, store);\n } else {\n PictureInPicture.stop().catch(err => console.error('error in stopping pip', err));\n }\n }, [hmsActions, isPipOn, store]);\n\n if (!PictureInPicture.isSupported()) {\n return null;\n }\n return (\n <>\n {content ? (\n <Flex css={{ w: '100%' }} onClick={() => onPipToggle()} data-testid=\"pip_btn\">\n {content}\n </Flex>\n ) : (\n <Tooltip title={`${isPipOn ? 'Deactivate' : 'Activate'} picture in picture view`}>\n <IconButton active={!isPipOn} key=\"pip\" onClick={() => onPipToggle()} data-testid=\"pip_btn\">\n <PipIcon />\n </IconButton>\n </Tooltip>\n )}\n </>\n );\n};\n\n/**\n * this is a separate component so it can be conditionally rendered and\n * the subscriptions to store are done only if required.\n */\nexport const ActivatedPIP = () => {\n const tracksMap = useHMSStore(selectTracksMap);\n const storePeers = useHMSStore(selectPeers);\n const pinnedTrack = usePinnedTrack();\n\n useEffect(() => {\n function updatePIP() {\n if (!PictureInPicture.isOn()) {\n return;\n }\n let pipPeers = storePeers;\n if (pinnedTrack) {\n pipPeers = storePeers.filter(peer => pinnedTrack.peerId === peer.id);\n }\n PictureInPicture.updatePeersAndTracks(pipPeers, tracksMap).catch(err => {\n console.error('error in updating pip', err);\n });\n }\n PictureInPicture.listenToStateChange(updatePIP);\n updatePIP();\n }, [storePeers, tracksMap, pinnedTrack]);\n\n return <></>;\n};\n\nexport default PIPComponent;\n", "import { selectIsLocalAudioEnabled, selectIsLocalVideoEnabled } from '@100mslive/react-sdk';\n\n/**\n * Media Session API allows for handling control actions on top of pip\n * https://web.dev/media-session/#video-conferencing-actions\n */\nclass SetupMediaSession {\n setup = (actions, store) => {\n this.actions = actions;\n this.store = store;\n this.initState();\n this.setUpHandlers();\n };\n\n initState = () => {\n const isMicActive = this.store.getState(selectIsLocalAudioEnabled);\n const isCamActive = this.store.getState(selectIsLocalVideoEnabled);\n navigator.mediaSession?.setMicrophoneActive?.(isMicActive);\n navigator.mediaSession?.setCameraActive?.(isCamActive);\n\n this.store.subscribe(isMicActive => {\n navigator.mediaSession?.setMicrophoneActive?.(isMicActive);\n }, selectIsLocalAudioEnabled);\n\n this.store.subscribe(isCamActive => {\n navigator.mediaSession?.setCameraActive?.(isCamActive);\n }, selectIsLocalVideoEnabled);\n };\n\n toggleMic = async () => {\n console.log('toggle mic clicked in pip');\n const current = this.store.getState(selectIsLocalAudioEnabled);\n await this.actions.setLocalAudioEnabled(!current);\n };\n\n toggleCam = async () => {\n console.log('toggle cam clicked in pip');\n const current = this.store.getState(selectIsLocalVideoEnabled);\n await this.actions.setLocalVideoEnabled(!current);\n };\n\n leave = () => {\n console.log('leave called from pip');\n this.actions.leave();\n };\n\n setUpHandlers = () => {\n if (navigator.mediaSession) {\n try {\n navigator.mediaSession.setActionHandler('togglemicrophone', this.toggleMic);\n navigator.mediaSession.setActionHandler('togglecamera', this.toggleCam);\n navigator.mediaSession.setActionHandler('hangup', this.leave);\n } catch (err) {\n console.error('error in setting media session handlers', err);\n }\n }\n };\n}\n\nexport const MediaSession = new SetupMediaSession();\n", "import React, { forwardRef, useRef, useState } from 'react';\nimport { selectPeerByID, useHMSActions, useHMSStore } from '@100mslive/react-sdk';\nimport { CheckIcon, ChevronDownIcon, ChevronUpIcon } from '@100mslive/react-icons';\nimport { Button } from '../../Button';\nimport { Checkbox } from '../../Checkbox';\nimport { Dropdown } from '../../Dropdown';\nimport { Label } from '../../Label';\nimport { Box, Flex } from '../../Layout';\nimport { Dialog } from '../../Modal';\nimport { Text } from '../../Text';\nimport { Tooltip } from '../../Tooltip';\nimport { PrebuiltDialogPortal } from './PrebuiltDialogPortal';\nimport { useDropdownSelection } from './hooks/useDropdownSelection';\nimport { useFilteredRoles } from '../common/hooks';\nimport { textEllipsis } from '../../utils';\n\nconst PeerName = forwardRef(({ children, maxWidth, ...rest }, ref) => (\n <Text\n {...rest}\n ref={ref}\n as=\"strong\"\n variant=\"body2\"\n css={{\n ...textEllipsis(maxWidth),\n display: 'inline-block',\n fontWeight: '$semiBold',\n c: 'inherit',\n }}\n >\n {children}\n </Text>\n));\n\nexport const RoleChangeModal = ({ peerId, onOpenChange }) => {\n const peer = useHMSStore(selectPeerByID(peerId));\n const roles = useFilteredRoles();\n const [selectedRole, setRole] = useState(peer?.roleName);\n const [requestPermission, setRequestPermission] = useState(true);\n const hmsActions = useHMSActions();\n const [open, setOpen] = useState(false);\n const selectionBg = useDropdownSelection();\n const [peerNameRef, setPeerNameRef] = useState();\n const ref = useRef();\n if (!peer) {\n return null;\n }\n\n const peerNameMaxWidth = 200;\n return (\n <Dialog.Root defaultOpen onOpenChange={onOpenChange}>\n <PrebuiltDialogPortal>\n <Dialog.Overlay />\n <Dialog.Content css={{ width: 'min(400px,80%)', p: '$10' }}>\n <Dialog.Title css={{ p: 0 }} asChild>\n <Text as=\"h6\" variant=\"h6\">\n Change Role\n </Text>\n </Dialog.Title>\n <Dialog.Description asChild>\n <Text\n variant=\"body2\"\n css={{\n mt: '$4',\n mb: '$8',\n c: '$on_surface_medium',\n display: 'flex',\n flexWrap: 'wrap',\n columnGap: '4px',\n }}\n >\n Change the role of\n {peerNameRef && peerNameRef.clientWidth === peerNameMaxWidth ? (\n <Tooltip title={peer.name} side=\"top\">\n <PeerName ref={setPeerNameRef} maxWidth={peerNameMaxWidth}>\n {peer.name}\n </PeerName>\n </Tooltip>\n ) : (\n <PeerName ref={setPeerNameRef} maxWidth={peerNameMaxWidth}>\n {peer.name}\n </PeerName>\n )}\n to\n </Text>\n </Dialog.Description>\n <Flex\n align=\"center\"\n css={{\n w: '100%',\n mb: '$10',\n }}\n >\n <Box\n css={{\n position: 'relative',\n flex: '1 1 0',\n minWidth: 0,\n }}\n >\n <Dropdown.Root open={open} onOpenChange={setOpen} css={{ width: '100%' }}>\n <Dropdown.Trigger\n data-testid=\"open_role_selection_dropdown\"\n asChild\n css={{\n border: '1px solid $border_bright',\n bg: '$surface_bright',\n r: '$1',\n p: '$6 $9',\n }}\n ref={ref}\n >\n <Flex align=\"center\" justify=\"between\" css={{ width: '100%' }}>\n <Text>{selectedRole}</Text>\n {open ? <ChevronUpIcon /> : <ChevronDownIcon />}\n </Flex>\n </Dropdown.Trigger>\n <Dropdown.Portal>\n <Dropdown.Content\n align=\"start\"\n sideOffset={8}\n css={{ zIndex: 1000, width: ref.current?.clientWidth }}\n >\n {roles.map(role => {\n return (\n <Dropdown.Item\n data-testid={role}\n key={role}\n onSelect={() => setRole(role)}\n css={{\n px: '$9',\n bg: role === selectedRole ? selectionBg : undefined,\n }}\n >\n {role}\n </Dropdown.Item>\n );\n })}\n </Dropdown.Content>\n </Dropdown.Portal>\n </Dropdown.Root>\n </Box>\n </Flex>\n {!peer.isLocal && (\n <Flex justify=\"between\" css={{ w: '100%', mb: '$10' }}>\n <Label htmlFor=\"requestRoleChangePermission\" css={{ cursor: 'pointer' }}>\n Request Permission\n </Label>\n <Checkbox.Root\n checked={requestPermission}\n onCheckedChange={value => setRequestPermission(value)}\n id=\"requestRoleChangePermission\"\n data-testid=\"force_role_change_checkbox\"\n >\n <Checkbox.Indicator>\n <CheckIcon width={16} height={16} />\n </Checkbox.Indicator>\n </Checkbox.Root>\n </Flex>\n )}\n <Flex justify=\"center\" align=\"center\" css={{ width: '100%', gap: '$md' }}>\n <Box css={{ width: '50%' }}>\n <Dialog.Close css={{ width: '100%', p: '$4 $8' }} asChild>\n <Button variant=\"standard\" outlined css={{ width: '100%' }} data-testid=\"cancel_button\">\n Cancel\n </Button>\n </Dialog.Close>\n </Box>\n <Box css={{ width: '50%' }}>\n <Button\n data-testid=\"change_button\"\n variant=\"primary\"\n css={{ width: '100%' }}\n onClick={async () => {\n await hmsActions.changeRole(peerId, selectedRole, peer.isLocal ? true : !requestPermission);\n onOpenChange(false);\n }}\n >\n Change\n </Button>\n </Box>\n </Flex>\n </Dialog.Content>\n </PrebuiltDialogPortal>\n </Dialog.Root>\n );\n};\n", "import React, { useState } from 'react';\nimport { selectPermissions, useHMSActions, useHMSStore, useRecordingStreaming } from '@100mslive/react-sdk';\nimport { AlertTriangleIcon } from '@100mslive/react-icons';\nimport { Button, Dialog, Flex, Text } from '../../../';\nimport { PrebuiltDialogPortal } from '../PrebuiltDialogPortal';\nimport { ResolutionInput } from '../Streaming/ResolutionInput';\nimport { getResolution } from '../Streaming/RTMPStreaming';\nimport { ToastManager } from '../Toast/ToastManager';\nimport { useSetAppDataByKey } from '../AppData/useUISettings';\nimport { APP_DATA, RTMP_RECORD_DEFAULT_RESOLUTION } from '../../common/constants';\n\nconst StartRecording = ({ open, onOpenChange }) => {\n const permissions = useHMSStore(selectPermissions);\n const [resolution, setResolution] = useState(RTMP_RECORD_DEFAULT_RESOLUTION);\n\n const [recordingStarted, setRecordingState] = useSetAppDataByKey(APP_DATA.recordingStarted);\n const { isBrowserRecordingOn, isStreamingOn, isHLSRunning } = useRecordingStreaming();\n const hmsActions = useHMSActions();\n if (!permissions?.browserRecording || isHLSRunning) {\n return null;\n }\n if (isBrowserRecordingOn) {\n return (\n <Dialog.Root open={open} onOpenChange={onOpenChange}>\n <PrebuiltDialogPortal>\n <Dialog.Content\n css={{\n width: 'min(400px,80%)',\n p: '$10',\n bg: '#201617',\n }}\n >\n <Dialog.Title>\n <Flex gap={2} css={{ c: '$alert_error_default' }}>\n <AlertTriangleIcon />\n <Text css={{ c: 'inherit' }} variant=\"h6\">\n End Recording\n </Text>\n </Flex>\n </Dialog.Title>\n <Text variant=\"sm\" css={{ c: '$on_surface_medium', my: '$8' }}>\n Are you sure you want to end recording? You can\u2019t undo this action.\n </Text>\n <Flex justify=\"end\" css={{ mt: '$12' }}>\n <Dialog.Close asChild>\n <Button outlined css={{ borderColor: '$secondary_bright', mr: '$4' }}>\n Don't end\n </Button>\n </Dialog.Close>\n <Button\n data-testid=\"stop_recording_confirm_mobile\"\n variant=\"danger\"\n icon\n onClick={async () => {\n try {\n await hmsActions.stopRTMPAndRecording();\n } catch (error) {\n ToastManager.addToast({\n title: error.message,\n variant: 'error',\n });\n }\n onOpenChange(false);\n }}\n >\n End recording\n </Button>\n </Flex>\n </Dialog.Content>\n </PrebuiltDialogPortal>\n </Dialog.Root>\n );\n }\n return (\n <Dialog.Root open={open} onOpenChange={onOpenChange}>\n <Dialog.Content css={{ width: 'min(400px,80%)', p: '$10' }}>\n <Dialog.Title>\n <Text variant=\"h6\">Start Recording</Text>\n </Dialog.Title>\n <ResolutionInput\n testId=\"recording_resolution_mobile\"\n css={{ flexDirection: 'column', alignItems: 'start' }}\n onResolutionChange={setResolution}\n />\n <Button\n data-testid=\"start_recording_confirm_mobile\"\n variant=\"primary\"\n icon\n css={{ ml: 'auto' }}\n type=\"submit\"\n disabled={recordingStarted || isStreamingOn}\n onClick={async () => {\n try {\n setRecordingState(true);\n await hmsActions.startRTMPOrRecording({\n resolution: getResolution(resolution),\n record: true,\n });\n } catch (error) {\n if (error.message.includes('stream already running')) {\n ToastManager.addToast({\n title: 'Recording already running',\n variant: 'error',\n });\n } else {\n ToastManager.addToast({\n title: error.message,\n variant: 'error',\n });\n }\n setRecordingState(false);\n }\n onOpenChange(false);\n }}\n >\n Start\n </Button>\n </Dialog.Content>\n </Dialog.Root>\n );\n};\n\nexport default StartRecording;\n", "import React, { useCallback, useState } from 'react';\nimport { InfoIcon } from '@100mslive/react-icons';\nimport { Flex, Input, Label, Text, Tooltip } from '../../../';\nimport { DialogRow } from '../../primitives/DialogContent';\nimport {\n RTMP_RECORD_DEFAULT_RESOLUTION,\n RTMP_RECORD_RESOLUTION_MAX,\n RTMP_RECORD_RESOLUTION_MIN,\n} from '../../common/constants';\n\nexport const ResolutionInput = ({ onResolutionChange, disabled, tooltipText, css, testId }) => {\n const [resolution, setResolution] = useState(RTMP_RECORD_DEFAULT_RESOLUTION);\n\n const resolutionChangeHandler = useCallback(\n event => {\n const { name, value } = event.target;\n let width = name === 'resWidth' ? Number(value) : resolution.width;\n let height = name === 'resHeight' ? Number(value) : resolution.height;\n\n if (width === 0) {\n width = null;\n }\n if (height === 0) {\n height = null;\n }\n const newResolution = {\n width: !isNaN(width) ? width : RTMP_RECORD_DEFAULT_RESOLUTION.width,\n height: !isNaN(height) ? height : RTMP_RECORD_DEFAULT_RESOLUTION.height,\n };\n setResolution(newResolution);\n },\n [resolution],\n );\n\n return (\n <DialogRow breakSm css={css}>\n <Flex gap={1}>\n <Label css={{ mb: '$8' }}>Resolution</Label>\n {tooltipText && (\n <Tooltip title={tooltipText}>\n <div>\n <InfoIcon color=\"#B0C3DB\" />\n </div>\n </Tooltip>\n )}\n </Flex>\n <Flex\n justify=\"between\"\n css={{ width: !tooltipText ? '100%' : '70%', '@sm': { width: '100%' } }}\n gap={2}\n direction=\"column\"\n >\n <Flex justify=\"between\" gap={2}>\n <Flex direction=\"column\" css={{ width: '50%' }}>\n <Text variant=\"xs\">Width</Text>\n <Input\n data-testid={`${testId}_width`}\n css={{ width: '100%', mt: '$4' }}\n name=\"resWidth\"\n value={resolution.width}\n onChange={resolutionChangeHandler}\n readOnly={disabled}\n min={RTMP_RECORD_RESOLUTION_MIN}\n max={RTMP_RECORD_RESOLUTION_MAX}\n onBlur={() => onResolutionChange(resolution)}\n type=\"number\"\n />\n </Flex>\n <Flex direction=\"column\" css={{ width: '50%' }}>\n <Text variant=\"xs\">Height</Text>\n <Input\n data-testid={`${testId}_height`}\n css={{ width: '100%', mt: '$4' }}\n name=\"resHeight\"\n value={resolution.height}\n onChange={resolutionChangeHandler}\n onBlur={() => onResolutionChange(resolution)}\n readOnly={disabled}\n min={RTMP_RECORD_RESOLUTION_MIN}\n max={RTMP_RECORD_RESOLUTION_MAX}\n type=\"number\"\n />\n </Flex>\n </Flex>\n </Flex>\n </DialogRow>\n );\n};\n", "import React, { useEffect, useRef, useState } from 'react';\nimport { useHMSActions, useRecordingStreaming } from '@100mslive/react-sdk';\nimport { AddCircleIcon, EndStreamIcon, GoLiveIcon, PencilIcon, SettingsIcon, TrashIcon } from '@100mslive/react-icons';\nimport { Accordion, Box, Button, Flex, Input, Label, Loading, Text } from '../../../';\nimport { Container, ContentBody, ContentHeader, ErrorText, RecordStream } from './Common';\nimport { ResolutionInput } from './ResolutionInput';\nimport { useSetAppDataByKey } from '../AppData/useUISettings';\nimport { UserPreferencesKeys, useUserPreferences } from '../hooks/useUserPreferences';\nimport { APP_DATA, RTMP_RECORD_DEFAULT_RESOLUTION } from '../../common/constants';\n\nexport const RTMPStreaming = ({ onBack }) => {\n const { isRTMPRunning } = useRecordingStreaming();\n\n return (\n <Container>\n <ContentHeader title=\"Start Streaming\" content=\"Choose a destination\" onBack={onBack} />\n <ContentBody Icon={SettingsIcon} title=\"RTMP\">\n Live Stream your call to Twitch, YouTube, Facebook and any app which supports RTMP, all at the same time\n </ContentBody>\n {!isRTMPRunning ? <StartRTMP /> : <EndRTMP />}\n </Container>\n );\n};\n\nconst StartRTMP = () => {\n const [rtmpPreference = [], setRTMPPreference] = useUserPreferences(UserPreferencesKeys.RTMP_URLS);\n const [rtmpStreams, setRTMPStreams] = useState(\n rtmpPreference.length > 0\n ? rtmpPreference\n : [\n {\n name: 'Stream',\n id: Date.now(),\n rtmpURL: '',\n streamKey: '',\n },\n ],\n );\n const hmsActions = useHMSActions();\n const [error, setError] = useState(false);\n const [record, setRecord] = useState(false);\n const [resolution, setResolution] = useState(RTMP_RECORD_DEFAULT_RESOLUTION);\n const [isRTMPStarted, setRTMPStarted] = useSetAppDataByKey(APP_DATA.rtmpStarted);\n const hasRTMPURL = rtmpStreams.some(value => value.rtmpURL && value.streamKey);\n\n return (\n <Box\n css={{ overflowY: 'auto' }}\n as=\"form\"\n onSubmit={e => {\n e.preventDefault();\n }}\n >\n {rtmpStreams.length > 0 && (\n <Box css={{ px: '$10' }}>\n <Accordion.Root type=\"single\" collapsible defaultValue={rtmpStreams[0].id}>\n {rtmpStreams.map((rtmp, index) => {\n return (\n <Accordion.Item\n value={rtmp.id}\n key={rtmp.id}\n css={{\n border: '2px solid $surface_bright !important',\n r: '$1',\n my: '$4',\n }}\n >\n <AccordionHeader rtmp={rtmp} setRTMPStreams={setRTMPStreams} />\n <Accordion.Content css={{ px: '$8', py: 0 }}>\n <RTMPForm {...rtmp} setRTMPStreams={setRTMPStreams} testId={`${index}_rtmp`} />\n </Accordion.Content>\n </Accordion.Item>\n );\n })}\n </Accordion.Root>\n </Box>\n )}\n <ResolutionInput\n testId=\"rtmp_resolution\"\n onResolutionChange={setResolution}\n css={{\n flexDirection: 'column',\n alignItems: 'start',\n px: '$10',\n my: '$8',\n }}\n />\n <RecordStream record={record} setRecord={setRecord} testId=\"rtmp_recording\" />\n <Box css={{ p: '$8 $10', '@lg': { display: 'flex', gap: '$4' } }}>\n {rtmpStreams.length < 3 && (\n <Button\n data-testid=\"add_stream\"\n variant=\"standard\"\n outlined\n icon\n css={{ my: '$4', w: '100%' }}\n onClick={() => {\n setRTMPStreams(streams => [\n ...streams,\n {\n name: 'Stream',\n id: Date.now(),\n rtmpURL: '',\n streamKey: '',\n },\n ]);\n }}\n >\n <AddCircleIcon /> Add Stream\n </Button>\n )}\n\n <Button\n data-testid=\"start_rtmp\"\n variant=\"primary\"\n icon\n type=\"submit\"\n css={{ w: '100%', my: '$4' }}\n disabled={isRTMPStarted || (rtmpStreams.length === 0 && !record)}\n onClick={async () => {\n try {\n const hasInvalidData = rtmpStreams.find(\n value => (value.rtmpURL && !value.streamKey) || (value.streamKey && !value.rtmpURL),\n );\n if (hasInvalidData || (rtmpStreams.length > 0 && !hasRTMPURL)) {\n return;\n }\n setError('');\n setRTMPStarted(true);\n const urls = hasRTMPURL ? rtmpStreams.map(value => `${value.rtmpURL}/${value.streamKey}`) : [];\n await hmsActions.startRTMPOrRecording({\n rtmpURLs: urls,\n resolution: getResolution(resolution),\n record: record,\n });\n setRTMPPreference(rtmpStreams);\n } catch (error) {\n console.error(error);\n setError(error.message);\n setRTMPStarted(false);\n }\n }}\n >\n {isRTMPStarted ? <Loading size={24} color=\"currentColor\" /> : <GoLiveIcon />}\n {isRTMPStarted ? 'Starting stream...' : 'Go Live'}\n </Button>\n <ErrorText error={error} />\n </Box>\n </Box>\n );\n};\n\nconst EndRTMP = () => {\n const hmsActions = useHMSActions();\n const [inProgress, setInProgress] = useState(false);\n const [error, setError] = useState('');\n const { isRTMPRunning } = useRecordingStreaming();\n\n useEffect(() => {\n if (inProgress && !isRTMPRunning) {\n setInProgress(false);\n }\n }, [inProgress, isRTMPRunning]);\n\n return (\n <Box css={{ p: '$4 $10' }}>\n <ErrorText error={error} />\n <Button\n data-testid=\"stop_rtmp\"\n variant=\"danger\"\n css={{ w: '100%', r: '$0', my: '$8' }}\n icon\n loading={inProgress}\n disabled={inProgress}\n onClick={async () => {\n try {\n setInProgress(true);\n await hmsActions.stopRTMPAndRecording();\n } catch (error) {\n setError(error.message);\n setInProgress(false);\n }\n }}\n >\n <EndStreamIcon />\n End Stream\n </Button>\n </Box>\n );\n};\n\nconst ActionIcon = ({ icon: Icon, onClick }) => {\n return (\n <Text as=\"span\" css={{ mx: '$2', cursor: 'pointer' }} onClick={onClick}>\n <Icon width={16} height={16} />\n </Text>\n );\n};\n\nconst FormLabel = ({ id, children }) => {\n return (\n <Label htmlFor={id} css={{ color: '$on_surface_high', my: '$4', fontSize: '$sm' }}>\n {children}\n </Label>\n );\n};\n\nconst RTMPForm = ({ rtmpURL, id, streamKey, setRTMPStreams, testId }) => {\n const formRef = useRef(null);\n return (\n <Flex id={id} direction=\"column\" css={{ mb: '$8', px: '$8' }} ref={formRef}>\n <FormLabel id=\"rtmpURL\">\n RTMP URL\n <Asterik />\n </FormLabel>\n <Input\n data-testid={`${testId}_url`}\n placeholder=\"Enter RTMP URL\"\n id=\"rtmpURL\"\n name=\"rtmpURL\"\n value={rtmpURL}\n onChange={e => {\n setRTMPStreams(streams =>\n updateStream({\n streams,\n id,\n value: e.target.value,\n key: e.target.name,\n }),\n );\n }}\n required\n />\n <FormLabel id=\"streamKey\">\n Stream Key\n <Asterik />\n </FormLabel>\n <Input\n placeholder=\"Enter Stream Key\"\n id=\"streamKey\"\n name=\"streamKey\"\n value={streamKey}\n data-testid={`${testId}_key`}\n onChange={e => {\n setRTMPStreams(streams =>\n updateStream({\n streams,\n id,\n value: e.target.value,\n key: e.target.name,\n }),\n );\n }}\n required\n />\n </Flex>\n );\n};\n\nconst Asterik = () => {\n return (\n <Text variant=\"sm\" as=\"span\" css={{ color: '$alert_error_default', mx: '$2' }}>\n *\n </Text>\n );\n};\nconst AccordionHeader = ({ rtmp, setRTMPStreams }) => {\n const [edit, setEdit] = useState(false);\n return (\n <Accordion.Header css={{ px: '$8' }}>\n {edit ? (\n <Input\n defaultValue={rtmp.name}\n autoFocus\n onBlur={e => {\n const value = e.currentTarget.value.trim();\n if (value) {\n setRTMPStreams(streams =>\n streams.map(stream => {\n if (stream.id === rtmp.id) {\n stream.name = value;\n }\n return stream;\n }),\n );\n setEdit(false);\n }\n }}\n />\n ) : (\n <Text css={{ flex: '1 1 0' }}>{rtmp.name}</Text>\n )}\n <Flex css={{ mx: '$4', gap: '$2' }}>\n <ActionIcon\n onClick={e => {\n e.stopPropagation();\n setEdit(true);\n }}\n icon={PencilIcon}\n />\n <ActionIcon\n onClick={() => {\n setRTMPStreams(streams => streams.filter(stream => stream.id !== rtmp.id));\n }}\n icon={TrashIcon}\n />\n </Flex>\n </Accordion.Header>\n );\n};\n\nconst updateStream = ({ streams, id, key, value }) =>\n streams.map(stream => {\n if (stream.id === id) {\n return {\n ...stream,\n [key]: value,\n };\n }\n return stream;\n });\n\nexport function getResolution(recordingResolution) {\n const resolution = {};\n if (recordingResolution.width) {\n resolution.width = recordingResolution.width;\n }\n if (recordingResolution.height) {\n resolution.height = recordingResolution.height;\n }\n if (Object.keys(resolution).length > 0) {\n return resolution;\n }\n}\n", "import React from 'react';\nimport { selectPermissions, useHMSStore } from '@100mslive/react-sdk';\nimport { ChevronLeftIcon, ChevronRightIcon, CrossIcon, RecordIcon } from '@100mslive/react-icons';\nimport { Box, Flex, IconButton, slideLeftAndFade, Switch, Text } from '../../../';\n\nexport const StreamCard = ({ title, subtitle, Icon, imgSrc = '', css = {}, onClick, testId }) => {\n return (\n <Flex\n css={{\n w: '100%',\n p: '$10',\n r: '$1',\n cursor: 'pointer',\n bg: '$surface_bright',\n mb: '$10',\n mt: '$8',\n ...css,\n }}\n data-testid={testId}\n onClick={onClick}\n >\n <Text css={{ alignSelf: 'center', p: '$4' }}>\n {imgSrc ? <img src={imgSrc} height={40} width={40} /> : <Icon width={40} height={40} />}\n </Text>\n <Box css={{ flex: '1 1 0', mx: '$8' }}>\n <Text variant=\"h6\" css={{ mb: '$4' }}>\n {title}\n </Text>\n <Text variant=\"sm\" css={{ color: '$on_surface_medium' }}>\n {subtitle}\n </Text>\n </Box>\n <Text css={{ alignSelf: 'center' }}>\n <ChevronRightIcon />\n </Text>\n </Flex>\n );\n};\n\nexport const ContentHeader = ({ onBack, title, content }) => {\n return (\n <Flex css={{ w: '100%', py: '$8', px: '$10', cursor: 'pointer' }}>\n <Text\n css={{ p: '$2', bg: '$surface_bright', r: '$round', alignSelf: 'center' }}\n onClick={onBack}\n data-testid=\"go_back\"\n >\n <ChevronLeftIcon width={16} height={16} />\n </Text>\n <Box css={{ flex: '1 1 0', mx: '$8' }}>\n <Text\n variant=\"tiny\"\n css={{\n textTransform: 'uppercase',\n fontWeight: '$semiBold',\n color: '$on_surface_medium',\n }}\n >\n {title}\n </Text>\n <Text variant=\"h6\">{content}</Text>\n </Box>\n <IconButton onClick={onBack} css={{ alignSelf: 'flex-start' }} data-testid=\"close_stream_section\">\n <CrossIcon width={16} height={16} />\n </IconButton>\n </Flex>\n );\n};\n\nexport const Container = ({ children, rounded = false }) => {\n return (\n <Box\n css={{\n size: '100%',\n zIndex: 2,\n position: 'absolute',\n top: 0,\n left: 0,\n bg: '$surface_default',\n transform: 'translateX(10%)',\n animation: `${slideLeftAndFade('10%')} 100ms ease-out forwards`,\n display: 'flex',\n flexDirection: 'column',\n borderRadius: rounded ? '$2' : '0',\n }}\n >\n {children}\n </Box>\n );\n};\n\nexport const ContentBody = ({ Icon, title, removeVerticalPadding = false, children }) => {\n return (\n <Box css={{ p: removeVerticalPadding ? '$0 $10' : '$10' }}>\n <Text css={{ display: 'flex', alignItems: 'center', mb: '$4' }}>\n <Icon />\n <Text as=\"span\" css={{ fontWeight: '$semiBold', ml: '$4' }}>\n {title}\n </Text>\n </Text>\n <Text variant=\"sm\" css={{ color: '$on_surface_medium' }}>\n {children}\n </Text>\n </Box>\n );\n};\n\nexport const RecordStream = ({ record, setRecord, testId }) => {\n const permissions = useHMSStore(selectPermissions);\n return permissions?.browserRecording ? (\n <Flex align=\"center\" css={{ bg: '$surface_bright', m: '$8 $10', p: '$8', r: '$0' }}>\n <Text css={{ color: '$alert_error_default' }}>\n <RecordIcon />\n </Text>\n <Text variant=\"sm\" css={{ flex: '1 1 0', mx: '$8' }}>\n Record the stream\n </Text>\n <Switch checked={record} onCheckedChange={setRecord} data-testid={testId} />\n </Flex>\n ) : null;\n};\n\nexport const ErrorText = ({ error }) => {\n if (!error) {\n return null;\n }\n return (\n <Text variant=\"sm\" css={{ mb: '$8', color: '$alert_error_default' }}>\n {error}\n </Text>\n );\n};\n", "import React, { useEffect, useMemo, useRef, useState } from 'react';\nimport {\n selectHMSStats,\n selectLocalPeerID,\n selectPeersMap,\n selectTracksMap,\n useHMSStatsStore,\n useHMSStore,\n} from '@100mslive/react-sdk';\nimport { HorizontalDivider } from '../../Divider';\nimport { Dropdown } from '../../Dropdown';\nimport { Label } from '../../Label';\nimport { Box, Flex } from '../../Layout';\nimport { Dialog } from '../../Modal';\nimport { Switch } from '../../Switch';\nimport { Text } from '../../Text';\nimport { DialogDropdownTrigger } from '../primitives/DropdownTrigger';\nimport { PrebuiltDialogPortal } from './PrebuiltDialogPortal';\nimport { useSetUiSettings } from './AppData/useUISettings';\nimport { useDropdownSelection } from './hooks/useDropdownSelection';\nimport { UI_SETTINGS } from '../common/constants';\n\nexport const StatsForNerds = ({ onOpenChange }) => {\n const tracksWithLabels = useTracksWithLabel();\n const statsOptions = useMemo(\n () => [{ id: 'local-peer', label: 'Local Peer Stats' }, ...tracksWithLabels],\n [tracksWithLabels],\n );\n const [selectedStat, setSelectedStat] = useState(statsOptions[0]);\n const [showStatsOnTiles, setShowStatsOnTiles] = useSetUiSettings(UI_SETTINGS.showStatsOnTiles);\n const [open, setOpen] = useState(false);\n const ref = useRef();\n const selectionBg = useDropdownSelection();\n\n useEffect(() => {\n if (selectedStat.id !== 'local-peer' && !tracksWithLabels.find(track => track.id === selectedStat.id)) {\n setSelectedStat('local-peer');\n }\n }, [tracksWithLabels, selectedStat]);\n\n return (\n <Dialog.Root defaultOpen onOpenChange={onOpenChange}>\n <PrebuiltDialogPortal>\n <Dialog.Overlay />\n <Dialog.Content\n css={{\n width: 'min(500px, 95%)',\n maxHeight: '100%',\n overflowY: 'auto',\n }}\n >\n {/* Title */}\n <Dialog.Title css={{ p: '$4 0' }}>\n <Flex justify=\"between\">\n <Flex align=\"center\" css={{ mb: '$1' }}>\n <Text variant=\"h6\" inline>\n Stats For Nerds\n </Text>\n </Flex>\n <Dialog.DefaultClose data-testid=\"stats_dialog_close_icon\" />\n </Flex>\n </Dialog.Title>\n <HorizontalDivider css={{ mt: '0.8rem' }} />\n {/* Switch */}\n <Flex justify=\"start\" gap={4} css={{ m: '$10 0' }}>\n <Switch checked={showStatsOnTiles} onCheckedChange={setShowStatsOnTiles} />\n <Text variant=\"body2\" css={{ fontWeight: '$semiBold' }}>\n Show Stats on Tiles\n </Text>\n </Flex>\n {/* Select */}\n <Flex\n direction=\"column\"\n css={{\n mb: '$12',\n position: 'relative',\n minWidth: 0,\n }}\n >\n <Label variant=\"body2\" css={{ c: '$on_surface_high' }}>\n Stats For\n </Label>\n <Dropdown.Root data-testid=\"dialog_select_Stats For\" open={open} onOpenChange={setOpen}>\n <DialogDropdownTrigger\n title={selectedStat.label || 'Select Stats'}\n css={{ mt: '$4' }}\n titleCSS={{ mx: 0 }}\n open={open}\n ref={ref}\n />\n <Dropdown.Portal>\n <Dropdown.Content align=\"start\" sideOffset={8} css={{ w: ref.current?.clientWidth, zIndex: 1000 }}>\n {statsOptions.map(option => {\n const isSelected = option.id === selectedStat.id && option.layer === selectedStat.layer;\n return (\n <Dropdown.Item\n key={`${option.id}-${option.layer || ''}`}\n onClick={() => {\n setSelectedStat(option);\n }}\n css={{\n px: '$9',\n bg: isSelected ? selectionBg : undefined,\n c: isSelected ? '$on_primary_high' : '$on_primary_high',\n }}\n >\n {option.label}\n </Dropdown.Item>\n );\n })}\n </Dropdown.Content>\n </Dropdown.Portal>\n </Dropdown.Root>\n </Flex>\n {/* Stats */}\n {selectedStat.id === 'local-peer' ? (\n <LocalPeerStats />\n ) : (\n <TrackStats trackID={selectedStat.id} layer={selectedStat.layer} local={selectedStat.local} />\n )}\n </Dialog.Content>\n </PrebuiltDialogPortal>\n </Dialog.Root>\n );\n};\n\nconst useTracksWithLabel = () => {\n const tracksMap = useHMSStore(selectTracksMap);\n const peersMap = useHMSStore(selectPeersMap);\n const localPeerID = useHMSStore(selectLocalPeerID);\n const tracksWithLabels = useMemo(\n () =>\n Object.values(tracksMap).reduce((res, track) => {\n const peerName = peersMap[track.peerId]?.name;\n const isLocalTrack = track.peerId === localPeerID;\n if (isLocalTrack && track.layerDefinitions?.length) {\n res = res.concat(\n track.layerDefinitions.map(({ layer }) => {\n return {\n id: track.id,\n layer,\n local: true,\n label: `${peerName} ${track.source} ${track.type} - ${layer}`,\n };\n }),\n );\n return res;\n }\n res.push({\n id: track.id,\n local: isLocalTrack,\n label: `${peerName} ${track.source} ${track.type}`,\n });\n return res;\n }, []),\n [tracksMap, peersMap, localPeerID],\n );\n return tracksWithLabels;\n};\n\nconst LocalPeerStats = () => {\n const stats = useHMSStatsStore(selectHMSStats.localPeerStats);\n\n if (!stats) {\n return null;\n }\n\n return (\n <Flex css={{ flexWrap: 'wrap', gap: '$10' }}>\n <StatsRow label=\"Packets Lost\" value={stats.subscribe?.packetsLost} />\n <StatsRow label=\"Jitter\" value={stats.subscribe?.jitter} />\n <StatsRow label=\"Publish Bitrate\" value={formatBytes(stats.publish?.bitrate, 'b/s')} />\n <StatsRow label=\"Subscribe Bitrate\" value={formatBytes(stats.subscribe?.bitrate, 'b/s')} />\n <StatsRow\n label=\"Available Outgoing Bitrate\"\n value={formatBytes(stats.publish?.availableOutgoingBitrate, 'b/s')}\n />\n <StatsRow label=\"Total Bytes Sent\" value={formatBytes(stats.publish?.bytesSent)} />\n <StatsRow label=\"Total Bytes Received\" value={formatBytes(stats.subscribe?.bytesReceived)} />\n <StatsRow\n label=\"Round Trip Time\"\n value={`${\n (((stats.publish?.currentRoundTripTime || 0) + (stats.subscribe?.currentRoundTripTime || 0)) / 2).toFixed(3) *\n 1000\n } ms`}\n />\n </Flex>\n );\n};\n\nconst TrackStats = ({ trackID, layer, local }) => {\n const selector = layer\n ? selectHMSStats.localVideoTrackStatsByLayer(layer)(trackID)\n : local\n ? selectHMSStats.localAudioTrackStatsByID(trackID)\n : selectHMSStats.trackStatsByID(trackID);\n const stats = useHMSStatsStore(selector);\n if (!stats) {\n return null;\n }\n const inbound = stats.type.includes('inbound');\n\n return (\n <Flex css={{ flexWrap: 'wrap', gap: '$10' }}>\n <StatsRow label=\"Type\" value={stats.type + ' ' + stats.kind} />\n <StatsRow label=\"Bitrate\" value={formatBytes(stats.bitrate, 'b/s')} />\n <StatsRow label=\"Packets Lost\" value={stats.packetsLost} />\n <StatsRow label=\"Jitter\" value={stats.jitter?.toFixed(3)} />\n <StatsRow\n label={inbound ? 'Bytes Received' : 'Bytes Sent'}\n value={formatBytes(inbound ? stats.bytesReceived : stats.bytesSent)}\n />\n {stats.kind === 'video' && (\n <>\n <StatsRow label=\"Framerate\" value={stats.framesPerSecond} />\n {!inbound && <StatsRow label=\"Quality Limitation Reason\" value={stats.qualityLimitationReason} />}\n </>\n )}\n <StatsRow label=\"Round Trip Time\" value={stats.roundTripTime ? `${stats.roundTripTime * 1000} ms` : '-'} />\n </Flex>\n );\n};\n\nconst StatsRow = React.memo(({ label, value }) => (\n <Box css={{ bg: '$surface_bright', w: 'calc(50% - $6)', p: '$8', r: '$3' }}>\n <Text\n variant=\"overline\"\n css={{\n fontWeight: '$semiBold',\n color: '$on_surface_medium',\n textTransform: 'uppercase',\n }}\n >\n {label}\n </Text>\n <Text variant=\"sub1\" css={{ fontWeight: '$semiBold', color: '$on_surface_high' }}>\n {value || '-'}\n </Text>\n </Box>\n));\n\nconst formatBytes = (bytes, unit = 'B', decimals = 2) => {\n if (bytes === undefined) return '-';\n if (bytes === 0) return '0 ' + unit;\n\n const k = 1024;\n const dm = decimals < 0 ? 0 : decimals;\n const sizes = ['', 'K', 'M', 'G', 'T', 'P', 'E', 'Z', 'Y'].map(size => size + unit);\n\n const i = Math.floor(Math.log(bytes) / Math.log(k));\n\n return parseFloat((bytes / Math.pow(k, i)).toFixed(dm)) + ' ' + sizes[i];\n};\n", "import React, { useCallback, useRef, useState } from 'react';\nimport { useHMSActions } from '@100mslive/react-sdk';\nimport { AlertTriangleIcon, ChangeRoleIcon, CheckIcon } from '@100mslive/react-icons';\nimport { Button, Checkbox, Dialog, Dropdown, Flex, Loading, Text } from '../../../';\nimport { DialogContent, DialogRow } from '../../primitives/DialogContent';\nimport { DialogDropdownTrigger } from '../../primitives/DropdownTrigger';\nimport { useFilteredRoles } from '../../common/hooks';\n\nexport const BulkRoleChangeModal = ({ onOpenChange }) => {\n const roles = useFilteredRoles();\n const hmsActions = useHMSActions();\n const ref = useRef(null);\n const roleRef = useRef(null);\n const [selectedBulkRole, setBulkRole] = useState([]);\n const [selectedRole, setRole] = useState('');\n const [bulkRoleDialog, setBulkRoleDialog] = useState(false);\n const [roleDialog, setRoleDialog] = useState(false);\n const [errorMessage, setErrorMessage] = useState('');\n const [isSubmiting, setIsSubmiting] = useState(false);\n\n const changeBulkRole = useCallback(async () => {\n if (selectedBulkRole.length > 0 && selectedRole) {\n try {\n setIsSubmiting(true);\n await hmsActions.changeRoleOfPeersWithRoles(selectedBulkRole, selectedRole);\n setIsSubmiting(false);\n setErrorMessage('');\n onOpenChange(false);\n } catch (err) {\n setErrorMessage(err?.message ? err?.message : 'Unknown error');\n setIsSubmiting(false);\n }\n }\n }, [selectedBulkRole, selectedRole, hmsActions, onOpenChange]);\n\n return (\n <Dialog.Root defaultOpen onOpenChange={onOpenChange}>\n <DialogContent title=\"Bulk Role Change\" Icon={ChangeRoleIcon}>\n <DialogRow>\n <Text>For Roles: </Text>\n <Dropdown.Root\n open={bulkRoleDialog}\n onOpenChange={value => {\n if (value) {\n setBulkRoleDialog(value);\n }\n }}\n modal={false}\n >\n <DialogDropdownTrigger\n ref={ref}\n title={selectedBulkRole.length === 0 ? 'Select Multiple Roles' : selectedBulkRole.toString()}\n css={{\n w: '70%',\n p: '$8',\n }}\n open={bulkRoleDialog}\n />\n <Dropdown.Content\n css={{ w: ref.current?.clientWidth, zIndex: 1000 }}\n onInteractOutside={() => {\n if (bulkRoleDialog) {\n setBulkRoleDialog(false);\n }\n }}\n >\n {roles &&\n roles.map(role => {\n return (\n <Dropdown.CheckboxItem\n key={role}\n checked={selectedBulkRole.includes(role)}\n onCheckedChange={value => {\n setBulkRole(selection => {\n return value ? [...selection, role] : selection.filter(selectedRole => selectedRole !== role);\n });\n setErrorMessage('');\n }}\n >\n <Checkbox.Root css={{ margin: '$2' }} checked={selectedBulkRole.includes(role)}>\n <Checkbox.Indicator>\n <CheckIcon width={16} height={16} />\n </Checkbox.Indicator>\n </Checkbox.Root>\n {role}\n </Dropdown.CheckboxItem>\n );\n })}\n </Dropdown.Content>\n </Dropdown.Root>\n </DialogRow>\n <DialogRow>\n <Text>To Role: </Text>\n <Dropdown.Root open={roleDialog} onOpenChange={value => setRoleDialog(value)}>\n <DialogDropdownTrigger\n ref={roleRef}\n title={selectedRole || 'Select Role'}\n css={{\n w: '70%',\n p: '$8',\n }}\n open={roleDialog}\n />\n <Dropdown.Content css={{ w: roleRef.current?.clientWidth, zIndex: 1000 }}>\n {roles &&\n roles.map(role => {\n return (\n <Dropdown.Item\n key={role}\n onSelect={() => {\n setRole(role);\n setErrorMessage('');\n }}\n >\n {role}\n </Dropdown.Item>\n );\n })}\n </Dropdown.Content>\n </Dropdown.Root>\n </DialogRow>\n <DialogRow>\n {errorMessage && (\n <Flex gap={2} css={{ c: '$alert_error_default', w: '70%', ml: 'auto' }}>\n <AlertTriangleIcon />\n <Text css={{ c: 'inherit' }}>{errorMessage}</Text>\n </Flex>\n )}\n </DialogRow>\n <DialogRow justify=\"end\">\n <Button variant=\"primary\" onClick={changeBulkRole} disabled={!(selectedRole && selectedBulkRole.length > 0)}>\n {isSubmiting && <Loading css={{ color: '$on_primary_medium' }} />}\n Apply\n </Button>\n </DialogRow>\n </DialogContent>\n </Dialog.Root>\n );\n};\n", "import React from 'react';\nimport { ExpandIcon } from '@100mslive/react-icons';\nimport { Dropdown, Text } from '../../../';\nimport { useFullscreen } from '../hooks/useFullscreen';\n\nexport const FullScreenItem = () => {\n const { allowed, isFullscreen, toggleFullscreen } = useFullscreen();\n\n if (!allowed) {\n return null;\n }\n\n return (\n <Dropdown.Item\n onClick={() => {\n toggleFullscreen();\n }}\n data-testid=\"full_screen_btn\"\n >\n <ExpandIcon />\n <Text variant=\"sm\" css={{ ml: '$4' }}>\n {isFullscreen ? 'Exit ' : 'Go '}Fullscreen\n </Text>\n </Dropdown.Item>\n );\n};\n", "import { useCallback, useEffect, useState } from 'react';\nimport screenfull from 'screenfull';\nimport { ToastManager } from '../Toast/ToastManager';\n\nexport const useFullscreen = () => {\n const [isFullScreenEnabled, setIsFullScreenEnabled] = useState(screenfull.isFullscreen);\n\n const toggle = useCallback(async () => {\n if (!screenfull.isEnabled) {\n ToastManager.addToast({ title: 'Fullscreen feature not supported' });\n return;\n }\n try {\n if (isFullScreenEnabled) {\n await screenfull.exit();\n } else {\n await screenfull.request();\n }\n } catch (err) {\n ToastManager.addToast({ title: err.message });\n }\n }, [isFullScreenEnabled]);\n\n useEffect(() => {\n const onChange = () => {\n setIsFullScreenEnabled(screenfull.isFullscreen);\n };\n if (screenfull.isEnabled) {\n screenfull.on('change', onChange);\n }\n return () => {\n if (screenfull.isEnabled) {\n screenfull.off('change', onChange);\n }\n };\n }, []);\n\n return {\n allowed: screenfull.isEnabled,\n isFullscreen: isFullScreenEnabled,\n toggleFullscreen: toggle,\n };\n};\n", "import React, { useCallback, useState } from 'react';\nimport { useHMSActions } from '@100mslive/react-sdk';\nimport { MicOffIcon } from '@100mslive/react-icons';\nimport { Dialog } from '../../../';\nimport { Sheet } from '../../../Sheet';\nimport { DialogContent } from '../../primitives/DialogContent';\nimport { MuteAllContent } from './MuteAllContent';\nimport { useFilteredRoles } from '../../common/hooks';\n\nconst trackSourceOptions = [\n { label: 'All Track Sources', value: '' },\n { label: 'regular', value: 'regular' },\n { label: 'screen', value: 'screen' },\n { label: 'audioplaylist', value: 'audioplaylist' },\n { label: 'videoplaylist', value: 'videoplaylist' },\n];\nconst trackTypeOptions = [\n { label: 'All Track Types', value: '' },\n { label: 'audio', value: 'audio' },\n { label: 'video', value: 'video' },\n];\nexport const MuteAllModal = ({ onOpenChange, isMobile = false }) => {\n const roles = useFilteredRoles();\n const hmsActions = useHMSActions();\n const [enabled, setEnabled] = useState(false);\n const [trackType, setTrackType] = useState();\n const [selectedRole, setRole] = useState();\n const [selectedSource, setSource] = useState();\n\n const muteAll = useCallback(async () => {\n await hmsActions.setRemoteTracksEnabled({\n enabled: enabled,\n type: trackType,\n source: selectedSource,\n roles: selectedRole ? [selectedRole] : undefined,\n });\n onOpenChange(false);\n }, [selectedRole, enabled, trackType, selectedSource, hmsActions, onOpenChange]);\n\n const props = {\n muteAll,\n roles,\n enabled,\n setEnabled,\n trackType,\n setTrackType,\n selectedRole,\n setRole,\n selectedSource,\n setSource,\n trackSourceOptions,\n trackTypeOptions,\n isMobile,\n };\n\n if (isMobile) {\n return (\n <Sheet.Root defaultOpen onOpenChange={onOpenChange}>\n <Sheet.Content css={{ px: '$10' }}>\n <MuteAllContent {...props} />\n </Sheet.Content>\n </Sheet.Root>\n );\n }\n\n return (\n <Dialog.Root defaultOpen onOpenChange={onOpenChange}>\n <DialogContent title=\"Mute/Unmute Remote Tracks\" Icon={MicOffIcon}>\n <MuteAllContent {...props} />\n </DialogContent>\n </Dialog.Root>\n );\n};\n", "import React from 'react';\nimport { Button } from '../../../Button';\nimport { Label } from '../../../Label';\nimport { Flex } from '../../../Layout';\nimport { RadioGroup } from '../../../RadioGroup';\nimport { Text } from '../../../Text';\nimport { DialogRow, DialogSelect } from '../../primitives/DialogContent';\n\nexport const MuteAllContent = props => {\n const roles = props.roles || [];\n return (\n <>\n <DialogSelect\n title=\"Role\"\n options={[{ label: 'All Roles', value: '' }, ...roles.map(role => ({ label: role, value: role }))]}\n selected={props.selectedRole}\n keyField=\"value\"\n labelField=\"label\"\n onChange={props.setRole}\n />\n <DialogSelect\n title=\"Track type\"\n options={props.trackTypeOptions}\n selected={props.trackType}\n onChange={props.setTrackType}\n keyField=\"value\"\n labelField=\"label\"\n />\n <DialogSelect\n title=\"Track source\"\n options={props.trackSourceOptions}\n selected={props.selectedSource}\n onChange={props.setSource}\n keyField=\"value\"\n labelField=\"label\"\n />\n <DialogRow>\n <Text variant=\"md\">Track status</Text>\n <RadioGroup.Root value={props.enabled} onValueChange={props.setEnabled}>\n <Flex align=\"center\" css={{ mr: '$8' }}>\n <RadioGroup.Item value={false} id=\"trackDisableRadio\" css={{ mr: '$4' }}>\n <RadioGroup.Indicator />\n </RadioGroup.Item>\n <Label htmlFor=\"trackDisableRadio\">Mute</Label>\n </Flex>\n <Flex align=\"center\" css={{ cursor: 'pointer' }}>\n <RadioGroup.Item value={true} id=\"trackEnableRadio\" css={{ mr: '$4' }}>\n <RadioGroup.Indicator />\n </RadioGroup.Item>\n <Label htmlFor=\"trackEnableRadio\">Request Unmute</Label>\n </Flex>\n </RadioGroup.Root>\n </DialogRow>\n <DialogRow justify=\"end\">\n <Button variant=\"primary\" onClick={props.muteAll} css={{ w: props?.isMobile ? '100%' : '' }}>\n Apply\n </Button>\n </DialogRow>\n </>\n );\n};\n", "import React, { useRef, useState } from 'react';\nimport { useClickAway } from 'react-use';\nimport { ConferencingScreen, DefaultConferencingScreen_Elements } from '@100mslive/types-prebuilt';\nimport {\n selectIsConnectedToRoom,\n selectPeerCount,\n selectPermissions,\n useAVToggle,\n useHMSActions,\n useHMSStore,\n useRecordingStreaming,\n} from '@100mslive/react-sdk';\nimport {\n BrbIcon,\n CrossIcon,\n DragHandleIcon,\n EmojiIcon,\n HandIcon,\n HandRaiseSlashedIcon,\n PeopleIcon,\n RecordIcon,\n SettingsIcon,\n} from '@100mslive/react-icons';\nimport { Box, Loading, Tooltip } from '../../../..';\nimport { Sheet } from '../../../../Sheet';\n// @ts-ignore: No implicit any\nimport IconButton from '../../../IconButton';\n// @ts-ignore: No implicit any\nimport { EmojiReaction } from '../../EmojiReaction';\n// @ts-ignore: No implicit any\nimport { StopRecordingInSheet } from '../../Header/StreamActions';\n// @ts-ignore: No implicit any\nimport SettingsModal from '../../Settings/SettingsModal';\n// @ts-ignore: No implicit any\nimport { ToastManager } from '../../Toast/ToastManager';\n// @ts-ignore: No implicit any\nimport { ActionTile } from '../ActionTile';\n// @ts-ignore: No implicit any\nimport { ChangeNameModal } from '../ChangeNameModal';\n// @ts-ignore: No implicit any\nimport { MuteAllModal } from '../MuteAllModal';\n// @ts-ignore: No implicit any\nimport { useSidepaneToggle } from '../../AppData/useSidepane';\n// @ts-ignore: No implicit any\nimport { useDropdownList } from '../../hooks/useDropdownList';\n// @ts-ignore: No implicit any\nimport { useMyMetadata } from '../../hooks/useMetadata';\n// @ts-ignore: No implicit any\nimport { getFormattedCount } from '../../../common/utils';\n// @ts-ignore: No implicit any\nimport { SIDE_PANE_OPTIONS } from '../../../common/constants';\n\n// const VirtualBackground = React.lazy(() => import('../../../plugins/VirtualBackground/VirtualBackground'));\n\nconst MODALS = {\n CHANGE_NAME: 'changeName',\n SELF_ROLE_CHANGE: 'selfRoleChange',\n MORE_SETTINGS: 'moreSettings',\n START_RECORDING: 'startRecording',\n DEVICE_SETTINGS: 'deviceSettings',\n STATS_FOR_NERDS: 'statsForNerds',\n BULK_ROLE_CHANGE: 'bulkRoleChange',\n MUTE_ALL: 'muteAll',\n EMBED_URL: 'embedUrl',\n};\n\nexport const MwebOptions = ({\n elements,\n screenType,\n}: {\n elements: DefaultConferencingScreen_Elements;\n screenType: keyof ConferencingScreen;\n}) => {\n const hmsActions = useHMSActions();\n const permissions = useHMSStore(selectPermissions);\n const isConnected = useHMSStore(selectIsConnectedToRoom);\n const { isBrowserRecordingOn, isStreamingOn, isHLSRunning } = useRecordingStreaming();\n const [openModals, setOpenModals] = useState(new Set());\n const [openOptionsSheet, setOpenOptionsSheet] = useState(false);\n const [openSettingsSheet, setOpenSettingsSheet] = useState(false);\n const [showEmojiCard, setShowEmojiCard] = useState(false);\n const [showRecordingOn, setShowRecordingOn] = useState(false);\n const [isRecordingLoading, setIsRecordingLoading] = useState(false);\n const toggleParticipants = useSidepaneToggle(SIDE_PANE_OPTIONS.PARTICIPANTS);\n const peerCount = useHMSStore(selectPeerCount);\n const emojiCardRef = useRef(null);\n const { isBRBOn, toggleBRB, isHandRaised, toggleHandRaise } = useMyMetadata();\n const { toggleAudio, toggleVideo } = useAVToggle();\n const noAVPermissions = !(toggleAudio || toggleVideo);\n // const isVideoOn = useHMSStore(selectIsLocalVideoEnabled);\n\n useDropdownList({ open: openModals.size > 0 || openOptionsSheet || openSettingsSheet, name: 'MoreSettings' });\n\n const updateState = (modalName: string, value: boolean) => {\n setOpenModals(modals => {\n const copy = new Set(modals);\n if (value) {\n copy.add(modalName);\n } else {\n copy.delete(modalName);\n }\n return copy;\n });\n };\n\n useClickAway(emojiCardRef, () => setShowEmojiCard(false));\n\n return (\n <>\n <Sheet.Root open={openOptionsSheet} onOpenChange={setOpenOptionsSheet}>\n <Tooltip title=\"More options\">\n <Sheet.Trigger asChild data-testid=\"more_settings_btn\">\n <IconButton>\n <DragHandleIcon />\n </IconButton>\n </Sheet.Trigger>\n </Tooltip>\n <Sheet.Content css={{ bg: '$surface_dim', pb: '$14' }}>\n <Sheet.Title\n css={{\n display: 'flex',\n color: '$on_surface_high',\n w: '100%',\n justifyContent: 'space-between',\n fontSize: '$md',\n mt: '$8',\n px: '$10',\n pb: '$8',\n borderBottom: '1px solid $border_default',\n mb: '$8',\n alignItems: 'center',\n }}\n >\n Options\n <Sheet.Close>\n <Box css={{ color: '$on_surface_high' }}>\n <CrossIcon />\n </Box>\n </Sheet.Close>\n </Sheet.Title>\n <Box\n css={{\n display: 'grid',\n gridTemplateColumns: '1fr 1fr 1fr',\n gridTemplateRows: 'auto',\n gridColumnGap: '$6',\n gridRowGap: '$8',\n px: '$9',\n }}\n >\n {elements?.participant_list && (\n <ActionTile.Root\n onClick={() => {\n toggleParticipants();\n setOpenOptionsSheet(false);\n }}\n >\n <ActionTile.Count>{getFormattedCount(peerCount)}</ActionTile.Count>\n <PeopleIcon />\n <ActionTile.Title>Participants</ActionTile.Title>\n </ActionTile.Root>\n )}\n\n {!noAVPermissions ? (\n <ActionTile.Root\n active={isHandRaised}\n onClick={() => {\n toggleHandRaise();\n setOpenOptionsSheet(false);\n }}\n >\n {isHandRaised ? <HandRaiseSlashedIcon /> : <HandIcon />}\n <ActionTile.Title>{isHandRaised ? 'Lower' : 'Raise'} Hand</ActionTile.Title>\n </ActionTile.Root>\n ) : null}\n\n {/* {isVideoOn ? (\n <Suspense fallback=\"\">\n <VirtualBackground asActionTile onVBClick={() => setOpenOptionsSheet(false)} />\n </Suspense>\n ) : null} */}\n\n {elements?.emoji_reactions && (\n <ActionTile.Root\n onClick={() => {\n setShowEmojiCard(true);\n setOpenOptionsSheet(false);\n }}\n >\n <EmojiIcon />\n <ActionTile.Title>Emoji Reactions</ActionTile.Title>\n </ActionTile.Root>\n )}\n\n {elements?.brb && (\n <ActionTile.Root\n active={isBRBOn}\n onClick={() => {\n toggleBRB();\n setOpenOptionsSheet(false);\n }}\n >\n <BrbIcon />\n <ActionTile.Title>Be Right Back</ActionTile.Title>\n </ActionTile.Root>\n )}\n\n <ActionTile.Root\n onClick={() => {\n setOpenSettingsSheet(true);\n setOpenOptionsSheet(false);\n }}\n >\n <SettingsIcon />\n <ActionTile.Title>Settings</ActionTile.Title>\n </ActionTile.Root>\n\n {isConnected && permissions?.browserRecording ? (\n <ActionTile.Root\n disabled={isHLSRunning}\n onClick={async () => {\n if (isRecordingLoading) {\n return;\n }\n if (isBrowserRecordingOn || isStreamingOn) {\n setOpenOptionsSheet(false);\n setShowRecordingOn(true);\n } else {\n // start recording\n setIsRecordingLoading(true);\n try {\n await hmsActions.startRTMPOrRecording({\n record: true,\n });\n setOpenOptionsSheet(false);\n setIsRecordingLoading(false);\n } catch (error) {\n // @ts-ignore\n if (error.message.includes('stream already running')) {\n ToastManager.addToast({\n title: 'Recording already running',\n variant: 'error',\n });\n } else {\n ToastManager.addToast({\n // @ts-ignore\n title: error.message,\n variant: 'error',\n });\n }\n setIsRecordingLoading(false);\n }\n }\n if (isHLSRunning) {\n setOpenOptionsSheet(false);\n }\n }}\n >\n {isRecordingLoading ? <Loading /> : <RecordIcon />}\n <ActionTile.Title>\n {isBrowserRecordingOn\n ? 'Recording On'\n : isRecordingLoading\n ? 'Starting Recording'\n : 'Start Recording'}\n </ActionTile.Title>\n </ActionTile.Root>\n ) : null}\n </Box>\n </Sheet.Content>\n </Sheet.Root>\n <SettingsModal open={openSettingsSheet} onOpenChange={setOpenSettingsSheet} screenType={screenType} />\n {openModals.has(MODALS.MUTE_ALL) && (\n <MuteAllModal onOpenChange={(value: boolean) => updateState(MODALS.MUTE_ALL, value)} isMobile />\n )}\n {openModals.has(MODALS.CHANGE_NAME) && (\n <ChangeNameModal\n onOpenChange={(value: boolean) => updateState(MODALS.CHANGE_NAME, value)}\n openParentSheet={() => setOpenOptionsSheet(true)}\n />\n )}\n\n {showEmojiCard && (\n <Box\n ref={emojiCardRef}\n css={{\n maxWidth: '100%',\n w: '100%',\n position: 'absolute',\n left: 0,\n right: 0,\n bottom: '$18',\n bg: '$surface_default',\n zIndex: '10',\n p: '$8',\n pb: 0,\n r: '$1',\n mx: '$4',\n }}\n >\n <EmojiReaction />\n </Box>\n )}\n {showRecordingOn && (\n <StopRecordingInSheet\n onClose={() => setShowRecordingOn(false)}\n onStopRecording={async () => {\n try {\n await hmsActions.stopRTMPAndRecording();\n setShowRecordingOn(false);\n } catch (error) {\n ToastManager.addToast({\n // @ts-ignore\n title: error.message,\n variant: 'error',\n });\n }\n }}\n />\n )}\n </>\n );\n};\n", "import React, { useState } from 'react';\nimport { useMedia } from 'react-use';\nimport { selectLocalPeerName, useHMSActions, useHMSStore } from '@100mslive/react-sdk';\nimport { config as cssConfig, Dialog } from '../../../';\nimport { Sheet } from '../../../Sheet';\nimport { PrebuiltDialogPortal } from '../PrebuiltDialogPortal';\nimport { ToastManager } from '../Toast/ToastManager';\nimport { ChangeNameContent } from './ChangeNameContent';\nimport { UserPreferencesKeys, useUserPreferences } from '../hooks/useUserPreferences';\n\nexport const ChangeNameModal = ({ onOpenChange, openParentSheet = null }) => {\n const [previewPreference, setPreviewPreference] = useUserPreferences(UserPreferencesKeys.PREVIEW);\n const hmsActions = useHMSActions();\n const localPeerName = useHMSStore(selectLocalPeerName);\n const [currentName, setCurrentName] = useState(localPeerName);\n const isMobile = useMedia(cssConfig.media.md);\n\n const changeName = async () => {\n const name = currentName.trim();\n if (!name || name === localPeerName) {\n return;\n }\n try {\n await hmsActions.changeName(name);\n setPreviewPreference({\n ...(previewPreference || {}),\n name,\n });\n } catch (error) {\n console.error('failed to update name', error);\n ToastManager.addToast({ title: error.message });\n } finally {\n onOpenChange(false);\n }\n };\n\n const props = {\n changeName,\n setCurrentName,\n currentName,\n localPeerName,\n isMobile,\n onExit: () => onOpenChange(false),\n onBackClick: () => {\n onOpenChange(false);\n openParentSheet();\n },\n };\n\n if (isMobile) {\n return (\n <Sheet.Root defaultOpen onOpenChange={onOpenChange}>\n <Sheet.Content css={{ bg: '$surface_dim', p: '$8 0' }}>\n <ChangeNameContent {...props} />\n </Sheet.Content>\n </Sheet.Root>\n );\n }\n\n return (\n <Dialog.Root defaultOpen onOpenChange={onOpenChange}>\n <PrebuiltDialogPortal>\n <Dialog.Overlay />\n <Dialog.Content css={{ bg: '$surface_dim', width: 'min(400px,80%)', p: '$10' }}>\n <ChangeNameContent {...props} />\n </Dialog.Content>\n </PrebuiltDialogPortal>\n </Dialog.Root>\n );\n};\n", "import React from 'react';\nimport { ChevronLeftIcon, CrossIcon } from '@100mslive/react-icons';\nimport { Button } from '../../../Button';\nimport { Input } from '../../../Input';\nimport { Box, Flex } from '../../../Layout';\nimport { Text } from '../../../Text';\n\nexport const ChangeNameContent = ({\n changeName,\n setCurrentName,\n currentName,\n localPeerName,\n isMobile,\n onExit,\n onBackClick,\n}) => {\n return (\n <form\n onSubmit={async e => {\n e.preventDefault();\n await changeName();\n }}\n >\n <Text\n variant={isMobile ? 'md' : 'lg'}\n css={{\n color: '$on_surface_high',\n fontWeight: '$semiBold',\n display: 'flex',\n pb: '$4',\n '@md': { px: '$8', borderBottom: '1px solid $border_default' },\n }}\n >\n {isMobile ? <ChevronLeftIcon onClick={onBackClick} style={{ marginRight: '0.5rem' }} /> : null}\n Change Name\n <Box\n css={{ color: 'inherit', ml: 'auto', '&:hover': { color: '$on_surface_medium', cursor: 'pointer' } }}\n onClick={onExit}\n >\n <CrossIcon />\n </Box>\n </Text>\n <Text variant=\"sm\" css={{ color: '$on_surface_medium', pb: '$6', mb: '$8', '@md': { px: '$8', mt: '$4' } }}>\n Your name will be visible to other participants in the session.\n </Text>\n <Flex justify=\"center\" align=\"center\" css={{ my: '$8', w: '100%', '@md': { px: '$8' } }}>\n <Input\n css={{ width: '100%', bg: '$surface_default' }}\n value={currentName}\n // Prevents popup from showing up on chrome mweb\n type={isMobile ? 'search' : 'text'}\n onChange={e => {\n setCurrentName(e.target.value);\n }}\n autoComplete=\"name\"\n required\n data-testid=\"change_name_field\"\n onKeyDown={async e => {\n if (e.key === 'Enter' && currentName.trim().length > 0 && currentName !== localPeerName) {\n e.preventDefault();\n if (isMobile) {\n return;\n }\n changeName();\n }\n }}\n />\n </Flex>\n\n <Flex\n justify=\"between\"\n align=\"center\"\n css={{\n width: '100%',\n gap: '$md',\n mt: '$10',\n '@md': { px: '$4' },\n }}\n >\n {isMobile ? null : (\n <Button\n variant=\"standard\"\n css={{ w: '100%' }}\n outlined\n type=\"submit\"\n disabled={!localPeerName}\n onClick={onExit}\n >\n Cancel\n </Button>\n )}\n\n <Button\n variant=\"primary\"\n css={{ width: '100%' }}\n type=\"submit\"\n disabled={!currentName.trim() || currentName.trim() === localPeerName}\n data-testid=\"popup_change_btn\"\n >\n Change\n </Button>\n </Flex>\n </form>\n );\n};\n", "import React from 'react';\nimport { HandIcon } from '@100mslive/react-icons';\nimport { Tooltip } from '../../Tooltip';\nimport IconButton from '../IconButton';\n// @ts-ignore: No implicit Any\nimport { useMyMetadata } from './hooks/useMetadata';\n\nexport const RaiseHand = () => {\n const { isHandRaised, toggleHandRaise } = useMyMetadata();\n return (\n <Tooltip title={isHandRaised ? 'Lower hand' : 'Raise hand'}>\n <IconButton active={!isHandRaised} onClick={async () => await toggleHandRaise()}>\n <HandIcon />\n </IconButton>\n </Tooltip>\n );\n};\n", "import React, { Fragment } from 'react';\nimport { selectIsAllowedToPublish, useHMSStore, useScreenShare } from '@100mslive/react-sdk';\nimport { ShareScreenIcon } from '@100mslive/react-icons';\nimport { ShareScreenOptions } from './pdfAnnotator/shareScreenOptions';\nimport { Box, Flex } from '../../Layout';\nimport { Tooltip } from '../../Tooltip';\nimport { ScreenShareButton } from './ShareMenuIcon';\nimport { useUISettings } from './AppData/useUISettings';\nimport { isScreenshareSupported } from '../common/utils';\nimport { UI_SETTINGS } from '../common/constants';\n\nexport const ScreenshareToggle = ({ css = {} }) => {\n const isAllowedToPublish = useHMSStore(selectIsAllowedToPublish);\n const isAudioOnly = useUISettings(UI_SETTINGS.isAudioOnly);\n\n const { amIScreenSharing, screenShareVideoTrackId: video, toggleScreenShare } = useScreenShare();\n const isVideoScreenshare = amIScreenSharing && !!video;\n if (!isAllowedToPublish.screen || !isScreenshareSupported()) {\n return null;\n }\n\n return (\n <Fragment>\n <Flex direction=\"row\" css={{ '@md': { display: 'none' } }}>\n <ScreenShareButton\n variant=\"standard\"\n key=\"ShareScreen\"\n active={!isVideoScreenshare}\n css={css}\n disabled={isAudioOnly}\n onClick={() => {\n toggleScreenShare();\n }}\n >\n <Tooltip title={`${!isVideoScreenshare ? 'Start' : 'Stop'} screen sharing`}>\n <Box>\n <ShareScreenIcon />\n </Box>\n </Tooltip>\n </ScreenShareButton>\n <ShareScreenOptions />\n </Flex>\n </Fragment>\n );\n};\n", "import React, { Fragment, useState } from 'react';\nimport { useScreenShare } from '@100mslive/react-sdk';\nimport { StarIcon, VerticalMenuIcon } from '@100mslive/react-icons';\nimport PDFShareImg from './../../images/pdf-share.png';\nimport ScreenShareImg from './../../images/screen-share.png';\nimport { Box, Dropdown, Flex, IconButton, Text, Tooltip } from '../../../';\nimport { ShareMenuIcon } from '../ShareMenuIcon';\nimport { PDFFileOptions } from './pdfFileOptions';\n\nconst MODALS = {\n SHARE: 'share',\n SCREEN_SHARE: 'screenShare',\n PDF_SHARE: 'pdfShare',\n};\n\nexport function ShareScreenOptions() {\n const [openModals, setOpenModals] = useState(new Set());\n const { amIScreenSharing } = useScreenShare();\n const updateState = (modalName, value) => {\n setOpenModals(modals => {\n const copy = new Set(modals);\n if (value) {\n copy.add(modalName);\n } else {\n copy.delete(modalName);\n }\n return copy;\n });\n };\n const { toggleScreenShare } = useScreenShare();\n return (\n <Fragment>\n <Dropdown.Root\n open={openModals.has(MODALS.SHARE)}\n onOpenChange={value => updateState(MODALS.SHARE, value)}\n modal={false}\n >\n <Dropdown.Trigger asChild data-testid=\"sharing_btn\" disabled={amIScreenSharing}>\n <ShareMenuIcon disabled={amIScreenSharing}>\n <Tooltip title=\"Share\">\n <Box>\n <VerticalMenuIcon />\n </Box>\n </Tooltip>\n </ShareMenuIcon>\n </Dropdown.Trigger>\n <Dropdown.Content\n sideOffset={5}\n css={{\n w: '$96',\n maxHeight: '$96',\n p: 0,\n bg: '$surface_dim',\n }}\n >\n <Dropdown.Item\n css={{\n flexDirection: 'column',\n alignItems: 'flex-start',\n px: '$10',\n pt: '$10',\n pb: '$6',\n '&:hover': {\n bg: '$transparent',\n cursor: 'default',\n },\n }}\n >\n <Text variant=\"h6\">Start Sharing</Text>\n <Text variant=\"sm\">Choose what you want to share</Text>\n </Dropdown.Item>\n <Dropdown.Item\n css={{\n flexDirection: 'row',\n alignItems: 'flex-start',\n gap: '$8',\n px: '$10',\n pt: '$6',\n pb: '$10',\n '&:hover': {\n bg: '$transparent',\n cursor: 'default',\n },\n }}\n >\n <Flex\n direction=\"column\"\n align=\"center\"\n css={{\n gap: '$6',\n }}\n >\n <IconButton\n as=\"div\"\n onClick={() => toggleScreenShare()}\n css={{\n p: '$6',\n display: 'flex',\n justifyContent: 'center',\n border: '1px solid $border_bright',\n r: '$2',\n bg: '$surface_brighter',\n pb: '0',\n }}\n >\n <img\n src={ScreenShareImg}\n alt=\"screen-share\"\n width=\"100%\"\n height=\"100%\"\n style={{\n borderTopLeftRadius: '0.5rem', // TODO: create image component to solve for style hardcoding\n borderTopRightRadius: '0.5rem',\n }}\n />\n </IconButton>\n <Flex direction=\"column\" align=\"center\">\n <Text variant=\"body2\">Share Screen</Text>\n <Text\n variant=\"caption\"\n css={{\n c: '$on_surface_low',\n textAlign: 'center',\n }}\n >\n Share your tab, window or your entire screen\n </Text>\n </Flex>\n </Flex>\n <Flex\n direction=\"column\"\n align=\"center\"\n css={{\n gap: '$6',\n }}\n >\n <IconButton\n onClick={() => {\n updateState(MODALS.PDF_SHARE, true);\n }}\n disabled={amIScreenSharing}\n css={{\n p: '$6',\n display: 'flex',\n justifyContent: 'center',\n border: '$border_bright 1px solid',\n r: '$2',\n bg: '$surface_bright',\n pb: '0',\n }}\n >\n <img\n src={PDFShareImg}\n alt=\"pdf-share\"\n width=\"100%\"\n height=\"100%\"\n style={{\n borderTopLeftRadius: '0.5rem', // TODO: create image component to solve for style hardcoding\n borderTopRightRadius: '0.5rem',\n }}\n />\n <Flex\n direction=\"row\"\n align=\"center\"\n css={{\n position: 'absolute',\n top: '35%',\n left: '54%',\n padding: '$2 $4',\n r: '$2',\n bg: '$primary_bright',\n zIndex: '2',\n gap: '$2',\n }}\n >\n <StarIcon height={14} width={14} />\n\n <Text\n variant=\"xs\"\n css={{\n fontWeight: '$semiBold',\n c: '$on_primary_high',\n pr: '$4',\n }}\n >\n New\n </Text>\n </Flex>\n </IconButton>\n <Flex direction=\"column\" align=\"center\">\n <Text variant=\"body2\">Share PDF</Text>\n <Text\n variant=\"caption\"\n css={{\n c: '$on_surface_low',\n textAlign: 'center',\n }}\n >\n Annotate, draw shapes, and more over PDFs\n </Text>\n </Flex>\n </Flex>\n </Dropdown.Item>\n </Dropdown.Content>\n </Dropdown.Root>\n {openModals.has(MODALS.PDF_SHARE) && (\n <PDFFileOptions onOpenChange={value => updateState(MODALS.PDF_SHARE, value)} />\n )}\n </Fragment>\n );\n}\n", "import { styled } from '../../Theme';\nimport IconButton from '../IconButton';\n\nexport const ScreenShareButton = styled(IconButton, {\n h: '$14',\n px: '$8',\n r: '$1',\n borderTopRightRadius: 0,\n borderBottomRightRadius: 0,\n '@md': {\n px: '$4',\n mx: 0,\n },\n});\n\nexport const ShareMenuIcon = styled(ScreenShareButton, {\n borderTopLeftRadius: 0,\n borderBottomLeftRadius: 0,\n borderTopRightRadius: '$1',\n borderBottomRightRadius: '$1',\n borderLeftWidth: 0,\n w: '$4',\n '@md': {\n w: 'unset',\n px: '$2',\n },\n});\n", "import React, { useState } from 'react';\nimport { Dialog, Flex } from '../../../';\nimport { DialogInputFile } from '../../primitives/DialogContent';\nimport { PrebuiltDialogPortal } from '../PrebuiltDialogPortal';\nimport { PDFHeader } from './pdfHeader';\nimport { SubmitPDF } from './submitPdf';\nimport { UploadedFile } from './uploadedFile';\n\nexport function PDFFileOptions({ onOpenChange }) {\n const [pdfFile, setPDFFile] = useState(null);\n\n return !pdfFile ? (\n <Dialog.Root defaultOpen onOpenChange={onOpenChange}>\n <PrebuiltDialogPortal>\n <Dialog.Overlay />\n <Dialog.Content\n css={{\n w: 'min(420px,80%)',\n overflow: 'auto',\n p: '$10',\n bg: '$surface_dim',\n }}\n >\n <Flex direction=\"column\">\n <PDFHeader />\n <DialogInputFile\n onChange={target => {\n setPDFFile(target.files[0]);\n }}\n placeholder=\"Click to upload\"\n type=\"file\"\n accept=\".pdf\"\n />\n\n <SubmitPDF pdfFile={pdfFile} onOpenChange={onOpenChange} />\n </Flex>\n </Dialog.Content>\n </PrebuiltDialogPortal>\n </Dialog.Root>\n ) : (\n <UploadedFile pdfFile={pdfFile} setPDFFile={setPDFFile} onOpenChange={onOpenChange} />\n );\n}\n", "import React from 'react';\nimport { Dialog, Text } from '../../../';\nimport { DialogCol } from '../../primitives/DialogContent';\n\nexport const PDFHeader = () => {\n return (\n <DialogCol\n align=\"start\"\n css={{\n mt: 0,\n mb: '$6',\n }}\n >\n <Dialog.Title asChild>\n <Text as=\"h6\" variant=\"h6\">\n Share PDF\n </Text>\n </Dialog.Title>\n <Dialog.Description asChild>\n <Text\n variant=\"sm\"\n css={{\n c: '$on_surface_medium',\n }}\n >\n Choose PDF you want to annotate and share\n </Text>\n </Dialog.Description>\n </DialogCol>\n );\n};\n", "import React from 'react';\nimport { Button, Flex } from '../../../';\nimport { useSetAppDataByKey } from '../AppData/useUISettings';\nimport { APP_DATA } from '../../common/constants';\n\nexport const SubmitPDF = ({ pdfFile, onOpenChange }) => {\n const [, setPDFConfig] = useSetAppDataByKey(APP_DATA.pdfConfig);\n\n return (\n <Flex\n direction=\"row\"\n css={{\n mb: '0',\n mt: 'auto',\n gap: '$8',\n }}\n >\n <Button\n variant=\"standard\"\n outlined\n type=\"submit\"\n onClick={() => {\n onOpenChange(false);\n }}\n css={{ w: '50%' }}\n >\n Cancel\n </Button>\n <Button\n variant=\"primary\"\n type=\"submit\"\n onClick={() => {\n if (pdfFile) {\n setPDFConfig({ state: true, file: pdfFile });\n onOpenChange(false);\n }\n }}\n disabled={!pdfFile}\n data-testid=\"share_pdf_btn\"\n css={{\n w: '50%',\n }}\n >\n Start Sharing\n </Button>\n </Flex>\n );\n};\n", "import React from 'react';\nimport { TrashIcon } from '@100mslive/react-icons';\nimport { Dialog, Flex, Text } from '../../../';\nimport { DialogRow } from '../../primitives/DialogContent';\nimport { PrebuiltDialogPortal } from '../PrebuiltDialogPortal';\nimport { PDFHeader } from './pdfHeader';\nimport { PDFInfo } from './pdfInfo';\nimport { SubmitPDF } from './submitPdf';\n\nexport const UploadedFile = ({ pdfFile, setPDFFile, onOpenChange }) => {\n const [fileName, ext] = pdfFile.name.split('.');\n return (\n <Dialog.Root defaultOpen onOpenChange={onOpenChange}>\n <PrebuiltDialogPortal>\n <Dialog.Overlay />\n <Dialog.Content\n css={{\n w: 'min(420px,80%)',\n overflow: 'auto',\n p: '$10',\n bg: '$surface_dim',\n }}\n >\n <Flex direction=\"column\">\n <PDFHeader />\n <DialogRow\n css={{\n fontFamily: '$sans',\n bg: '$surface_bright',\n r: '$1',\n outline: 'none',\n border: '1px solid $border_bright',\n p: '$4 $6',\n minHeight: '$11',\n c: '$on_primary_high',\n fs: '$md',\n w: '100%',\n '&:focus': {\n boxShadow: '0 0 0 1px $colors$primary_default',\n border: '1px solid $transparent',\n },\n mb: 0,\n mt: '$6',\n }}\n >\n <Flex direction=\"row\" css={{ flexGrow: '1', maxWidth: '88%' }}>\n <Text\n css={{\n textOverflow: 'ellipsis',\n overflow: 'hidden',\n whiteSpace: 'nowrap',\n }}\n >\n {fileName}\n </Text>\n <Text css={{ whiteSpace: 'nowrap' }}>.{ext}</Text>\n </Flex>\n <TrashIcon\n onClick={() => setPDFFile(null)}\n style={{\n cursor: 'pointer',\n }}\n />\n </DialogRow>\n <PDFInfo />\n <SubmitPDF pdfFile={pdfFile} onOpenChange={onOpenChange} />\n </Flex>\n </Dialog.Content>\n </PrebuiltDialogPortal>\n </Dialog.Root>\n );\n};\n", "import React from 'react';\nimport { InfoIcon } from '@100mslive/react-icons';\nimport { Text } from '../../../';\nimport { DialogRow } from '../../primitives/DialogContent';\n\nexport const PDFInfo = () => {\n return (\n <DialogRow\n css={{\n px: '$8',\n py: '$3',\n bg: '$surface_default',\n r: '$1',\n outline: 'none',\n border: '1px solid $border_bright',\n minHeight: '$11',\n }}\n >\n <InfoIcon\n width=\"64px\"\n height=\"64px\"\n style={{\n paddingRight: '16px',\n }}\n />\n <Text variant=\"caption\">\n On the next screen, ensure you select \u201CThis Tab\u201D and click on share. Only the PDF viewer will be seen by other\n participants\n </Text>\n </DialogRow>\n );\n};\n", "import React from 'react';\nimport { selectUnreadHMSMessagesCount, useHMSStore } from '@100mslive/react-sdk';\nimport { ChatIcon, ChatUnreadIcon } from '@100mslive/react-icons';\nimport { Tooltip } from '../../..';\n// @ts-ignore: No implicit Any\nimport IconButton from '../../IconButton';\n// @ts-ignore: No implicit Any\nimport { useIsSidepaneTypeOpen, useSidepaneToggle } from '../AppData/useSidepane';\n// @ts-ignore: No implicit Any\nimport { SIDE_PANE_OPTIONS } from '../../common/constants';\n\nexport const ChatToggle = () => {\n const countUnreadMessages = useHMSStore(selectUnreadHMSMessagesCount);\n const isChatOpen = useIsSidepaneTypeOpen(SIDE_PANE_OPTIONS.CHAT);\n const toggleChat = useSidepaneToggle(SIDE_PANE_OPTIONS.CHAT);\n\n return (\n <Tooltip key=\"chat\" title={`${isChatOpen ? 'Close' : 'Open'} chat`}>\n <IconButton onClick={toggleChat} active={!isChatOpen} data-testid=\"chat_btn\">\n {countUnreadMessages === 0 ? <ChatIcon /> : <ChatUnreadIcon data-testid=\"chat_unread_btn\" />}\n </IconButton>\n </Tooltip>\n );\n};\n", "import React, { Fragment, useCallback, useEffect, useState } from 'react';\nimport { useDebounce, useMedia } from 'react-use';\nimport {\n selectHandRaisedPeers,\n selectHasPeerHandRaised,\n selectIsLargeRoom,\n selectIsPeerAudioEnabled,\n selectLocalPeerID,\n selectPeerCount,\n selectPeerMetadata,\n selectPermissions,\n useHMSActions,\n useHMSStore,\n} from '@100mslive/react-sdk';\nimport {\n ChangeRoleIcon,\n HandIcon,\n MicOffIcon,\n PeopleIcon,\n PeopleRemoveIcon,\n SearchIcon,\n VerticalMenuIcon,\n} from '@100mslive/react-icons';\nimport { Accordion, Box, config as cssConfig, Dropdown, Flex, Input, Text, textEllipsis } from '../../..';\nimport IconButton from '../../IconButton';\nimport { ConnectionIndicator } from '../Connection/ConnectionIndicator';\nimport { ToastManager } from '../Toast/ToastManager';\nimport { RoleAccordion } from './RoleAccordion';\nimport { useRoomLayoutConferencingScreen } from '../../provider/roomLayoutProvider/hooks/useRoomLayoutScreen';\nimport { useIsSidepaneTypeOpen, useSidepaneToggle } from '../AppData/useSidepane';\nimport { useParticipants } from '../../common/hooks';\nimport { getFormattedCount } from '../../common/utils';\nimport { SIDE_PANE_OPTIONS } from '../../common/constants';\n\nexport const ParticipantList = ({ offStageRoles = [], onActive }) => {\n const [filter, setFilter] = useState();\n const { participants, isConnected, peerCount } = useParticipants(filter);\n const isLargeRoom = useHMSStore(selectIsLargeRoom);\n const peersOrderedByRoles = {};\n\n const handRaisedPeers = useHMSStore(selectHandRaisedPeers);\n\n participants.forEach(participant => {\n if (peersOrderedByRoles[participant.roleName] === undefined) {\n peersOrderedByRoles[participant.roleName] = [];\n }\n peersOrderedByRoles[participant.roleName].push(participant);\n });\n\n // prefill off_stage roles of large rooms to load more peers\n if (isLargeRoom) {\n offStageRoles.forEach(role => {\n if (!peersOrderedByRoles[role]) {\n peersOrderedByRoles[role] = [];\n }\n });\n }\n\n const onSearch = useCallback(value => {\n setFilter(filterValue => {\n if (!filterValue) {\n filterValue = {};\n }\n filterValue.search = value.toLowerCase();\n return { ...filterValue };\n });\n }, []);\n if (peerCount === 0) {\n return null;\n }\n\n return (\n <Fragment>\n <Flex direction=\"column\" css={{ size: '100%', gap: '$4' }}>\n {!filter?.search && participants.length === 0 ? null : <ParticipantSearch onSearch={onSearch} inSidePane />}\n {participants.length === 0 ? (\n <Flex align=\"center\" justify=\"center\" css={{ w: '100%', p: '$8 0' }}>\n <Text variant=\"sm\">{!filter ? 'No participants' : 'No matching participants'}</Text>\n </Flex>\n ) : null}\n <VirtualizedParticipants\n peersOrderedByRoles={peersOrderedByRoles}\n handRaisedList={handRaisedPeers}\n isConnected={isConnected}\n filter={filter}\n offStageRoles={offStageRoles}\n isLargeRoom={isLargeRoom}\n onActive={onActive}\n />\n </Flex>\n </Fragment>\n );\n};\n\nexport const ParticipantCount = () => {\n const peerCount = useHMSStore(selectPeerCount);\n const toggleSidepane = useSidepaneToggle(SIDE_PANE_OPTIONS.PARTICIPANTS);\n const isParticipantsOpen = useIsSidepaneTypeOpen(SIDE_PANE_OPTIONS.PARTICIPANTS);\n useEffect(() => {\n if (isParticipantsOpen && peerCount === 0) {\n toggleSidepane();\n }\n }, [isParticipantsOpen, peerCount, toggleSidepane]);\n\n if (peerCount === 0) {\n return null;\n }\n return (\n <IconButton\n css={{\n w: 'auto',\n p: '$4',\n h: 'auto',\n }}\n onClick={() => {\n if (peerCount > 0) {\n toggleSidepane();\n }\n }}\n active={!isParticipantsOpen}\n data-testid=\"participant_list\"\n >\n <PeopleIcon />\n <Text variant=\"sm\" css={{ mx: '$4', c: 'inherit' }}>\n {getFormattedCount(peerCount)}\n </Text>\n </IconButton>\n );\n};\n\nconst VirtualizedParticipants = ({\n peersOrderedByRoles = {},\n isConnected,\n filter,\n handRaisedList = [],\n offStageRoles,\n isLargeRoom,\n onActive,\n}) => {\n return (\n <Flex\n direction=\"column\"\n css={{\n gap: '$8',\n overflowY: 'auto',\n overflowX: 'hidden',\n pr: '$10',\n mr: '-$10',\n flex: '1 1 0',\n }}\n >\n <Accordion.Root type={isLargeRoom ? 'single' : 'multiple'} collapsible>\n {handRaisedList.length > 0 ? (\n <RoleAccordion\n peerList={handRaisedList}\n roleName=\"Hand Raised\"\n filter={filter}\n isConnected={isConnected}\n isHandRaisedAccordion\n offStageRoles={offStageRoles}\n />\n ) : null}\n {Object.keys(peersOrderedByRoles).map(role => (\n <RoleAccordion\n key={role}\n peerList={peersOrderedByRoles[role]}\n roleName={role}\n isConnected={isConnected}\n filter={filter}\n offStageRoles={offStageRoles}\n onActive={onActive}\n />\n ))}\n </Accordion.Root>\n </Flex>\n );\n};\n\nexport const Participant = ({ peer, isConnected }) => {\n const localPeerId = useHMSStore(selectLocalPeerID);\n return (\n <Flex\n key={peer.id}\n css={{\n w: '100%',\n p: '$4 $8',\n pr: '$6',\n h: '$16',\n '&:hover .participant_item': { display: 'flex' },\n }}\n align=\"center\"\n justify=\"between\"\n data-testid={'participant_' + peer.name}\n >\n <Text\n variant=\"sm\"\n css={{ ...textEllipsis('100%'), flex: '1 1 0', mr: '$8', fontWeight: '$semiBold', color: '$on_surface_high' }}\n >\n {peer.name} {localPeerId === peer.id ? '(You)' : ''}\n </Text>\n {isConnected ? (\n <ParticipantActions peerId={peer.id} isLocal={peer.id === localPeerId} role={peer.roleName} />\n ) : null}\n </Flex>\n );\n};\n\n/**\n * shows settings to change for a participant like changing their role\n */\nconst ParticipantActions = React.memo(({ peerId, role, isLocal }) => {\n const isHandRaised = useHMSStore(selectHasPeerHandRaised(peerId));\n const canChangeRole = useHMSStore(selectPermissions)?.changeRole;\n const canRemoveOthers = useHMSStore(selectPermissions)?.removeOthers;\n const { elements } = useRoomLayoutConferencingScreen();\n const { on_stage_exp } = elements || {};\n const shouldShowMoreActions = (on_stage_exp && canChangeRole) || canRemoveOthers;\n const isAudioMuted = !useHMSStore(selectIsPeerAudioEnabled(peerId));\n\n return (\n <Flex\n align=\"center\"\n css={{\n flexShrink: 0,\n gap: '$8',\n }}\n >\n <ConnectionIndicator peerId={peerId} />\n {isHandRaised && (\n <Flex\n align=\"center\"\n justify=\"center\"\n css={{ p: '$1', c: '$on_surface_high', bg: '$surface_bright', borderRadius: '$round' }}\n >\n <HandIcon height={19} width={19} />\n </Flex>\n )}\n {isAudioMuted ? (\n <Flex\n align=\"center\"\n justify=\"center\"\n css={{ p: '$2', c: '$on_surface_high', bg: '$surface_bright', borderRadius: '$round' }}\n >\n <MicOffIcon height={19} width={19} />\n </Flex>\n ) : null}\n\n {shouldShowMoreActions && !isLocal ? (\n <ParticipantMoreActions\n peerId={peerId}\n role={role}\n elements={elements}\n canChangeRole={canChangeRole}\n canRemoveOthers={canRemoveOthers}\n />\n ) : null}\n </Flex>\n );\n});\n\nconst ParticipantMoreActions = ({ peerId, role, elements, canChangeRole, canRemoveOthers }) => {\n const hmsActions = useHMSActions();\n const {\n bring_to_stage_label,\n remove_from_stage_label,\n on_stage_role,\n off_stage_roles = [],\n } = elements.on_stage_exp || {};\n const isInStage = role === on_stage_role;\n const shouldShowStageRoleChange =\n canChangeRole &&\n ((isInStage && remove_from_stage_label) || (off_stage_roles?.includes(role) && bring_to_stage_label));\n const prevRole = useHMSStore(selectPeerMetadata(peerId))?.prevRole;\n const localPeerId = useHMSStore(selectLocalPeerID);\n const isLocal = localPeerId === peerId;\n const [open, setOpen] = useState(false);\n\n const handleStageAction = async () => {\n if (isInStage) {\n prevRole && hmsActions.changeRoleOfPeer(peerId, prevRole, true);\n } else {\n await hmsActions.changeRoleOfPeer(peerId, on_stage_role);\n }\n setOpen(false);\n };\n\n return (\n <Dropdown.Root open={open} onOpenChange={value => setOpen(value)} modal={false}>\n <Dropdown.Trigger\n asChild\n data-testid=\"participant_more_actions\"\n className=\"participant_item\"\n css={{\n p: '$1',\n r: '$0',\n c: '$on_surface_high',\n display: open ? 'flex' : 'none',\n '&:hover': {\n bg: '$surface_bright',\n },\n '@md': {\n display: 'flex',\n },\n }}\n tabIndex={0}\n >\n <Box css={{ my: 'auto' }}>\n <VerticalMenuIcon />\n </Box>\n </Dropdown.Trigger>\n <Dropdown.Portal>\n <Dropdown.Content align=\"end\" sideOffset={8} css={{ w: '$64', bg: '$surface_default' }}>\n {shouldShowStageRoleChange ? (\n <Dropdown.Item css={{ bg: '$surface_default' }} onClick={() => handleStageAction()}>\n <ChangeRoleIcon />\n <Text variant=\"sm\" css={{ ml: '$4', fontWeight: '$semiBold', c: '$on_surface_high' }}>\n {isInStage ? remove_from_stage_label : bring_to_stage_label}\n </Text>\n </Dropdown.Item>\n ) : null}\n\n {!isLocal && canRemoveOthers && (\n <Dropdown.Item\n css={{ color: '$alert_error_default', bg: '$surface_default' }}\n onClick={async () => {\n try {\n await hmsActions.removePeer(peerId, '');\n } catch (error) {\n ToastManager.addToast({ title: error.message, variant: 'error' });\n }\n }}\n >\n <PeopleRemoveIcon />\n <Text variant=\"sm\" css={{ ml: '$4', color: 'inherit', fontWeight: '$semiBold' }}>\n Remove Participant\n </Text>\n </Dropdown.Item>\n )}\n </Dropdown.Content>\n </Dropdown.Portal>\n </Dropdown.Root>\n );\n};\n\nexport const ParticipantSearch = ({ onSearch, placeholder, inSidePane = false }) => {\n const [value, setValue] = React.useState('');\n const isMobile = useMedia(cssConfig.media.md);\n\n useDebounce(\n () => {\n onSearch(value);\n },\n 300,\n [value, onSearch],\n );\n return (\n <Flex\n align=\"center\"\n css={{\n p: isMobile ? '0' : '$2 0',\n mb: '$2',\n position: 'relative',\n color: '$on_surface_medium',\n mt: inSidePane ? '$4' : '',\n }}\n >\n <SearchIcon style={{ position: 'absolute', left: isMobile ? '1.25rem' : '0.5rem' }} />\n <Input\n type=\"text\"\n placeholder={placeholder || 'Search for participants'}\n css={{ w: '100%', p: '$6', pl: '$14', bg: inSidePane ? '$surface_default' : '$surface_dim' }}\n value={value}\n onKeyDown={event => {\n event.stopPropagation();\n }}\n onChange={event => {\n setValue(event.currentTarget.value);\n }}\n autoComplete=\"off\"\n aria-autocomplete=\"none\"\n />\n </Flex>\n );\n};\n", "import React, { useEffect } from 'react';\nimport { useMeasure } from 'react-use';\nimport { FixedSizeList } from 'react-window';\nimport { HMSPeer, selectIsLargeRoom, useHMSStore, usePaginatedParticipants } from '@100mslive/react-sdk';\nimport { ChevronRightIcon } from '@100mslive/react-icons';\nimport { Accordion } from '../../../Accordion';\nimport { Flex } from '../../../Layout';\nimport { Text } from '../../../Text';\n// @ts-ignore: No implicit Any\nimport { Participant } from './ParticipantList';\nimport { RoleOptions } from './RoleOptions';\n// @ts-ignore: No implicit Any\nimport { getFormattedCount } from '../../common/utils';\n\nexport const ROW_HEIGHT = 50;\nconst ITER_TIMER = 5000;\n\nexport interface ItemData {\n peerList: HMSPeer[];\n isConnected: boolean;\n}\n\nexport function itemKey(index: number, data: ItemData) {\n return data.peerList[index].id;\n}\n\nexport const VirtualizedParticipantItem = React.memo(({ index, data }: { index: number; data: ItemData }) => {\n return <Participant key={data.peerList[index].id} peer={data.peerList[index]} isConnected={data.isConnected} />;\n});\n\nexport const RoleAccordion = ({\n peerList = [],\n roleName,\n isConnected,\n filter,\n isHandRaisedAccordion = false,\n offStageRoles,\n onActive,\n}: ItemData & {\n roleName: string;\n isHandRaisedAccordion?: boolean;\n filter?: { search: string };\n offStageRoles: string[];\n onActive?: (role: string) => void;\n}) => {\n const [ref, { width }] = useMeasure<HTMLDivElement>();\n const showAcordion = filter?.search ? peerList.some(peer => peer.name.toLowerCase().includes(filter.search)) : true;\n const isLargeRoom = useHMSStore(selectIsLargeRoom);\n const { peers, total, loadPeers } = usePaginatedParticipants({ role: roleName, limit: 10 });\n const isOffStageRole = roleName && offStageRoles.includes(roleName);\n\n useEffect(() => {\n if (!isOffStageRole || !isLargeRoom) {\n return;\n }\n loadPeers();\n const interval = setInterval(() => {\n loadPeers();\n }, ITER_TIMER);\n return () => clearInterval(interval);\n }, [isOffStageRole, isLargeRoom]); //eslint-disable-line\n\n if (!showAcordion || (isHandRaisedAccordion && filter?.search) || (peerList.length === 0 && filter?.search)) {\n return null;\n }\n\n const height = ROW_HEIGHT * (peers.length || peerList.length);\n const peersInAccordion = isOffStageRole && isLargeRoom ? peers : peerList;\n const hasNext = total > peersInAccordion.length;\n\n if (peersInAccordion.length === 0) {\n return null;\n }\n\n return (\n <Accordion.Item value={roleName} css={{ '&:hover .role_actions': { visibility: 'visible' }, mb: '$8' }} ref={ref}>\n <Accordion.Header\n iconStyles={{ c: '$on_surface_high' }}\n css={{\n textTransform: 'capitalize',\n p: '$6 $8',\n fontSize: '$sm',\n fontWeight: '$semiBold',\n c: '$on_surface_medium',\n borderRadius: '$1',\n border: '1px solid $border_default',\n '&[data-state=\"open\"]': {\n borderBottomLeftRadius: 0,\n borderBottomRightRadius: 0,\n },\n }}\n >\n <Flex justify=\"between\" css={{ flexGrow: 1, pr: '$6' }}>\n <Text\n variant=\"sm\"\n css={{ fontWeight: '$semiBold', textTransform: 'capitalize', color: '$on_surface_medium' }}\n >\n {roleName} {`(${getFormattedCount(isLargeRoom && isOffStageRole ? total : peerList.length)})`}\n </Text>\n <RoleOptions roleName={roleName} peerList={peersInAccordion} />\n </Flex>\n </Accordion.Header>\n <Accordion.Content contentStyles={{ border: '1px solid $border_default', borderTop: 'none' }}>\n <FixedSizeList\n itemSize={ROW_HEIGHT}\n itemData={{ peerList: peersInAccordion, isConnected }}\n itemKey={itemKey}\n itemCount={peersInAccordion.length}\n width={width}\n height={height}\n >\n {VirtualizedParticipantItem}\n </FixedSizeList>\n {offStageRoles?.includes(roleName) && hasNext ? (\n <Flex\n align=\"center\"\n justify=\"end\"\n css={{\n gap: '$1',\n cursor: 'pointer',\n color: '$on_surface_high',\n p: '$6',\n borderTop: '1px solid $border_default',\n }}\n onClick={() => onActive?.(roleName)}\n >\n <Text variant=\"sm\" css={{ color: 'inherit' }}>\n View All\n </Text>\n <ChevronRightIcon />\n </Flex>\n ) : null}\n </Accordion.Content>\n </Accordion.Item>\n );\n};\n", "import React, { useState } from 'react';\nimport { DefaultConferencingScreen_Elements } from '@100mslive/types-prebuilt';\nimport { HMSPeer, selectPermissions, useHMSActions, useHMSStore, useHMSVanillaStore } from '@100mslive/react-sdk';\nimport {\n MicOffIcon,\n MicOnIcon,\n PersonRectangleIcon,\n RemoveUserIcon,\n VerticalMenuIcon,\n VideoOffIcon,\n VideoOnIcon,\n} from '@100mslive/react-icons';\nimport { Dropdown } from '../../../Dropdown';\nimport { Flex } from '../../../Layout';\nimport { Text } from '../../../Text';\nimport { useRoomLayoutConferencingScreen } from '../../provider/roomLayoutProvider/hooks/useRoomLayoutScreen';\n// @ts-ignore: No implicit Any\nimport { getMetadata } from '../../common/utils';\n\nconst dropdownItemCSS = { backgroundColor: '$surface_default', gap: '$4', p: '$8' };\nconst optionTextCSS = { fontWeight: '$semiBold', color: '$on_surface_high', textTransform: 'none' };\n\nexport const RoleOptions = ({ roleName, peerList }: { roleName: string; peerList: HMSPeer[] }) => {\n const [openOptions, setOpenOptions] = useState(false);\n const permissions = useHMSStore(selectPermissions);\n const hmsActions = useHMSActions();\n const { elements } = useRoomLayoutConferencingScreen();\n const { on_stage_role, off_stage_roles = [] } = (elements as DefaultConferencingScreen_Elements)?.on_stage_exp || {};\n\n const vanillaStore = useHMSVanillaStore();\n const store = vanillaStore.getState();\n\n let allPeersHaveVideoOn = true;\n let allPeersHaveAudioOn = true;\n\n peerList.forEach(peer => {\n const isAudioOn = !!peer.audioTrack && store.tracks[peer.audioTrack]?.enabled;\n const isVideoOn = !!peer.videoTrack && store.tracks[peer.videoTrack]?.enabled;\n allPeersHaveAudioOn = allPeersHaveAudioOn && isAudioOn;\n allPeersHaveVideoOn = allPeersHaveVideoOn && isVideoOn;\n });\n\n const canMuteRole = permissions?.mute && roleName === on_stage_role;\n const canRemoveRoleFromStage = permissions?.changeRole && roleName === on_stage_role;\n // on stage and off stage roles\n const canRemoveRoleFromRoom =\n permissions?.removeOthers && (on_stage_role === roleName || off_stage_roles?.includes(roleName));\n\n if (!(canMuteRole || canRemoveRoleFromStage || canRemoveRoleFromRoom) || peerList.length === 0) {\n return null;\n }\n\n const removeAllFromStage = () => {\n peerList.forEach(peer => {\n const prevRole = getMetadata(peer.metadata).prevRole;\n if (prevRole) {\n hmsActions.changeRoleOfPeer(peer.id, prevRole, true);\n }\n });\n };\n\n const setTrackEnabled = async (type: 'audio' | 'video', enabled = false) => {\n try {\n await hmsActions.setRemoteTracksEnabled({ roles: [roleName], source: 'regular', type, enabled });\n } catch (e) {\n console.error(e);\n }\n };\n\n const removePeersFromRoom = async () => {\n try {\n peerList.forEach(async peer => {\n await hmsActions.removePeer(peer.id, '');\n });\n } catch (e) {\n console.error(e);\n }\n };\n\n return (\n <Dropdown.Root open={openOptions} onOpenChange={setOpenOptions}>\n <Dropdown.Trigger\n onClick={e => e.stopPropagation()}\n className=\"role_actions\"\n asChild\n css={{\n p: '$1',\n r: '$0',\n c: '$on_surface_high',\n visibility: openOptions ? 'visible' : 'hidden',\n '&:hover': {\n c: '$on_surface_medium',\n },\n '@md': {\n visibility: 'visible',\n },\n }}\n >\n <Flex>\n <VerticalMenuIcon />\n </Flex>\n </Dropdown.Trigger>\n <Dropdown.Content\n onClick={e => e.stopPropagation()}\n css={{ w: 'max-content', maxWidth: '$64', bg: '$surface_default', py: 0 }}\n align=\"end\"\n >\n {canRemoveRoleFromStage && (\n <Dropdown.Item\n css={{ ...dropdownItemCSS, borderBottom: '1px solid $border_bright' }}\n onClick={removeAllFromStage}\n >\n <PersonRectangleIcon />\n <Text variant=\"sm\" css={optionTextCSS}>\n Remove all from Stage\n </Text>\n </Dropdown.Item>\n )}\n\n {canMuteRole && (\n <>\n <Dropdown.Item css={dropdownItemCSS} onClick={() => setTrackEnabled('audio', !allPeersHaveAudioOn)}>\n {allPeersHaveAudioOn ? <MicOffIcon /> : <MicOnIcon />}\n <Text variant=\"sm\" css={optionTextCSS}>\n {allPeersHaveAudioOn ? 'Mute' : 'Unmute'} Audio\n </Text>\n </Dropdown.Item>\n\n <Dropdown.Item\n css={{ ...dropdownItemCSS, borderTop: '1px solid $border_bright' }}\n onClick={() => setTrackEnabled('video', !allPeersHaveVideoOn)}\n >\n {allPeersHaveVideoOn ? <VideoOffIcon /> : <VideoOnIcon />}\n <Text variant=\"sm\" css={optionTextCSS}>\n {allPeersHaveVideoOn ? 'Mute' : 'Unmute'} Video\n </Text>\n </Dropdown.Item>\n </>\n )}\n\n {canRemoveRoleFromRoom && (\n <Dropdown.Item\n css={{ ...dropdownItemCSS, borderTop: '1px solid $border_bright', color: '$alert_error_default' }}\n onClick={removePeersFromRoom}\n >\n <RemoveUserIcon />\n <Text variant=\"sm\" css={{ ...optionTextCSS, color: 'inherit' }}>\n Remove all from Room\n </Text>\n </Dropdown.Item>\n )}\n </Dropdown.Content>\n </Dropdown.Root>\n );\n};\n", "import React, { useCallback, useState } from 'react';\nimport { selectHLSState, useHMSActions, useHMSStore } from '@100mslive/react-sdk';\nimport { Button } from '../../../Button';\nimport { Flex } from '../../../Layout';\nimport { Dialog } from '../../../Modal';\nimport { Text } from '../../../Text';\nimport { PrebuiltDialogPortal } from '../PrebuiltDialogPortal';\nimport { useSetAppDataByKey } from '../AppData/useUISettings';\nimport { APP_DATA } from '../../common/constants';\n\nexport function HLSFailureModal() {\n const { hlsError } = useHMSStore(selectHLSState).error || false;\n const [openModal, setOpenModal] = useState(!!hlsError);\n const hmsActions = useHMSActions();\n const [isHLSStarted, setHLSStarted] = useSetAppDataByKey(APP_DATA.hlsStarted);\n const startHLS = useCallback(async () => {\n try {\n if (isHLSStarted) {\n return;\n }\n setHLSStarted(true);\n await hmsActions.startHLSStreaming({});\n } catch (error) {\n if (error.message.includes('invalid input')) {\n await startHLS();\n return;\n }\n setHLSStarted(false);\n }\n }, [hmsActions, isHLSStarted, setHLSStarted]);\n\n return hlsError ? (\n <Dialog.Root\n open={openModal}\n onOpenChange={value => {\n if (!value) {\n setOpenModal(false);\n }\n }}\n >\n <PrebuiltDialogPortal>\n <Dialog.Overlay />\n <Dialog.Content css={{ w: 'min(360px, 90%)' }}>\n <Dialog.Title\n css={{\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'space-between',\n borderBottom: '1px solid $border_default',\n mt: '$4',\n }}\n >\n <Text variant=\"h6\" css={{ fontWeight: '$semiBold' }}>\n Failed to Go Live\n </Text>\n </Dialog.Title>\n <Text variant=\"sm\" css={{ mb: '$10', color: '$on_surface_medium' }}>\n Something went wrong and your live broadcast failed. Please try again.\n </Text>\n <Flex align=\"center\" justify=\"between\" css={{ w: '100%', gap: '$8' }}>\n <Button outlined variant=\"standard\" css={{ w: '100%' }} onClick={() => setOpenModal(false)}>\n Dismiss\n </Button>\n <Button css={{ w: '100%' }} onClick={startHLS}>\n Go Live\n </Button>\n </Flex>\n </Dialog.Content>\n </PrebuiltDialogPortal>\n </Dialog.Root>\n ) : null;\n}\n", "import React, { useEffect } from 'react';\nimport {\n selectLocalPeerName,\n selectLocalPeerRoleName,\n selectRoleChangeRequest,\n useCustomEvent,\n useHMSActions,\n useHMSStore,\n} from '@100mslive/react-sdk';\nimport { Flex, Text } from '../../..';\n// @ts-ignore: No implicit Any\nimport { PreviewControls, PreviewTile } from '../Preview/PreviewJoin';\nimport { RequestPrompt } from './RequestPrompt';\n// @ts-ignore: No implicit Any\nimport { useMyMetadata } from '../hooks/useMetadata';\n// @ts-ignore: No implicit Any\nimport { ROLE_CHANGE_DECLINED } from '../../common/constants';\n\nexport const RoleChangeRequestModal = () => {\n const hmsActions = useHMSActions();\n const { updateMetaData } = useMyMetadata();\n const currentRole = useHMSStore(selectLocalPeerRoleName);\n const roleChangeRequest = useHMSStore(selectRoleChangeRequest);\n const name = useHMSStore(selectLocalPeerName);\n const { sendEvent } = useCustomEvent({ type: ROLE_CHANGE_DECLINED });\n\n useEffect(() => {\n if (!roleChangeRequest?.role) {\n return;\n }\n (async () => {\n await hmsActions.preview({ asRole: roleChangeRequest.role.name });\n })();\n }, [hmsActions, roleChangeRequest, currentRole, updateMetaData]);\n\n if (!roleChangeRequest?.role) {\n return null;\n }\n\n const body = (\n <>\n <Text\n variant=\"xs\"\n css={{\n c: '$on_surface_medium',\n textAlign: 'center',\n '@md': { textAlign: 'left', borderBottom: '1px solid $border_bright', pb: '$4', px: '$8' },\n }}\n >\n Setup your audio and video before joining\n </Text>\n <Flex\n align=\"center\"\n justify=\"center\"\n css={{\n '@sm': { width: '100%' },\n flexDirection: 'column',\n mt: '$6',\n '@md': { px: '$8' },\n }}\n >\n <PreviewTile name={name || ''} />\n\n <PreviewControls hideSettings={true} />\n </Flex>\n </>\n );\n\n return (\n <RequestPrompt\n title=\"You're invited to join the stage\"\n onOpenChange={async value => {\n if (!value) {\n hmsActions.rejectChangeRole(roleChangeRequest);\n sendEvent({ ...roleChangeRequest, peerName: name }, { peerId: roleChangeRequest.requestedBy?.id });\n await hmsActions.cancelMidCallPreview();\n await hmsActions.lowerLocalPeerHand();\n }\n }}\n body={body}\n onAction={async () => {\n await hmsActions.acceptChangeRole(roleChangeRequest);\n await updateMetaData({ prevRole: currentRole });\n await hmsActions.lowerLocalPeerHand();\n }}\n actionText=\"Accept\"\n />\n );\n};\n", "import React from 'react';\nimport { useMedia } from 'react-use';\nimport { Box, Button, config as cssConfig, Dialog, Flex, Text } from '../../..';\nimport { Sheet } from '../../../Sheet';\nimport { PrebuiltDialogPortal } from '../PrebuiltDialogPortal';\n\nexport const RequestPrompt = ({\n open = true,\n onOpenChange,\n title,\n body,\n actionText = 'Accept',\n onAction,\n}: {\n open?: boolean;\n onOpenChange: (value: boolean) => void;\n title: string;\n body: React.ReactNode;\n actionText?: string;\n onAction: () => void;\n}) => {\n const isMobile = useMedia(cssConfig.media.md);\n\n if (isMobile) {\n return (\n <Sheet.Root open={open} onOpenChange={onOpenChange}>\n <Sheet.Content css={{ py: '$8' }}>\n <Text css={{ fontWeight: '$semiBold', c: '$on_surface_high', '@md': { px: '$8' } }}>{title}</Text>\n {body}\n <RequestActions actionText={actionText} onAction={onAction} />\n </Sheet.Content>\n </Sheet.Root>\n );\n }\n\n return (\n <Dialog.Root open={open} onOpenChange={onOpenChange}>\n <PrebuiltDialogPortal>\n <Dialog.Overlay />\n <Dialog.Content css={{ p: '$10' }}>\n <Dialog.Title css={{ p: 0, display: 'flex', flexDirection: 'row', gap: '$md', justifyContent: 'center' }}>\n <Text variant=\"h6\">{title}</Text>\n </Dialog.Title>\n <Box css={{ mt: '$4', mb: '$10' }}>{body}</Box>\n <RequestActions actionText={actionText} onAction={onAction} />\n </Dialog.Content>\n </PrebuiltDialogPortal>\n </Dialog.Root>\n );\n};\n\nconst RequestActions = ({ onAction, actionText }: { actionText?: string; onAction: () => void }) => (\n <Flex justify=\"center\" align=\"center\" css={{ width: '100%', gap: '$md', '@md': { mt: '$8', px: '$8' } }}>\n <Box css={{ width: '50%' }}>\n <Dialog.Close css={{ width: '100%' }}>\n <Button variant=\"standard\" outlined css={{ width: '100%' }}>\n Decline\n </Button>\n </Dialog.Close>\n </Box>\n <Box css={{ width: '50%' }}>\n <Button variant=\"primary\" css={{ width: '100%' }} onClick={onAction}>\n {actionText}\n </Button>\n </Box>\n </Flex>\n);\n", "import React, { Suspense, useEffect } from 'react';\nimport {\n ConferencingScreen,\n DefaultConferencingScreen_Elements,\n HLSLiveStreamingScreen_Elements,\n} from '@100mslive/types-prebuilt';\nimport { selectIsConnectedToRoom, selectLocalPeerRoleName, useHMSActions, useHMSStore } from '@100mslive/react-sdk';\n// @ts-ignore: No implicit Any\nimport FullPageProgress from '../components/FullPageProgress';\nimport { GridLayout } from '../components/VideoLayouts/GridLayout';\nimport { Flex } from '../../Layout';\n// @ts-ignore: No implicit Any\nimport { EmbedView } from './EmbedView';\n// @ts-ignore: No implicit Any\nimport { PDFView } from './PDFView';\nimport SidePane from './SidePane';\n// @ts-ignore: No implicit Any\nimport { WaitingView } from './WaitingView';\n// import { useWhiteboardMetadata } from '../plugins/whiteboard';\nimport {\n usePDFAnnotator,\n useUrlToEmbed,\n useWaitingViewerRole,\n // @ts-ignore: No implicit Any\n} from '../components/AppData/useUISettings';\n// @ts-ignore: No implicit Any\nimport { SESSION_STORE_KEY } from '../common/constants';\n\n// const WhiteboardView = React.lazy(() => import(\"./WhiteboardView\"));\n// @ts-ignore: No implicit Any\nconst HLSView = React.lazy(() => import('./HLSView'));\n\nexport const VideoStreamingSection = ({\n screenType,\n elements,\n hideControls = false,\n}: {\n screenType: keyof ConferencingScreen;\n elements: DefaultConferencingScreen_Elements | HLSLiveStreamingScreen_Elements;\n hideControls: boolean;\n}) => {\n const localPeerRole = useHMSStore(selectLocalPeerRoleName);\n // const { whiteboardOwner: whiteboardShared } = useWhiteboardMetadata();\n const isConnected = useHMSStore(selectIsConnectedToRoom);\n const hmsActions = useHMSActions();\n const waitingViewerRole = useWaitingViewerRole();\n const urlToIframe = useUrlToEmbed();\n const pdfAnnotatorActive = usePDFAnnotator();\n\n useEffect(() => {\n if (!isConnected) {\n return;\n }\n hmsActions.sessionStore.observe([SESSION_STORE_KEY.PINNED_MESSAGE, SESSION_STORE_KEY.SPOTLIGHT]);\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [isConnected, hmsActions]);\n\n if (!localPeerRole) {\n // we don't know the role yet to decide how to render UI\n return null;\n }\n\n let ViewComponent;\n if (screenType === 'hls_live_streaming') {\n ViewComponent = <HLSView />;\n } else if (localPeerRole === waitingViewerRole) {\n ViewComponent = <WaitingView />;\n } else if (pdfAnnotatorActive) {\n ViewComponent = <PDFView />;\n } else if (urlToIframe) {\n ViewComponent = <EmbedView />;\n } else {\n //@ts-ignore\n ViewComponent = <GridLayout {...(elements as DefaultConferencingScreen_Elements)?.video_tile_layout?.grid} />;\n }\n\n return (\n <Suspense fallback={<FullPageProgress />}>\n <Flex\n css={{\n size: '100%',\n position: 'relative',\n gap: '$4',\n }}\n >\n {ViewComponent}\n <SidePane\n screenType={screenType}\n // @ts-ignore\n tileProps={(elements as DefaultConferencingScreen_Elements)?.video_tile_layout?.grid}\n hideControls={hideControls}\n />\n </Flex>\n </Suspense>\n );\n};\n", "import React, { useEffect, useMemo, useState } from 'react';\nimport { GridVideoTileLayout } from '@100mslive/types-prebuilt/elements/video_tile_layout';\nimport { selectPeers, selectPeerScreenSharing, useHMSStore, useHMSVanillaStore } from '@100mslive/react-sdk';\nimport { EqualProminence } from './EqualProminence';\nimport { RoleProminence } from './RoleProminence';\nimport { ScreenshareLayout } from './ScreenshareLayout';\n// @ts-ignore: No implicit Any\nimport { usePinnedTrack } from '../AppData/useUISettings';\nimport { VideoTileContext } from '../hooks/useVideoTileLayout';\nimport PeersSorter from '../../common/PeersSorter';\n\nexport type TileCustomisationProps = {\n hide_participant_name_on_tile: boolean;\n rounded_video_tile: boolean;\n hide_audio_mute_on_tile: boolean;\n video_object_fit: 'contain' | 'cover';\n edge_to_edge: boolean;\n hide_metadata_on_tile: boolean;\n};\n\nexport type GridLayoutProps = GridVideoTileLayout & TileCustomisationProps;\n\nexport const GridLayout = ({\n enable_local_tile_inset: isInsetEnabled = false,\n prominent_roles: prominentRoles = [],\n enable_spotlighting_peer = false,\n hide_participant_name_on_tile = false,\n rounded_video_tile = true,\n hide_audio_mute_on_tile = false,\n video_object_fit = 'contain',\n edge_to_edge = false,\n hide_metadata_on_tile = false,\n}: GridLayoutProps) => {\n const peerSharing = useHMSStore(selectPeerScreenSharing);\n const pinnedTrack = usePinnedTrack();\n const peers = useHMSStore(selectPeers);\n const isRoleProminence =\n (prominentRoles.length &&\n peers.some(\n peer => peer.roleName && prominentRoles.includes(peer.roleName) && (peer.videoTrack || peer.audioTrack),\n )) ||\n pinnedTrack;\n const updatedPeers = useMemo(() => {\n if (isInsetEnabled && !isRoleProminence && !peerSharing) {\n return peers.filter(peer => !peer.isLocal);\n }\n return peers;\n }, [isInsetEnabled, isRoleProminence, peerSharing, peers]);\n const vanillaStore = useHMSVanillaStore();\n const [sortedPeers, setSortedPeers] = useState(updatedPeers);\n const peersSorter = useMemo(() => new PeersSorter(vanillaStore), [vanillaStore]);\n const [pageSize, setPageSize] = useState(0);\n const [mainPage, setMainPage] = useState(0);\n const tileLayout = {\n enableSpotlightingPeer: enable_spotlighting_peer,\n hideParticipantNameOnTile: hide_participant_name_on_tile,\n roundedVideoTile: rounded_video_tile,\n hideAudioMuteOnTile: hide_audio_mute_on_tile,\n hideMetadataOnTile: hide_metadata_on_tile,\n objectFit: video_object_fit,\n };\n\n useEffect(() => {\n if (mainPage !== 0) {\n return;\n }\n peersSorter.setPeersAndTilesPerPage({\n peers: updatedPeers,\n tilesPerPage: pageSize,\n });\n peersSorter.onUpdate(setSortedPeers);\n }, [mainPage, peersSorter, updatedPeers, pageSize]);\n\n if (peerSharing) {\n return (\n <VideoTileContext.Provider value={tileLayout}>\n <ScreenshareLayout\n peers={sortedPeers}\n onPageSize={setPageSize}\n onPageChange={setMainPage}\n edgeToEdge={edge_to_edge}\n />\n </VideoTileContext.Provider>\n );\n } else if (isRoleProminence) {\n return (\n <VideoTileContext.Provider value={tileLayout}>\n <RoleProminence\n peers={sortedPeers}\n onPageSize={setPageSize}\n onPageChange={setMainPage}\n prominentRoles={prominentRoles}\n isInsetEnabled={isInsetEnabled}\n edgeToEdge={edge_to_edge}\n />\n </VideoTileContext.Provider>\n );\n }\n return (\n <VideoTileContext.Provider value={tileLayout}>\n <EqualProminence\n peers={sortedPeers}\n onPageSize={setPageSize}\n onPageChange={setMainPage}\n isInsetEnabled={isInsetEnabled}\n edgeToEdge={edge_to_edge}\n />\n </VideoTileContext.Provider>\n );\n};\n", "import React, { useEffect, useMemo, useState } from 'react';\nimport { useMedia } from 'react-use';\nimport { selectLocalPeer, useHMSStore } from '@100mslive/react-sdk';\nimport { Flex } from '../../../Layout';\nimport { config as cssConfig } from '../../../Theme';\nimport { InsetTile } from '../InsetTile';\nimport { Pagination } from '../Pagination';\nimport { Grid } from './Grid';\nimport { LayoutProps } from './interface';\n// @ts-ignore: No implicit Any\nimport { useUISettings } from '../AppData/useUISettings';\nimport { usePagesWithTiles, useTileLayout } from '../hooks/useTileLayout';\n// @ts-ignore: No implicit Any\nimport { UI_SETTINGS } from '../../common/constants';\n\nexport function EqualProminence({ isInsetEnabled = false, peers, onPageChange, onPageSize, edgeToEdge }: LayoutProps) {\n const localPeer = useHMSStore(selectLocalPeer);\n const isMobile = useMedia(cssConfig.media.md);\n let maxTileCount = useUISettings(UI_SETTINGS.maxTileCount);\n maxTileCount = isMobile ? Math.min(maxTileCount, 6) : maxTileCount;\n let pageList = usePagesWithTiles({\n peers,\n maxTileCount,\n });\n // useMemo is needed to prevent recursion as new array is created for localPeer\n const inputPeers = useMemo(\n () => (pageList.length === 0 ? (localPeer ? [localPeer] : []) : peers),\n [pageList.length, peers, localPeer],\n );\n // Pass local peer to main grid if no other peer has tiles\n pageList = usePagesWithTiles({\n peers: inputPeers,\n maxTileCount,\n });\n const { ref, pagesWithTiles } = useTileLayout({\n pageList,\n maxTileCount,\n edgeToEdge,\n });\n const [page, setPage] = useState(0);\n const pageSize = pagesWithTiles[0]?.length || 0;\n\n useEffect(() => {\n if (pageSize > 0) {\n onPageSize?.(pageSize);\n }\n }, [pageSize, onPageSize]);\n\n return (\n <Flex direction=\"column\" css={{ flex: '1 1 0', h: '100%', position: 'relative', minWidth: 0 }}>\n <Grid tiles={pagesWithTiles[page]} ref={ref} edgeToEdge={edgeToEdge} />\n {!edgeToEdge && (\n <Pagination\n page={page}\n onPageChange={page => {\n setPage(page);\n onPageChange?.(page);\n }}\n numPages={pagesWithTiles.length}\n />\n )}\n {isInsetEnabled && pageList.length > 0 && pageList[0][0].peer.id !== localPeer?.id && <InsetTile />}\n </Flex>\n );\n}\n", "import React, { useEffect, useRef } from 'react';\nimport Draggable from 'react-draggable';\nimport { useMedia } from 'react-use';\nimport { selectIsAllowedToPublish, selectLocalPeer, selectVideoTrackByID, useHMSStore } from '@100mslive/react-sdk';\nimport { ExpandIcon } from '@100mslive/react-icons';\nimport { Box, Flex } from '../../Layout';\nimport { Text } from '../../Text';\nimport { config as cssConfig } from '../../Theme';\n// @ts-ignore: No implicit Any\nimport IconButton from '../IconButton';\n// @ts-ignore: No implicit Any\nimport { AudioVideoToggle } from './AudioVideoToggle';\n// @ts-ignore: No implicit Any\nimport VideoTile from './VideoTile';\n// @ts-ignore: No implicit Any\nimport { useSetAppDataByKey } from './AppData/useUISettings';\nimport { useVideoTileContext } from './hooks/useVideoTileLayout';\n// @ts-ignore: No implicit Any\nimport { APP_DATA } from '../common/constants';\n\nconst MinimisedTile = ({ setMinimised }: { setMinimised: (value: boolean) => void }) => {\n return (\n <Flex align=\"center\" css={{ gap: '$6', r: '$1', bg: '$surface_default', p: '$4', color: '$on_surface_high' }}>\n <AudioVideoToggle hideOptions={true} />\n <Text>You</Text>\n <IconButton\n className=\"__cancel-drag-event\"\n onClick={() => setMinimised(false)}\n css={{ bg: 'transparent', border: 'transparent' }}\n >\n <ExpandIcon />\n </IconButton>\n </Flex>\n );\n};\n\nconst insetHeightPx = 180;\nconst insetMaxWidthPx = 240;\nconst defaultMobileAspectRatio = 9 / 16;\nconst desktopAspectRatio = 1 / defaultMobileAspectRatio;\n\nexport const InsetTile = () => {\n const isMobile = useMedia(cssConfig.media.md);\n const isLandscape = useMedia(cssConfig.media.ls);\n const localPeer = useHMSStore(selectLocalPeer);\n const [minimised, setMinimised] = useSetAppDataByKey(APP_DATA.minimiseInset);\n const videoTrack = useHMSStore(selectVideoTrackByID(localPeer?.videoTrack));\n const isAllowedToPublish = useHMSStore(selectIsAllowedToPublish);\n const videoTileProps = useVideoTileContext();\n let aspectRatio = isMobile ? defaultMobileAspectRatio : desktopAspectRatio;\n if (videoTrack?.width && videoTrack?.height && !isMobile) {\n aspectRatio = videoTrack.width / videoTrack.height;\n }\n let height = insetHeightPx;\n let width = height * aspectRatio;\n // Convert to 16/9 in landscape mode with a max width of 240\n if (isLandscape && width > insetMaxWidthPx) {\n width = 240;\n height = width / aspectRatio;\n }\n\n const nodeRef = useRef<HTMLDivElement>(null);\n\n useEffect(() => {\n const node = nodeRef.current;\n if (!node || !window.ResizeObserver) {\n return;\n }\n const resizeObserver = new ResizeObserver(entries => {\n entries.forEach(entry => {\n if (entry.target === node.parentElement) {\n // reset to original position on resize\n node.style.transform = `translate(0,0)`;\n }\n });\n });\n node.parentElement && resizeObserver.observe(node.parentElement);\n return () => {\n node?.parentElement && resizeObserver?.unobserve(node.parentElement);\n resizeObserver?.disconnect();\n };\n }, []);\n\n if (!isAllowedToPublish.video && !isAllowedToPublish.audio) {\n return null;\n }\n\n return (\n <Draggable bounds=\"parent\" nodeRef={nodeRef} cancel=\".__cancel-drag-event\">\n <Box\n ref={nodeRef}\n css={{\n position: 'absolute',\n bottom: 0,\n right: 0,\n zIndex: 11,\n boxShadow: '0 0 8px 0 rgba(0,0,0,0.3)',\n r: '$2',\n ...(!minimised\n ? {\n aspectRatio: aspectRatio,\n h: height,\n }\n : {}),\n }}\n >\n {minimised ? (\n <MinimisedTile setMinimised={setMinimised} />\n ) : (\n <VideoTile\n peerId={localPeer?.id}\n trackid={localPeer?.videoTrack}\n rootCSS={{\n size: '100%',\n padding: 0,\n }}\n width={width}\n height={height}\n containerCSS={{ background: '$surface_default' }}\n canMinimise\n isDragabble\n {...videoTileProps}\n hideParticipantNameOnTile\n />\n )}\n </Box>\n </Draggable>\n );\n};\n", "import React, { Fragment, useCallback, useRef, useState } from 'react';\nimport { useMedia } from 'react-use';\nimport {\n selectAudioTrackByPeerID,\n selectHasPeerHandRaised,\n selectIsPeerAudioEnabled,\n selectLocalPeerID,\n selectPeerMetadata,\n selectPeerNameByID,\n selectSessionStore,\n selectVideoTrackByID,\n selectVideoTrackByPeerID,\n useHMSStore,\n} from '@100mslive/react-sdk';\nimport { BrbTileIcon, HandIcon, MicOffIcon } from '@100mslive/react-icons';\nimport TileConnection from './Connection/TileConnection';\nimport TileMenu, { isSameTile } from './TileMenu/TileMenu';\nimport { AudioLevel } from '../../AudioLevel';\nimport { Avatar } from '../../Avatar';\nimport { VideoTileStats } from '../../Stats';\nimport { config as cssConfig } from '../../Theme';\nimport { Video } from '../../Video';\nimport { StyledVideoTile } from '../../VideoTile';\nimport { getVideoTileLabel } from './peerTileUtils';\nimport { PrebuiltAttributeBox, PrebuiltAudioIndicator } from './PrebuiltTileElements';\nimport { useSetAppDataByKey, useUISettings } from './AppData/useUISettings';\nimport { APP_DATA, SESSION_STORE_KEY, UI_SETTINGS } from '../common/constants';\n\nconst iconDims = { height: '1rem', width: '1rem' };\n\nconst Tile = ({\n peerId,\n trackId,\n width,\n height,\n objectFit = 'cover',\n canMinimise = false,\n isDragabble = false,\n rootCSS = {},\n containerCSS = {},\n enableSpotlightingPeer = true,\n hideParticipantNameOnTile = false,\n roundedVideoTile = true,\n hideAudioMuteOnTile = false,\n hideMetadataOnTile = false,\n}) => {\n const trackSelector = trackId ? selectVideoTrackByID(trackId) : selectVideoTrackByPeerID(peerId);\n const track = useHMSStore(trackSelector);\n const isMobile = useMedia(cssConfig.media.md);\n const peerName = useHMSStore(selectPeerNameByID(peerId));\n const audioTrack = useHMSStore(selectAudioTrackByPeerID(peerId));\n const localPeerID = useHMSStore(selectLocalPeerID);\n const isAudioOnly = useUISettings(UI_SETTINGS.isAudioOnly);\n const mirrorLocalVideo = useUISettings(UI_SETTINGS.mirrorLocalVideo);\n const showStatsOnTiles = useUISettings(UI_SETTINGS.showStatsOnTiles);\n const isAudioMuted = !useHMSStore(selectIsPeerAudioEnabled(peerId));\n const isVideoMuted = !track?.enabled;\n const [isMouseHovered, setIsMouseHovered] = useState(false);\n const isVideoDegraded = track?.degraded;\n const isLocal = localPeerID === peerId;\n const [pinnedTrackId] = useSetAppDataByKey(APP_DATA.pinnedTrackId);\n const pinned = isSameTile({\n trackId: pinnedTrackId,\n videoTrackID: track?.id,\n audioTrackID: audioTrack?.id,\n });\n const spotlighted = useHMSStore(selectSessionStore(SESSION_STORE_KEY.SPOTLIGHT)) === peerId;\n const label = getVideoTileLabel({\n peerName,\n track,\n isLocal,\n });\n const onHoverHandler = useCallback(event => {\n setIsMouseHovered(event.type === 'mouseenter');\n }, []);\n\n const ref = useRef(null);\n const calculatedHeight = ref.current?.clientHeight || '';\n const calculatedWidth = ref.current?.clientWidth || '';\n const isTileBigEnoughToShowStats = calculatedHeight >= 180 && calculatedWidth >= 180;\n const avatarSize = 'medium';\n\n return (\n <StyledVideoTile.Root\n ref={ref}\n css={{\n width,\n height,\n ...rootCSS,\n }}\n data-testid={`participant_tile_${peerName}`}\n >\n {peerName !== undefined ? (\n <StyledVideoTile.Container\n onMouseEnter={onHoverHandler}\n onMouseLeave={onHoverHandler}\n noRadius={!roundedVideoTile}\n css={containerCSS}\n >\n {showStatsOnTiles && isTileBigEnoughToShowStats ? (\n <VideoTileStats audioTrackID={audioTrack?.id} videoTrackID={track?.id} peerID={peerId} isLocal={isLocal} />\n ) : null}\n\n <Video\n trackId={track?.id}\n attach={isLocal ? undefined : !isAudioOnly}\n mirror={\n mirrorLocalVideo &&\n peerId === localPeerID &&\n track?.source === 'regular' &&\n track?.facingMode !== 'environment'\n }\n noRadius={!roundedVideoTile}\n data-testid=\"participant_video_tile\"\n css={{\n objectFit,\n filter: isVideoDegraded ? 'blur($space$2)' : undefined,\n bg: 'transparent',\n }}\n />\n\n {isVideoMuted || (!isLocal && isAudioOnly) ? (\n <StyledVideoTile.AvatarContainer>\n <Avatar name={peerName || ''} data-testid=\"participant_avatar_icon\" size={avatarSize} />\n </StyledVideoTile.AvatarContainer>\n ) : null}\n\n {!hideAudioMuteOnTile ? (\n isAudioMuted ? (\n <PrebuiltAudioIndicator data-testid=\"participant_audio_mute_icon\">\n <MicOffIcon style={iconDims} />\n </PrebuiltAudioIndicator>\n ) : (\n <PrebuiltAudioIndicator>\n <AudioLevel trackId={audioTrack?.id} />\n </PrebuiltAudioIndicator>\n )\n ) : null}\n {isMouseHovered || (isDragabble && isMobile) ? (\n <TileMenu\n peerID={peerId}\n audioTrackID={audioTrack?.id}\n videoTrackID={track?.id}\n canMinimise={canMinimise}\n enableSpotlightingPeer={enableSpotlightingPeer}\n />\n ) : null}\n {!hideMetadataOnTile && <PeerMetadata peerId={peerId} />}\n\n <TileConnection\n hideLabel={hideParticipantNameOnTile}\n name={label}\n isTile\n peerId={peerId}\n width={width}\n pinned={pinned}\n spotlighted={spotlighted}\n />\n </StyledVideoTile.Container>\n ) : null}\n </StyledVideoTile.Root>\n );\n};\n\nconst PeerMetadata = ({ peerId }) => {\n const metaData = useHMSStore(selectPeerMetadata(peerId));\n const isBRB = metaData?.isBRBOn || false;\n const isHandRaised = useHMSStore(selectHasPeerHandRaised(peerId));\n\n return (\n <Fragment>\n {isHandRaised ? (\n <PrebuiltAttributeBox data-testid=\"raiseHand_icon_onTile\">\n <HandIcon style={iconDims} />\n </PrebuiltAttributeBox>\n ) : null}\n {isBRB ? (\n <PrebuiltAttributeBox data-testid=\"brb_icon_onTile\">\n <BrbTileIcon style={iconDims} />\n </PrebuiltAttributeBox>\n ) : null}\n </Fragment>\n );\n};\n\nconst VideoTile = React.memo(Tile);\n\nexport default VideoTile;\n", "import React, { useState } from 'react';\nimport { useMedia } from 'react-use';\nimport {\n selectLocalPeerID,\n selectPeerByID,\n selectPermissions,\n selectTrackByID,\n selectVideoTrackByPeerID,\n useHMSStore,\n useRemoteAVToggle,\n} from '@100mslive/react-sdk';\nimport { CrossIcon, VerticalMenuIcon } from '@100mslive/react-icons';\nimport { Box, Flex } from '../../../Layout';\nimport { Sheet } from '../../../Sheet';\nimport { Text } from '../../../Text';\nimport { config as cssConfig, useTheme } from '../../../Theme';\nimport { StyledMenuTile } from '../../../TileMenu';\nimport { ChangeNameModal } from '../MoreSettings/ChangeNameModal';\nimport { TileMenuContent } from './TileMenuContent';\nimport { useDropdownList } from '../hooks/useDropdownList';\n\n/**\n * Taking peerID as peer won't necesarilly have tracks\n */\nconst TileMenu = ({\n audioTrackID,\n videoTrackID,\n peerID,\n isScreenshare = false,\n canMinimise,\n enableSpotlightingPeer = true,\n}) => {\n const [open, setOpen] = useState(false);\n const { theme } = useTheme();\n\n const localPeerID = useHMSStore(selectLocalPeerID);\n const isLocal = localPeerID === peerID;\n const { removeOthers } = useHMSStore(selectPermissions);\n const { setVolume, toggleAudio, toggleVideo } = useRemoteAVToggle(audioTrackID, videoTrackID);\n const showSpotlight = enableSpotlightingPeer;\n\n const isPrimaryVideoTrack = useHMSStore(selectVideoTrackByPeerID(peerID))?.id === videoTrackID;\n const showPinAction = audioTrackID || (videoTrackID && isPrimaryVideoTrack);\n\n const track = useHMSStore(selectTrackByID(videoTrackID));\n const hideSimulcastLayers = !track?.layerDefinitions?.length || track.degraded || !track.enabled;\n const isMobile = useMedia(cssConfig.media.md);\n const peer = useHMSStore(selectPeerByID(peerID));\n const [showNameChangeModal, setShowNameChangeModal] = useState(false);\n useDropdownList({ open, name: 'TileMenu' });\n\n if (!(removeOthers || toggleAudio || toggleVideo || setVolume || showPinAction) && hideSimulcastLayers) {\n return null;\n }\n\n const openNameChangeModal = () => setShowNameChangeModal(true);\n\n const props = {\n isLocal,\n isScreenshare,\n audioTrackID,\n videoTrackID,\n peerID,\n isPrimaryVideoTrack,\n showSpotlight,\n showPinAction,\n canMinimise,\n openNameChangeModal,\n };\n\n return (\n <>\n <StyledMenuTile.Root open={open} onOpenChange={setOpen}>\n <StyledMenuTile.Trigger\n data-testid=\"participant_menu_btn\"\n css={{ bg: `${theme.colors.background_dim.value}A3`, p: '$2', w: 'unset', h: 'unset' }}\n onClick={e => e.stopPropagation()}\n className={isMobile ? '__cancel-drag-event' : ''}\n >\n <VerticalMenuIcon width={20} height={20} />\n </StyledMenuTile.Trigger>\n\n {isMobile ? (\n <Sheet.Root open={open} onOpenChange={setOpen}>\n <Sheet.Content css={{ bg: '$surface_dim', pt: '$8' }}>\n <Flex\n css={{\n color: '$on_surface_high',\n display: 'flex',\n w: '100%',\n justifyContent: 'space-between',\n alignItems: 'center',\n px: '$10',\n pb: '$8',\n borderBottom: '1px solid $border_default',\n }}\n >\n <Box>\n <Text css={{ color: '$on_surface_high', fontWeight: '$semiBold' }}>\n {peer.name}\n {isLocal ? ` (You)` : null}\n </Text>\n {peer?.roleName ? (\n <Text variant=\"xs\" css={{ color: '$on_surface_low', mt: '$2' }}>\n {peer.roleName}\n </Text>\n ) : null}\n </Box>\n\n <Sheet.Close css={{ color: 'inherit' }}>\n <CrossIcon />\n </Sheet.Close>\n </Flex>\n <Box css={{ px: '$8', pb: '$8', maxHeight: '80vh', overflowY: 'auto' }}>\n <TileMenuContent {...props} closeSheetOnClick={() => setOpen(false)} />\n </Box>\n </Sheet.Content>\n </Sheet.Root>\n ) : (\n <StyledMenuTile.Content side=\"top\" align=\"end\" css={{ maxHeight: '$80', overflowY: 'auto' }}>\n <TileMenuContent {...props} />\n </StyledMenuTile.Content>\n )}\n </StyledMenuTile.Root>\n {showNameChangeModal && <ChangeNameModal onOpenChange={setShowNameChangeModal} />}\n </>\n );\n};\n\nexport { isSameTile } from './TileMenuContent';\n\nexport default TileMenu;\n", "import React, { Fragment } from 'react';\nimport { useMedia } from 'react-use';\nimport {\n selectPermissions,\n selectSessionStore,\n selectTrackByID,\n useCustomEvent,\n useHMSActions,\n useHMSStore,\n useRemoteAVToggle,\n} from '@100mslive/react-sdk';\nimport {\n MicOffIcon,\n MicOnIcon,\n PencilIcon,\n PinIcon,\n RemoveUserIcon,\n ShareScreenIcon,\n ShrinkIcon,\n SpeakerIcon,\n StarIcon,\n VideoOffIcon,\n VideoOnIcon,\n} from '@100mslive/react-icons';\nimport { Box, Flex } from '../../../Layout';\nimport { Slider } from '../../../Slider';\nimport { Text } from '../../../Text';\nimport { config as cssConfig } from '../../../Theme';\nimport { StyledMenuTile } from '../../../TileMenu';\nimport { ToastManager } from '../Toast/ToastManager';\nimport { useSetAppDataByKey } from '../AppData/useUISettings';\nimport { useDropdownSelection } from '../hooks/useDropdownSelection';\nimport { APP_DATA, REMOTE_STOP_SCREENSHARE_TYPE, SESSION_STORE_KEY } from '../../common/constants';\n\nexport const isSameTile = ({ trackId, videoTrackID, audioTrackID }) =>\n trackId && ((videoTrackID && videoTrackID === trackId) || (audioTrackID && audioTrackID === trackId));\n\nconst spacingCSS = { '@md': { my: '$8', fontWeight: '$semiBold', fontSize: 'sm' } };\n\nconst SpotlightActions = ({\n peerId,\n onSpotLightClick = () => {\n return;\n },\n}) => {\n const hmsActions = useHMSActions();\n const spotlightPeerId = useHMSStore(selectSessionStore(SESSION_STORE_KEY.SPOTLIGHT));\n const isTileSpotlighted = spotlightPeerId === peerId;\n\n const setSpotlightPeerId = peer =>\n hmsActions.sessionStore\n .set(SESSION_STORE_KEY.SPOTLIGHT, peer)\n .catch(err => ToastManager.addToast({ title: err.description }));\n\n return (\n <StyledMenuTile.ItemButton\n css={spacingCSS}\n onClick={() => {\n if (isTileSpotlighted) {\n setSpotlightPeerId();\n } else {\n setSpotlightPeerId(peerId);\n }\n onSpotLightClick();\n }}\n >\n <StarIcon height={20} width={20} />\n <span>{isTileSpotlighted ? 'Remove from Spotlight' : 'Spotlight Tile for everyone'}</span>\n </StyledMenuTile.ItemButton>\n );\n};\n\nconst PinActions = ({ audioTrackID, videoTrackID }) => {\n const [pinnedTrackId, setPinnedTrackId] = useSetAppDataByKey(APP_DATA.pinnedTrackId);\n\n const isTilePinned = isSameTile({\n trackId: pinnedTrackId,\n videoTrackID,\n audioTrackID,\n });\n\n return (\n <>\n <StyledMenuTile.ItemButton\n css={spacingCSS}\n onClick={() => (isTilePinned ? setPinnedTrackId() : setPinnedTrackId(videoTrackID || audioTrackID))}\n >\n <PinIcon height={20} width={20} />\n <span>{isTilePinned ? 'Unpin' : 'Pin'} Tile for myself</span>\n </StyledMenuTile.ItemButton>\n </>\n );\n};\n\nconst MinimiseInset = () => {\n const [minimised, setMinimised] = useSetAppDataByKey(APP_DATA.minimiseInset);\n\n return (\n <>\n <StyledMenuTile.ItemButton css={spacingCSS} onClick={() => setMinimised(!minimised)}>\n <ShrinkIcon height={20} width={20} />\n <span>{minimised ? 'Show' : 'Minimise'} your video</span>\n </StyledMenuTile.ItemButton>\n </>\n );\n};\n\nconst SimulcastLayers = ({ trackId }) => {\n const track = useHMSStore(selectTrackByID(trackId));\n const actions = useHMSActions();\n const bg = useDropdownSelection();\n if (!track?.layerDefinitions?.length || track.degraded || !track.enabled) {\n return null;\n }\n const currentLayer = track.layerDefinitions.find(layer => layer.layer === track.layer);\n return (\n <Fragment>\n <StyledMenuTile.ItemButton css={{ color: '$on_surface_medium', cursor: 'default' }}>\n Select maximum resolution\n </StyledMenuTile.ItemButton>\n {track.layerDefinitions.map(layer => {\n return (\n <StyledMenuTile.ItemButton\n key={layer.layer}\n onClick={async () => {\n await actions.setPreferredLayer(trackId, layer.layer);\n }}\n css={{\n justifyContent: 'space-between',\n bg: track.preferredLayer === layer.layer ? bg : undefined,\n '&:hover': {\n bg: track.preferredLayer === layer.layer ? bg : undefined,\n },\n }}\n >\n <Text\n as=\"span\"\n css={{\n textTransform: 'capitalize',\n mr: '$2',\n fontWeight: track.preferredLayer === layer.layer ? '$semiBold' : '$regular',\n color: track.preferredLayer === layer.layer ? '$on_primary_high' : '$on_surface_high',\n }}\n >\n {layer.layer}\n </Text>\n <Text\n as=\"span\"\n variant=\"xs\"\n css={{\n color: track.preferredLayer === layer.layer ? '$on_primary_high' : '$on_surface_high',\n }}\n >\n {layer.resolution.width}x{layer.resolution.height}\n </Text>\n </StyledMenuTile.ItemButton>\n );\n })}\n <StyledMenuTile.ItemButton>\n <Text as=\"span\" variant=\"xs\" css={{ color: '$on_surface_medium' }}>\n Currently streaming:\n <Text\n as=\"span\"\n variant=\"xs\"\n css={{\n fontWeight: '$semiBold',\n textTransform: 'capitalize',\n color: '$on_surface_medium',\n ml: '$2',\n }}\n >\n {currentLayer ? (\n <>\n {track.layer} ({currentLayer.resolution.width}x{currentLayer.resolution.height})\n </>\n ) : (\n '-'\n )}\n </Text>\n </Text>\n </StyledMenuTile.ItemButton>\n </Fragment>\n );\n};\n\nexport const TileMenuContent = props => {\n const actions = useHMSActions();\n const { removeOthers } = useHMSStore(selectPermissions);\n const {\n videoTrackID,\n audioTrackID,\n isLocal,\n isScreenshare,\n showSpotlight,\n showPinAction,\n peerID,\n canMinimise,\n closeSheetOnClick = () => {\n return;\n },\n openNameChangeModal = () => {\n return;\n },\n } = props;\n\n const { isAudioEnabled, isVideoEnabled, setVolume, toggleAudio, toggleVideo, volume } = useRemoteAVToggle(\n audioTrackID,\n videoTrackID,\n );\n\n const { sendEvent } = useCustomEvent({\n type: REMOTE_STOP_SCREENSHARE_TYPE,\n });\n\n const isMobile = useMedia(cssConfig.media.md);\n\n return isLocal ? (\n (showPinAction || canMinimise) && (\n <>\n {showPinAction && <PinActions audioTrackID={audioTrackID} videoTrackID={videoTrackID} />}\n {showSpotlight && <SpotlightActions peerId={peerID} onSpotLightClick={() => closeSheetOnClick()} />}\n {canMinimise && <MinimiseInset />}\n <StyledMenuTile.ItemButton\n onClick={() => {\n openNameChangeModal();\n closeSheetOnClick();\n }}\n >\n <PencilIcon height={20} width={20} />\n <Text variant=\"sm\" css={{ '@md': { fontWeight: '$semiBold' }, c: '$on_surface_high' }}>\n Change Name\n </Text>\n </StyledMenuTile.ItemButton>\n </>\n )\n ) : (\n <>\n {toggleVideo ? (\n <StyledMenuTile.ItemButton\n css={spacingCSS}\n onClick={() => {\n toggleVideo();\n closeSheetOnClick();\n }}\n data-testid={isVideoEnabled ? 'mute_video_participant_btn' : 'unmute_video_participant_btn'}\n >\n {isVideoEnabled ? <VideoOnIcon height={20} width={20} /> : <VideoOffIcon height={20} width={20} />}\n <span>{isVideoEnabled ? 'Mute' : 'Request Unmute'}</span>\n </StyledMenuTile.ItemButton>\n ) : null}\n\n {toggleAudio ? (\n <StyledMenuTile.ItemButton\n css={spacingCSS}\n onClick={() => {\n toggleAudio();\n closeSheetOnClick();\n }}\n data-testid={isVideoEnabled ? 'mute_audio_participant_btn' : 'unmute_audio_participant_btn'}\n >\n {isAudioEnabled ? <MicOnIcon height={20} width={20} /> : <MicOffIcon height={20} width={20} />}\n <span>{isAudioEnabled ? 'Mute' : 'Request Unmute'}</span>\n </StyledMenuTile.ItemButton>\n ) : null}\n\n {audioTrackID ? (\n <StyledMenuTile.VolumeItem data-testid=\"participant_volume_slider\" css={{ ...spacingCSS, mb: '$0' }}>\n <Flex align=\"center\" gap={1}>\n <SpeakerIcon height={20} width={20} />\n <Box as=\"span\" css={{ ml: '$4' }}>\n Volume ({volume})\n </Box>\n </Flex>\n <Slider css={{ my: '0.5rem' }} step={5} value={[volume]} onValueChange={e => setVolume(e[0])} />\n </StyledMenuTile.VolumeItem>\n ) : null}\n\n {showPinAction && (\n <>\n <PinActions audioTrackID={audioTrackID} videoTrackID={videoTrackID} />\n {showSpotlight && <SpotlightActions peerId={peerID} onSpotLightClick={() => closeSheetOnClick()} />}\n </>\n )}\n\n {isMobile ? null : <SimulcastLayers trackId={videoTrackID} />}\n\n {removeOthers ? (\n <StyledMenuTile.RemoveItem\n css={{ ...spacingCSS, borderTop: 'none' }}\n onClick={async () => {\n try {\n await actions.removePeer(peerID, '');\n } catch (error) {\n // TODO: Toast here\n }\n closeSheetOnClick();\n }}\n data-testid=\"remove_participant_btn\"\n >\n <RemoveUserIcon height={20} width={20} />\n <span>Remove Participant</span>\n </StyledMenuTile.RemoveItem>\n ) : null}\n\n {removeOthers && isScreenshare ? (\n <StyledMenuTile.RemoveItem\n onClick={() => {\n sendEvent({});\n closeSheetOnClick();\n }}\n css={spacingCSS}\n >\n <ShareScreenIcon height={20} width={20} />\n <span>Stop Screenshare</span>\n </StyledMenuTile.RemoveItem>\n ) : null}\n </>\n );\n};\n", "const PEER_NAME_PLACEHOLDER = 'peerName';\nconst labelMap = new Map([\n [[true, 'screen'].toString(), 'Your Screen'],\n [[true, 'regular'].toString(), `You (${PEER_NAME_PLACEHOLDER})`],\n [[false, 'screen'].toString(), `${PEER_NAME_PLACEHOLDER}'s Screen`],\n [[false, 'regular'].toString(), PEER_NAME_PLACEHOLDER],\n [[true, undefined].toString(), `You (${PEER_NAME_PLACEHOLDER})`],\n [[false, undefined].toString(), `${PEER_NAME_PLACEHOLDER}`],\n]);\n\nexport const getVideoTileLabel = ({ peerName, isLocal, track }) => {\n const isPeerPresent = peerName !== undefined;\n if (!isPeerPresent || !track) {\n // for peers with only audio track\n return isPeerPresent ? labelMap.get([isLocal, undefined].toString()).replace(PEER_NAME_PLACEHOLDER, peerName) : '';\n }\n const isLocallyMuted = track.volume === 0;\n // Map [isLocal, videoSource] to the label to be displayed.\n let label = labelMap.get([isLocal, track.source].toString());\n if (label) {\n label = label.replace(PEER_NAME_PLACEHOLDER, peerName);\n } else {\n label = `${peerName} ${track.source}`;\n }\n // label = `${label}${track.degraded ? '(Degraded)' : ''}`;\n return `${label}${isLocallyMuted ? ' (Muted for you)' : ''}`;\n};\n", "import React, { useContext } from 'react';\n\ntype TileContextType = {\n enableSpotlightingPeer: boolean;\n hideParticipantNameOnTile?: boolean;\n roundedVideoTile?: boolean;\n hideAudioMuteOnTile?: boolean;\n hideAudioLevelOnTile?: boolean;\n objectFit?: 'cover' | 'contain';\n hideMetadataOnTile?: boolean;\n};\n\nexport const VideoTileContext = React.createContext<TileContextType>({\n enableSpotlightingPeer: true,\n hideParticipantNameOnTile: false,\n roundedVideoTile: true,\n hideAudioMuteOnTile: false,\n hideAudioLevelOnTile: false,\n objectFit: 'contain',\n hideMetadataOnTile: false,\n});\n\nexport const useVideoTileContext = () => {\n const context = useContext(VideoTileContext);\n return context;\n};\n", "import React, { useEffect } from 'react';\nimport { ChevronLeftIcon, ChevronRightIcon } from '@100mslive/react-icons';\nimport { StyledPagination } from '../../Pagination';\n\nexport const Pagination = ({\n page,\n onPageChange,\n numPages,\n}: {\n page: number;\n onPageChange: (page: number) => void;\n numPages: number;\n}) => {\n const disableLeft = page === 0;\n const disableRight = page === numPages - 1;\n const nextPage = (e: React.SyntheticEvent) => {\n e.stopPropagation();\n onPageChange(Math.min(page + 1, numPages - 1));\n };\n const prevPage = (e: React.SyntheticEvent) => {\n e.stopPropagation();\n onPageChange(Math.max(page - 1, 0));\n };\n\n useEffect(() => {\n // currentPageIndex should not exceed pages length\n if (page >= numPages) {\n onPageChange(Math.max(0, numPages - 1));\n }\n }, [numPages, onPageChange, page]);\n\n if (numPages <= 1) {\n return null;\n }\n\n return (\n <StyledPagination.Root css={{ flexShrink: 0 }}>\n <StyledPagination.Chevron disabled={disableLeft} onClick={prevPage}>\n <ChevronLeftIcon width={16} height={16} style={{ cursor: disableLeft ? 'not-allowed' : 'pointer' }} />\n </StyledPagination.Chevron>\n {numPages <= 5 ? (\n <StyledPagination.Dots>\n {[...Array(numPages)].map((_, i) => (\n <StyledPagination.Dot\n key={i}\n active={page === i}\n onClick={e => {\n e.stopPropagation();\n onPageChange(i);\n }}\n />\n ))}\n </StyledPagination.Dots>\n ) : null}\n <StyledPagination.Chevron disabled={disableRight} onClick={nextPage}>\n <ChevronRightIcon width={16} height={16} style={{ cursor: disableRight ? 'not-allowed' : 'pointer' }} />\n </StyledPagination.Chevron>\n </StyledPagination.Root>\n );\n};\n", "import React from 'react';\nimport { TrackWithPeerAndDimensions } from '@100mslive/react-sdk';\nimport { Box } from '../../../Layout';\n// @ts-ignore: No implicit Any\nimport VideoTile from '../VideoTile';\nimport { useVideoTileContext } from '../hooks/useVideoTileLayout';\n\nexport const Grid = React.forwardRef<HTMLDivElement, { tiles: TrackWithPeerAndDimensions[]; edgeToEdge?: boolean }>(\n ({ tiles, edgeToEdge }, ref) => {\n const videoTileProps = useVideoTileContext();\n return (\n <Box\n ref={ref}\n css={{\n flex: '1 1 0',\n gap: '$4',\n display: 'flex',\n placeContent: 'center',\n alignItems: 'center',\n justifyContent: 'center',\n flexFlow: 'row wrap',\n minHeight: 0,\n '@md': { gap: edgeToEdge ? 0 : '$4' },\n }}\n >\n {tiles?.map(tile => {\n return (\n <VideoTile\n key={tile.track?.id || tile.peer?.id}\n width={tile.width}\n height={tile.height}\n peerId={tile.peer?.id}\n trackId={tile.track?.id}\n rootCSS={{ padding: 0 }}\n objectFit=\"contain\"\n {...videoTileProps}\n />\n );\n })}\n </Box>\n );\n },\n);\n", "import { useEffect, useMemo, useState } from 'react';\nimport { useMeasure, useMedia } from 'react-use';\nimport {\n getPeersWithTiles,\n HMSPeer,\n selectTracksMap,\n TrackWithPeerAndDimensions,\n useHMSVanillaStore,\n} from '@100mslive/react-sdk';\nimport { config as cssConfig } from '../../../Theme';\n\nconst aspectRatioConfig = { default: [1 / 1, 4 / 3, 16 / 9], mobile: [1 / 1, 3 / 4, 9 / 16] };\n\nexport const usePagesWithTiles = ({ peers, maxTileCount }: { peers: HMSPeer[]; maxTileCount: number }) => {\n const vanillaStore = useHMSVanillaStore();\n const tracksMap = vanillaStore.getState(selectTracksMap);\n const peersWithTiles = useMemo(\n () => getPeersWithTiles(peers, tracksMap, () => false) as TrackWithPeerAndDimensions[],\n [peers, tracksMap],\n );\n const noOfPages = Math.ceil(peersWithTiles.length / maxTileCount);\n const pagesList = useMemo(() => {\n let sliceStart = 0;\n let remaining = peersWithTiles.length;\n const list = [];\n // split into pages\n for (let i = 0; i < noOfPages; i++) {\n const count = Math.min(remaining, maxTileCount);\n list.push(peersWithTiles.slice(sliceStart, sliceStart + count));\n remaining = remaining - count;\n sliceStart += count;\n }\n return list;\n }, [peersWithTiles, noOfPages, maxTileCount]);\n return pagesList;\n};\n\nexport const useTileLayout = ({\n pageList,\n maxTileCount,\n edgeToEdge = false,\n}: {\n pageList: TrackWithPeerAndDimensions[][];\n maxTileCount: number;\n edgeToEdge?: boolean;\n}) => {\n const vanillaStore = useHMSVanillaStore();\n const [ref, { width, height }] = useMeasure<HTMLDivElement>();\n const isMobile = useMedia(cssConfig.media.lg);\n const [pagesWithTiles, setPagesWithTiles] = useState<TrackWithPeerAndDimensions[][]>([]);\n\n useEffect(() => {\n if (width === 0 || height === 0) {\n return;\n }\n // calculate dimesions for each page\n for (const page of pageList) {\n const noOfTilesInPage = page.length;\n let maxCols =\n noOfTilesInPage > 2 && noOfTilesInPage < 9\n ? Math.ceil(noOfTilesInPage / 2)\n : Math.ceil(Math.sqrt(noOfTilesInPage));\n if (isMobile) {\n maxCols = noOfTilesInPage < 4 ? 1 : Math.min(maxCols, 2);\n }\n const maxRows = Math.ceil(noOfTilesInPage / maxCols);\n let index = 0;\n // convert the current page to a matrix(grid)\n const matrix = new Array(maxRows).fill(null).map((_, i) => {\n const numCols = Math.min(maxCols, noOfTilesInPage - i * maxCols);\n const rowElements = [];\n for (let j = 0; j < numCols; j++) {\n if (index < page.length) {\n rowElements.push(page[index++]);\n }\n }\n return rowElements;\n });\n\n const gap = edgeToEdge && isMobile ? 0 : 8; // gap between flex items\n const maxHeight = height - (maxRows - 1) * gap;\n const maxRowHeight = maxHeight / matrix.length;\n const aspectRatios =\n isMobile && (noOfTilesInPage === 1 || noOfTilesInPage > 3)\n ? aspectRatioConfig.mobile\n : aspectRatioConfig.default;\n // calculate height and width of each tile in a row\n for (const row of matrix) {\n let tileWidth = (width - (row.length - 1) * gap) / row.length;\n let tileHeight = 0;\n if (edgeToEdge) {\n tileHeight = maxRowHeight;\n } else {\n const calcHeights = aspectRatios.map(aR => tileWidth / aR);\n for (const h of calcHeights) {\n if (h < maxRowHeight) {\n if (tileHeight < h) {\n tileHeight = h;\n }\n }\n }\n\n // tileHeight is not calculated as it could be exceeding the max possible height\n // find the max possible width instead\n if (tileHeight === 0) {\n tileHeight = maxRowHeight;\n const calcWidths = aspectRatios.map(aR => tileHeight * aR);\n tileWidth = 0;\n for (const w of calcWidths) {\n if (w < width) {\n if (tileWidth < w) {\n tileWidth = w;\n }\n }\n }\n }\n }\n for (let i = 0; i < row.length; i++) {\n row[i].width = tileWidth;\n row[i].height = tileHeight;\n }\n }\n }\n setPagesWithTiles([...pageList]);\n }, [width, height, maxTileCount, pageList, vanillaStore, isMobile, edgeToEdge]);\n return { pagesWithTiles, ref };\n};\n", "import React, { useEffect, useState } from 'react';\nimport { selectLocalPeer, useHMSStore } from '@100mslive/react-sdk';\nimport { InsetTile } from '../InsetTile';\nimport { Pagination } from '../Pagination';\nimport { SecondaryTiles } from '../SecondaryTiles';\nimport { Grid } from './Grid';\nimport { LayoutProps } from './interface';\nimport { ProminenceLayout } from './ProminenceLayout';\nimport { useRoleProminencePeers } from '../hooks/useRoleProminencePeers';\nimport { usePagesWithTiles, useTileLayout } from '../hooks/useTileLayout';\n\nexport function RoleProminence({\n isInsetEnabled = false,\n prominentRoles = [],\n peers,\n onPageChange,\n onPageSize,\n edgeToEdge,\n}: LayoutProps) {\n const { prominentPeers, secondaryPeers } = useRoleProminencePeers(prominentRoles, peers, isInsetEnabled);\n const localPeer = useHMSStore(selectLocalPeer);\n const maxTileCount = 4;\n const pageList = usePagesWithTiles({\n peers: prominentPeers,\n maxTileCount,\n });\n const { ref, pagesWithTiles } = useTileLayout({\n pageList,\n maxTileCount,\n });\n const [page, setPage] = useState(0);\n const pageSize = pagesWithTiles[0]?.length || 0;\n\n useEffect(() => {\n if (pageSize > 0) {\n onPageSize?.(pageSize);\n }\n }, [pageSize, onPageSize]);\n\n return (\n <ProminenceLayout.Root>\n <ProminenceLayout.ProminentSection>\n <Grid ref={ref} tiles={pagesWithTiles[page]} />\n </ProminenceLayout.ProminentSection>\n {!edgeToEdge && (\n <Pagination\n page={page}\n onPageChange={page => {\n setPage(page);\n onPageChange?.(page);\n }}\n numPages={pagesWithTiles.length}\n />\n )}\n <SecondaryTiles peers={secondaryPeers} isInsetEnabled={isInsetEnabled} edgeToEdge={edgeToEdge} />\n {isInsetEnabled && localPeer && !prominentPeers.includes(localPeer) && <InsetTile />}\n </ProminenceLayout.Root>\n );\n}\n", "import React, { useEffect, useState } from 'react';\nimport { useMedia } from 'react-use';\nimport { LayoutProps } from './VideoLayouts/interface';\nimport { ProminenceLayout } from './VideoLayouts/ProminenceLayout';\nimport { config as cssConfig } from '../../Theme';\nimport { Pagination } from './Pagination';\nimport { usePagesWithTiles } from './hooks/useTileLayout';\n\nexport const SecondaryTiles = ({ peers, onPageChange, onPageSize, edgeToEdge }: LayoutProps) => {\n const isMobile = useMedia(cssConfig.media.md);\n const maxTileCount = isMobile ? 2 : 4;\n const pagesWithTiles = usePagesWithTiles({ peers, maxTileCount });\n const [page, setPage] = useState(0);\n const pageSize = pagesWithTiles[0]?.length || 0;\n\n useEffect(() => {\n if (pageSize > 0) {\n onPageSize?.(pageSize);\n }\n }, [pageSize, onPageSize]);\n\n return (\n <ProminenceLayout.SecondarySection tiles={pagesWithTiles[page]} edgeToEdge={edgeToEdge}>\n {!edgeToEdge && (\n <Pagination\n page={page}\n onPageChange={page => {\n setPage(page);\n onPageChange?.(page);\n }}\n numPages={pagesWithTiles.length}\n />\n )}\n </ProminenceLayout.SecondarySection>\n );\n};\n", "import React from 'react';\nimport { TrackWithPeerAndDimensions } from '@100mslive/react-sdk';\nimport { Box, Flex } from '../../../Layout';\nimport { CSS } from '../../../Theme';\n// @ts-ignore: No implicit Any\nimport VideoTile from '../VideoTile';\nimport { useVideoTileContext } from '../hooks/useVideoTileLayout';\n\nconst Root = ({ children, edgeToEdge }: React.PropsWithChildren<{ edgeToEdge?: boolean }>) => (\n <Flex\n direction=\"column\"\n css={{ h: '100%', flex: '1 1 0', minWidth: 0, gap: '$6', '@md': { gap: edgeToEdge ? 0 : '$6' } }}\n >\n {children}\n </Flex>\n);\n\nconst ProminentSection = ({ children, css = {} }: React.PropsWithChildren<{ css?: CSS }>) => {\n return (\n <Flex direction=\"column\" css={{ flex: '1 1 0', gap: '$2', minHeight: 0, ...css }}>\n {children}\n </Flex>\n );\n};\n\nconst SecondarySection = ({\n tiles,\n children,\n edgeToEdge,\n}: React.PropsWithChildren<{ tiles: TrackWithPeerAndDimensions[]; edgeToEdge?: boolean }>) => {\n const tileLayoutProps = useVideoTileContext();\n if (!tiles?.length) {\n return null;\n }\n return (\n <Box\n css={{\n display: 'grid',\n gridTemplateRows: React.Children.count(children) > 0 ? '136px auto' : '154px',\n gridTemplateColumns: `repeat(${tiles.length}, minmax(0, 1fr))`,\n margin: '0 auto',\n gap: '$2 $4',\n placeItems: 'center',\n '@md': { gap: edgeToEdge ? 0 : '$4' },\n }}\n >\n {tiles.map(tile => {\n return (\n <VideoTile\n key={tile.track?.id || tile.peer?.id}\n peerId={tile.peer?.id}\n trackId={tile.track?.id}\n rootCSS={{\n padding: 0,\n maxWidth: 240,\n maxHeight: '100%',\n aspectRatio: 16 / 9,\n '@md': { aspectRatio: 1 },\n }}\n objectFit=\"contain\"\n {...tileLayoutProps}\n />\n );\n })}\n <Box css={{ gridColumn: `1/span ${tiles.length}` }}>{children}</Box>\n </Box>\n );\n};\n\nexport const ProminenceLayout = {\n Root,\n ProminentSection,\n SecondarySection,\n};\n", "import { useMemo } from 'react';\nimport { HMSPeer } from '@100mslive/react-sdk';\n// @ts-ignore: No implicit Any\nimport { usePinnedTrack } from '../AppData/useUISettings';\n\nexport const useRoleProminencePeers = (prominentRoles: string[], peers: HMSPeer[], isInsetEnabled: boolean) => {\n const pinnedTrack = usePinnedTrack();\n\n const [prominentPeers, secondaryPeers] = useMemo(() => {\n return peers.reduce<[HMSPeer[], HMSPeer[]]>(\n (acc, peer) => {\n if (pinnedTrack) {\n if (pinnedTrack.peerId === peer.id) {\n acc[0].push(peer);\n } else if (!(isInsetEnabled && peer.isLocal)) {\n acc[1].push(peer);\n }\n return acc;\n }\n if (peer.isLocal && isInsetEnabled) {\n return acc;\n }\n if (prominentRoles?.includes(peer.roleName || '')) {\n acc[0].push(peer);\n } else {\n acc[1].push(peer);\n }\n return acc;\n },\n [[], []],\n );\n }, [peers, isInsetEnabled, prominentRoles, pinnedTrack]);\n\n return {\n prominentPeers,\n secondaryPeers,\n };\n};\n", "import React, { useEffect, useMemo, useState } from 'react';\nimport { useMedia } from 'react-use';\nimport { selectPeersScreenSharing, useHMSStore } from '@100mslive/react-sdk';\nimport { config as cssConfig } from '../../../Theme';\nimport { Pagination } from '../Pagination';\n// @ts-ignore: No implicit Any\nimport ScreenshareTile from '../ScreenshareTile';\nimport { SecondaryTiles } from '../SecondaryTiles';\nimport { LayoutProps } from './interface';\nimport { ProminenceLayout } from './ProminenceLayout';\n// @ts-ignore: No implicit Any\nimport { useSetAppDataByKey } from '../AppData/useUISettings';\n// @ts-ignore: No implicit Any\nimport { APP_DATA } from '../../common/constants';\n\nexport const ScreenshareLayout = ({ peers, onPageChange, onPageSize, edgeToEdge }: LayoutProps) => {\n const peersSharing = useHMSStore(selectPeersScreenSharing);\n const [, setActiveScreenSharePeer] = useSetAppDataByKey(APP_DATA.activeScreensharePeerId);\n const [page, setPage] = useState(0);\n const activeSharePeer = peersSharing[page];\n const isMobile = useMedia(cssConfig.media.md);\n const secondaryPeers = useMemo(\n () =>\n isMobile\n ? activeSharePeer\n ? [activeSharePeer, ...peers.filter(p => p.id !== activeSharePeer?.id)]\n : peers //keep active sharing peer as first tile\n : peers.filter(p => p.id !== activeSharePeer?.id),\n [activeSharePeer, peers, isMobile],\n );\n useEffect(() => {\n setActiveScreenSharePeer(isMobile ? '' : activeSharePeer?.id);\n return () => {\n setActiveScreenSharePeer('');\n };\n }, [activeSharePeer?.id, isMobile, setActiveScreenSharePeer]);\n\n return (\n <ProminenceLayout.Root edgeToEdge={edgeToEdge}>\n <ProminenceLayout.ProminentSection>\n <ScreenshareTile peerId={peersSharing[page]?.id} />\n {!edgeToEdge && <Pagination page={page} onPageChange={setPage} numPages={peersSharing.length} />}\n </ProminenceLayout.ProminentSection>\n <SecondaryTiles\n peers={secondaryPeers}\n onPageChange={onPageChange}\n onPageSize={onPageSize}\n edgeToEdge={edgeToEdge}\n />\n </ProminenceLayout.Root>\n );\n};\n", "import React, { useRef, useState } from 'react';\nimport { useFullscreen } from 'react-use';\nimport screenfull from 'screenfull';\nimport {\n selectLocalPeerID,\n selectPeerByID,\n selectScreenShareAudioByPeerID,\n selectScreenShareByPeerID,\n useHMSStore,\n} from '@100mslive/react-sdk';\nimport { ExpandIcon, ShrinkIcon } from '@100mslive/react-icons';\nimport TileMenu from './TileMenu/TileMenu';\nimport { VideoTileStats } from '../../Stats';\nimport { Video } from '../../Video';\nimport { StyledVideoTile } from '../../VideoTile';\nimport { getVideoTileLabel } from './peerTileUtils';\nimport { ScreenshareDisplay } from './ScreenshareDisplay';\nimport { useUISettings } from './AppData/useUISettings';\nimport { UI_SETTINGS } from '../common/constants';\n\nconst labelStyles = {\n position: 'unset',\n width: '100%',\n textAlign: 'center',\n c: '$on_surface_high',\n transform: 'none',\n flexShrink: 0,\n};\n\nconst Tile = ({ peerId, width = '100%', height = '100%' }) => {\n const isLocal = useHMSStore(selectLocalPeerID) === peerId;\n const track = useHMSStore(selectScreenShareByPeerID(peerId));\n const peer = useHMSStore(selectPeerByID(peerId));\n const isAudioOnly = useUISettings(UI_SETTINGS.isAudioOnly);\n const [isMouseHovered, setIsMouseHovered] = useState(false);\n const showStatsOnTiles = useUISettings(UI_SETTINGS.showStatsOnTiles);\n const fullscreenRef = useRef(null);\n // fullscreen is for desired state\n const [fullscreen, setFullscreen] = useState(false);\n // isFullscreen is for true state\n const isFullscreen = useFullscreen(fullscreenRef, fullscreen, {\n onClose: () => setFullscreen(false),\n });\n const isFullScreenSupported = screenfull.isEnabled;\n const audioTrack = useHMSStore(selectScreenShareAudioByPeerID(peer?.id));\n\n if (isLocal && !['browser', 'window', 'application'].includes(track?.displaySurface)) {\n return <ScreenshareDisplay />;\n }\n\n if (!peer) {\n return null;\n }\n\n const label = getVideoTileLabel({\n peerName: peer?.name,\n isLocal: false,\n track,\n });\n\n return (\n <StyledVideoTile.Root css={{ width, height, p: 0, minHeight: 0 }} data-testid=\"screenshare_tile\">\n <StyledVideoTile.Container\n transparentBg\n ref={fullscreenRef}\n css={{ flexDirection: 'column', gap: '$2' }}\n onMouseEnter={() => setIsMouseHovered(true)}\n onMouseLeave={() => {\n setIsMouseHovered(false);\n }}\n >\n {showStatsOnTiles ? (\n <VideoTileStats audioTrackID={audioTrack?.id} videoTrackID={track?.id} peerID={peerId} isLocal={isLocal} />\n ) : null}\n {isFullScreenSupported && isMouseHovered ? (\n <StyledVideoTile.FullScreenButton onClick={() => setFullscreen(!fullscreen)}>\n {isFullscreen ? <ShrinkIcon /> : <ExpandIcon />}\n </StyledVideoTile.FullScreenButton>\n ) : null}\n {track ? (\n <Video\n screenShare={true}\n mirror={peer.isLocal && track?.source === 'regular'}\n attach={!isAudioOnly}\n trackId={track.id}\n css={{ minHeight: 0 }}\n />\n ) : null}\n <StyledVideoTile.Info css={labelStyles}>{label}</StyledVideoTile.Info>\n {isMouseHovered && !peer.isLocal ? (\n <TileMenu\n isScreenshare\n peerID={peer.id}\n audioTrackID={audioTrack?.id}\n videoTrackID={track?.id}\n enableSpotlightingPeer={false}\n />\n ) : null}\n </StyledVideoTile.Container>\n </StyledVideoTile.Root>\n );\n};\n\nconst ScreenshareTile = React.memo(Tile);\n\nexport default ScreenshareTile;\n", "import React from 'react';\nimport { useHMSActions } from '@100mslive/react-sdk';\nimport { CrossIcon, ShareScreenIcon } from '@100mslive/react-icons';\nimport { Button } from '../../Button';\nimport { Flex } from '../../Layout';\nimport { Text } from '../../Text';\n\nexport const ScreenshareDisplay = () => {\n const hmsActions = useHMSActions();\n\n return (\n <Flex\n direction=\"column\"\n align=\"center\"\n justify=\"center\"\n css={{\n size: '100%',\n bg: '$background_default',\n color: '$on_surface_high',\n }}\n >\n <ShareScreenIcon width={48} height={48} />\n <Text variant=\"h5\" css={{ m: '$8 0' }}>\n You are sharing your screen\n </Text>\n <Button\n variant=\"danger\"\n css={{ fontWeight: '$semiBold' }}\n onClick={async () => {\n await hmsActions.setScreenShareEnabled(false);\n }}\n data-testid=\"stop_screen_share_btn\"\n >\n <CrossIcon width={18} height={18} />\n Stop screen share\n </Button>\n </Flex>\n );\n};\n", "import { HMSPeer, HMSPeerID, IStoreReadOnly, selectDominantSpeaker } from '@100mslive/react-sdk';\n\nclass PeersSorter {\n storeUnsubscribe: undefined | (() => void) = undefined;\n store: IStoreReadOnly<any>;\n peers: Map<string, HMSPeer>;\n lruPeers: Set<HMSPeerID>;\n tilesPerPage!: number;\n speaker?: HMSPeer;\n listeners: Set<(peers: HMSPeer[]) => void> = new Set();\n\n constructor(store: IStoreReadOnly<any>) {\n this.store = store;\n this.peers = new Map();\n this.lruPeers = new Set();\n this.speaker = undefined;\n }\n\n setPeersAndTilesPerPage = ({ peers, tilesPerPage }: { peers: HMSPeer[]; tilesPerPage: number }) => {\n this.tilesPerPage = tilesPerPage;\n const peerIds = new Set(peers.map(peer => peer.id));\n // remove existing peers which are no longer provided\n this.peers.forEach((_, key) => {\n if (!peerIds.has(key)) {\n this.peers.delete(key);\n }\n });\n this.lruPeers = new Set([...this.lruPeers].filter(peerId => peerIds.has(peerId)));\n peers.forEach(peer => {\n this.peers.set(peer.id, peer);\n if (this.lruPeers.size < tilesPerPage) {\n this.lruPeers.add(peer.id);\n }\n });\n if (!this.storeUnsubscribe) {\n this.storeUnsubscribe = this.store.subscribe(this.onDominantSpeakerChange, selectDominantSpeaker);\n }\n this.moveSpeakerToFront(this.speaker);\n };\n\n onUpdate = (cb: (peers: HMSPeer[]) => void) => {\n this.listeners.add(cb);\n };\n\n stop = () => {\n this.updateListeners();\n this.listeners.clear();\n this.storeUnsubscribe?.();\n };\n\n moveSpeakerToFront = (speaker?: HMSPeer) => {\n if (!speaker) {\n this.updateListeners();\n return;\n }\n if (this.lruPeers.has(speaker.id) && this.lruPeers.size <= this.tilesPerPage) {\n this.updateListeners();\n return;\n }\n // delete to insert at beginning\n this.lruPeers.delete(speaker.id);\n const lruPeerArray = Array.from(this.lruPeers);\n while (lruPeerArray.length >= this.tilesPerPage && lruPeerArray.length) {\n lruPeerArray.pop();\n }\n this.lruPeers = new Set([speaker.id, ...lruPeerArray]);\n this.updateListeners();\n };\n\n onDominantSpeakerChange = (speaker: HMSPeer | null) => {\n if (speaker && speaker.id !== this?.speaker?.id) {\n this.speaker = speaker;\n this.moveSpeakerToFront(speaker);\n }\n };\n\n updateListeners = () => {\n const orderedPeers: HMSPeer[] = [];\n this.lruPeers.forEach(key => {\n const peer = this.peers.get(key);\n if (peer) {\n orderedPeers.push(peer);\n }\n });\n this.peers.forEach(peer => {\n if (!this.lruPeers.has(peer.id) && peer) {\n orderedPeers.push(peer);\n }\n });\n this.listeners.forEach(listener => listener?.(orderedPeers));\n };\n}\n\nexport default PeersSorter;\n", "import React, { useCallback, useEffect, useMemo, useRef, useState } from 'react';\nimport {\n selectPeers,\n selectPeerScreenSharing,\n throwErrorHandler,\n useHMSStore,\n useScreenShare,\n} from '@100mslive/react-sdk';\nimport { SecondaryTiles } from '../components/SecondaryTiles';\nimport { ProminenceLayout } from '../components/VideoLayouts/ProminenceLayout';\nimport { Box } from '../../Layout';\nimport { useSetAppDataByKey } from '../components/AppData/useUISettings';\nimport { APP_DATA } from '../common/constants';\n\nexport const EmbedView = () => {\n return (\n <EmbebScreenShareView>\n <EmbedComponent />\n </EmbebScreenShareView>\n );\n};\n\nexport const EmbebScreenShareView = ({ children }) => {\n const peers = useHMSStore(selectPeers);\n\n const peerPresenting = useHMSStore(selectPeerScreenSharing);\n const [, setActiveScreenSharePeer] = useSetAppDataByKey(APP_DATA.activeScreensharePeerId);\n\n const smallTilePeers = useMemo(() => {\n const smallTilePeers = peers.filter(peer => peer.id !== peerPresenting?.id);\n return smallTilePeers;\n }, [peers, peerPresenting]);\n\n useEffect(() => {\n setActiveScreenSharePeer(peerPresenting?.id);\n return () => {\n setActiveScreenSharePeer('');\n };\n }, [peerPresenting?.id, setActiveScreenSharePeer]);\n return (\n <ProminenceLayout.Root>\n <ProminenceLayout.ProminentSection>{children}</ProminenceLayout.ProminentSection>\n <SecondaryTiles peers={smallTilePeers} />\n </ProminenceLayout.Root>\n );\n};\n\nconst EmbedComponent = () => {\n const { amIScreenSharing, toggleScreenShare } = useScreenShare(throwErrorHandler);\n const [embedConfig, setEmbedConfig] = useSetAppDataByKey(APP_DATA.embedConfig);\n const [wasScreenShared, setWasScreenShared] = useState(false);\n // to handle - https://github.com/facebook/react/issues/24502\n const screenShareAttemptInProgress = useRef(false);\n const src = embedConfig.url;\n const iframeRef = useRef();\n\n const resetEmbedConfig = useCallback(() => {\n if (src) {\n setEmbedConfig({ url: '' });\n }\n }, [src, setEmbedConfig]);\n\n useEffect(() => {\n if (embedConfig.shareScreen && !amIScreenSharing && !wasScreenShared && !screenShareAttemptInProgress.current) {\n screenShareAttemptInProgress.current = true;\n // start screenshare on load for others in the room to see\n toggleScreenShare({\n forceCurrentTab: true,\n cropElement: iframeRef.current,\n })\n .then(() => {\n setWasScreenShared(true);\n })\n .catch(resetEmbedConfig)\n .finally(() => {\n screenShareAttemptInProgress.current = false;\n });\n }\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, []);\n\n useEffect(() => {\n // reset embed when screenshare is closed from anywhere\n if (wasScreenShared && !amIScreenSharing) {\n resetEmbedConfig();\n }\n return () => {\n // close screenshare when this component is being unmounted\n if (wasScreenShared && amIScreenSharing) {\n resetEmbedConfig();\n toggleScreenShare(); // stop\n }\n };\n }, [wasScreenShared, amIScreenSharing, resetEmbedConfig, toggleScreenShare]);\n\n return (\n <Box ref={iframeRef} css={{ size: '100%' }}>\n <iframe\n src={src}\n title={src}\n style={{ width: '100%', height: '100%', border: 0 }}\n allow=\"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture fullscreen\"\n referrerPolicy=\"no-referrer\"\n />\n </Box>\n );\n};\n", "import React, { useCallback, useEffect, useRef, useState } from 'react';\nimport { throwErrorHandler, useScreenShare } from '@100mslive/react-sdk';\nimport { Box } from '../../Layout';\nimport { ThemeTypes, useTheme } from '../../Theme';\nimport { EmbebScreenShareView } from './EmbedView';\nimport { useSetAppDataByKey } from '../components/AppData/useUISettings';\nimport { APP_DATA, isChrome } from '../common/constants';\n\nexport const PDFView = () => {\n return (\n <EmbebScreenShareView>\n <PDFEmbedComponent />\n </EmbebScreenShareView>\n );\n};\n\nexport const PDFEmbedComponent = () => {\n const ref = useRef();\n const themeType = useTheme().themeType;\n const [isPDFLoaded, setIsPDFLoaded] = useState(false);\n let pdfJSURL = process.env.REACT_APP_PDFJS_IFRAME_URL;\n const { amIScreenSharing, toggleScreenShare } = useScreenShare(throwErrorHandler);\n const [pdfConfig, setPDFConfig] = useSetAppDataByKey(APP_DATA.pdfConfig);\n if (pdfConfig.url && !pdfConfig.file) {\n pdfJSURL = pdfJSURL + '?file=' + encodeURIComponent(pdfConfig.url);\n }\n const [wasScreenShared, setWasScreenShared] = useState(false);\n // to handle - https://github.com/facebook/react/issues/24502\n const screenShareAttemptInProgress = useRef(false);\n const iframeRef = useRef();\n\n const resetEmbedConfig = useCallback(() => {\n setPDFConfig({ state: false });\n }, [setPDFConfig]);\n useEffect(() => {\n if (isPDFLoaded && ref.current) {\n ref.current.contentWindow.postMessage(\n {\n theme: themeType === ThemeTypes.dark ? 2 : 1,\n },\n '*',\n );\n }\n }, [isPDFLoaded, themeType]);\n useEffect(() => {\n if (!amIScreenSharing && !wasScreenShared && !screenShareAttemptInProgress.current) {\n screenShareAttemptInProgress.current = true;\n // start screenshare on load for others in the room to see\n toggleScreenShare({\n forceCurrentTab: isChrome,\n cropElement: iframeRef.current,\n preferCurrentTab: isChrome,\n })\n .then(() => {\n setWasScreenShared(true);\n })\n .catch(resetEmbedConfig)\n .finally(() => {\n screenShareAttemptInProgress.current = false;\n });\n }\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, []);\n\n useEffect(() => {\n // reset embed when screenshare is closed from anywhere\n if (wasScreenShared && !amIScreenSharing) {\n resetEmbedConfig();\n }\n return () => {\n // close screenshare when this component is being unmounted\n if (wasScreenShared && amIScreenSharing) {\n resetEmbedConfig();\n toggleScreenShare(); // stop\n }\n };\n }, [wasScreenShared, amIScreenSharing, resetEmbedConfig, toggleScreenShare]);\n\n return (\n <Box ref={iframeRef} css={{ size: '100%' }}>\n <iframe\n src={pdfJSURL}\n title=\"PDF Annotator\"\n ref={ref}\n style={{\n width: '100%',\n height: '100%',\n border: 0,\n borderRadius: '0.75rem',\n }}\n allow=\"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture fullscreen\"\n referrerPolicy=\"no-referrer\"\n onLoad={() => {\n if (ref.current && pdfConfig.file) {\n // setting theme dark -> 2 and light -> 1\n requestAnimationFrame(() => {\n ref.current.contentWindow.postMessage(\n {\n file: pdfConfig.file,\n theme: themeType === ThemeTypes.dark ? 2 : 1,\n },\n '*',\n );\n setIsPDFLoaded(true);\n }, 1000);\n }\n }}\n />\n </Box>\n );\n};\n", "import React from 'react';\nimport { useMedia } from 'react-use';\nimport { ConferencingScreen } from '@100mslive/types-prebuilt';\nimport { selectAppData, selectVideoTrackByPeerID, useHMSStore } from '@100mslive/react-sdk';\nimport { SidePaneTabs } from '../components/SidePaneTabs';\n// @ts-ignore: No implicit Any\nimport { StreamingLanding } from '../components/Streaming/StreamingLanding';\nimport { TileCustomisationProps } from '../components/VideoLayouts/GridLayout';\n// @ts-ignore: No implicit Any\nimport VideoTile from '../components/VideoTile';\nimport { Box, Flex } from '../../Layout';\nimport { config as cssConfig } from '../../Theme';\nimport { useRoomLayoutConferencingScreen } from '../provider/roomLayoutProvider/hooks/useRoomLayoutScreen';\n// @ts-ignore: No implicit Any\nimport { APP_DATA, SIDE_PANE_OPTIONS } from '../common/constants';\n\nconst SidePane = ({\n screenType,\n tileProps,\n hideControls = false,\n}: {\n screenType: keyof ConferencingScreen;\n tileProps: TileCustomisationProps;\n hideControls: boolean;\n}) => {\n const isMobile = useMedia(cssConfig.media.md);\n const sidepane = useHMSStore(selectAppData(APP_DATA.sidePane));\n const activeScreensharePeerId = useHMSStore(selectAppData(APP_DATA.activeScreensharePeerId));\n const trackId = useHMSStore(selectVideoTrackByPeerID(activeScreensharePeerId))?.id;\n const { elements } = useRoomLayoutConferencingScreen();\n let ViewComponent;\n if (sidepane === SIDE_PANE_OPTIONS.PARTICIPANTS || sidepane === SIDE_PANE_OPTIONS.CHAT) {\n ViewComponent = <SidePaneTabs screenType={screenType} hideControls={hideControls} active={sidepane} />;\n } else if (sidepane === SIDE_PANE_OPTIONS.STREAMING) {\n ViewComponent = <StreamingLanding />;\n }\n if (!ViewComponent && !trackId) {\n return null;\n }\n\n const tileLayout = {\n hideParticipantNameOnTile: tileProps?.hide_participant_name_on_tile,\n roundedVideoTile: tileProps?.rounded_video_tile,\n hideAudioMuteOnTile: tileProps?.hide_audio_mute_on_tile,\n hideMetadataOnTile: tileProps?.hide_metadata_on_tile,\n objectFit: tileProps?.video_object_fit,\n };\n\n const mwebStreamingChat = isMobile && sidepane === SIDE_PANE_OPTIONS.CHAT && elements?.chat?.is_overlay;\n\n return (\n <Flex\n direction=\"column\"\n justify=\"center\"\n css={{\n w: '$100',\n h: '100%',\n flexShrink: 0,\n gap: '$4',\n '@md': { position: mwebStreamingChat ? 'absolute' : '', zIndex: 12 },\n }}\n >\n {trackId && (\n <VideoTile\n peerId={activeScreensharePeerId}\n trackId={trackId}\n width=\"100%\"\n height={225}\n rootCSS={{ p: 0, alignSelf: 'start', flexShrink: 0 }}\n {...tileLayout}\n />\n )}\n {!!ViewComponent && (\n <Box\n css={{\n w: '$100',\n h: mwebStreamingChat ? '0' : '100%',\n p: '$10',\n flex: '1 1 0',\n minHeight: 0,\n maxHeight: mwebStreamingChat ? '300px' : 'unset',\n background: mwebStreamingChat\n ? 'linear-gradient(180deg, rgba(0, 0, 0, 0.00) 35.94%, rgba(0, 0, 0, 0.64) 100%)'\n : '$surface_dim',\n r: '$1',\n position: 'relative',\n '@lg': {\n w: '100%',\n h: '100%',\n ml: 0,\n right: 0,\n position: 'fixed',\n bottom: 0,\n borderRadius: 0,\n zIndex: 10,\n },\n '@md': {\n p: '$6 $8',\n pb: mwebStreamingChat ? '$20' : '$12',\n },\n }}\n >\n {ViewComponent}\n </Box>\n )}\n </Flex>\n );\n};\n\nexport default SidePane;\n", "import React, { useEffect, useState } from 'react';\nimport { useMedia } from 'react-use';\nimport { ConferencingScreen, DefaultConferencingScreen_Elements } from '@100mslive/types-prebuilt';\nimport { selectPeerCount, useHMSStore } from '@100mslive/react-sdk';\nimport { CrossIcon } from '@100mslive/react-icons';\n// @ts-ignore: No implicit Any\nimport { Chat } from './Chat/Chat';\nimport { PaginatedParticipants } from './Footer/PaginatedParticipants';\n// @ts-ignore: No implicit Any\nimport { ParticipantList } from './Footer/ParticipantList';\nimport { Box, config as cssConfig, Flex, IconButton, Tabs, Text } from '../..';\nimport { Tooltip } from '../../Tooltip';\n// @ts-ignore: No implicit Any\nimport { useRoomLayoutConferencingScreen } from '../provider/roomLayoutProvider/hooks/useRoomLayoutScreen';\n// @ts-ignore: No implicit Any\nimport { useIsSidepaneTypeOpen, useSidepaneReset, useSidepaneToggle } from './AppData/useSidepane';\n// @ts-ignore: No implicit Any\nimport { getFormattedCount } from '../common/utils';\n// @ts-ignore: No implicit Any\nimport { SIDE_PANE_OPTIONS } from '../common/constants';\n\nconst tabTriggerCSS = {\n color: '$on_surface_high',\n p: '$4',\n fontWeight: '$semiBold',\n fontSize: '$sm',\n w: '100%',\n justifyContent: 'center',\n};\n\nconst ParticipantCount = ({ count }: { count: number }) => {\n return count < 1000 ? (\n <span>({count})</span>\n ) : (\n <Tooltip title={count}>\n <span>({getFormattedCount(count)})</span>\n </Tooltip>\n );\n};\n\nexport const SidePaneTabs = React.memo<{\n active: 'Participants | Chat';\n screenType: keyof ConferencingScreen;\n hideControls?: boolean;\n}>(({ active = SIDE_PANE_OPTIONS.CHAT, screenType, hideControls }) => {\n const toggleChat = useSidepaneToggle(SIDE_PANE_OPTIONS.CHAT);\n const toggleParticipants = useSidepaneToggle(SIDE_PANE_OPTIONS.PARTICIPANTS);\n const resetSidePane = useSidepaneReset();\n const [activeTab, setActiveTab] = useState(active);\n const [activeRole, setActiveRole] = useState('');\n const peerCount = useHMSStore(selectPeerCount);\n const { elements } = useRoomLayoutConferencingScreen();\n const showChat = !!elements?.chat;\n const showParticipants = !!elements?.participant_list;\n const hideTabs = !(showChat && showParticipants);\n const isMobile = useMedia(cssConfig.media.md);\n const isOverlayChat = !!elements?.chat?.is_overlay && isMobile;\n const { off_stage_roles = [] } = (elements as DefaultConferencingScreen_Elements)?.on_stage_exp || {};\n const isChatOpen = useIsSidepaneTypeOpen(SIDE_PANE_OPTIONS.CHAT);\n\n useEffect(() => {\n if (activeTab === SIDE_PANE_OPTIONS.CHAT && !showChat && showParticipants) {\n setActiveTab(SIDE_PANE_OPTIONS.PARTICIPANTS);\n } else if (activeTab === SIDE_PANE_OPTIONS.PARTICIPANTS && showChat && !showParticipants) {\n setActiveTab(SIDE_PANE_OPTIONS.CHAT);\n } else if (!showChat && !showParticipants) {\n resetSidePane();\n }\n }, [showChat, activeTab, showParticipants, resetSidePane]);\n\n useEffect(() => {\n setActiveTab(active);\n }, [active]);\n\n if (activeRole) {\n return (\n <Flex\n direction=\"column\"\n css={{\n color: '$on_primary_high',\n h: '100%',\n marginTop: hideControls && isOverlayChat ? '$17' : '0',\n transition: 'margin 0.3s ease-in-out',\n position: 'relative',\n }}\n >\n <Box css={{ position: 'absolute', left: 0, top: 0, size: '100%', zIndex: 21, bg: '$surface_dim' }}>\n <PaginatedParticipants roleName={activeRole} onBack={() => setActiveRole('')} />\n </Box>\n </Flex>\n );\n }\n\n return (\n <Flex\n direction=\"column\"\n css={{\n color: '$on_primary_high',\n h: '100%',\n marginTop: hideControls && isOverlayChat ? '$17' : '0',\n transition: 'margin 0.3s ease-in-out',\n }}\n >\n {isOverlayChat && isChatOpen && showChat ? (\n <Chat screenType={screenType} />\n ) : (\n <>\n {hideTabs ? (\n <>\n <Text variant=\"sm\" css={{ fontWeight: '$semiBold', p: '$4', c: '$on_surface_high', pr: '$12' }}>\n {showChat ? (\n 'Chat'\n ) : (\n <span>\n Participants <ParticipantCount count={peerCount} />\n </span>\n )}\n </Text>\n\n {showChat ? (\n <Chat screenType={screenType} />\n ) : (\n <ParticipantList offStageRoles={off_stage_roles} onActive={setActiveRole} />\n )}\n </>\n ) : (\n <Tabs.Root\n value={activeTab}\n onValueChange={setActiveTab}\n css={{\n flexDirection: 'column',\n size: '100%',\n }}\n >\n <Tabs.List css={{ w: 'calc(100% - $12)', p: '$2', borderRadius: '$2', bg: '$surface_default' }}>\n <Tabs.Trigger\n value={SIDE_PANE_OPTIONS.CHAT}\n onClick={toggleChat}\n css={{\n ...tabTriggerCSS,\n color: activeTab !== SIDE_PANE_OPTIONS.CHAT ? '$on_surface_low' : '$on_surface_high',\n }}\n >\n Chat\n </Tabs.Trigger>\n <Tabs.Trigger\n value={SIDE_PANE_OPTIONS.PARTICIPANTS}\n onClick={toggleParticipants}\n css={{\n ...tabTriggerCSS,\n color: activeTab !== SIDE_PANE_OPTIONS.PARTICIPANTS ? '$on_surface_low' : '$on_surface_high',\n }}\n >\n Participants <ParticipantCount count={peerCount} />\n </Tabs.Trigger>\n </Tabs.List>\n <Tabs.Content value={SIDE_PANE_OPTIONS.PARTICIPANTS} css={{ p: 0 }}>\n <ParticipantList offStageRoles={off_stage_roles} onActive={setActiveRole} />\n </Tabs.Content>\n <Tabs.Content value={SIDE_PANE_OPTIONS.CHAT} css={{ p: 0 }}>\n <Chat screenType={screenType} />\n </Tabs.Content>\n </Tabs.Root>\n )}\n </>\n )}\n\n {isOverlayChat && isChatOpen ? null : (\n <IconButton\n css={{ position: 'absolute', right: '$9', top: '$11', '@md': { top: '$8', right: '$6' } }}\n onClick={e => {\n e.stopPropagation();\n if (activeTab === SIDE_PANE_OPTIONS.CHAT) {\n toggleChat();\n } else {\n toggleParticipants();\n }\n }}\n data-testid=\"close_chat\"\n >\n <CrossIcon />\n </IconButton>\n )}\n </Flex>\n );\n});\n", "import React, { useCallback, useEffect, useRef, useState } from 'react';\nimport { useMedia } from 'react-use';\nimport {\n HMSNotificationTypes,\n selectHMSMessagesCount,\n selectPeerNameByID,\n selectPermissions,\n selectSessionStore,\n useHMSActions,\n useHMSNotifications,\n useHMSStore,\n} from '@100mslive/react-sdk';\nimport { ChevronDownIcon, CrossIcon, PinIcon } from '@100mslive/react-icons';\nimport { Button } from '../../../Button';\nimport { Box, Flex } from '../../../Layout';\nimport { Text } from '../../../Text';\nimport { config as cssConfig } from '../../../Theme';\nimport { AnnotisedMessage, ChatBody } from './ChatBody';\nimport { ChatFooter } from './ChatFooter';\nimport { useRoomLayoutConferencingScreen } from '../../provider/roomLayoutProvider/hooks/useRoomLayoutScreen';\nimport { useSetSubscribedChatSelector } from '../AppData/useUISettings';\nimport { useSetPinnedMessage } from '../hooks/useSetPinnedMessage';\nimport { useUnreadCount } from './useUnreadCount';\nimport { CHAT_SELECTOR, SESSION_STORE_KEY } from '../../common/constants';\n\nconst PINNED_MESSAGE_LENGTH = 80;\n\nconst PinnedMessage = ({ clearPinnedMessage }) => {\n const permissions = useHMSStore(selectPermissions);\n const pinnedMessage = useHMSStore(selectSessionStore(SESSION_STORE_KEY.PINNED_MESSAGE));\n const formattedPinnedMessage =\n pinnedMessage?.length && pinnedMessage.length > PINNED_MESSAGE_LENGTH\n ? `${pinnedMessage.slice(0, PINNED_MESSAGE_LENGTH)}...`\n : pinnedMessage;\n\n return pinnedMessage ? (\n <Flex\n title={pinnedMessage}\n css={{ p: '$4', color: '$on_surface_medium', bg: '$surface_default', r: '$1', gap: '$4', mb: '$8', mt: '$8' }}\n align=\"center\"\n justify=\"between\"\n >\n <PinIcon />\n\n <Box\n css={{\n color: '$on_surface_medium',\n w: '100%',\n maxHeight: '$18',\n overflowY: 'auto',\n }}\n >\n <Text variant=\"sm\">\n <AnnotisedMessage message={formattedPinnedMessage} />\n </Text>\n </Box>\n {permissions.removeOthers && (\n <Flex\n onClick={() => clearPinnedMessage()}\n css={{ cursor: 'pointer', color: '$on_surface_medium', '&:hover': { color: '$on_surface_high' } }}\n >\n <CrossIcon />\n </Flex>\n )}\n </Flex>\n ) : null;\n};\n\nexport const Chat = ({ screenType }) => {\n const notification = useHMSNotifications(HMSNotificationTypes.PEER_LEFT);\n const [peerSelector, setPeerSelector] = useSetSubscribedChatSelector(CHAT_SELECTOR.PEER_ID);\n const [roleSelector, setRoleSelector] = useSetSubscribedChatSelector(CHAT_SELECTOR.ROLE);\n const peerName = useHMSStore(selectPeerNameByID(peerSelector));\n const [chatOptions, setChatOptions] = useState({\n role: roleSelector || '',\n peerId: peerSelector && peerName ? peerSelector : '',\n selection: roleSelector ? roleSelector : peerSelector && peerName ? peerName : 'Everyone',\n });\n const [isSelectorOpen] = useState(false);\n const listRef = useRef(null);\n const hmsActions = useHMSActions();\n const { setPinnedMessage } = useSetPinnedMessage();\n\n useEffect(() => {\n if (notification && notification.data && peerSelector === notification.data.id) {\n setPeerSelector('');\n setChatOptions({\n role: '',\n peerId: '',\n selection: 'Everyone',\n });\n }\n }, [notification, peerSelector, setPeerSelector]);\n\n const storeMessageSelector = selectHMSMessagesCount;\n const { elements } = useRoomLayoutConferencingScreen();\n const isMobile = useMedia(cssConfig.media.md);\n\n let isScrolledToBottom = false;\n if (listRef.current) {\n const currentRef = listRef.current._outerRef;\n isScrolledToBottom = currentRef.scrollHeight - currentRef.clientHeight - currentRef.scrollTop < 10;\n }\n\n const messagesCount = useHMSStore(storeMessageSelector) || 0;\n const scrollToBottom = useCallback(\n (unreadCount = 0) => {\n if (listRef.current && listRef.current.scrollToItem && unreadCount > 0) {\n listRef.current?.scrollToItem(messagesCount, 'end');\n requestAnimationFrame(() => {\n listRef.current?.scrollToItem(messagesCount, 'end');\n });\n hmsActions.setMessageRead(true);\n }\n },\n [hmsActions, messagesCount],\n );\n\n return (\n <Flex\n direction=\"column\"\n css={{\n size: '100%',\n gap: '$4',\n }}\n >\n {isMobile && elements?.chat?.is_overlay ? null : (\n <>{elements?.chat?.allow_pinning_messages ? <PinnedMessage clearPinnedMessage={setPinnedMessage} /> : null}</>\n )}\n\n <ChatBody\n role={chatOptions.role}\n peerId={chatOptions.peerId}\n ref={listRef}\n scrollToBottom={scrollToBottom}\n screenType={screenType}\n />\n <ChatFooter\n role={chatOptions.role}\n onSend={() => scrollToBottom(1)}\n selection={chatOptions.selection}\n screenType={screenType}\n onSelect={({ role, peerId, selection }) => {\n setChatOptions({\n role,\n peerId,\n selection,\n });\n setPeerSelector(peerId);\n setRoleSelector(role);\n }}\n peerId={chatOptions.peerId}\n >\n {!isSelectorOpen && !isScrolledToBottom && (\n <NewMessageIndicator role={chatOptions.role} peerId={chatOptions.peerId} scrollToBottom={scrollToBottom} />\n )}\n </ChatFooter>\n </Flex>\n );\n};\n\nconst NewMessageIndicator = ({ role, peerId, scrollToBottom }) => {\n const unreadCount = useUnreadCount({ role, peerId });\n if (!unreadCount) {\n return null;\n }\n return (\n <Flex\n justify=\"center\"\n css={{\n width: '100%',\n left: 0,\n bottom: '100%',\n position: 'absolute',\n }}\n >\n <Button\n variant=\"standard\"\n onClick={() => {\n scrollToBottom(unreadCount);\n }}\n icon\n css={{\n p: '$4',\n pl: '$8',\n pr: '$6',\n '& > svg': { ml: '$4' },\n borderRadius: '$round',\n position: 'relative',\n bottom: '$16',\n fontSize: '$xs',\n fontWeight: '$semiBold',\n c: '$on_secondary_high',\n }}\n >\n New {unreadCount === 1 ? 'message' : 'messages'}\n <ChevronDownIcon />\n </Button>\n </Flex>\n );\n};\n", "import React, { Fragment, useCallback, useEffect, useLayoutEffect, useMemo, useRef, useState } from 'react';\nimport { useInView } from 'react-intersection-observer';\nimport { useMedia } from 'react-use';\nimport AutoSizer from 'react-virtualized-auto-sizer';\nimport { VariableSizeList } from 'react-window';\nimport {\n selectHMSMessages,\n selectLocalPeerID,\n selectLocalPeerRoleName,\n selectMessagesByPeerID,\n selectMessagesByRole,\n selectPeerNameByID,\n selectPermissions,\n useHMSActions,\n useHMSStore,\n} from '@100mslive/react-sdk';\nimport { PinIcon, VerticalMenuIcon } from '@100mslive/react-icons';\nimport { Dropdown } from '../../../Dropdown';\nimport { IconButton } from '../../../IconButton';\nimport { Box, Flex } from '../../../Layout';\nimport { Text } from '../../../Text';\nimport { config as cssConfig, styled } from '../../../Theme';\nimport { Tooltip } from '../../../Tooltip';\nimport emptyChat from '../../images/empty-chat.svg';\nimport { useRoomLayoutConferencingScreen } from '../../provider/roomLayoutProvider/hooks/useRoomLayoutScreen';\nimport { useSetPinnedMessage } from '../hooks/useSetPinnedMessage';\nimport { useUnreadCount } from './useUnreadCount';\n\nconst formatTime = date => {\n if (!(date instanceof Date)) {\n return '';\n }\n let hours = date.getHours();\n let mins = date.getMinutes();\n const suffix = hours > 11 ? 'PM' : 'AM';\n if (hours < 10) {\n hours = '0' + hours;\n }\n if (mins < 10) {\n mins = '0' + mins;\n }\n return `${hours}:${mins} ${suffix}`;\n};\n\nconst MessageTypeContainer = ({ left, right }) => {\n return (\n <Flex\n align=\"center\"\n css={{\n ml: 'auto',\n mr: '$4',\n p: '$2 $4',\n border: '1px solid $border_bright',\n r: '$0',\n }}\n >\n {left && (\n <SenderName variant=\"tiny\" as=\"span\" css={{ color: '$on_surface_medium' }}>\n {left}\n </SenderName>\n )}\n {left && right && <Box css={{ borderLeft: '1px solid $border_bright', mx: '$4', h: '$8' }} />}\n {right && (\n <SenderName as=\"span\" variant=\"tiny\" css={{ textTransform: 'uppercase' }}>\n {right}\n </SenderName>\n )}\n </Flex>\n );\n};\n\nconst MessageType = ({ roles, hasCurrentUserSent, receiver }) => {\n const peerName = useHMSStore(selectPeerNameByID(receiver));\n const localPeerRoleName = useHMSStore(selectLocalPeerRoleName);\n if (receiver) {\n return (\n <MessageTypeContainer\n left={hasCurrentUserSent ? `${peerName ? `TO ${peerName}` : ''}` : 'TO YOU'}\n right=\"PRIVATE\"\n />\n );\n }\n\n if (roles && roles.length) {\n return <MessageTypeContainer left=\"TO\" right={hasCurrentUserSent ? roles.join(',') : localPeerRoleName} />;\n }\n return null;\n};\n\nconst URL_REGEX =\n /^https?:\\/\\/(www\\.)?[-a-zA-Z0-9@:%._+~#=]{1,256}\\.[a-zA-Z0-9()]{1,6}\\b([-a-zA-Z0-9()@:%_+.~#?&//=]*)/;\n\nconst Link = styled('a', {\n color: '$primary_default',\n wordBreak: 'break-word',\n '&:hover': {\n textDecoration: 'underline',\n },\n});\n\nexport const AnnotisedMessage = ({ message }) => {\n if (!message) {\n return <Fragment />;\n }\n\n return (\n <Fragment>\n {message\n .trim()\n .split(/(\\s)/)\n .map(part =>\n URL_REGEX.test(part) ? (\n <Link href={part} key={part} target=\"_blank\" rel=\"noopener noreferrer\">\n {part}\n </Link>\n ) : (\n part\n ),\n )}\n </Fragment>\n );\n};\n\nconst getMessageType = ({ roles, receiver }) => {\n if (roles && roles.length > 0) {\n return 'role';\n }\n return receiver ? 'private' : '';\n};\nconst ChatActions = ({ onPin, showPinAction }) => {\n const [open, setOpen] = useState(false);\n if (!showPinAction) {\n return null;\n }\n\n return (\n <Dropdown.Root open={open} onOpenChange={setOpen}>\n <Dropdown.Trigger className=\"chat_actions\" css={{ opacity: open ? 1 : 0, '@md': { opacity: 1 } }} asChild>\n <IconButton>\n <Tooltip title=\"More options\">\n <VerticalMenuIcon />\n </Tooltip>\n </IconButton>\n </Dropdown.Trigger>\n <Dropdown.Portal>\n <Dropdown.Content\n sideOffset={5}\n align=\"end\"\n css={{ width: '$48', backgroundColor: '$surface_bright', py: '$0', border: '1px solid $border_bright' }}\n >\n <Dropdown.Item data-testid=\"pin_message_btn\" onClick={onPin}>\n <PinIcon />\n <Text variant=\"sm\" css={{ ml: '$4' }}>\n Pin Message\n </Text>\n </Dropdown.Item>\n {/* {isMobile ? (\n <Dropdown.Item\n data-testid=\"copy_message_btn\"\n onClick={() => {\n try {\n navigator?.clipboard.writeText(messageContent);\n ToastManager.addToast({\n title: 'Message copied successfully',\n });\n } catch (e) {\n console.log(e);\n ToastManager.addToast({\n title: 'Could not copy message',\n });\n }\n }}\n >\n <CopyIcon />\n <Text variant=\"sm\" css={{ ml: '$4' }}>\n Copy Message\n </Text>\n </Dropdown.Item>\n ) : null} */}\n </Dropdown.Content>\n </Dropdown.Portal>\n </Dropdown.Root>\n );\n};\n\nconst SenderName = styled(Text, {\n overflow: 'hidden',\n textOverflow: 'ellipsis',\n whiteSpace: 'nowrap',\n maxWidth: '24ch',\n minWidth: 0,\n color: '$on_surface_high',\n fontWeight: '$semiBold',\n});\n\nconst ChatMessage = React.memo(\n ({ index, style = {}, message, setRowHeight, isLast = false, unreadCount = 0, scrollToBottom, onPin }) => {\n const { ref, inView } = useInView({ threshold: 0.5, triggerOnce: true });\n const rowRef = useRef(null);\n useEffect(() => {\n if (rowRef.current) {\n setRowHeight(index, rowRef.current.clientHeight);\n }\n }, [index, setRowHeight]);\n const isMobile = useMedia(cssConfig.media.md);\n const { elements } = useRoomLayoutConferencingScreen();\n const isOverlay = elements?.chat?.is_overlay && isMobile;\n const hmsActions = useHMSActions();\n const localPeerId = useHMSStore(selectLocalPeerID);\n const permissions = useHMSStore(selectPermissions);\n const messageType = getMessageType({\n roles: message.recipientRoles,\n receiver: message.recipientPeer,\n });\n // show pin action only if peer has remove others permission and the message is of broadcast type\n const showPinAction = permissions.removeOthers && !messageType && elements?.chat?.allow_pinning_messages;\n\n useEffect(() => {\n if (message.id && !message.read && inView) {\n hmsActions.setMessageRead(true, message.id);\n }\n }, [message.read, hmsActions, inView, message.id]);\n\n useEffect(() => {\n if (isLast && inView && unreadCount >= 1) {\n scrollToBottom(1);\n }\n }, [inView, isLast, scrollToBottom, unreadCount]);\n\n return (\n <Box\n ref={ref}\n as=\"div\"\n css={{ mb: '$10', pr: '$10', mt: '$8', '&:hover .chat_actions': { opacity: 1 } }}\n style={style}\n >\n <Flex\n ref={rowRef}\n align=\"center\"\n css={{\n flexWrap: 'wrap',\n // Theme independent color, token should not be used for transparent chat\n bg: messageType ? (isOverlay ? 'rgba(0, 0, 0, 0.64)' : '$surface_default') : undefined,\n r: messageType ? '$1' : undefined,\n px: messageType ? '$4' : '$2',\n py: messageType ? '$4' : 0,\n userSelect: 'none',\n }}\n key={message.time}\n data-testid=\"chat_msg\"\n >\n <Text\n css={{\n color: isOverlay ? '#FFF' : '$on_surface_high',\n fontWeight: '$semiBold',\n display: 'inline-flex',\n alignItems: 'center',\n justifyContent: 'space-between',\n width: '100%',\n }}\n as=\"div\"\n >\n <Flex align=\"baseline\">\n {message.senderName === 'You' || !message.senderName ? (\n <SenderName as=\"span\" variant=\"sm\" css={{ color: isOverlay ? '#FFF' : '$on_surface_high' }}>\n {message.senderName || 'Anonymous'}\n </SenderName>\n ) : (\n <Tooltip title={message.senderName} side=\"top\" align=\"start\">\n <SenderName as=\"span\" variant=\"sm\" css={{ color: isOverlay ? '#FFF' : '$on_surface_high' }}>\n {message.senderName}\n </SenderName>\n </Tooltip>\n )}\n {!isOverlay ? (\n <Text\n as=\"span\"\n variant=\"xs\"\n css={{\n ml: '$4',\n color: '$on_surface_medium',\n flexShrink: 0,\n }}\n >\n {formatTime(message.time)}\n </Text>\n ) : null}\n </Flex>\n <MessageType\n hasCurrentUserSent={message.sender === localPeerId}\n receiver={message.recipientPeer}\n roles={message.recipientRoles}\n />\n {!isOverlay ? <ChatActions onPin={onPin} showPinAction={showPinAction} /> : null}\n </Text>\n <Text\n variant=\"sm\"\n css={{\n w: '100%',\n mt: '$2',\n wordBreak: 'break-word',\n whiteSpace: 'pre-wrap',\n userSelect: 'all',\n color: isOverlay ? '#FFF' : '$on_surface_high',\n }}\n onClick={e => e.stopPropagation()}\n >\n <AnnotisedMessage message={message.message} />\n </Text>\n </Flex>\n </Box>\n );\n },\n);\nconst ChatList = React.forwardRef(\n ({ width, height, setRowHeight, getRowHeight, messages, unreadCount = 0, scrollToBottom }, listRef) => {\n const { setPinnedMessage } = useSetPinnedMessage();\n useLayoutEffect(() => {\n if (listRef.current && listRef.current.scrollToItem) {\n scrollToBottom(1);\n }\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [listRef]);\n\n return (\n <VariableSizeList\n ref={listRef}\n itemCount={messages.length}\n itemSize={getRowHeight}\n width={width}\n height={height - 1}\n style={{\n overflowX: 'hidden',\n }}\n >\n {({ index, style }) => (\n <ChatMessage\n style={style}\n index={index}\n key={messages[index].id}\n message={messages[index]}\n setRowHeight={setRowHeight}\n unreadCount={unreadCount}\n isLast={index >= messages.length - 2}\n scrollToBottom={scrollToBottom}\n onPin={() => setPinnedMessage(messages[index])}\n />\n )}\n </VariableSizeList>\n );\n },\n);\nconst VirtualizedChatMessages = React.forwardRef(({ messages, unreadCount = 0, scrollToBottom }, listRef) => {\n const rowHeights = useRef({});\n\n function getRowHeight(index) {\n // 72 will be default row height for any message length\n // 16 will add margin value as clientHeight don't include margin\n return rowHeights.current[index] + 16 || 72;\n }\n\n const setRowHeight = useCallback(\n (index, size) => {\n listRef.current.resetAfterIndex(0);\n rowHeights.current = { ...rowHeights.current, [index]: size };\n },\n [listRef],\n );\n\n return (\n <Box\n css={{\n mr: '-$10',\n h: '100%',\n }}\n as=\"div\"\n >\n <AutoSizer\n style={{\n width: '90%',\n }}\n >\n {({ height, width }) => (\n <ChatList\n width={width}\n height={height}\n messages={messages}\n setRowHeight={setRowHeight}\n getRowHeight={getRowHeight}\n scrollToBottom={scrollToBottom}\n ref={listRef}\n unreadCount={unreadCount}\n />\n )}\n </AutoSizer>\n </Box>\n );\n});\n\nexport const ChatBody = React.forwardRef(({ role, peerId, scrollToBottom }, listRef) => {\n const storeMessageSelector = role\n ? selectMessagesByRole(role)\n : peerId\n ? selectMessagesByPeerID(peerId)\n : selectHMSMessages;\n let messages = useHMSStore(storeMessageSelector);\n messages = useMemo(() => messages?.filter(message => message.type === 'chat') || [], [messages]);\n const isMobile = useMedia(cssConfig.media.md);\n const { elements } = useRoomLayoutConferencingScreen();\n const unreadCount = useUnreadCount({ role, peerId });\n\n if (messages.length === 0 && !(isMobile && elements?.chat?.is_overlay)) {\n return (\n <Flex\n css={{\n width: '100%',\n flex: '1 1 0',\n textAlign: 'center',\n px: '$4',\n }}\n align=\"center\"\n justify=\"center\"\n >\n <Box>\n <img src={emptyChat} alt=\"Empty Chat\" height={132} width={185} style={{ margin: '0 auto' }} />\n <Text variant=\"h5\" css={{ mt: '$8', c: '$on_surface_high' }}>\n Start a conversation\n </Text>\n <Text\n variant=\"sm\"\n css={{ mt: '$4', maxWidth: '80%', textAlign: 'center', mx: 'auto', c: '$on_surface_medium' }}\n >\n There are no messages here yet. Start a conversation by sending a message.\n </Text>\n </Box>\n </Flex>\n );\n }\n\n return (\n <Fragment>\n <VirtualizedChatMessages\n messages={messages}\n scrollToBottom={scrollToBottom}\n unreadCount={unreadCount}\n ref={listRef}\n />\n </Fragment>\n );\n});\n", "// @ts-check\nimport { useCallback } from 'react';\nimport {\n selectPeerNameByID,\n selectSessionMetadata,\n useHMSActions,\n useHMSStore,\n useHMSVanillaStore,\n} from '@100mslive/react-sdk';\nimport { ToastManager } from '../Toast/ToastManager';\nimport { SESSION_STORE_KEY } from '../../common/constants';\n\n/**\n * set pinned chat message by updating the session store\n */\nexport const useSetPinnedMessage = () => {\n const hmsActions = useHMSActions();\n const vanillaStore = useHMSVanillaStore();\n const pinnedMessage = useHMSStore(selectSessionMetadata);\n\n const setPinnedMessage = useCallback(\n /**\n * @param {import(\"@100mslive/react-sdk\").HMSMessage | undefined} message\n */\n async message => {\n const peerName = vanillaStore.getState(selectPeerNameByID(message?.sender)) || message?.senderName;\n const newPinnedMessage = message ? (peerName ? `${peerName}: ${message.message}` : message.message) : null;\n if (newPinnedMessage !== pinnedMessage) {\n await hmsActions.sessionStore\n .set(SESSION_STORE_KEY.PINNED_MESSAGE, newPinnedMessage)\n .catch(err => ToastManager.addToast({ title: err.description }));\n }\n },\n [hmsActions, vanillaStore, pinnedMessage],\n );\n\n return { setPinnedMessage };\n};\n", "import {\n selectMessagesUnreadCountByPeerID,\n selectMessagesUnreadCountByRole,\n selectUnreadHMSMessagesCount,\n useHMSStore,\n} from '@100mslive/react-sdk';\n\nexport const useUnreadCount = ({ role, peerId }) => {\n const unreadCountSelector = role\n ? selectMessagesUnreadCountByRole(role)\n : peerId\n ? selectMessagesUnreadCountByPeerID(peerId)\n : selectUnreadHMSMessagesCount;\n\n const unreadCount = useHMSStore(unreadCountSelector);\n return unreadCount;\n};\n", "import React, { ReactNode, useCallback, useEffect, useRef, useState } from 'react';\nimport { useMedia } from 'react-use';\nimport data from '@emoji-mart/data';\nimport Picker from '@emoji-mart/react';\nimport { useHMSActions } from '@100mslive/react-sdk';\nimport { EmojiIcon, SendIcon } from '@100mslive/react-icons';\nimport { Box, config as cssConfig, Flex, IconButton as BaseIconButton, Popover, styled } from '../../..';\n// @ts-ignore\nimport { ToastManager } from '../Toast/ToastManager';\nimport { useRoomLayoutConferencingScreen } from '../../provider/roomLayoutProvider/hooks/useRoomLayoutScreen';\n// import { ChatSelectorContainer } from './ChatSelectorContainer';\n// @ts-ignore\nimport { useChatDraftMessage } from '../AppData/useChatState';\n// @ts-ignore\nimport { useEmojiPickerStyles } from './useEmojiPickerStyles';\n\nconst TextArea = styled('textarea', {\n width: '100%',\n bg: 'transparent',\n color: '$on_primary_high',\n resize: 'none',\n lineHeight: '1rem',\n position: 'relative',\n fontFamily: '$sans',\n fontSize: '100%',\n margin: 0,\n padding: 0,\n top: '$3',\n '&:focus': {\n boxShadow: 'none',\n outline: 'none',\n },\n});\n\nfunction EmojiPicker({ onSelect }: { onSelect: (emoji: any) => void }) {\n const [showEmoji, setShowEmoji] = useState(false);\n const ref = useEmojiPickerStyles(showEmoji);\n return (\n <Popover.Root open={showEmoji} onOpenChange={setShowEmoji}>\n <Popover.Trigger asChild css={{ appearance: 'none' }}>\n <BaseIconButton as=\"div\">\n <EmojiIcon />\n </BaseIconButton>\n </Popover.Trigger>\n <Popover.Portal>\n <Popover.Content\n alignOffset={-40}\n sideOffset={16}\n align=\"end\"\n css={{\n p: 0,\n }}\n >\n <Box\n css={{\n minWidth: 352,\n minHeight: 435,\n }}\n ref={ref}\n >\n <Picker onEmojiSelect={onSelect} data={data} previewPosition=\"none\" skinPosition=\"search\" />\n </Box>\n </Popover.Content>\n </Popover.Portal>\n </Popover.Root>\n );\n}\n\nexport const ChatFooter = ({\n role,\n peerId,\n onSend,\n children /* onSelect, selection, screenType */,\n}: {\n role: any;\n peerId: string;\n onSend: any;\n children: ReactNode;\n}) => {\n const hmsActions = useHMSActions();\n const inputRef = useRef<HTMLTextAreaElement>(null);\n const [draftMessage, setDraftMessage] = useChatDraftMessage();\n const isMobile = useMedia(cssConfig.media.md);\n const { elements } = useRoomLayoutConferencingScreen();\n const isOverlayChat = elements?.chat?.is_overlay;\n\n const sendMessage = useCallback(async () => {\n const message = inputRef?.current?.value;\n if (!message || !message.trim().length) {\n return;\n }\n try {\n if (role) {\n await hmsActions.sendGroupMessage(message, [role]);\n } else if (peerId) {\n await hmsActions.sendDirectMessage(message, peerId);\n } else {\n await hmsActions.sendBroadcastMessage(message);\n }\n inputRef.current.value = '';\n setTimeout(() => {\n onSend();\n }, 0);\n } catch (error) {\n const err = error as Error;\n ToastManager.addToast({ title: err.message });\n }\n }, [role, peerId, hmsActions, onSend]);\n\n useEffect(() => {\n const messageElement = inputRef.current;\n if (messageElement) {\n messageElement.value = draftMessage;\n }\n }, [draftMessage]);\n\n useEffect(() => {\n const messageElement = inputRef.current;\n return () => {\n setDraftMessage(messageElement?.value || '');\n };\n }, [setDraftMessage]);\n\n return (\n <>\n {/* {screenType !== 'hls_live_streaming' ? (\n <ChatSelectorContainer onSelect={onSelect} role={role} peerId={peerId} selection={selection} />\n ) : null} */}\n <Flex align=\"center\" css={{ gap: '$4', w: '100%' }}>\n <Flex\n align=\"center\"\n css={{\n bg: isOverlayChat && isMobile ? '$surface_dim' : '$surface_default',\n minHeight: '$16',\n maxHeight: '$24',\n position: 'relative',\n py: '$6',\n pl: '$8',\n flexGrow: 1,\n r: '$1',\n '@md': {\n minHeight: 'unset',\n h: '$14',\n boxSizing: 'border-box',\n },\n }}\n >\n {children}\n <TextArea\n css={{\n c: '$on_surface_high',\n '&:valid ~ .send-msg': { color: '$on_surface_high' },\n '& ~ .send-msg': { color: '$on_surface_low' },\n '&::placeholder': { color: '$on_surface_medium' },\n }}\n placeholder=\"Send a message....\"\n ref={inputRef}\n required\n autoFocus={!isMobile}\n onKeyPress={async event => {\n if (event.key === 'Enter') {\n if (!event.shiftKey) {\n event.preventDefault();\n await sendMessage();\n }\n }\n }}\n autoComplete=\"off\"\n aria-autocomplete=\"none\"\n onPaste={e => e.stopPropagation()}\n onCut={e => e.stopPropagation()}\n onCopy={e => e.stopPropagation()}\n />\n {!isMobile ? (\n <EmojiPicker\n onSelect={(emoji: any) => {\n if (inputRef.current) {\n inputRef.current.value += ` ${emoji.native} `;\n }\n }}\n />\n ) : null}\n <BaseIconButton\n className=\"send-msg\"\n onClick={sendMessage}\n css={{\n ml: 'auto',\n height: 'max-content',\n mr: '$4',\n '&:hover': { c: isMobile ? '' : '$on_surface_medium' },\n }}\n data-testid=\"send_msg_btn\"\n >\n <SendIcon />\n </BaseIconButton>\n </Flex>\n </Flex>\n </>\n );\n};\n", "import { useCallback } from 'react';\nimport { selectAppData, useHMSActions, useHMSStore } from '@100mslive/react-sdk';\nimport { APP_DATA } from '../../common/constants';\n\nexport const useChatDraftMessage = () => {\n const hmsActions = useHMSActions();\n let chatDraftMessage = useHMSStore(selectAppData(APP_DATA.chatDraft));\n if (chatDraftMessage === undefined || chatDraftMessage === null) {\n chatDraftMessage = '';\n }\n const setDraftMessage = useCallback(\n message => {\n hmsActions.setAppData(APP_DATA.chatDraft, message, true);\n },\n [hmsActions],\n );\n return [chatDraftMessage, setDraftMessage];\n};\n", "import { useEffect, useRef } from 'react';\n\nexport const useEmojiPickerStyles = showing => {\n const ref = useRef(null);\n useEffect(() => {\n if (showing) {\n setTimeout(() => {\n const root = ref.current?.querySelector('em-emoji-picker')?.shadowRoot;\n const style = document.createElement('style');\n style.textContent = `\n #root {\n --em-rgb-color: var(--hms-ui-colors-on_surface_high);\n --em-rgb-input: var(--hms-ui-colors-on_primary_high);\n --em-color-border: var(--hms-ui-colors-surface_bright);\n --color-b: var(--hms-ui-colors-on_surface_high);\n --rgb-background: transparent;\n color: var(--hms-ui-colors-on_surface_high);\n font-family: var(--hms-ui-fonts-sans);\n }\n .sticky {\n top: 0.25rem;\n background-color: var(--hms-ui-colors-surface_bright);\n margin-top: 0.5rem;\n }\n `;\n root?.appendChild(style);\n }, 0);\n }\n }, [showing]);\n\n return ref;\n};\n", "import React, { useEffect, useRef, useState } from 'react';\nimport { useMeasure } from 'react-use';\nimport { FixedSizeList } from 'react-window';\nimport { selectIsConnectedToRoom, useHMSStore, usePaginatedParticipants } from '@100mslive/react-sdk';\nimport { ChevronLeftIcon, CrossIcon } from '@100mslive/react-icons';\nimport { Button } from '../../../Button';\nimport { IconButton } from '../../../IconButton';\nimport { Box, Flex } from '../../../Layout';\nimport { Loading } from '../../../Loading';\nimport { Text } from '../../../Text';\n// @ts-ignore: No implicit Any\nimport { ParticipantSearch } from './ParticipantList';\nimport { itemKey, ROW_HEIGHT, VirtualizedParticipantItem } from './RoleAccordion';\n// @ts-ignore: No implicit Any\nimport { useSidepaneReset } from '../AppData/useSidepane';\n// @ts-ignore: No implicit Any\nimport { getFormattedCount } from '../../common/utils';\n\nexport const PaginatedParticipants = ({ roleName, onBack }: { roleName: string; onBack: () => void }) => {\n const { peers, total, loadPeers, loadMorePeers } = usePaginatedParticipants({ role: roleName, limit: 20 });\n const [search, setSearch] = useState<string>('');\n const [isLoading, setIsLoading] = useState(false);\n const filteredPeers = peers.filter(p => p.name?.toLowerCase().includes(search));\n const isConnected = useHMSStore(selectIsConnectedToRoom);\n const [ref, { width }] = useMeasure<HTMLDivElement>();\n const containerRef = useRef<HTMLDivElement | null>(null);\n const height = ROW_HEIGHT * peers.length;\n const resetSidePane = useSidepaneReset();\n const hasNext = total > peers.length;\n\n useEffect(() => {\n loadPeers();\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, []);\n\n return (\n <Flex ref={ref} direction=\"column\" css={{ size: '100%', gap: '$4' }}>\n <Flex align=\"center\">\n <Flex align=\"center\" css={{ flex: '1 1 0', cursor: 'pointer' }} onClick={onBack}>\n <ChevronLeftIcon />\n <Text variant=\"lg\" css={{ flex: '1 1 0' }}>\n Participants\n </Text>\n </Flex>\n <IconButton\n onClick={e => {\n e.stopPropagation();\n resetSidePane();\n }}\n data-testid=\"close_sidepane\"\n >\n <CrossIcon />\n </IconButton>\n </Flex>\n <ParticipantSearch onSearch={(search: string) => setSearch(search)} placeholder={`Search for ${roleName}`} />\n <Flex direction=\"column\" css={{ border: '1px solid $border_default', borderRadius: '$1', flex: '1 1 0' }}>\n <Flex align=\"center\" css={{ height: ROW_HEIGHT, borderBottom: '1px solid $border_default', px: '$8' }}>\n <Text css={{ fontSize: '$space$7' }}>\n {roleName}({getFormattedCount(peers.length)}/{getFormattedCount(total)})\n </Text>\n </Flex>\n <Box css={{ flex: '1 1 0', overflowY: 'auto', overflowX: 'hidden', mr: '-$10' }}>\n <FixedSizeList\n itemSize={ROW_HEIGHT}\n itemData={{ peerList: filteredPeers, isConnected: isConnected === true }}\n itemKey={itemKey}\n itemCount={filteredPeers.length}\n width={width}\n height={height}\n outerRef={containerRef}\n >\n {VirtualizedParticipantItem}\n </FixedSizeList>\n {hasNext ? (\n <Flex justify=\"center\" css={{ w: '100%' }}>\n <Button\n css={{ w: 'max-content', p: '$4' }}\n onClick={() => {\n setIsLoading(true);\n loadMorePeers()\n .catch(console.error)\n .finally(() => setIsLoading(false));\n }}\n disabled={isLoading}\n >\n {isLoading ? <Loading size={16} /> : 'Load More'}\n </Button>\n </Flex>\n ) : null}\n </Box>\n </Flex>\n </Flex>\n );\n};\n", "import React, { Fragment, useState } from 'react';\nimport { selectPermissions, useHMSStore, useRecordingStreaming } from '@100mslive/react-sdk';\nimport { ColoredHandIcon, CrossIcon, GoLiveIcon } from '@100mslive/react-icons';\nimport { Box, Flex } from '../../../Layout';\nimport { Text } from '../../../Text';\nimport IconButton from '../../IconButton';\nimport RTMPIcon from '../../images/rtmp.png';\nimport { StreamCard } from './Common';\nimport { HLSStreaming } from './HLSStreaming';\nimport { RTMPStreaming } from './RTMPStreaming';\nimport { useSidepaneToggle } from '../AppData/useSidepane';\nimport { SIDE_PANE_OPTIONS } from '../../common/constants';\n\nexport const StreamingLanding = () => {\n const toggleStreaming = useSidepaneToggle(SIDE_PANE_OPTIONS.STREAMING);\n const { isHLSRunning, isRTMPRunning } = useRecordingStreaming();\n const permissions = useHMSStore(selectPermissions);\n const [showHLS, setShowHLS] = useState(isHLSRunning);\n const [showRTMP, setShowRTMP] = useState(isRTMPRunning);\n\n if (!permissions?.hlsStreaming && !permissions?.rtmpStreaming) {\n toggleStreaming();\n return null;\n }\n\n return (\n <Fragment>\n <Flex css={{ w: '100%', py: '$8' }}>\n <Box\n css={{\n alignSelf: 'center',\n p: '$4',\n bg: '$surface_bright',\n r: '$round',\n }}\n >\n <ColoredHandIcon width={40} height={40} />\n </Box>\n <Box css={{ flex: '1 1 0', mx: '$8' }}>\n <Text variant=\"sm\">Welcome !</Text>\n <Text variant=\"h6\">Let\u2019s get you started</Text>\n </Box>\n <IconButton onClick={toggleStreaming} css={{ alignSelf: 'flex-start' }} data-testid=\"close_streaming\">\n <CrossIcon />\n </IconButton>\n </Flex>\n <Text variant=\"tiny\" color=\"$on_surface_medium\">\n Start Streaming\n </Text>\n {permissions?.hlsStreaming && (\n <StreamCard\n testId=\"hls_stream\"\n title=\"Live Stream with HLS\"\n subtitle=\"Stream to millions, edit and control what the viewer sees and more!\"\n css={{ my: '$8' }}\n onClick={() => setShowHLS(true)}\n Icon={GoLiveIcon}\n />\n )}\n {permissions?.rtmpStreaming && (\n <StreamCard\n testId=\"rtmp_stream\"\n title=\"Stream live to Facebook, Twitch, and others\"\n subtitle=\"Stream to a specific destination directly from your app.\"\n css={{ my: '$8' }}\n onClick={() => {\n setShowRTMP(true);\n }}\n imgSrc={RTMPIcon}\n />\n )}\n {showHLS && <HLSStreaming onBack={() => setShowHLS(false)} />}\n {showRTMP && <RTMPStreaming onBack={() => setShowRTMP(false)} />}\n </Fragment>\n );\n};\n", "import React, { Fragment, useCallback, useEffect, useState } from 'react';\nimport { selectRoomID, useHMSActions, useHMSStore, useRecordingStreaming } from '@100mslive/react-sdk';\nimport {\n EndStreamIcon,\n EyeOpenIcon,\n GoLiveIcon,\n InfoIcon,\n LinkIcon,\n PeopleIcon,\n SupportIcon,\n WrenchIcon,\n} from '@100mslive/react-icons';\nimport { Box, Button, Flex, Loading, Text } from '../../../';\nimport { Container, ContentBody, ContentHeader, ErrorText, RecordStream } from './Common';\nimport { useSetAppDataByKey } from '../AppData/useUISettings';\nimport { useFilteredRoles } from '../../common/hooks';\nimport { APP_DATA } from '../../common/constants';\n\nconst getCardData = (roleName, roomId) => {\n let data = {};\n const formattedRoleName = roleName[0].toUpperCase() + roleName.slice(1);\n\n switch (roleName) {\n case 'broadcaster': {\n data = {\n title: formattedRoleName,\n content: 'Broadcasters can livestream audio or video, manage stream appearance and control the room via HLS.',\n icon: <SupportIcon />,\n };\n break;\n }\n case 'hls-viewer': {\n data = {\n title: 'HLS Viewer',\n content:\n 'Viewers can view and send chat messages, but need to be made broadcasters to participate with audio or video.',\n icon: <EyeOpenIcon />,\n };\n break;\n }\n default:\n data = {\n title: formattedRoleName,\n content: `${formattedRoleName} is customised with specific permissions, which will determine how it interacts with this room.`,\n icon: <WrenchIcon />,\n order: 1,\n };\n }\n data['link'] = `/${roomId}/${roleName}`;\n return data;\n};\n\nconst Card = ({ title, icon, link, content, isHLSRunning, order = 0 }) => {\n const [copied, setCopied] = useState(false);\n return isHLSRunning ? (\n <Box\n key={title}\n css={{\n backgroundColor: '$surface_bright',\n padding: '$10',\n order,\n borderRadius: '$2',\n }}\n >\n <Flex align=\"center\" gap=\"2\" css={{ color: '$primary_bright' }}>\n {icon}\n <Text variant=\"h6\" css={{ fontWeight: '$semiBold' }}>\n {title}\n </Text>\n </Flex>\n <Text variant=\"sm\" css={{ color: '$on_surface_medium', mt: '$6' }}>\n {content}\n </Text>\n <Button\n variant=\"standard\"\n onClick={() => {\n navigator.clipboard.writeText(`${window.location.origin}${link}`);\n setCopied(true);\n setTimeout(() => setCopied(false), 2000);\n }}\n css={{ w: '100%', r: '$1', mt: '$10', fontWeight: '$semiBold' }}\n icon\n >\n {copied ? (\n <>Link copied!</>\n ) : (\n <>\n <LinkIcon style={{ color: 'inherit' }} />\n Copy Invite Link\n </>\n )}\n </Button>\n </Box>\n ) : null;\n};\n\nexport const HLSStreaming = ({ onBack }) => {\n const roleNames = useFilteredRoles();\n const roomId = useHMSStore(selectRoomID);\n const cards = roleNames.map(roleName => getCardData(roleName, roomId));\n\n const { isHLSRunning } = useRecordingStreaming();\n const [showLinks, setShowLinks] = useState(false);\n return !showLinks ? (\n <Container rounded>\n <ContentHeader title=\"Start Streaming\" content=\"HLS\" onBack={onBack} />\n <ContentBody title=\"HLS Streaming\" Icon={GoLiveIcon} removeVerticalPadding>\n Stream directly from the browser using any device with multiple hosts and real-time messaging, all within this\n platform.\n </ContentBody>\n {isHLSRunning ? <EndHLS setShowLinks={setShowLinks} /> : <StartHLS />}\n </Container>\n ) : (\n <Container rounded>\n <ContentHeader title=\"Invite People\" content=\"Start the conversation\" onBack={() => setShowLinks(false)} />\n\n <Flex direction=\"column\" css={{ gap: '$10', p: '$0 $10', overflowY: 'auto', mb: '$10' }}>\n {cards.map(card => (\n <Card key={card.title} {...card} isHLSRunning={isHLSRunning} />\n ))}\n </Flex>\n </Container>\n );\n};\n\nconst StartHLS = () => {\n const [record, setRecord] = useState(false);\n const [error, setError] = useState(false);\n const hmsActions = useHMSActions();\n const [isHLSStarted, setHLSStarted] = useSetAppDataByKey(APP_DATA.hlsStarted);\n const startHLS = useCallback(\n async variants => {\n try {\n if (isHLSStarted) {\n return;\n }\n setHLSStarted(true);\n setError('');\n await hmsActions.startHLSStreaming({\n variants,\n recording: { hlsVod: record, singleFilePerLayer: record },\n });\n } catch (error) {\n setHLSStarted(false);\n setError(error.message);\n }\n },\n [hmsActions, record, isHLSStarted, setHLSStarted],\n );\n\n return (\n <Fragment>\n <RecordStream record={record} setRecord={setRecord} testId=\"hls-recording\" />\n <Box css={{ p: '$4 $10' }}>\n <ErrorText error={error} />\n <Button\n data-testid=\"start_hls\"\n css={{ w: '100%', r: '$0' }}\n icon\n onClick={() => startHLS()}\n disabled={isHLSStarted}\n >\n {isHLSStarted ? <Loading size={24} color=\"currentColor\" /> : <GoLiveIcon />}\n {isHLSStarted ? 'Starting stream...' : 'Go Live'}\n </Button>\n </Box>\n <Flex align=\"center\" css={{ p: '$4 $10' }}>\n <Text>\n <InfoIcon width={16} height={16} />\n </Text>\n <Text variant=\"tiny\" color=\"$on_surface_medium\" css={{ mx: '$8' }}>\n You cannot start recording once the stream starts, you will have to stop the stream to enable recording.\n </Text>\n </Flex>\n </Fragment>\n );\n};\n\nconst EndHLS = ({ setShowLinks }) => {\n const hmsActions = useHMSActions();\n\n const [inProgress, setInProgress] = useState(false);\n const [error, setError] = useState('');\n const { isHLSRunning } = useRecordingStreaming();\n\n useEffect(() => {\n if (inProgress && !isHLSRunning) {\n setInProgress(false);\n }\n }, [inProgress, isHLSRunning]);\n\n return (\n <Box css={{ p: '$4 $10' }}>\n <ErrorText error={error} />\n <Button\n data-testid=\"stop_hls\"\n variant=\"danger\"\n css={{ w: '100%', r: '$0', mt: '$8' }}\n icon\n loading={inProgress}\n disabled={inProgress}\n onClick={async () => {\n try {\n setInProgress(true);\n await hmsActions.stopHLSStreaming();\n } catch (error) {\n setError(error.message);\n setInProgress(false);\n }\n }}\n >\n <EndStreamIcon />\n End Stream\n </Button>\n <Button icon css={{ w: '100%', r: '$0', mt: '$8' }} onClick={() => setShowLinks(true)}>\n <PeopleIcon /> Invite People\n </Button>\n </Box>\n );\n};\n", "import React from 'react';\nimport { ColoredTimeIcon } from '@100mslive/react-icons';\nimport { Box, Flex } from '../../Layout';\nimport { Text } from '../../Text';\n\nexport const WaitingView = React.memo(() => {\n return (\n <Box\n css={{\n overflow: 'hidden',\n w: '96%',\n maxWidth: '96%',\n h: '100%',\n m: 'auto',\n background: '$surface_default',\n borderRadius: '$3',\n }}\n data-testid=\"waiting_view\"\n >\n <Flex\n align=\"center\"\n direction=\"column\"\n css={{\n w: '$96',\n textAlign: 'center',\n margin: 'auto',\n h: '100%',\n justifyContent: 'center',\n gap: '$8',\n }}\n >\n <ColoredTimeIcon width=\"80px\" height=\"80px\" />\n <Flex\n direction=\"column\"\n css={{\n w: '$80',\n p: '$1',\n gap: '$4',\n }}\n >\n <Text color=\"white\" variant=\"h6\" css={{ '@md': { fontSize: '$md' } }}>\n Please wait\n </Text>\n <Text color=\"$on_surface_medium\" css={{ mt: '$4', '@md': { fontSize: '$sm' } }}>\n Sit back and relax till others let you join.\n </Text>\n </Flex>\n </Flex>\n </Box>\n );\n});\n"],
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,OAAOA,WAAS,aAAAC,aAAW,UAAAC,UAAQ,YAAAC,kBAAgB;AACnD,SAAS,aAAa,iBAAiB;AACvC,SAAS,mBAAmB;AAC5B;AAAA,EACE;AAAA,EACA,iBAAAC;AAAA,EACA,2BAAAC;AAAA,EACA;AAAA,EACA,iBAAAC;AAAA,EACA,eAAAC;AAAA,OACK;;;ACVP,OAAOC,WAAS,UAAU,aAAAC,kBAAiB;AAC3C,SAAS,YAAAC,iBAAgB;AAMzB,SAAS,sBAAsB;AAC/B,SAAS,eAAAC,oBAAmB;;;ACR5B,OAAOC,UAAS,UAAU,gBAAgB;AAC1C,SAAS,gBAAgB;AACzB,OAAO,UAAU;AACjB,SAAS,YAAY;AACrB;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EAEA;AAAA,OAEK;AACP,SAAS,iBAAiB;;;ACb1B,OAAO,WAAW;AAKlB,IAAM,oBAAoB;AAAA,EACxB,CAAC,EAAE,SAAS,KAAK,GAAG,EAAE,SAAS,KAAK,GAAG,EAAE,SAAS,OAAO,GA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", "selectIsConnectedToRoom", "useHMSActions", "useHMSStore", "React", "useEffect", "useMedia", "useAVToggle", "React", "data", "React", "React", "useMedia", "selectIsConnectedToRoom", "selectPermissions", "useHMSStore", "React", "Fragment", "useState", "selectIsConnectedToRoom", "useHMSStore", "React", "React", "React", "React", "React", "AlertTriangleIcon", "CrossIcon", "React", "AlertTriangleIcon", "CrossIcon", "useState", "useHMSStore", "selectIsConnectedToRoom", "React", "Fragment", "React", "Fragment", "useState", "selectIsConnectedToRoom", "selectPermissions", "useHMSStore", "useRecordingStreaming", "ExitIcon", "StopIcon", "useState", "useHMSStore", "selectIsConnectedToRoom", "selectPermissions", "useRecordingStreaming", "React", "Fragment", "ExitIcon", "StopIcon", "useHMSStore", "selectIsConnectedToRoom", "selectPermissions", "useMedia", "React", "React", "useMedia", "React", "Fragment", "useState", "selectLocalPeerID", "useHMSActions", "useHMSStore", "CheckIcon", "InfoIcon", "PipIcon", "SettingsIcon", "React", "React", "useEffect", "useState", "useHMSActions", "useHMSStore", "isMicActive", "_a", "_b", "isCamActive", "useState", "useHMSActions", "React", "useHMSStore", "useEffect", "React", "React", "useState", "useHMSActions", "useHMSStore", "React", "useHMSStore", "useState", "useHMSActions", "React", "useState", "selectPermissions", "useHMSActions", "useHMSStore", "useRecordingStreaming", "AlertTriangleIcon", "React", "useCallback", "useState", "useState", "useCallback", "React", "React", "useEffect", "useRef", "useState", "useHMSActions", "useRecordingStreaming", "React", "selectPermissions", "useHMSStore", "CrossIcon", "React", "CrossIcon", "useHMSStore", "selectPermissions", "useRecordingStreaming", "React", "useState", "useHMSActions", "error", "useEffect", "useRef", "useHMSStore", "selectPermissions", "useState", "useRecordingStreaming", "useHMSActions", "React", "AlertTriangleIcon", "React", "useEffect", "useRef", "useState", "selectLocalPeerID", "selectTracksMap", "useHMSStore", "useState", "useRef", "useEffect", "React", "useHMSStore", "selectTracksMap", "selectLocalPeerID", "React", "useCallback", "useRef", "useState", "useHMSActions", "AlertTriangleIcon", "CheckIcon", "useHMSActions", "useRef", "useState", "useCallback", "React", "selectedRole", "CheckIcon", "AlertTriangleIcon", "React", "useCallback", "useEffect", "useState", "useState", "useCallback", "useEffect", "React", "React", "useCallback", "useState", "useHMSActions", "React", "React", "useHMSActions", "useState", "useCallback", "React", "useHMSStore", "selectLocalPeerID", "useHMSActions", "useState", "React", "Fragment", "CheckIcon", "PipIcon", "SettingsIcon", "InfoIcon", "React", "useRef", "useState", "selectIsConnectedToRoom", "selectPermissions", "useHMSActions", "useHMSStore", "useRecordingStreaming", "BrbIcon", "CrossIcon", "DragHandleIcon", "EmojiIcon", "RecordIcon", "SettingsIcon", "React", "useState", "useMedia", "useHMSActions", "useHMSStore", "React", "ChevronLeftIcon", "CrossIcon", "React", "ChevronLeftIcon", "CrossIcon", "useHMSActions", "useHMSStore", "useState", "useMedia", "React", "MODALS", "useHMSActions", "useHMSStore", "selectPermissions", "selectIsConnectedToRoom", "useRecordingStreaming", "useState", "useRef", "React", "DragHandleIcon", "CrossIcon", "EmojiIcon", "BrbIcon", "SettingsIcon", "RecordIcon", "useMedia", "React", "React", "HandIcon", "React", "HandIcon", "React", "Fragment", "useHMSStore", "useScreenShare", "React", "Fragment", "useState", "VerticalMenuIcon", "React", "useState", "React", "React", "React", "React", "React", "TrashIcon", "React", "InfoIcon", "React", "InfoIcon", "React", "TrashIcon", "useState", "React", "MODALS", "useState", "React", "Fragment", "VerticalMenuIcon", "useHMSStore", "useScreenShare", "React", "Fragment", "React", "useHMSStore", "useHMSStore", "React", "React", "Fragment", "useCallback", "useEffect", "useState", "useMedia", "selectIsLargeRoom", "selectLocalPeerID", "selectPeerCount", "selectPermissions", "useHMSActions", "useHMSStore", "ChangeRoleIcon", "HandIcon", "MicOffIcon", "PeopleIcon", "VerticalMenuIcon", "React", "useEffect", "useHMSStore", "ChevronRightIcon", "React", "useState", "selectPermissions", "useHMSActions", "useHMSStore", "useHMSVanillaStore", "MicOffIcon", "VerticalMenuIcon", "useState", "useHMSStore", "selectPermissions", "useHMSActions", "useHMSVanillaStore", "React", "VerticalMenuIcon", "MicOffIcon", "data", "React", "useHMSStore", "useEffect", "ChevronRightIcon", "useState", "useHMSStore", "selectIsLargeRoom", "useCallback", "React", "Fragment", "selectPeerCount", "useEffect", "PeopleIcon", "selectLocalPeerID", "selectPermissions", "HandIcon", "MicOffIcon", "useHMSActions", "VerticalMenuIcon", "ChangeRoleIcon", "useMedia", "React", "Footer", "useMedia", "useAVToggle", "useEffect", "React", "useCallback", "useState", "selectHLSState", "useHMSActions", "useHMSStore", "useHMSStore", "selectHLSState", "useState", "useHMSActions", "useCallback", "React", "React", "useEffect", "selectLocalPeerName", "useCustomEvent", "useHMSActions", "useHMSStore", "React", "useMedia", "useMedia", "React", "useHMSActions", "useHMSStore", "selectLocalPeerName", "useCustomEvent", "useEffect", "React", "React", "Suspense", "useEffect", "selectIsConnectedToRoom", "selectLocalPeerRoleName", "useHMSActions", "useHMSStore", "React", "useEffect", "useMemo", "useState", "selectPeers", "useHMSStore", "useHMSVanillaStore", "React", "useEffect", "useMemo", "useState", "useMedia", "selectLocalPeer", "useHMSStore", "React", "useEffect", "useRef", "useMedia", "selectIsAllowedToPublish", "selectVideoTrackByID", "useHMSStore", "ExpandIcon", "React", "Fragment", "useCallback", "useRef", "useState", "useMedia", "selectHasPeerHandRaised", "selectIsPeerAudioEnabled", "selectLocalPeerID", "selectPeerMetadata", "selectSessionStore", "selectVideoTrackByPeerID", "useHMSStore", "HandIcon", "MicOffIcon", "React", "useState", "useMedia", "selectLocalPeerID", "selectPeerByID", "selectPermissions", "selectTrackByID", "useHMSStore", "useRemoteAVToggle", "CrossIcon", "VerticalMenuIcon", "React", "Fragment", "useMedia", "selectPermissions", "useCustomEvent", "useHMSActions", "useHMSStore", "MicOffIcon", "MicOnIcon", "PencilIcon", "RemoveUserIcon", "ShareScreenIcon", "StarIcon", "VideoOffIcon", "VideoOnIcon", "useHMSActions", "useHMSStore", "React", "StarIcon", "Fragment", "selectPermissions", "useCustomEvent", "useMedia", "PencilIcon", "VideoOnIcon", "VideoOffIcon", "MicOnIcon", "MicOffIcon", "RemoveUserIcon", "ShareScreenIcon", "useState", "useHMSStore", "selectLocalPeerID", "selectPermissions", "useRemoteAVToggle", "selectTrackByID", "useMedia", "selectPeerByID", "React", "VerticalMenuIcon", "CrossIcon", "selectVideoTrackByPeerID", "useHMSStore", "useMedia", "selectLocalPeerID", "selectIsPeerAudioEnabled", "useState", "selectSessionStore", "useCallback", "useRef", "React", "MicOffIcon", "selectPeerMetadata", "selectHasPeerHandRaised", "Fragment", "HandIcon", "React", "React", "ExpandIcon", "useMedia", "useHMSStore", "selectVideoTrackByID", "selectIsAllowedToPublish", "useRef", "useEffect", "React", "useEffect", "ChevronLeftIcon", "ChevronRightIcon", "useEffect", "React", "ChevronLeftIcon", "ChevronRightIcon", "React", "React", "useEffect", "useMemo", "useState", "useMeasure", "useMedia", "selectTracksMap", "useHMSVanillaStore", "useHMSVanillaStore", "selectTracksMap", "useMemo", "useMeasure", "useMedia", "useState", "useEffect", "useHMSStore", "selectLocalPeer", "useMedia", "useMemo", "useState", "useEffect", "React", "page", "React", "useEffect", "useState", "selectLocalPeer", "useHMSStore", "React", "useEffect", "useState", "useMedia", "React", "React", "useMedia", "useState", "useEffect", "React", "page", "useMemo", "useMemo", "useHMSStore", "selectLocalPeer", "useState", "useEffect", "React", "page", "React", "useEffect", "useMemo", "useState", "useMedia", "useHMSStore", "React", "useRef", "useState", "useFullscreen", "screenfull", "selectLocalPeerID", "selectPeerByID", "useHMSStore", "ExpandIcon", "ShrinkIcon", "React", "useHMSActions", "CrossIcon", "ShareScreenIcon", "useHMSActions", "React", "ShareScreenIcon", "CrossIcon", "Tile", "useHMSStore", "selectLocalPeerID", "selectPeerByID", "useState", "useRef", "useFullscreen", "screenfull", "React", "ShrinkIcon", "ExpandIcon", "useHMSStore", "useState", "useMedia", "useMemo", "useEffect", "React", "useHMSStore", "selectPeers", "useMemo", "useHMSVanillaStore", "useState", "useEffect", "React", "React", "useCallback", "useEffect", "useMemo", "useRef", "useState", "selectPeers", "selectPeerScreenSharing", "useHMSStore", "useScreenShare", "React", "useHMSStore", "selectPeers", "selectPeerScreenSharing", "useMemo", "smallTilePeers", "useEffect", "useScreenShare", "useState", "useRef", "useCallback", "React", "useCallback", "useEffect", "useRef", "useState", "throwErrorHandler", "useScreenShare", "React", "useRef", "useState", "useScreenShare", "throwErrorHandler", "useCallback", "useEffect", "React", "useMedia", "selectAppData", "selectVideoTrackByPeerID", "useHMSStore", "React", "useEffect", "useState", "useMedia", "selectPeerCount", "useHMSStore", "CrossIcon", "React", "useCallback", "useEffect", "useRef", "useState", "useMedia", "selectPeerNameByID", "selectPermissions", "selectSessionStore", "useHMSActions", "useHMSStore", "ChevronDownIcon", "CrossIcon", "PinIcon", "React", "Fragment", "useCallback", "useEffect", "useMemo", "useRef", "useState", "useMedia", "selectLocalPeerID", "selectLocalPeerRoleName", "selectPeerNameByID", "selectPermissions", "useHMSActions", "useHMSStore", "PinIcon", "VerticalMenuIcon", "useCallback", "selectPeerNameByID", "useHMSActions", "useHMSStore", "useHMSVanillaStore", "useHMSActions", "useHMSVanillaStore", "useHMSStore", "useCallback", "selectPeerNameByID", "selectUnreadHMSMessagesCount", "useHMSStore", "React", "useHMSStore", "selectPeerNameByID", "selectLocalPeerRoleName", "Fragment", "useState", "VerticalMenuIcon", "PinIcon", "useRef", "useEffect", "useMedia", "useHMSActions", "selectLocalPeerID", "selectPermissions", "useCallback", "useMemo", "React", "useCallback", "useEffect", "useRef", "useState", "useMedia", "data", "useHMSActions", "EmojiIcon", "useCallback", "selectAppData", "useHMSActions", "useHMSStore", "useHMSActions", "useHMSStore", "selectAppData", "useCallback", "useEffect", "useRef", "useState", "React", "EmojiIcon", "data", "useHMSActions", "useRef", "useMedia", "useCallback", "_a", "useEffect", "useHMSStore", "selectPermissions", "selectSessionStore", "React", "PinIcon", "CrossIcon", "selectPeerNameByID", "useState", "useRef", "useHMSActions", "useEffect", "useMedia", "useCallback", "_a", "ChevronDownIcon", "React", "useEffect", "useRef", "useState", "useMeasure", "FixedSizeList", "selectIsConnectedToRoom", "useHMSStore", "usePaginatedParticipants", "ChevronLeftIcon", "CrossIcon", "usePaginatedParticipants", "useState", "useHMSStore", "selectIsConnectedToRoom", "useMeasure", "useRef", "useEffect", "React", "ChevronLeftIcon", "CrossIcon", "search", "FixedSizeList", "ParticipantCount", "React", "useState", "useHMSStore", "selectPeerCount", "useMedia", "useEffect", "CrossIcon", "React", "Fragment", "useState", "selectPermissions", "useHMSStore", "useRecordingStreaming", "CrossIcon", "GoLiveIcon", "React", "Fragment", "useCallback", "useEffect", "useState", "useHMSActions", "useHMSStore", "useRecordingStreaming", "EndStreamIcon", "GoLiveIcon", "InfoIcon", "PeopleIcon", "data", "React", "useState", "useHMSStore", "useRecordingStreaming", "GoLiveIcon", "useHMSActions", "useCallback", "error", "Fragment", "InfoIcon", "useEffect", "EndStreamIcon", "PeopleIcon", "useRecordingStreaming", "useHMSStore", "selectPermissions", "useState", "React", "Fragment", "CrossIcon", "GoLiveIcon", "useMedia", "useHMSStore", "selectAppData", "selectVideoTrackByPeerID", "React", "React", "React", "React", "useHMSStore", "selectLocalPeerRoleName", "selectIsConnectedToRoom", "useHMSActions", "useEffect", "Suspense", "useHMSStore", "selectIsConnectedToRoom", "useHMSActions", "useState", "selectAppData", "useRef", "_a", "useEffect", "React", "Footer"]
|
7
|
-
}
|