Choose the grid shape that gives every tile the most screen.
For each candidate column count, the limiting dimension decides the tile
size (width share vs. height share × aspect); the candidate with the
largest tile wins. Unlike a participant-count lookup table, this reacts to
the CONTAINER's shape and the tiles' aspect — five 4:3 cameras in a wide
room pick 3×2, in a tall room 2×3 — so the letterbox a fixed table leaves
behind becomes usable video.
columns, when provided, pins the column count (explicit override).
There is deliberately no minimum-tile-width knob: the winner is already
the candidate with the WIDEST tiles, so a floor either passes the winner
untouched or rejects every candidate — it can never improve the choice.
(The old table-based layout needed a width cap precisely because its
column count ignored the container.)
Choose the grid shape that gives every tile the most screen.
For each candidate column count, the limiting dimension decides the tile size (width share vs. height share × aspect); the candidate with the largest tile wins. Unlike a participant-count lookup table, this reacts to the CONTAINER's shape and the tiles' aspect — five 4:3 cameras in a wide room pick 3×2, in a tall room 2×3 — so the letterbox a fixed table leaves behind becomes usable video.
columns, when provided, pins the column count (explicit override).There is deliberately no minimum-tile-width knob: the winner is already the candidate with the WIDEST tiles, so a floor either passes the winner untouched or rejects every candidate — it can never improve the choice. (The old table-based layout needed a width cap precisely because its column count ignored the container.)