Apply local override where participant not yet known

This commit is contained in:
Hugh Nimmo-Smith
2024-11-07 16:23:40 +00:00
parent bf41cfc005
commit 0c4cddbb32

View File

@@ -231,10 +231,11 @@ class UserMedia {
participant: LocalParticipant | RemoteParticipant | undefined, participant: LocalParticipant | RemoteParticipant | undefined,
encryptionSystem: EncryptionSystem, encryptionSystem: EncryptionSystem,
livekitRoom: LivekitRoom, livekitRoom: LivekitRoom,
local: boolean,
) { ) {
this.participant = new BehaviorSubject(participant); this.participant = new BehaviorSubject(participant);
if (participant && participant.isLocal) { if (participant?.isLocal || local) {
this.vm = new LocalUserMediaViewModel( this.vm = new LocalUserMediaViewModel(
this.id, this.id,
member, member,
@@ -500,6 +501,7 @@ export class CallViewModel extends ViewModel {
participant, participant,
this.encryptionSystem, this.encryptionSystem,
this.livekitRoom, this.livekitRoom,
mediaId === "local",
), ),
]; ];
@@ -556,6 +558,7 @@ export class CallViewModel extends ViewModel {
participant, participant,
this.encryptionSystem, this.encryptionSystem,
this.livekitRoom, this.livekitRoom,
false,
), ),
]; ];
} }