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 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 ( return (
<animated.div <animated.div
className={classNames(styles.videoTile, className, { className={classNames(styles.videoTile, className, {
@ -78,23 +99,8 @@ export const VideoTile = forwardRef<HTMLDivElement, Props>(
ref={ref} ref={ref}
{...rest} {...rest}
> >
{(!isLocal || screenshare) && ( {toolbarButtons.length > 0 && (
<div className={classNames(styles.toolbar)}> <div className={classNames(styles.toolbar)}>{toolbarButtons}</div>
{!isLocal && (
<AudioButton
className={styles.button}
volume={localVolume}
onPress={onOptionsPress}
/>
)}
{screenshare && (
<FullscreenButton
className={styles.button}
fullscreen={fullscreen}
onPress={onFullscreen}
/>
)}
</div>
)} )}
{videoMuted && ( {videoMuted && (
<> <>