Skip to content

Commit

Permalink
fix: share screen for alone participant on spotlight layout (#1553)
Browse files Browse the repository at this point in the history
Before: 
- screen share was shown when alone participant on a call in spotlight
layout
<img
src="https://github.com/user-attachments/assets/6ee6a1db-a462-4687-af62-008f84bbf45f"
alt="ios-before" width="200" height="440"/>

After: 
- screen share overlay condition is updated so that now check whether
there is active screen share and not shown always by default
<img
src="https://github.com/user-attachments/assets/f9699594-f034-4a1b-85c8-b5314a070578"
alt="ios-after" width="200" height="440"/>
  • Loading branch information
kristian-mkd authored Nov 4, 2024
1 parent 17aea5e commit 660056a
Showing 1 changed file with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,11 @@ export const CallParticipantsSpotlight = ({
marginHorizontal: landscape ? 0 : 8,
};

const showShareScreenOverlay =
participantInSpotlight?.isLocalParticipant &&
isScreenShareOnSpotlight &&
ScreenShareOverlay;

return (
<View
testID={ComponentTestIds.CALL_PARTICIPANTS_SPOTLIGHT}
Expand All @@ -105,7 +110,7 @@ export const CallParticipantsSpotlight = ({
>
{participantInSpotlight &&
ParticipantView &&
(participantInSpotlight.isLocalParticipant && ScreenShareOverlay ? (
(showShareScreenOverlay ? (
<ScreenShareOverlay />
) : (
<ParticipantView
Expand Down

0 comments on commit 660056a

Please sign in to comment.