Hide speaking border when presenting/1:1 in group

This commit is contained in:
Jamie Kyle 2023-03-22 10:53:13 -07:00 committed by GitHub
parent fc161a67df
commit f272433b7a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 40 additions and 14 deletions

View file

@ -37,6 +37,7 @@ type BasePropsType = {
i18n: LocalizerType;
onVisibilityChanged?: (demuxId: number, isVisible: boolean) => unknown;
remoteParticipant: GroupCallRemoteParticipantType;
remoteParticipantsCount: number;
};
type InPipPropsType = {
@ -65,6 +66,7 @@ export const GroupCallRemoteParticipant: React.FC<PropsType> = React.memo(
getGroupCallVideoFrameSource,
i18n,
onVisibilityChanged,
remoteParticipantsCount,
} = props;
const {
@ -81,6 +83,7 @@ export const GroupCallRemoteParticipant: React.FC<PropsType> = React.memo(
sharingScreen,
title,
videoAspectRatio,
presenting,
} = props.remoteParticipant;
const isSpeaking = useValueAtFixedRate(
@ -278,6 +281,8 @@ export const GroupCallRemoteParticipant: React.FC<PropsType> = React.memo(
className={classNames(
'module-ongoing-call__group-call-remote-participant',
isSpeaking &&
!presenting &&
remoteParticipantsCount > 1 &&
'module-ongoing-call__group-call-remote-participant--speaking'
)}
ref={intersectionRef}