Don't request video for invisible group call participants

This commit is contained in:
Evan Hahn 2021-12-06 17:06:13 -06:00 committed by GitHub
parent b4b65c4f00
commit 01549b11d1
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 171 additions and 16 deletions

View file

@ -19,6 +19,10 @@ type PropsType = {
getFrameBuffer: () => ArrayBuffer;
getGroupCallVideoFrameSource: (demuxId: number) => VideoFrameSource;
i18n: LocalizerType;
onParticipantVisibilityChanged: (
demuxId: number,
isVisible: boolean
) => unknown;
overflowedParticipants: ReadonlyArray<GroupCallRemoteParticipantType>;
};
@ -26,6 +30,7 @@ export const GroupCallOverflowArea: FC<PropsType> = ({
getFrameBuffer,
getGroupCallVideoFrameSource,
i18n,
onParticipantVisibilityChanged,
overflowedParticipants,
}) => {
const overflowRef = useRef<HTMLDivElement | null>(null);
@ -109,6 +114,7 @@ export const GroupCallOverflowArea: FC<PropsType> = ({
getFrameBuffer={getFrameBuffer}
getGroupCallVideoFrameSource={getGroupCallVideoFrameSource}
i18n={i18n}
onVisibilityChanged={onParticipantVisibilityChanged}
width={OVERFLOW_PARTICIPANT_WIDTH}
height={Math.floor(
OVERFLOW_PARTICIPANT_WIDTH / remoteParticipant.videoAspectRatio