From 005aebd60b6e2c88d44f75e19a0bd269ae99be5d Mon Sep 17 00:00:00 2001 From: byGalax Date: Tue, 12 May 2026 18:36:32 +0200 Subject: [PATCH] feat(call): VideoStub accepts fit prop, contain when focused --- apps/desktop/src/components/CallParticipantTile.tsx | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/apps/desktop/src/components/CallParticipantTile.tsx b/apps/desktop/src/components/CallParticipantTile.tsx index de8569a..a1b9694 100644 --- a/apps/desktop/src/components/CallParticipantTile.tsx +++ b/apps/desktop/src/components/CallParticipantTile.tsx @@ -129,7 +129,7 @@ export function CallParticipantTile(props: ParticipantTileProps) { } > {video ? ( - + ) : ( )} @@ -303,7 +303,8 @@ function VideoStub({ videoTrack, me, small, -}: ParticipantTileProps & { small: boolean }) { + fit, +}: ParticipantTileProps & { small: boolean; fit: 'cover' | 'contain' }) { const videoRef = useRef(null); useEffect(() => { const el = videoRef.current; @@ -330,7 +331,8 @@ function VideoStub({ playsInline muted className={ - 'h-full w-full object-cover ' + + 'h-full w-full ' + + (fit === 'contain' ? 'object-contain ' : 'object-cover ') + (me ? 'scale-x-[-1]' : '') /* mirror local preview */ } />