diff --git a/stylesheets/_mixins.scss b/stylesheets/_mixins.scss index f5300438cd..e21e4a8e68 100644 --- a/stylesheets/_mixins.scss +++ b/stylesheets/_mixins.scss @@ -230,8 +230,11 @@ } @mixin lonely-local-video-preview { - object-fit: cover; - opacity: 0.6; + max-height: calc(100% - 24px); + height: auto; + transform: rotateY(180deg); + width: calc(100% - 24px); + border-radius: 8px; } // --- Buttons diff --git a/stylesheets/_modules.scss b/stylesheets/_modules.scss index d9388cd8fc..e16ef0ce95 100644 --- a/stylesheets/_modules.scss +++ b/stylesheets/_modules.scss @@ -5235,7 +5235,10 @@ button.module-image__border-overlay:focus { } &__local-preview-fullsize { + align-items: center; + display: flex; height: 100%; + justify-content: center; left: 0; position: absolute; top: 0; @@ -5245,6 +5248,12 @@ button.module-image__border-overlay:focus { video { @include lonely-local-video-preview; } + + &--presenting { + video { + transform: none; + } + } } &__footer { diff --git a/stylesheets/components/CallingLobby.scss b/stylesheets/components/CallingLobby.scss index f00aeef99d..cd00a7ab0b 100644 --- a/stylesheets/components/CallingLobby.scss +++ b/stylesheets/components/CallingLobby.scss @@ -3,14 +3,17 @@ .module-CallingLobby { &__local-preview { - @include lonely-local-video-preview; - height: 100%; position: absolute; - width: 100%; z-index: -1; &--camera-is-on { - transform: rotateY(180deg); + @include lonely-local-video-preview; + opacity: 0.6; + } + + &--camera-is-off { + height: 100%; + width: 100%; } } diff --git a/ts/components/CallScreen.tsx b/ts/components/CallScreen.tsx index eed8f9d561..252f719734 100644 --- a/ts/components/CallScreen.tsx +++ b/ts/components/CallScreen.tsx @@ -211,6 +211,8 @@ export const CallScreen: React.FC = ({ remoteParticipant => remoteParticipant.hasRemoteVideo ); + const isSendingVideo = hasLocalVideo || presentingSource; + let isRinging: boolean; let hasCallStarted: boolean; let headerMessage: string | undefined; @@ -278,9 +280,80 @@ export const CallScreen: React.FC = ({ throw missingCaseError(activeCall); } - const isLonelyInGroup = + let lonelyInGroupNode: ReactNode; + let localPreviewNode: ReactNode; + if ( activeCall.callMode === CallMode.Group && - !activeCall.remoteParticipants.length; + !activeCall.remoteParticipants.length + ) { + lonelyInGroupNode = ( +
+ {isSendingVideo ? ( +
+ ); + } else { + localPreviewNode = isSendingVideo ? ( +