Only switch to spotlight for remote screen shares
This commit is contained in:
@@ -376,9 +376,9 @@ export class CallViewModel extends ViewModel {
|
|||||||
shareReplay(1),
|
shareReplay(1),
|
||||||
);
|
);
|
||||||
|
|
||||||
private readonly hasScreenShares: Observable<boolean> =
|
private readonly hasRemoteScreenShares: Observable<boolean> =
|
||||||
this.screenShares.pipe(
|
this.screenShares.pipe(
|
||||||
map((ms) => ms.length > 0),
|
map((ms) => ms.find((m) => !m.vm.local) !== undefined),
|
||||||
distinctUntilChanged(),
|
distinctUntilChanged(),
|
||||||
);
|
);
|
||||||
|
|
||||||
@@ -474,7 +474,7 @@ export class CallViewModel extends ViewModel {
|
|||||||
this.gridModeUserSelection,
|
this.gridModeUserSelection,
|
||||||
// If the user hasn't selected spotlight and somebody starts screen sharing,
|
// If the user hasn't selected spotlight and somebody starts screen sharing,
|
||||||
// automatically switch to spotlight mode and reset when screen sharing ends
|
// automatically switch to spotlight mode and reset when screen sharing ends
|
||||||
this.hasScreenShares.pipe(
|
this.hasRemoteScreenShares.pipe(
|
||||||
withLatestFrom(this.gridModeUserSelection.pipe(startWith(null))),
|
withLatestFrom(this.gridModeUserSelection.pipe(startWith(null))),
|
||||||
concatMap(([hasScreenShares, userSelection]) =>
|
concatMap(([hasScreenShares, userSelection]) =>
|
||||||
userSelection === "spotlight"
|
userSelection === "spotlight"
|
||||||
|
|||||||
Reference in New Issue
Block a user