Dont show speaking indicator for active speaker in speaker view

This commit is contained in:
Jamie Kyle 2023-03-22 14:54:11 -07:00 committed by GitHub
parent 2f691f3dd0
commit 67e290ea8d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 18 additions and 3 deletions

View file

@ -105,7 +105,17 @@ const createActiveGroupCallProp = (overrideProps: GroupCallOverrideProps) => ({
peekedParticipants:
overrideProps.peekedParticipants || overrideProps.remoteParticipants || [],
remoteParticipants: overrideProps.remoteParticipants || [],
remoteAudioLevels: new Map<number, number>(),
remoteAudioLevels: new Map<number, number>(
overrideProps.remoteParticipants?.map((_participant, index) => [
index,
number('remoteAudioLevel', 0, {
range: true,
min: 0,
max: 1,
step: 0.01,
}),
])
),
});
const createActiveCallProp = (

View file

@ -172,6 +172,7 @@ export function CallingPipRemoteVideo({
isInPip
remoteParticipant={activeGroupCallSpeaker}
remoteParticipantsCount={activeCall.remoteParticipants.length}
isActiveSpeakerInSpeakerView={false}
/>
</div>
);

View file

@ -126,6 +126,7 @@ export function GroupCallOverflowArea({
)}
remoteParticipant={remoteParticipant}
remoteParticipantsCount={remoteParticipantsCount}
isActiveSpeakerInSpeakerView={false}
/>
))}
</div>

View file

@ -64,6 +64,7 @@ const createProps = (
}),
},
remoteParticipantsCount: 1,
isActiveSpeakerInSpeakerView: false,
...overrideProps,
});

View file

@ -35,6 +35,7 @@ type BasePropsType = {
getFrameBuffer: () => Buffer;
getGroupCallVideoFrameSource: (demuxId: number) => VideoFrameSource;
i18n: LocalizerType;
isActiveSpeakerInSpeakerView: boolean;
onVisibilityChanged?: (demuxId: number, isVisible: boolean) => unknown;
remoteParticipant: GroupCallRemoteParticipantType;
remoteParticipantsCount: number;
@ -67,6 +68,7 @@ export const GroupCallRemoteParticipant: React.FC<PropsType> = React.memo(
i18n,
onVisibilityChanged,
remoteParticipantsCount,
isActiveSpeakerInSpeakerView,
} = props;
const {
@ -83,7 +85,6 @@ export const GroupCallRemoteParticipant: React.FC<PropsType> = React.memo(
sharingScreen,
title,
videoAspectRatio,
presenting,
} = props.remoteParticipant;
const isSpeaking = useValueAtFixedRate(
@ -281,7 +282,7 @@ export const GroupCallRemoteParticipant: React.FC<PropsType> = React.memo(
className={classNames(
'module-ongoing-call__group-call-remote-participant',
isSpeaking &&
!presenting &&
!isActiveSpeakerInSpeakerView &&
remoteParticipantsCount > 1 &&
'module-ongoing-call__group-call-remote-participant--speaking'
)}

View file

@ -296,6 +296,7 @@ export function GroupCallRemoteParticipants({
top={top}
width={renderedWidth}
remoteParticipantsCount={remoteParticipants.length}
isActiveSpeakerInSpeakerView={isInSpeakerView}
/>
);
});