Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Show speaker in the spotlight in large grids #2416

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 11 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,10 @@ export class CallViewModel extends ViewModel {
(grid, spotlight, screenShares): Layout => ({
type: "grid",
spotlight:
screenShares.length > 0 ? spotlight : undefined,
screenShares.length > 0 ||
grid.length > largeGridThreshold
? spotlight
: undefined,
grid,
}),
);
Expand Down
Loading