Skip to content

Commit

Permalink
fix: check if currentParticipant is actually initialized
Browse files Browse the repository at this point in the history
  • Loading branch information
oliverlaz committed Oct 3, 2023
1 parent 6e8a4bd commit 4947770
Showing 1 changed file with 15 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -102,19 +102,21 @@ export const LivestreamLayout = (props: LivestreamLayoutProps) => {
muteAudio // audio is rendered by ParticipantsAudio
/>
)}
<ParticipantView
className={clsx(
hasOngoingScreenShare &&
'str-video__livestream-layout__floating-participant',
(hasOngoingScreenShare &&
floatingParticipantProps?.position &&
`str-video__livestream-layout__floating-participant--${floatingParticipantProps.position}`) ??
'str-video__livestream-layout__floating-participant--top-right',
)}
participant={currentSpeaker}
ParticipantViewUI={FloatingParticipantOverlay || Overlay}
muteAudio // audio is rendered by ParticipantsAudio
/>
{currentSpeaker && (
<ParticipantView
className={clsx(
hasOngoingScreenShare &&
'str-video__livestream-layout__floating-participant',
(hasOngoingScreenShare &&
floatingParticipantProps?.position &&
`str-video__livestream-layout__floating-participant--${floatingParticipantProps.position}`) ??
'str-video__livestream-layout__floating-participant--top-right',
)}
participant={currentSpeaker}
ParticipantViewUI={FloatingParticipantOverlay || Overlay}
muteAudio // audio is rendered by ParticipantsAudio
/>
)}
</div>
);
};
Expand Down

0 comments on commit 4947770

Please sign in to comment.