diff --git a/packages/roomkit-react/src/Prebuilt/components/Chat/Chat.tsx b/packages/roomkit-react/src/Prebuilt/components/Chat/Chat.tsx index fab34ea08b..5da5d74bb3 100644 --- a/packages/roomkit-react/src/Prebuilt/components/Chat/Chat.tsx +++ b/packages/roomkit-react/src/Prebuilt/components/Chat/Chat.tsx @@ -45,6 +45,7 @@ export const Chat = () => { if (!elements?.chat) { return null; } + const streaming = isMobileHLSStream || isLandscapeStream; return ( { gap: '$4', }} > - {isMobile && elements?.chat?.is_overlay ? null : } + {isMobile && elements?.chat?.is_overlay && !streaming ? null : } - {isMobile && elements?.chat?.is_overlay ? : null} + {isMobile && elements?.chat?.is_overlay && !streaming ? : null} {isChatEnabled ? ( @@ -70,7 +71,7 @@ export const Chat = () => { { }, () => ({ bottom: '$20', right: '$10' }), ) + .with( + { + isMobileHLSStream: true, + isChatEnabled: false, + }, + () => ({ bottom: '$19', right: '$8' }), + ) + .with( + { + isMobileHLSStream: true, + isChatEnabled: true, + }, + () => ({ bottom: '$17', right: '$8' }), + ) .with( { isLandscapeStream: false, diff --git a/packages/roomkit-react/src/Prebuilt/components/Chat/EmptyChat.tsx b/packages/roomkit-react/src/Prebuilt/components/Chat/EmptyChat.tsx index 930c2805a0..12c5ccfc10 100644 --- a/packages/roomkit-react/src/Prebuilt/components/Chat/EmptyChat.tsx +++ b/packages/roomkit-react/src/Prebuilt/components/Chat/EmptyChat.tsx @@ -7,6 +7,7 @@ import { config as cssConfig } from '../../../Theme'; import emptyChat from '../../images/empty-chat.svg'; import { useRoomLayoutConferencingScreen } from '../../provider/roomLayoutProvider/hooks/useRoomLayoutScreen'; import { useIsPeerBlacklisted } from '../hooks/useChatBlacklist'; +import { useLandscapeHLSStream, useMobileHLSStream } from '../../common/hooks'; export const EmptyChat = () => { const { elements } = useRoomLayoutConferencingScreen(); @@ -18,8 +19,11 @@ export const EmptyChat = () => { elements.chat.private_chat_enabled || (elements.chat.roles_whitelist && elements.chat.roles_whitelist.length)) && !isLocalPeerBlacklisted; + const isMobileHLSStream = useMobileHLSStream(); + const isLandscapeStream = useLandscapeHLSStream(); + const streaming = isMobileHLSStream || isLandscapeStream; - if (isMobile && elements?.chat?.is_overlay) return <>; + if (isMobile && elements?.chat?.is_overlay && !streaming) return <>; return (