diff --git a/packages/roomkit-react/src/Prebuilt/components/Chat/Chat.tsx b/packages/roomkit-react/src/Prebuilt/components/Chat/Chat.tsx index f586485ab7..d3f1863b08 100644 --- a/packages/roomkit-react/src/Prebuilt/components/Chat/Chat.tsx +++ b/packages/roomkit-react/src/Prebuilt/components/Chat/Chat.tsx @@ -86,7 +86,7 @@ export const Chat = () => { isLandscapeStream: false, isChatEnabled: true, }, - () => ({ bottom: '$19', right: '$8' }), + () => ({ bottom: '$20', right: '$8' }), ) .otherwise(() => ({})), }} diff --git a/packages/roomkit-react/src/Prebuilt/components/Chat/ChatFooter.tsx b/packages/roomkit-react/src/Prebuilt/components/Chat/ChatFooter.tsx index 06d608359e..3df03a0f5e 100644 --- a/packages/roomkit-react/src/Prebuilt/components/Chat/ChatFooter.tsx +++ b/packages/roomkit-react/src/Prebuilt/components/Chat/ChatFooter.tsx @@ -152,7 +152,7 @@ export const ChatFooter = ({ onSend, children }: { onSend: (count: number) => vo {canDisableChat && isMobile && isOverlayChat ? ( - + e.stopPropagation()}> diff --git a/packages/roomkit-react/src/Prebuilt/components/ConferenceScreen.tsx b/packages/roomkit-react/src/Prebuilt/components/ConferenceScreen.tsx index 9cd6e2fea6..2ff63fdef8 100644 --- a/packages/roomkit-react/src/Prebuilt/components/ConferenceScreen.tsx +++ b/packages/roomkit-react/src/Prebuilt/components/ConferenceScreen.tsx @@ -22,6 +22,8 @@ import { Box, Flex } from '../../Layout'; import { useHMSPrebuiltContext } from '../AppContext'; import { VideoStreamingSection } from '../layouts/VideoStreamingSection'; // @ts-ignore: No implicit Any +import { EmojiReaction } from './EmojiReaction'; +// @ts-ignore: No implicit Any import FullPageProgress from './FullPageProgress'; import { Header } from './Header'; import { PreviousRoleInMetadata } from './PreviousRoleInMetadata'; @@ -195,12 +197,22 @@ export const ConferenceScreen = () => { alignItems: 'center', pr: '$4', pb: '$4', + position: 'relative', }} justify="end" gap="1" > {noAVPermissions ? : null} + + + )} diff --git a/packages/roomkit-react/src/Prebuilt/components/EmojiReaction.jsx b/packages/roomkit-react/src/Prebuilt/components/EmojiReaction.jsx index 57ecfa0d68..7de2809605 100644 --- a/packages/roomkit-react/src/Prebuilt/components/EmojiReaction.jsx +++ b/packages/roomkit-react/src/Prebuilt/components/EmojiReaction.jsx @@ -23,7 +23,7 @@ import { EMOJI_REACTION_TYPE } from '../common/constants'; init({ data }); -export const EmojiReaction = () => { +export const EmojiReaction = ({ showCard = false }) => { const [open, setOpen] = useState(false); const isConnected = useHMSStore(selectIsConnectedToRoom); useDropdownList({ open: open, name: 'EmojiReaction' }); @@ -68,7 +68,7 @@ export const EmojiReaction = () => { return null; } - if ((isMobile || isLandscape) && !(isLandscapeStream || isMobileHLSStream)) { + if (showCard) { return ; } return ( diff --git a/packages/roomkit-react/src/Prebuilt/components/Footer/RoleOptions.tsx b/packages/roomkit-react/src/Prebuilt/components/Footer/RoleOptions.tsx index 57139cb9ad..7d2314d1d0 100644 --- a/packages/roomkit-react/src/Prebuilt/components/Footer/RoleOptions.tsx +++ b/packages/roomkit-react/src/Prebuilt/components/Footer/RoleOptions.tsx @@ -38,9 +38,6 @@ const DropdownWrapper = ({ children }: { children: React.ReactNode }) => { if (React.Children.toArray(children).length === 0) { return null; } - React.Children.map(children, child => { - console.log({ child }); - }); return ( { - const isLandscape = useIsLandscape(); - const isMobile = useMedia(config.media.md); return ( { > - )} + + + {isMobile && !isFullScreen && } ); }; diff --git a/packages/roomkit-react/src/Prebuilt/layouts/SidePane.tsx b/packages/roomkit-react/src/Prebuilt/layouts/SidePane.tsx index b17a03a68a..47f8344509 100644 --- a/packages/roomkit-react/src/Prebuilt/layouts/SidePane.tsx +++ b/packages/roomkit-react/src/Prebuilt/layouts/SidePane.tsx @@ -43,16 +43,13 @@ const Wrapper = styled('div', { }, '@md': { p: '$6 $8', - pb: '$12', - borderTopLeftRadius: 0, - borderTopRightRadius: 0, animation: `${translateAcross({ yFrom: '100%' })} 150ms cubic-bezier(0.22, 1, 0.36, 1)`, }, variants: { landscapeStream: { true: { '@lg': { - position: 'unset !important', + position: 'unset', minHeight: '100%', }, }, @@ -66,14 +63,18 @@ const Wrapper = styled('div', { }, overlayChat: { true: { - height: 'unset', - maxHeight: 300, - background: 'linear-gradient(180deg, rgba(0, 0, 0, 0.00) 35.94%, rgba(0, 0, 0, 0.64) 100%)', - '@md': { - pb: '$20', + '@lg': { + maxHeight: '300px', + background: 'linear-gradient(180deg, rgba(0, 0, 0, 0.00) 35.94%, rgba(0, 0, 0, 0.64) 100%)', + position: 'fixed', + zIndex: 12, + bottom: 0, }, }, }, + hideControls: { + true: {}, + }, }, compoundVariants: [ { @@ -83,6 +84,9 @@ const Wrapper = styled('div', { position: 'unset', height: '100%', maxHeight: 'unset', + '@md': { + pb: 0, + }, }, }, { @@ -94,6 +98,13 @@ const Wrapper = styled('div', { maxHeight: 'unset', }, }, + { + hideControls: false, + overlayChat: true, + css: { + pb: '$17', + }, + }, ], }); @@ -138,21 +149,64 @@ const SidePane = ({ const commonProps = { landscapeStream: isLandscapeHLSStream, mobileStream: isMobileHLSStream, + hideControls, + overlayChat: !!elements?.chat?.is_overlay, }; + const SidepaneComponent = match(sidepane) + .with(SIDE_PANE_OPTIONS.POLLS, () => ( + + + + )) + .with(SIDE_PANE_OPTIONS.VB, () => ( + + + + )) + .with(SIDE_PANE_OPTIONS.CHAT, SIDE_PANE_OPTIONS.PARTICIPANTS, () => ( + + + + )) + .with(SIDE_PANE_OPTIONS.ROOM_DETAILS, () => ( + + + + )) + .otherwise(() => { + return null; + }); + + if (!trackId && !SidepaneComponent) { + return null; + } + return ( '340px') + .with({ isMobileHLSStream: true }, () => '100%') + .otherwise(() => '$100'), h: '100%', flexShrink: 0, gap: '$4', position: 'relative', '&:empty': { display: 'none' }, - '@ls': { - w: isMobileHLSStream || isLandscapeHLSStream ? '340px' : '$100', + '@md': { + position: 'absolute', + zIndex: 12, }, }} > @@ -166,43 +220,7 @@ const SidePane = ({ {...tileLayout} /> )} - - {match(sidepane) - .with(SIDE_PANE_OPTIONS.POLLS, () => ( - - - - )) - .with(SIDE_PANE_OPTIONS.VB, () => ( - - - - )) - .with(SIDE_PANE_OPTIONS.CHAT, SIDE_PANE_OPTIONS.PARTICIPANTS, () => ( - - - - )) - .with(SIDE_PANE_OPTIONS.ROOM_DETAILS, () => ( - - - - )) - .otherwise(() => { - return null; - })} + {SidepaneComponent} ); }; diff --git a/packages/roomkit-react/src/Prebuilt/layouts/VideoStreamingSection.tsx b/packages/roomkit-react/src/Prebuilt/layouts/VideoStreamingSection.tsx index b1deebd310..d19c00f368 100644 --- a/packages/roomkit-react/src/Prebuilt/layouts/VideoStreamingSection.tsx +++ b/packages/roomkit-react/src/Prebuilt/layouts/VideoStreamingSection.tsx @@ -4,6 +4,7 @@ import { DefaultConferencingScreen_Elements, HLSLiveStreamingScreen_Elements, } from '@100mslive/types-prebuilt'; +import { match } from 'ts-pattern'; import { selectIsConnectedToRoom, selectLocalPeerRoleName, @@ -107,12 +108,19 @@ export const VideoStreamingSection = ({ position: 'relative', gap: isMobileHLSStream || isLandscapeHLSStream ? '0' : '$4', }} - direction={isMobileHLSStream ? 'column' : 'row'} + direction={match, 'row' | 'column'>({ isLandscapeHLSStream, isMobileHLSStream }) + .with({ isLandscapeHLSStream: true }, () => 'row') + .with({ isMobileHLSStream: true }, () => 'column') + .otherwise(() => 'row')} > {ViewComponent} '1 1 0') + .with({ isMobileHLSStream: true }, () => '2 1 0') + .otherwise(() => undefined), + position: 'relative', height: !isMobileHLSStream ? '100%' : undefined, maxHeight: '100%', '&:empty': { display: 'none' },