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

New spotlight layout #2382

Merged
merged 9 commits into from
Jul 18, 2024
6 changes: 3 additions & 3 deletions src/state/CallViewModel.ts
Original file line number Diff line number Diff line change
Expand Up @@ -376,9 +376,9 @@ export class CallViewModel extends ViewModel {
shareReplay(1),
);

private readonly hasScreenShares: Observable<boolean> =
private readonly hasRemoteScreenShares: Observable<boolean> =
this.screenShares.pipe(
map((ms) => ms.length > 0),
map((ms) => ms.find((m) => !m.vm.local) !== undefined),
robintown marked this conversation as resolved.
Show resolved Hide resolved
distinctUntilChanged(),
);

Expand Down Expand Up @@ -474,7 +474,7 @@ export class CallViewModel extends ViewModel {
this.gridModeUserSelection,
// If the user hasn't selected spotlight and somebody starts screen sharing,
// automatically switch to spotlight mode and reset when screen sharing ends
this.hasScreenShares.pipe(
this.hasRemoteScreenShares.pipe(
withLatestFrom(this.gridModeUserSelection.pipe(startWith(null))),
concatMap(([hasScreenShares, userSelection]) =>
userSelection === "spotlight"
Expand Down