Skip to content

Commit

Permalink
Merge pull request #2541 from robintown/local-on-local
Browse files Browse the repository at this point in the history
Don't show local media on top of itself
  • Loading branch information
robintown authored Aug 7, 2024
2 parents b13fa85 + bf5128c commit 9b5072c
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 9b5072c

Please sign in to comment.