diff --git a/src/state/MediaViewModel.ts b/src/state/MediaViewModel.ts index e005fbc3..31232b74 100644 --- a/src/state/MediaViewModel.ts +++ b/src/state/MediaViewModel.ts @@ -215,9 +215,6 @@ abstract class BaseMediaViewModel extends ViewModel { */ public readonly unencryptedWarning: Observable; - public readonly isLiveKitParticipantAvailable: Observable = - this.participant.pipe(map((p) => !!p)); - public readonly encryptionStatus: Observable; public constructor( @@ -231,7 +228,7 @@ abstract class BaseMediaViewModel extends ViewModel { // TODO: Fully separate the data layer from the UI layer by keeping the // member object internal public readonly member: RoomMember | undefined, - // We dont necessarily have a participant if a user connects via MatrixRTC but not (not yet) through + // We don't necessarily have a participant if a user connects via MatrixRTC but not (yet) through // livekit. protected readonly participant: Observable< LocalParticipant | RemoteParticipant | undefined @@ -259,8 +256,9 @@ abstract class BaseMediaViewModel extends ViewModel { this.encryptionStatus = this.participant.pipe( switchMap((participant): Observable => { - if ( - !participant || + if (!participant) { + return of(EncryptionStatus.Connecting); + } else if ( participant.isLocal || encryptionSystem.kind === E2eeType.NONE ) { diff --git a/src/tile/GridTile.tsx b/src/tile/GridTile.tsx index e493cba7..bad9a613 100644 --- a/src/tile/GridTile.tsx +++ b/src/tile/GridTile.tsx @@ -86,9 +86,6 @@ const UserMediaTile = forwardRef( const videoEnabled = useObservableEagerState(vm.videoEnabled); const speaking = useObservableEagerState(vm.speaking); const cropVideo = useObservableEagerState(vm.cropVideo); - const isLiveKitParticipantAvailable = useObservableEagerState( - vm.isLiveKitParticipantAvailable, - ); const onSelectFitContain = useCallback( (e: Event) => { e.preventDefault(); @@ -142,12 +139,7 @@ const UserMediaTile = forwardRef( className={styles.muteIcon} /> } - displayName={ - displayName + - (isLiveKitParticipantAvailable - ? "" - : " missing Livekit Participant...") - } + displayName={displayName} primaryButton={ - {/* {isLiveKitParticipantAvailable - ? "is available" - : "Loading RTC participant"} */}