Don't allow the user to fullscreen their own screenshare feed

This commit is contained in:
Robin Townsend 2022-09-22 17:35:23 -04:00
parent b84c36eb2e
commit f78cf6e79a

View file

@ -66,6 +66,27 @@ export const VideoTile = forwardRef<HTMLDivElement, Props>(
},
ref
) => {
const toolbarButtons: JSX.Element[] = [];
if (!isLocal) {
toolbarButtons.push(
<AudioButton
className={styles.button}
volume={localVolume}
onPress={onOptionsPress}
/>
);
if (screenshare) {
toolbarButtons.push(
<FullscreenButton
className={styles.button}
fullscreen={fullscreen}
onPress={onFullscreen}
/>
);
}
}
return (
<animated.div
className={classNames(styles.videoTile, className, {
@ -78,23 +99,8 @@ export const VideoTile = forwardRef<HTMLDivElement, Props>(
ref={ref}
{...rest}
>
{(!isLocal || screenshare) && (
<div className={classNames(styles.toolbar)}>
{!isLocal && (
<AudioButton
className={styles.button}
volume={localVolume}
onPress={onOptionsPress}
/>
)}
{screenshare && (
<FullscreenButton
className={styles.button}
fullscreen={fullscreen}
onPress={onFullscreen}
/>
)}
</div>
{toolbarButtons.length > 0 && (
<div className={classNames(styles.toolbar)}>{toolbarButtons}</div>
)}
{videoMuted && (
<>