From 9909fa7ebb333d4195da625d6e06c8641a690935 Mon Sep 17 00:00:00 2001 From: Robert Long Date: Thu, 26 Aug 2021 13:39:23 -0700 Subject: [PATCH] Fix presenter aspect ratio when only presenters or when multiple presenters --- src/VideoGrid.jsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/VideoGrid.jsx b/src/VideoGrid.jsx index 99d3a74..f2dccfe 100644 --- a/src/VideoGrid.jsx +++ b/src/VideoGrid.jsx @@ -53,7 +53,7 @@ function getTilePositions(tileCount, gridBounds, presenterTileCount) { const gridHeight = gridBounds.height; const gridAspectRatio = gridWidth / gridHeight; - if (presenterTileCount) { + if (presenterTileCount && presenterTileCount !== tileCount) { const subGridTileCount = tileCount - presenterTileCount; let presenterGridWidth, @@ -172,7 +172,7 @@ function getTilePositions(tileCount, gridBounds, presenterTileCount) { presenterGridHeight = gridHeight; presenterColumnCount = 1; presenterRowCount = presenterTileCount; - presenterTileAspectRatio = 0; + presenterTileAspectRatio = presenterTileCount === 1 ? 0 : 16 / 9; subGridWidth = gridWidth - presenterGridWidth; subGridHeight = gridHeight;