From a1af640ff7821467713fb29c37fd2950e935ebc2 Mon Sep 17 00:00:00 2001 From: Amar Bathwal <110378139+amar-1995@users.noreply.github.com> Date: Wed, 22 May 2024 14:06:08 +0530 Subject: [PATCH] fix: single peer view --- packages/roomkit-react/src/Prebuilt/common/hooks.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/roomkit-react/src/Prebuilt/common/hooks.ts b/packages/roomkit-react/src/Prebuilt/common/hooks.ts index c1ae0b8c31..4f9b87aa5a 100644 --- a/packages/roomkit-react/src/Prebuilt/common/hooks.ts +++ b/packages/roomkit-react/src/Prebuilt/common/hooks.ts @@ -234,8 +234,8 @@ export function useWaitingRoomInfo(): WaitingRoomInfo { const { video, audio, screen } = useHMSStore(selectIsAllowedToPublish); const roles = useHMSStore(selectRolesMap); const peersByRoles = useHMSStore(selectPeersByRoles(localPeerRole?.subscribeParams.subscribeToRoles || [])); - const isNotAllowedToPublish = video && audio && screen; - const isScreenOnlyPublishParams: boolean = screen; + const isNotAllowedToPublish = !(video || audio || screen); + const isScreenOnlyPublishParams: boolean = screen && !(video || audio); const hasSubscribedRolePublishing: boolean = useMemo(() => { return peersByRoles.some((peer: HMSPeer) => { if (peer.roleName && roles[peer.roleName] && !peer.isLocal) {