Make the type of participant$ stricter

It is, in fact, required to be a behavior.
This commit is contained in:
Robin
2026-02-18 14:01:55 +01:00
parent 9d37125677
commit bc238778ad
2 changed files with 7 additions and 7 deletions

View File

@@ -259,7 +259,7 @@ abstract class BaseMediaViewModel {
public readonly userId: string,
// We don't necessarily have a participant if a user connects via MatrixRTC but not (yet) through
// livekit.
protected readonly participant$: Observable<
protected readonly participant$: Behavior<
LocalParticipant | RemoteParticipant | null
>,
@@ -410,7 +410,7 @@ abstract class BaseUserMediaViewModel extends BaseMediaViewModel {
* The expected identity of the LiveKit participant. Exposed for debugging.
*/
public readonly rtcBackendIdentity: string,
participant$: Observable<LocalParticipant | RemoteParticipant | null>,
participant$: Behavior<LocalParticipant | RemoteParticipant | null>,
encryptionSystem: EncryptionSystem,
livekitRoom$: Behavior<LivekitRoom | undefined>,
focusUrl$: Behavior<string | undefined>,
@@ -678,7 +678,7 @@ export class RemoteUserMediaViewModel extends BaseUserMediaViewModel {
id: string,
userId: string,
rtcBackendIdentity: string,
participant$: Observable<RemoteParticipant | null>,
participant$: Behavior<RemoteParticipant | null>,
encryptionSystem: EncryptionSystem,
livekitRoom$: Behavior<LivekitRoom | undefined>,
focusUrl$: Behavior<string | undefined>,
@@ -780,7 +780,7 @@ export class ScreenShareViewModel extends BaseMediaViewModel {
scope: ObservableScope,
id: string,
userId: string,
participant$: Observable<LocalParticipant | RemoteParticipant>,
participant$: Behavior<LocalParticipant | RemoteParticipant>,
encryptionSystem: EncryptionSystem,
livekitRoom$: Behavior<LivekitRoom | undefined>,
focusUrl$: Behavior<string | undefined>,