Skip to content

Commit

Permalink
fix: use isCallLive since no broadcasting done
Browse files Browse the repository at this point in the history
  • Loading branch information
khushal87 committed Oct 25, 2023
1 parent b2e3dca commit 4d62622
Showing 1 changed file with 4 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -89,11 +89,8 @@ export const ViewLiveStreamChilden = ({
const {
params: { callId },
} = route;
const { useIsCallBroadcastingInProgress, useIsCallLive } =
useCallStateHooks();
const { useIsCallLive } = useCallStateHooks();
const isCallLive = useIsCallLive();
const isCallBroadcasting = useIsCallBroadcastingInProgress();
const liveOrBroadcasting = isCallLive || isCallBroadcasting;

const client = useAnonymousInitVideoClient({
callId,
Expand Down Expand Up @@ -122,14 +119,14 @@ export const ViewLiveStreamChilden = ({

return (
<>
{(!autoJoin || !liveOrBroadcasting) && (
{(!autoJoin || !isCallLive) && (
<ViewerLobby
autoJoin={autoJoin}
setAutoJoin={setAutoJoin}
isLive={liveOrBroadcasting}
isLive={isCallLive}
/>
)}
{liveOrBroadcasting && autoJoin && (
{isCallLive && autoJoin && (
<StreamCall call={call}>
<SafeAreaView style={styles.livestream}>
<ViewerLivestream
Expand Down

0 comments on commit 4d62622

Please sign in to comment.