From 9c7a0db36500bb94f0023b8a764a3e881cf61eb8 Mon Sep 17 00:00:00 2001 From: automated-signal <37887102+automated-signal@users.noreply.github.com> Date: Thu, 17 Oct 2024 18:43:16 -0500 Subject: [PATCH] Don't mirror screensharing preview in PiP Co-authored-by: Fedor Indutny <79877362+indutny-signal@users.noreply.github.com> --- stylesheets/_modules.scss | 15 ++++++++++----- ts/components/CallingPip.tsx | 9 +++++---- 2 files changed, 15 insertions(+), 9 deletions(-) diff --git a/stylesheets/_modules.scss b/stylesheets/_modules.scss index 2a9b0f079b..be68377ca9 100644 --- a/stylesheets/_modules.scss +++ b/stylesheets/_modules.scss @@ -4292,9 +4292,10 @@ button.module-image__border-overlay:focus { width: 100%; transform: rotateY(180deg); - &--presenting { - transform: inherit; - } + } + + &--presenting video { + transform: inherit; } } } @@ -4372,7 +4373,8 @@ button.module-image__border-overlay:focus { } } - &--local { + &--local, + &--local-presenting { bottom: 38px; height: 32px; position: absolute; @@ -4380,11 +4382,14 @@ button.module-image__border-overlay:focus { width: 32px; video { - transform: rotateY(180deg); width: 100%; height: 100%; } } + + &--local video { + transform: rotateY(180deg); + } } &__actions { diff --git a/ts/components/CallingPip.tsx b/ts/components/CallingPip.tsx index 8f415f4f31..6ce57d5982 100644 --- a/ts/components/CallingPip.tsx +++ b/ts/components/CallingPip.tsx @@ -261,6 +261,10 @@ export function CallingPip({ }, [isRTL, windowWidth, windowHeight, positionState]); const localizedTranslateX = isRTL ? -translateX : translateX; + const localVideoClassName = activeCall.presentingSource + ? 'module-calling-pip__video--local-presenting' + : 'module-calling-pip__video--local'; + return ( // eslint-disable-next-line jsx-a11y/no-static-element-interactions
{hasLocalVideo ? ( -
+
) : null}