mirror of
https://github.com/vector-im/element-call.git
synced 2026-07-27 19:29:19 +00:00
Simplify diff
These changes are in https://github.com/element-hq/element-call/pull/2809
This commit is contained in:
@@ -375,16 +375,12 @@ export class CallViewModel extends ViewModel {
|
|||||||
}),
|
}),
|
||||||
);
|
);
|
||||||
|
|
||||||
/**
|
private readonly rawRemoteParticipants = connectedParticipantsObserver(
|
||||||
* The raw list of RemoteParticipants as reported by LiveKit
|
this.livekitRoom,
|
||||||
*/
|
).pipe(this.scope.state());
|
||||||
private readonly rawRemoteParticipants: Observable<RemoteParticipant[]> =
|
|
||||||
connectedParticipantsObserver(this.livekitRoom).pipe(this.scope.state());
|
|
||||||
|
|
||||||
/**
|
// Lists of RemoteParticipants to "hold" on display, even if LiveKit claims that
|
||||||
* Lists of RemoteParticipants to "hold" on display, even if LiveKit claims that
|
// they've left
|
||||||
* they've left
|
|
||||||
*/
|
|
||||||
private readonly remoteParticipantHolds: Observable<RemoteParticipant[][]> =
|
private readonly remoteParticipantHolds: Observable<RemoteParticipant[][]> =
|
||||||
this.connectionState.pipe(
|
this.connectionState.pipe(
|
||||||
withLatestFrom(this.rawRemoteParticipants),
|
withLatestFrom(this.rawRemoteParticipants),
|
||||||
@@ -419,9 +415,6 @@ export class CallViewModel extends ViewModel {
|
|||||||
),
|
),
|
||||||
);
|
);
|
||||||
|
|
||||||
/**
|
|
||||||
* The RemoteParticipants including those that are being "held" on the screen
|
|
||||||
*/
|
|
||||||
private readonly remoteParticipants: Observable<RemoteParticipant[]> =
|
private readonly remoteParticipants: Observable<RemoteParticipant[]> =
|
||||||
combineLatest(
|
combineLatest(
|
||||||
[this.rawRemoteParticipants, this.remoteParticipantHolds],
|
[this.rawRemoteParticipants, this.remoteParticipantHolds],
|
||||||
@@ -443,9 +436,6 @@ export class CallViewModel extends ViewModel {
|
|||||||
},
|
},
|
||||||
);
|
);
|
||||||
|
|
||||||
/**
|
|
||||||
* List of MediaItems that we want to display
|
|
||||||
*/
|
|
||||||
private readonly mediaItems: Observable<MediaItem[]> = combineLatest([
|
private readonly mediaItems: Observable<MediaItem[]> = combineLatest([
|
||||||
this.remoteParticipants,
|
this.remoteParticipants,
|
||||||
observeParticipantMedia(this.livekitRoom.localParticipant),
|
observeParticipantMedia(this.livekitRoom.localParticipant),
|
||||||
@@ -551,18 +541,12 @@ export class CallViewModel extends ViewModel {
|
|||||||
this.scope.state(),
|
this.scope.state(),
|
||||||
);
|
);
|
||||||
|
|
||||||
/**
|
|
||||||
* List of MediaItems that we want to display, that are of type UserMedia
|
|
||||||
*/
|
|
||||||
private readonly userMedia: Observable<UserMedia[]> = this.mediaItems.pipe(
|
private readonly userMedia: Observable<UserMedia[]> = this.mediaItems.pipe(
|
||||||
map((mediaItems) =>
|
map((mediaItems) =>
|
||||||
mediaItems.filter((m): m is UserMedia => m instanceof UserMedia),
|
mediaItems.filter((m): m is UserMedia => m instanceof UserMedia),
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
|
|
||||||
/**
|
|
||||||
* List of MediaItems that we want to display, that are of type ScreenShare
|
|
||||||
*/
|
|
||||||
private readonly screenShares: Observable<ScreenShare[]> =
|
private readonly screenShares: Observable<ScreenShare[]> =
|
||||||
this.mediaItems.pipe(
|
this.mediaItems.pipe(
|
||||||
map((mediaItems) =>
|
map((mediaItems) =>
|
||||||
|
|||||||
Reference in New Issue
Block a user