Skip to content

Commit

Permalink
Don't show local media on top of itself
Browse files Browse the repository at this point in the history
If you were the only one in the call, you could get a broken-looking view in which the local tile is shown in the spotlight, and it's also shown in the PiP. This is redundant.
  • Loading branch information
robintown committed Aug 6, 2024
1 parent f928e63 commit bf5128c
Showing 1 changed file with 11 additions and 5 deletions.
16 changes: 11 additions & 5 deletions src/state/CallViewModel.ts
Original file line number Diff line number Diff line change
Expand Up @@ -488,11 +488,17 @@ export class CallViewModel extends ViewModel {
? ([of(screenShares.map((m) => m.vm)), this.spotlightSpeaker] as const)
: ([
this.spotlightSpeaker.pipe(map((speaker) => [speaker!])),
this.localUserMedia.pipe(
switchMap((vm) =>
vm.alwaysShow.pipe(
map((alwaysShow) => (alwaysShow ? vm : null)),
),
this.spotlightSpeaker.pipe(
switchMap((speaker) =>
speaker.local
? of(null)
: this.localUserMedia.pipe(
switchMap((vm) =>
vm.alwaysShow.pipe(
map((alwaysShow) => (alwaysShow ? vm : null)),
),
),
),
),
),
] as const),
Expand Down

0 comments on commit bf5128c

Please sign in to comment.