@100mslive/roomkit-react 0.1.6-alpha.2 → 0.1.6

Sign up to get free protection for your applications and to get access to all the features.
Files changed (37) hide show
  1. package/dist/{HLSView-QMU5JK7U.js → HLSView-4NSE37G7.js} +3 -3
  2. package/dist/Prebuilt/components/Leave/DesktopLeaveRoom.d.ts +2 -1
  3. package/dist/Prebuilt/components/Leave/MwebLeaveRoom.d.ts +2 -1
  4. package/dist/{VirtualBackground-37FXUPYO.js → VirtualBackground-A5UM363O.js} +3 -3
  5. package/dist/{chunk-ZKE2N5LH.js → chunk-BUWIMYLW.js} +2 -2
  6. package/dist/{chunk-KBVIZGYW.js → chunk-NMOZ33TX.js} +2 -2
  7. package/dist/{chunk-KBVIZGYW.js.map → chunk-NMOZ33TX.js.map} +1 -1
  8. package/dist/{chunk-WVGGQZK4.js → chunk-Q6U22HIE.js} +65 -77
  9. package/dist/chunk-Q6U22HIE.js.map +7 -0
  10. package/dist/{conference-FJJQ4TXX.js → conference-S7R3O4OC.js} +72 -50
  11. package/dist/conference-S7R3O4OC.js.map +7 -0
  12. package/dist/index.cjs.js +165 -153
  13. package/dist/index.cjs.js.map +3 -3
  14. package/dist/index.js +2 -2
  15. package/dist/meta.cjs.json +43 -43
  16. package/dist/meta.esbuild.json +75 -75
  17. package/package.json +6 -6
  18. package/src/Button/Button.tsx +6 -6
  19. package/src/Prebuilt/components/Chat/Chat.jsx +1 -3
  20. package/src/Prebuilt/components/Chat/useEmojiPickerStyles.js +1 -0
  21. package/src/Prebuilt/components/Footer/Footer.tsx +1 -1
  22. package/src/Prebuilt/components/Footer/ParticipantList.jsx +4 -3
  23. package/src/Prebuilt/components/Footer/RoleAccordion.tsx +1 -1
  24. package/src/Prebuilt/components/Header/HeaderComponents.jsx +2 -8
  25. package/src/Prebuilt/components/Leave/DesktopLeaveRoom.tsx +7 -9
  26. package/src/Prebuilt/components/Leave/LeaveRoom.tsx +6 -2
  27. package/src/Prebuilt/components/Leave/MwebLeaveRoom.tsx +7 -4
  28. package/src/Prebuilt/components/Notifications/Notifications.jsx +4 -10
  29. package/src/Prebuilt/components/RoleChangeRequestModal.tsx +1 -2
  30. package/src/Prebuilt/components/ScreenshareTile.jsx +15 -7
  31. package/src/Prebuilt/components/SidePaneTabs.tsx +78 -57
  32. package/src/Prebuilt/components/conference.jsx +9 -1
  33. package/dist/chunk-WVGGQZK4.js.map +0 -7
  34. package/dist/conference-FJJQ4TXX.js.map +0 -7
  35. /package/dist/{HLSView-QMU5JK7U.js.map → HLSView-4NSE37G7.js.map} +0 -0
  36. /package/dist/{VirtualBackground-37FXUPYO.js.map → VirtualBackground-A5UM363O.js.map} +0 -0
  37. /package/dist/{chunk-ZKE2N5LH.js.map → chunk-BUWIMYLW.js.map} +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/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/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/layouts/VideoStreamingSection.tsx", "../src/Prebuilt/components/VideoLayouts/GridLayout.tsx", "../src/Prebuilt/components/VideoLayouts/EqualProminence.tsx", "../src/Prebuilt/components/InsetTile.tsx", "../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/ChatFooter.tsx", "../src/Prebuilt/components/AppData/useChatState.js", "../src/Prebuilt/components/Chat/useEmojiPickerStyles.js", "../src/Prebuilt/components/Chat/useUnreadCount.js", "../src/Prebuilt/components/Streaming/StreamingLanding.jsx", "../src/Prebuilt/components/Streaming/HLSStreaming.jsx", "../src/Prebuilt/layouts/WaitingView.jsx", "../src/Prebuilt/components/RoleChangeRequestModal.tsx"],
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 { Box, Flex } from '../../Layout';\nimport { useHMSPrebuiltContext } from '../AppContext';\nimport { VideoStreamingSection } from '../layouts/VideoStreamingSection';\nimport FullPageProgress from './FullPageProgress';\nimport { Header } from './Header';\nimport { RoleChangeRequestModal } from './RoleChangeRequestModal';\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 } = 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\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 (authTokenInAppData && !isConnectedToRoom && !isPreviewScreenEnabled && roomState !== HMSRoomState.Connecting) {\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 }\n }, [authTokenInAppData, endpoints?.init, hmsActions, isConnectedToRoom, isPreviewScreenEnabled, roomState, userName]);\n\n useEffect(() => {\n return () => {\n PictureInPicture.stop().catch(error => console.error('stopping pip', error));\n };\n }, []);\n\n if (!isConnectedToRoom) {\n return <FullPageProgress text=\"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 { 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 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 ? 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 {screenType === 'hls_live_streaming' ? <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 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\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} />\n ) : (\n <DesktopLeaveRoom leaveRoom={leaveRoom} screenType={screenType} />\n );\n};\n", "import React, { Fragment, useState } from 'react';\nimport { ConferencingScreen } from '@100mslive/types-prebuilt';\nimport { selectIsConnectedToRoom, selectPermissions, useHMSStore, useRecordingStreaming } from '@100mslive/react-sdk';\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 { 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}: {\n leaveRoom: (args: { endstream: boolean }) => void;\n screenType: keyof ConferencingScreen;\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 = permissions?.hlsStreaming && isStreamingOn;\n\n useDropdownList({ open: open || showEndStreamAlert || showLeaveRoomAlert, name: 'LeaveRoom' });\n\n if (!permissions || !isConnected) {\n return null;\n }\n\n return (\n <Fragment>\n {permissions.hlsStreaming ? (\n <Flex>\n <LeaveIconButton\n key=\"LeaveRoom\"\n data-testid=\"leave_room_btn\"\n css={{\n borderTopRightRadius: 0,\n borderBottomRightRadius: 0,\n }}\n onClick={() => {\n if (screenType === 'hls_live_streaming') {\n setShowLeaveRoomAlert(true);\n } else {\n leaveRoom({ endstream: false });\n }\n }}\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_low',\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 {isStreamingOn && permissions?.hlsStreaming ? (\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 ) : null}\n </Dropdown.Content>\n </Dropdown.Root>\n </Flex>\n ) : (\n <LeaveIconButton\n onClick={() => {\n if (screenType === 'hls_live_streaming') {\n setShowLeaveRoomAlert(true);\n } else {\n leaveRoom({ endstream: false });\n }\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 <Dialog.Portal>\n <Dialog.Overlay />\n <Dialog.Content css={{ w: 'min(420px, 90%)', p: '$8', bg: '$surface_dim' }}>\n <EndSessionContent\n setShowEndStreamAlert={setShowEndStreamAlert}\n leaveRoom={leaveRoom}\n isStreamingOn={isStreamingOn}\n isModal\n />\n </Dialog.Content>\n </Dialog.Portal>\n </Dialog.Root>\n\n {screenType === 'hls_live_streaming' ? (\n <Dialog.Root open={showLeaveRoomAlert} modal={false}>\n <Dialog.Portal>\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 </Dialog.Portal>\n </Dialog.Root>\n ) : null}\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}: {\n leaveRoom: (args: { endstream: boolean }) => void;\n screenType: keyof ConferencingScreen;\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\n const showStream = permissions?.hlsStreaming && isStreamingOn;\n useDropdownList({ open, name: 'LeaveRoom' });\n\n if (!permissions || !isConnected) {\n return null;\n }\n\n return (\n <Fragment>\n {permissions?.hlsStreaming ? (\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 {isStreamingOn && permissions?.hlsStreaming ? (\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 ) : null}\n </Sheet.Content>\n </Sheet.Root>\n ) : (\n <LeaveIconButton\n key=\"LeaveRoom\"\n data-testid=\"leave_room_btn\"\n onClick={() => {\n if (screenType === 'hls_live_streaming') {\n setShowLeaveRoomAlert(true);\n } else {\n leaveRoom({ endstream: false });\n }\n }}\n >\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={leaveRoom}\n isStreamingOn={isStreamingOn}\n />\n </Sheet.Content>\n </Sheet.Root>\n {screenType === 'hls_live_streaming' ? (\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 ) : null}\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 { 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 <Dialog.Portal>\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 </Dialog.Portal>\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 { 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 <Dialog.Portal>\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 </Dialog.Portal>\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 { 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 <Dialog.Portal>\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 </Dialog.Portal>\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 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 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 {screenType !== 'hls_live_streaming' ? (\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 onClick={() => setShowEmojiCard(false)}\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 from 'react';\nimport { selectLocalPeer, selectPeerMetadata, useHMSStore } from '@100mslive/react-sdk';\nimport { HandIcon } from '@100mslive/react-icons';\nimport { Tooltip } from '../../Tooltip';\nimport IconButton from '../IconButton';\nimport { useMyMetadata } from './hooks/useMetadata';\n\nexport const RaiseHand = () => {\n const { toggleHandRaise } = useMyMetadata();\n const localPeer = useHMSStore(selectLocalPeer);\n const isHandRaised = useHMSStore(selectPeerMetadata(localPeer.id))?.isHandRaised || false;\n\n return (\n <Tooltip title={isHandRaised ? 'Lower hand' : 'Raise hand'}>\n <IconButton active={!isHandRaised} onClick={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, Button, 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 py: '$6',\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: '29%',\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.Item\n css={{\n px: '$10',\n pb: '$10',\n pt: '$6',\n '&:hover': {\n bg: '$transparent',\n cursor: 'default',\n },\n }}\n >\n <Button\n variant=\"standard\"\n outlined\n type=\"submit\"\n onClick={() => {\n updateState(MODALS.SHARE, false);\n }}\n data-testid=\"share_btn\"\n css={{\n w: '100%',\n }}\n >\n Cancel\n </Button>\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 { 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 <Dialog.Portal>\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 </Dialog.Portal>\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 { 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 <Dialog.Portal>\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 </Dialog.Portal>\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 selectIsPeerAudioEnabled,\n selectLocalPeerID,\n selectPeerCount,\n selectPeerMetadata,\n selectPeersByCondition,\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 { 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 { isInternalRole } from '../../common/utils';\nimport { SIDE_PANE_OPTIONS } from '../../common/constants';\n\nexport const ParticipantList = () => {\n const [filter, setFilter] = useState();\n const { participants, isConnected, peerCount } = useParticipants(filter);\n const peersOrderedByRoles = {};\n\n const handRaisedPeers = useHMSStore(selectPeersByCondition(peer => JSON.parse(peer.metadata || '{}')?.isHandRaised));\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 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 />\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 {peerCount}\n </Text>\n </IconButton>\n );\n};\n\nconst VirtualizedParticipants = ({ peersOrderedByRoles = {}, isConnected, filter, handRaisedList = [] }) => {\n return (\n <Flex\n direction=\"column\"\n css={{\n gap: '$8',\n maxHeight: '100%',\n overflowY: 'auto',\n overflowX: 'hidden',\n pr: '$3',\n }}\n >\n <RoleAccordion\n peerList={handRaisedList}\n roleName=\"Hand Raised\"\n filter={filter}\n isConnected={isConnected}\n isHandRaisedAccordion\n />\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 />\n ))}\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 variant=\"sm\" css={{ ...textEllipsis(150), fontWeight: '$semiBold', color: '$on_surface_high' }}>\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(selectPeerMetadata(peerId))?.isHandRaised;\n const canChangeRole = useHMSStore(selectPermissions)?.changeRole;\n const shouldShowMoreActions = canChangeRole;\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 && !isInternalRole(role) && !isLocal ? (\n <ParticipantMoreActions peerId={peerId} role={role} />\n ) : null}\n </Flex>\n );\n});\n\nconst ParticipantMoreActions = ({ peerId, role }) => {\n const hmsActions = useHMSActions();\n const { changeRole: canChangeRole, removeOthers: canRemoveOthers } = useHMSStore(selectPermissions);\n const { elements } = useRoomLayoutConferencingScreen();\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 $6' : '$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', mr: '$4', 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 from 'react';\nimport { useMeasure } from 'react-use';\nimport { FixedSizeList } from 'react-window';\nimport { HMSPeer } from '@100mslive/react-sdk';\nimport { Accordion } from '../../../Accordion';\nimport { Box, 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\nconst ROW_HEIGHT = 50;\n\ninterface ItemData {\n peerList: HMSPeer[];\n isConnected: boolean;\n}\n\nfunction itemKey(index: number, data: ItemData) {\n return data.peerList[index].id;\n}\n\nconst 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}: ItemData & {\n roleName: string;\n isHandRaisedAccordion?: boolean;\n filter?: { search: string };\n}) => {\n const [ref, { width }] = useMeasure<HTMLDivElement>();\n const showAcordion = filter?.search ? peerList.some(peer => peer.name.toLowerCase().includes(filter.search)) : true;\n\n if (!showAcordion || (isHandRaisedAccordion && filter?.search) || peerList.length === 0) {\n return null;\n }\n const height = ROW_HEIGHT * peerList.length;\n\n return (\n <Flex direction=\"column\" css={{ flexGrow: 1, '&:hover .role_actions': { visibility: 'visible' } }} ref={ref}>\n <Accordion.Root\n type=\"single\"\n collapsible\n defaultValue={roleName}\n css={{ borderRadius: '$1', border: '1px solid $border_bright' }}\n >\n <Accordion.Item value={roleName}>\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 }}\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(peerList.length)})`}\n </Text>\n <RoleOptions roleName={roleName} peerList={peerList} />\n </Flex>\n </Accordion.Header>\n <Accordion.Content>\n <Box css={{ borderTop: '1px solid $border_default' }} />\n <FixedSizeList\n itemSize={ROW_HEIGHT}\n itemData={{ peerList, isConnected }}\n itemKey={itemKey}\n itemCount={peerList.length}\n width={width}\n height={height}\n >\n {VirtualizedParticipantItem}\n </FixedSizeList>\n </Accordion.Content>\n </Accordion.Item>\n </Accordion.Root>\n </Flex>\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)) {\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 { 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 <Dialog.Portal>\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 </Dialog.Portal>\n </Dialog.Root>\n ) : null;\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, { 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 label = getVideoTileLabel({\n peerName: peer.name,\n isLocal: false,\n track,\n });\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 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 isScreenshare peerID={peer?.id} audioTrackID={audioTrack?.id} videoTrackID={track?.id} />\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 &nbsp; 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 { ConferencingScreen } 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';\n// @ts-ignore: No implicit Any\nimport { ParticipantList } from './Footer/ParticipantList';\nimport { Flex, IconButton, Tabs, Text } from '../..';\nimport { useRoomLayoutConferencingScreen } from '../provider/roomLayoutProvider/hooks/useRoomLayoutScreen';\n// @ts-ignore: No implicit Any\nimport { useSidepaneReset, useSidepaneToggle } from './AppData/useSidepane';\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\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 peerCount = useHMSStore(selectPeerCount);\n const { elements } = useRoomLayoutConferencingScreen();\n const showChat = !!elements?.chat;\n const showParticipants = !!elements?.participant_list;\n const hideTabs = !(showChat && showParticipants);\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 return (\n <Flex\n direction=\"column\"\n css={{\n color: '$on_primary_high',\n h: '100%',\n }}\n >\n {hideTabs ? (\n <>\n <Text variant=\"sm\" css={{ fontWeight: '$semiBold', p: '$4', c: '$on_surface_high', pr: '$12' }}>\n {showChat ? 'Chat' : `Participants (${peerCount})`}\n </Text>\n {showChat ? <Chat screenType={screenType} hideControls={hideControls} /> : <ParticipantList />}\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 ({peerCount})\n </Tabs.Trigger>\n </Tabs.List>\n <Tabs.Content value={SIDE_PANE_OPTIONS.PARTICIPANTS} css={{ p: 0 }}>\n <ParticipantList />\n </Tabs.Content>\n <Tabs.Content value={SIDE_PANE_OPTIONS.CHAT} css={{ p: 0 }}>\n <Chat screenType={screenType} hideControls={hideControls} />\n </Tabs.Content>\n </Tabs.Root>\n )}\n <IconButton\n css={{ position: 'absolute', right: '$10', top: '$11' }}\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 </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, hideControls = false }) => {\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 marginTop: hideControls && elements?.chat?.is_overlay ? '$17' : '0',\n transition: 'margin 0.3s ease-in-out',\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';\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(({ index, style = {}, message, setRowHeight, 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 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});\nconst ChatList = React.forwardRef(\n ({ width, height, setRowHeight, getRowHeight, messages, 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 onPin={() => setPinnedMessage(messages[index])}\n />\n )}\n </VariableSizeList>\n );\n },\n);\nconst VirtualizedChatMessages = React.forwardRef(({ messages, 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 />\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\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 messages={messages} scrollToBottom={scrollToBottom} ref={listRef} />\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 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 }}\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 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 {\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, { 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", "import React, { useEffect } from 'react';\nimport {\n selectLocalPeerName,\n selectLocalPeerRoleName,\n selectRoleChangeRequest,\n useCustomEvent,\n useHMSActions,\n useHMSStore,\n} from '@100mslive/react-sdk';\n// @ts-ignore: No implicit Any\nimport { PreviewControls, PreviewTile } from './Preview/PreviewJoin';\nimport { Box, Button, Dialog, Flex, Text } from '../..';\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 updateMetaData({ prevRole: currentRole });\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 css={{ fontWeight: 400, c: '$on_surface_medium', textAlign: 'center' }}>\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 }}\n >\n <PreviewTile name={name || ''} />\n <PreviewControls hideSettings={true} />\n </Flex>\n </>\n );\n\n return (\n <RequestDialog\n title={`You're invited to join the ${roleChangeRequest.role.name} role`}\n onOpenChange={async value => {\n if (!value) {\n await hmsActions.rejectChangeRole(roleChangeRequest);\n sendEvent({ ...roleChangeRequest, peerName: name }, { peerId: roleChangeRequest.requestedBy?.id });\n await hmsActions.cancelMidCallPreview();\n await updateMetaData({ isHandRaised: false });\n }\n }}\n body={body}\n onAction={async () => {\n await hmsActions.acceptChangeRole(roleChangeRequest);\n await updateMetaData({ isHandRaised: false });\n }}\n actionText=\"Accept\"\n />\n );\n};\n\nconst RequestDialog = ({\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 <Dialog.Root open={open} onOpenChange={onOpenChange}>\n <Dialog.Portal>\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 <Flex justify=\"center\" align=\"center\" css={{ width: '100%', gap: '$md' }}>\n <Box css={{ width: '50%' }}>\n <Dialog.Close css={{ width: '100%' }}>\n <Button variant=\"standard\" outlined css={{ width: '100%' }}>\n Cancel\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 </Dialog.Content>\n </Dialog.Portal>\n </Dialog.Root>\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,WAA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AAA,QACZ,WAAW;AAAA,QACX,YAAY;AAAA,QACZ,IAAI;AAAA,QACJ,cAAc,eAAe,KAAI,eAAU,YAAV,mBAAmB,YAAY,OAAO;AAAA,QACvE,OAAO;AAAA,UACL,WAAW;AAAA,UACX,IAAI,YAAY,eAAe,uBAAuB,gBAAgB;AAAA,QACxE;AAAA,MACF;AAAA,MACA,eAAY;AAAA;AAAA,IAEZ,gBAAAA,QAAA,cAACC,SAAA,EAAO,UAAU,YAAY,UAAU,YAAY,YAAY,YAAY;AAAA,EAC9E,GAEF,gBAAAD,QAAA,cAAC,4BAAuB,GACxB,gBAAAA,QAAA,cAAC,qBAAgB,GACjB,gBAAAA,QAAA,cAAC,kBAAa,CAChB,CACF;AAEJ;AAEA,IAAO,qBAAQ;",
6
- "names": ["React", "useEffect", "useRef", "useState", "selectAppData", "selectIsConnectedToRoom", "useHMSActions", "useHMSStore", "React", "useEffect", "useMedia", "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", "useState", "useHMSActions", "useHMSStore", "isMicActive", "_a", "_b", "isCamActive", "useState", "useHMSActions", "React", "useHMSStore", "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", "MODALS", "useHMSActions", "useHMSStore", "selectPermissions", "selectIsConnectedToRoom", "useRecordingStreaming", "useState", "useRef", "React", "DragHandleIcon", "CrossIcon", "EmojiIcon", "BrbIcon", "SettingsIcon", "RecordIcon", "useMedia", "React", "React", "useHMSStore", "HandIcon", "useHMSStore", "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", "selectLocalPeerID", "selectPeerCount", "selectPeerMetadata", "selectPeersByCondition", "selectPermissions", "useHMSActions", "useHMSStore", "ChangeRoleIcon", "HandIcon", "MicOffIcon", "PeopleIcon", "VerticalMenuIcon", "React", "React", "useState", "selectPermissions", "useHMSActions", "useHMSStore", "useHMSVanillaStore", "MicOffIcon", "VerticalMenuIcon", "useState", "useHMSStore", "selectPermissions", "useHMSActions", "useHMSVanillaStore", "React", "VerticalMenuIcon", "MicOffIcon", "data", "React", "useState", "useHMSStore", "selectPeersByCondition", "useCallback", "React", "Fragment", "selectPeerCount", "useEffect", "PeopleIcon", "selectLocalPeerID", "selectPeerMetadata", "selectPermissions", "HandIcon", "MicOffIcon", "useHMSActions", "VerticalMenuIcon", "ChangeRoleIcon", "useMedia", "React", "Footer", "useMedia", "useEffect", "React", "useCallback", "useState", "selectHLSState", "useHMSActions", "useHMSStore", "useHMSStore", "selectHLSState", "useState", "useHMSActions", "useCallback", "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", "selectLocalPeer", "useHMSStore", "ExpandIcon", "React", "React", "ExpandIcon", "useMedia", "useHMSStore", "selectLocalPeer", "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", "React", "useHMSActions", "CrossIcon", "ShareScreenIcon", "useHMSActions", "React", "ShareScreenIcon", "CrossIcon", "useHMSStore", "selectLocalPeerID", "selectPeerByID", "useState", "useRef", "useFullscreen", "screenfull", "React", "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", "useHMSStore", "React", "useEffect", "useState", "selectPeerCount", "useHMSStore", "CrossIcon", "React", "useCallback", "useEffect", "useRef", "useState", "useMedia", "selectPeerNameByID", "selectPermissions", "useHMSActions", "useHMSStore", "ChevronDownIcon", "CrossIcon", "PinIcon", "React", "Fragment", "useCallback", "useEffect", "useMemo", "useRef", "useState", "useMedia", "selectLocalPeerID", "selectPeerNameByID", "selectPermissions", "useHMSActions", "useHMSStore", "VerticalMenuIcon", "useCallback", "useHMSActions", "useHMSStore", "useHMSVanillaStore", "useHMSActions", "useHMSVanillaStore", "useHMSStore", "useCallback", "React", "useHMSStore", "selectPeerNameByID", "Fragment", "useState", "VerticalMenuIcon", "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", "selectUnreadHMSMessagesCount", "useHMSStore", "useHMSStore", "selectPermissions", "React", "PinIcon", "CrossIcon", "selectPeerNameByID", "useState", "useRef", "useHMSActions", "useEffect", "useMedia", "useCallback", "_a", "ChevronDownIcon", "React", "useState", "useHMSStore", "selectPeerCount", "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", "React", "React", "React", "React", "useHMSStore", "selectLocalPeerRoleName", "selectIsConnectedToRoom", "useHMSActions", "useEffect", "Suspense", "React", "useEffect", "selectLocalPeerRoleName", "useCustomEvent", "useHMSActions", "useHMSStore", "useHMSActions", "useHMSStore", "selectLocalPeerRoleName", "useCustomEvent", "useEffect", "React", "useHMSStore", "selectIsConnectedToRoom", "useHMSActions", "useState", "selectAppData", "useRef", "_a", "useEffect", "React", "Footer"]
7
- }