From 00f0f63ca6b545940fabc749e3f206d8881c319d Mon Sep 17 00:00:00 2001 From: Robert Long Date: Tue, 31 Aug 2021 14:07:47 -0700 Subject: [PATCH] Fix 0 presenter case --- src/VideoGrid.jsx | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/src/VideoGrid.jsx b/src/VideoGrid.jsx index 86faa909..6efc827d 100644 --- a/src/VideoGrid.jsx +++ b/src/VideoGrid.jsx @@ -50,10 +50,6 @@ function getTilePositions( console.warn("Over 12 tiles is not currently supported"); } - if (presenterTileCount > 3) { - console.warn("Over 3 presenters is not currently supported"); - } - const gap = 8; const { layoutDirection, participantGridRatio } = getGridLayout( @@ -83,7 +79,10 @@ function getTilePositions( let presenterGridWidth, presenterGridHeight; - if (layoutDirection === "vertical") { + if (presenterTileCount === 0) { + presenterGridWidth = 0; + presenterGridHeight = 0; + } else if (layoutDirection === "vertical") { presenterGridWidth = gridWidth; presenterGridHeight = gridHeight - (participantGridBounds.height + gap * 2); } else {