From b732cbe00b90d1e6d6cbb346b8091f2cb8fc54f7 Mon Sep 17 00:00:00 2001 From: Cody Henthorne Date: Wed, 3 Jun 2026 09:23:52 -0400 Subject: [PATCH] Disable video mirroring for screen share preview in calls. --- .../securesms/components/webrtc/v2/CallParticipantViewer.kt | 2 +- .../thoughtcrime/securesms/components/webrtc/v2/CallScreen.kt | 2 +- .../components/webrtc/v2/PictureInPictureCallScreen.kt | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/app/src/main/java/org/thoughtcrime/securesms/components/webrtc/v2/CallParticipantViewer.kt b/app/src/main/java/org/thoughtcrime/securesms/components/webrtc/v2/CallParticipantViewer.kt index 24cdea761f..189ef746f6 100644 --- a/app/src/main/java/org/thoughtcrime/securesms/components/webrtc/v2/CallParticipantViewer.kt +++ b/app/src/main/java/org/thoughtcrime/securesms/components/webrtc/v2/CallParticipantViewer.kt @@ -190,7 +190,7 @@ fun SelfPipContent( Box(modifier = modifier) { VideoRenderer( participant = participant, - mirror = participant.cameraDirection == CameraState.Direction.FRONT, + mirror = !participant.isScreenSharing && participant.cameraDirection == CameraState.Direction.FRONT, modifier = Modifier.fillMaxSize() ) diff --git a/app/src/main/java/org/thoughtcrime/securesms/components/webrtc/v2/CallScreen.kt b/app/src/main/java/org/thoughtcrime/securesms/components/webrtc/v2/CallScreen.kt index c0f216faa9..a3efe08294 100644 --- a/app/src/main/java/org/thoughtcrime/securesms/components/webrtc/v2/CallScreen.kt +++ b/app/src/main/java/org/thoughtcrime/securesms/components/webrtc/v2/CallScreen.kt @@ -543,7 +543,7 @@ private fun LargeLocalVideoRenderer( participant = localParticipant, renderInPip = false, raiseHandAllowed = false, - mirrorVideo = localParticipant.cameraDirection == CameraState.Direction.FRONT, + mirrorVideo = !localParticipant.isScreenSharing && localParticipant.cameraDirection == CameraState.Direction.FRONT, showAudioIndicator = false, onInfoMoreInfoClick = null, modifier = modifier diff --git a/app/src/main/java/org/thoughtcrime/securesms/components/webrtc/v2/PictureInPictureCallScreen.kt b/app/src/main/java/org/thoughtcrime/securesms/components/webrtc/v2/PictureInPictureCallScreen.kt index 2f5debf89c..ab612f71a6 100644 --- a/app/src/main/java/org/thoughtcrime/securesms/components/webrtc/v2/PictureInPictureCallScreen.kt +++ b/app/src/main/java/org/thoughtcrime/securesms/components/webrtc/v2/PictureInPictureCallScreen.kt @@ -75,7 +75,7 @@ fun PictureInPictureCallScreen( renderInPip = true, raiseHandAllowed = false, onInfoMoreInfoClick = null, - mirrorVideo = isFullScreenLocalParticipant, + mirrorVideo = isFullScreenLocalParticipant && !fullScreenParticipant.isScreenSharing, modifier = Modifier.fillMaxSize() )