use updated state logic in the sdk

This commit is contained in:
Timo K.
2026-10-14 10:23:29 +02:00
committed by Timo
parent cec5031f62
commit 598ec42390
5 changed files with 69 additions and 70 deletions
+6 -3
View File
@@ -147,8 +147,8 @@ export async function createMatrixRTCSdk(
vm.leave$
.pipe(
switchMap(() =>
participation.status$.pipe(
filter((status) => status === "left"),
participation.state$.pipe(
filter((state) => state.kind === "left"),
take(1),
),
),
@@ -164,7 +164,10 @@ export async function createMatrixRTCSdk(
},
leave: (): void => vm?.leave(),
stop: (): void => scope.end(),
connected$: over((p) => p.connected$, false),
connected$: over(
(p) => p.state$.pipe(map((state) => state.kind === "connected")),
false,
),
localMember$: over((p) => p.localMember$, null),
remoteMembers$: over((p) => p.remoteMembers$, []),
// Attested members only: the SDK has matched the sender