mirror of
https://github.com/vector-im/element-call.git
synced 2024-11-21 00:28:08 +08:00
React more actively to changes in room membership
This commit is contained in:
parent
1b5b9342fe
commit
ca135d471e
@ -16,7 +16,11 @@ import {
|
|||||||
ParticipantEvent,
|
ParticipantEvent,
|
||||||
RemoteParticipant,
|
RemoteParticipant,
|
||||||
} from "livekit-client";
|
} from "livekit-client";
|
||||||
import { Room as MatrixRoom, RoomMember } from "matrix-js-sdk/src/matrix";
|
import {
|
||||||
|
Room as MatrixRoom,
|
||||||
|
RoomMember,
|
||||||
|
RoomStateEvent,
|
||||||
|
} from "matrix-js-sdk/src/matrix";
|
||||||
import {
|
import {
|
||||||
EMPTY,
|
EMPTY,
|
||||||
Observable,
|
Observable,
|
||||||
@ -321,6 +325,8 @@ export class CallViewModel extends ViewModel {
|
|||||||
this.remoteParticipants,
|
this.remoteParticipants,
|
||||||
observeParticipantMedia(this.livekitRoom.localParticipant),
|
observeParticipantMedia(this.livekitRoom.localParticipant),
|
||||||
duplicateTiles.value,
|
duplicateTiles.value,
|
||||||
|
// Also react to changes in the list of members
|
||||||
|
fromEvent(this.matrixRoom, RoomStateEvent.Update).pipe(startWith(null)),
|
||||||
]).pipe(
|
]).pipe(
|
||||||
scan(
|
scan(
|
||||||
(
|
(
|
||||||
|
Loading…
Reference in New Issue
Block a user