Send zero speakerHeight when someone is presenting

Co-authored-by: trevor-signal <trevor@signal.org>
This commit is contained in:
Richard Russo
2026-03-04 08:41:12 -08:00
committed by GitHub
parent 07b7de6d4f
commit f1bf48b069
2 changed files with 14 additions and 2 deletions

View File

@@ -167,7 +167,11 @@ export function CallingPipRemoteVideo({
}
return nonRenderedRemoteParticipant(participant);
});
setGroupCallVideoRequest(participants, newHeight);
setGroupCallVideoRequest(
participants,
// When there's a presenter, we do not want the SFU to prioritize the speaker feed
activeGroupCallSpeaker.presenting ? 0 : newHeight
);
} else {
setGroupCallVideoRequest(
activeCall.remoteParticipants.map(nonRenderedRemoteParticipant),

View File

@@ -220,6 +220,10 @@ export function GroupCallRemoteParticipants({
prioritySortedParticipants,
]);
const isSomeonePresenting =
prioritySortedParticipants.length &&
prioritySortedParticipants[0].presenting;
// Make sure we're not on a page that no longer exists (e.g. if people left the call)
if (
pageIndex >= gridParticipantsByPage.length &&
@@ -457,7 +461,10 @@ export function GroupCallRemoteParticipants({
}
setGroupCallVideoRequest(
videoRequest,
clamp(gridParticipantHeight, 0, MAX_FRAME_HEIGHT)
// When there's a presenter, we do not want the SFU to prioritize the speaker
isSomeonePresenting
? 0
: clamp(gridParticipantHeight, 0, MAX_FRAME_HEIGHT)
);
}, [
devicePixelRatio,
@@ -469,6 +476,7 @@ export function GroupCallRemoteParticipants({
setGroupCallVideoRequest,
videoRequestMode,
participantsOnOtherPages,
isSomeonePresenting,
]);
return (