Ensure setLocalPreviewContainer is called when video is enabled

This commit is contained in:
Scott Nonnenberg
2026-01-06 04:59:27 +10:00
committed by GitHub
parent d635d426b1
commit df85bcf2a5
2 changed files with 8 additions and 2 deletions

View File

@@ -552,6 +552,9 @@ export function CallScreen({
);
React.useLayoutEffect(() => {
if (!isSendingVideo) {
return;
}
if (isLonelyInCall && !lonelyCallPreviewRef.current) {
return;
}
@@ -571,7 +574,7 @@ export function CallScreen({
sizeCallback: handleSize,
});
}
}, [handleSize, isLonelyInCall, setLocalPreviewContainer]);
}, [isSendingVideo, handleSize, isLonelyInCall, setLocalPreviewContainer]);
const { selfViewExpanded } = activeCall;
const previousSelfViewExpanded = usePrevious(

View File

@@ -480,6 +480,9 @@ export function CallingPip({
);
React.useLayoutEffect(() => {
if (!isSendingVideo) {
return;
}
if (isLonelyInCall && !lonelyCallPreviewRef.current) {
return;
}
@@ -499,7 +502,7 @@ export function CallingPip({
sizeCallback: handleSize,
});
}
}, [handleSize, isLonelyInCall, setLocalPreviewContainer]);
}, [isSendingVideo, handleSize, isLonelyInCall, setLocalPreviewContainer]);
if (isLonelyInCall) {
remoteVideoNode = (