Almost running

- NEVER use undefined as the default for behaviors (FOOTGUN)
This commit is contained in:
Timo K
2025-11-07 12:32:29 +01:00
parent 92fdce33ea
commit 28047217b8
13 changed files with 83 additions and 34 deletions

View File

@@ -288,7 +288,7 @@ export const createLocalMembership$ = ({
};
const requestConnect = (): LocalMemberConnectionState => {
if (state.livekit$.value === null) {
if (state.livekit$.value.state === LivekitState.Uninitialized) {
startTracks();
state.livekit$.next({ state: LivekitState.Connecting });
combineLatest([publisher$, tracks$], (publisher, tracks) => {
@@ -302,7 +302,7 @@ export const createLocalMembership$ = ({
});
});
}
if (state.matrix$.value.state !== MatrixState.Disconnected) {
if (state.matrix$.value.state === MatrixState.Disconnected) {
state.matrix$.next({ state: MatrixState.Connecting });
localTransport$.pipe(
tap((transport) => {
@@ -438,6 +438,7 @@ export const createLocalMembership$ = ({
return of(false);
}),
),
null,
);
const toggleScreenSharing =