Skip to content

Commit

Permalink
Justify the use of a participant count threshold
Browse files Browse the repository at this point in the history
  • Loading branch information
robintown committed Jul 18, 2024
1 parent 183d2d9 commit e04affe
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion src/state/CallViewModel.ts
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,13 @@ import { ObservableScope } from "./ObservableScope";
// list again
const POST_FOCUS_PARTICIPANT_UPDATE_DELAY_MS = 3000;

// This is the number of participants that we think constitutes a "large" grid.
// The hypothesis is that, after this many participants there's enough cognitive
// load that it makes sense to show the speaker in an easy-to-locate spotlight
// tile. We might change this to a scroll-based condition or do something else
// entirely with the spotlight tile, if we workshop this further.
const largeGridThreshold = 20;

// Represents something that should get a tile on the layout,
// ie. a user's video feed or a screen share feed.
// TODO: This exposes too much information to the view layer, let's keep this
Expand Down Expand Up @@ -504,7 +511,8 @@ export class CallViewModel extends ViewModel {
(grid, spotlight, screenShares): Layout => ({
type: "grid",
spotlight:
screenShares.length > 0 || grid.length > 20
screenShares.length > 0 ||
grid.length > largeGridThreshold
? spotlight
: undefined,
grid,
Expand Down

0 comments on commit e04affe

Please sign in to comment.