diff --git a/src/button/Button.tsx b/src/button/Button.tsx index 3136e2da..4bb0058d 100644 --- a/src/button/Button.tsx +++ b/src/button/Button.tsx @@ -23,6 +23,7 @@ import styles from "./Button.module.css"; interface MicButtonProps extends ComponentPropsWithoutRef<"button"> { muted: boolean; + size: "sm" | "lg"; } export const MicButton: FC = ({ muted, ...props }) => { @@ -47,6 +48,7 @@ export const MicButton: FC = ({ muted, ...props }) => { interface VideoButtonProps extends ComponentPropsWithoutRef<"button"> { muted: boolean; + size: "sm" | "lg"; } export const VideoButton: FC = ({ muted, ...props }) => { @@ -71,6 +73,7 @@ export const VideoButton: FC = ({ muted, ...props }) => { interface ShareScreenButtonProps extends ComponentPropsWithoutRef<"button"> { enabled: boolean; + size: "sm" | "lg"; } export const ShareScreenButton: FC = ({ @@ -94,7 +97,11 @@ export const ShareScreenButton: FC = ({ ); }; -export const EndCallButton: FC> = ({ +interface EndCallButtonProps extends ComponentPropsWithoutRef<"button"> { + size: "sm" | "lg"; +} + +export const EndCallButton: FC = ({ className, ...props }) => { diff --git a/src/room/InCallView.module.css b/src/room/InCallView.module.css index 55724932..70f7c73a 100644 --- a/src/room/InCallView.module.css +++ b/src/room/InCallView.module.css @@ -108,22 +108,9 @@ Please see LICENSE in the repository root for full details. } } -@media (max-width: 370px) { - .shareScreen { - display: none; - } - - @media (max-height: 400px) { - .footer { - display: none; - } - } -} - -@media (max-width: 320px) { - .invite, - .raiseHand { - display: none; +@media (max-height: 800px) { + .footer { + padding-block: var(--cpd-space-8x); } } @@ -133,9 +120,27 @@ Please see LICENSE in the repository root for full details. } } -@media (max-height: 800px) { - .footer { - padding-block: var(--cpd-space-8x); +@media (max-width: 370px) { + .shareScreen { + display: none; + } + + /* PIP custom css */ + @media (max-height: 400px) { + .shareScreen { + display: flex; + } + .footer { + padding-block-start: var(--cpd-space-3x); + padding-block-end: var(--cpd-space-2x); + } + } +} + +@media (max-width: 320px) { + .invite, + .raiseHand { + display: none; } } diff --git a/src/room/InCallView.tsx b/src/room/InCallView.tsx index d8803b22..f1a872a0 100644 --- a/src/room/InCallView.tsx +++ b/src/room/InCallView.tsx @@ -640,8 +640,10 @@ export const InCallView: FC = ({ const buttons: JSX.Element[] = []; + const buttonSize = layout.type === "pip" ? "sm" : "lg"; buttons.push( = ({ data-testid="incall_mute" />, = ({ if (vm.toggleScreenSharing !== null) { buttons.push( = ({ if (supportsReactions) { buttons.push( = ({ ); } if (layout.type !== "pip") - buttons.push(); + buttons.push( + , + ); buttons.push( { switch (mode) { case "pip": - return of(false); + return of(true); case "normal": case "narrow": return of(true); diff --git a/src/state/PipLayout.ts b/src/state/PipLayout.ts index 56e9aeb2..25a84e94 100644 --- a/src/state/PipLayout.ts +++ b/src/state/PipLayout.ts @@ -16,7 +16,8 @@ export function pipLayout( prevTiles: TileStore, ): [PipLayout, TileStore] { const update = prevTiles.from(0); - update.registerSpotlight(media.spotlight, true); + // Dont maximise in pip since we want the rounded corners and the footer + update.registerSpotlight(media.spotlight, false); const tiles = update.build(); return [ {