diff --git a/src/VideoGrid.jsx b/src/VideoGrid.jsx index 1a665b0..de3ce47 100644 --- a/src/VideoGrid.jsx +++ b/src/VideoGrid.jsx @@ -37,6 +37,10 @@ function getTilePositions(tileCount, gridBounds) { const { width: gridWidth, height: gridHeight } = gridBounds; const gap = 8; + if (tileCount > 12) { + console.warn("Over 12 tiles is not currently supported"); + } + if (tileCount > 0) { const aspectRatio = gridWidth / gridHeight; @@ -49,6 +53,10 @@ function getTilePositions(tileCount, gridBounds) { } else if (tileCount <= 12) { columnCount = 2; rowCount = Math.ceil(tileCount / 2); + } else { + // Unsupported + columnCount = 3; + rowCount = Math.ceil(tileCount / 2); } } else { if (tileCount === 1) { @@ -72,6 +80,10 @@ function getTilePositions(tileCount, gridBounds) { } else if (tileCount <= 12) { columnCount = 4; rowCount = 3; + } else { + // Unsupported + columnCount = 4; + rowCount = 4; } }