From f78cf6e79ac762eaead7e6f634f409d461687240 Mon Sep 17 00:00:00 2001 From: Robin Townsend Date: Thu, 22 Sep 2022 17:35:23 -0400 Subject: [PATCH] Don't allow the user to fullscreen their own screenshare feed --- src/video-grid/VideoTile.tsx | 40 +++++++++++++++++++++--------------- 1 file changed, 23 insertions(+), 17 deletions(-) diff --git a/src/video-grid/VideoTile.tsx b/src/video-grid/VideoTile.tsx index 44980b7..a82cb5b 100644 --- a/src/video-grid/VideoTile.tsx +++ b/src/video-grid/VideoTile.tsx @@ -66,6 +66,27 @@ export const VideoTile = forwardRef( }, ref ) => { + const toolbarButtons: JSX.Element[] = []; + if (!isLocal) { + toolbarButtons.push( + + ); + + if (screenshare) { + toolbarButtons.push( + + ); + } + } + return ( ( ref={ref} {...rest} > - {(!isLocal || screenshare) && ( -
- {!isLocal && ( - - )} - {screenshare && ( - - )} -
+ {toolbarButtons.length > 0 && ( +
{toolbarButtons}
)} {videoMuted && ( <>