From 0c4cddbb3290fbc9f030a5698dcac81cb3c248b4 Mon Sep 17 00:00:00 2001 From: Hugh Nimmo-Smith Date: Thu, 7 Nov 2024 16:23:40 +0000 Subject: [PATCH] Apply local override where participant not yet known --- src/state/CallViewModel.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/state/CallViewModel.ts b/src/state/CallViewModel.ts index ee5eeda1..080adbf4 100644 --- a/src/state/CallViewModel.ts +++ b/src/state/CallViewModel.ts @@ -231,10 +231,11 @@ class UserMedia { participant: LocalParticipant | RemoteParticipant | undefined, encryptionSystem: EncryptionSystem, livekitRoom: LivekitRoom, + local: boolean, ) { this.participant = new BehaviorSubject(participant); - if (participant && participant.isLocal) { + if (participant?.isLocal || local) { this.vm = new LocalUserMediaViewModel( this.id, member, @@ -500,6 +501,7 @@ export class CallViewModel extends ViewModel { participant, this.encryptionSystem, this.livekitRoom, + mediaId === "local", ), ]; @@ -556,6 +558,7 @@ export class CallViewModel extends ViewModel { participant, this.encryptionSystem, this.livekitRoom, + false, ), ]; }