Add hideControls url param for screen recordings. (#1808)

---------

Signed-off-by: Timo K <toger5@hotmail.de>
This commit is contained in:
Timo
2023-10-26 19:33:59 +02:00
committed by GitHub
parent e2c6a3eda6
commit 58ee31d383
3 changed files with 28 additions and 5 deletions

View File

@@ -41,6 +41,7 @@ import { useTranslation } from "react-i18next";
import useMeasure from "react-use-measure";
import { logger } from "matrix-js-sdk/src/logger";
import { MatrixRTCSession } from "matrix-js-sdk/src/matrixrtc/MatrixRTCSession";
import classNames from "classnames";
import LogoMark from "../icons/LogoMark.svg?react";
import LogoType from "../icons/LogoType.svg?react";
@@ -177,7 +178,7 @@ export const InCallView: FC<InCallViewProps> = ({
const [showConnectionStats] = useShowConnectionStats();
const { hideScreensharing } = useUrlParams();
const { hideScreensharing, showControls } = useUrlParams();
const { isScreenShareEnabled, localParticipant } = useLocalParticipant({
room: livekitRoom,
@@ -387,7 +388,15 @@ export const InCallView: FC<InCallViewProps> = ({
/>,
);
footer = (
<div className={styles.footer}>
<div
className={classNames(
showControls
? hideHeader
? [styles.footer, styles.footerHidden]
: [styles.footer, styles.footerThin]
: styles.footer,
)}
>
{!mobile && !hideHeader && (
<div className={styles.logo}>
<LogoMark width={24} height={24} aria-hidden />
@@ -398,8 +407,8 @@ export const InCallView: FC<InCallViewProps> = ({
/>
</div>
)}
<div className={styles.buttons}>{buttons}</div>
{!mobile && !hideHeader && (
{!showControls && <div className={styles.buttons}>{buttons}</div>}
{!mobile && !hideHeader && !showControls && (
<LayoutToggle
className={styles.layout}
layout={layout}
@@ -424,7 +433,7 @@ export const InCallView: FC<InCallViewProps> = ({
/>
</LeftNav>
<RightNav>
{!reducedControls && onShareClick !== null && (
{!reducedControls && !showControls && onShareClick !== null && (
<InviteButton onClick={onShareClick} />
)}
</RightNav>