Skip to content

Commit 74d98d3

Browse files
ToubatlukasIO
andauthored
Fix duplicate startWith on room events observable (#1092)
Co-authored-by: lukasIO <mail@lukasseiler.de>
1 parent 4d82699 commit 74d98d3

File tree

2 files changed

+8
-3
lines changed

2 files changed

+8
-3
lines changed

.changeset/curly-eyes-laugh.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@livekit/components-core": patch
3+
---
4+
5+
Fix duplicate startWith on room events observable

packages/core/src/observables/room.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
import type { Subscriber, Subscription } from 'rxjs';
2-
import { Subject, map, Observable, startWith, finalize, filter, concat } from 'rxjs';
31
import type { Participant, TrackPublication } from 'livekit-client';
42
import { LocalParticipant, Room, RoomEvent, Track } from 'livekit-client';
3+
import type { Subscriber, Subscription } from 'rxjs';
4+
import { concat, filter, finalize, map, Observable, startWith, Subject } from 'rxjs';
55
// @ts-ignore some module resolutions (other than 'node') choke on this
66
import type { RoomEventCallbacks } from 'livekit-client/dist/src/room/Room';
77
import { log } from '../logger';
@@ -54,7 +54,7 @@ export function roomObserver(room: Room) {
5454
RoomEvent.LocalTrackUnpublished,
5555
RoomEvent.AudioPlaybackStatusChanged,
5656
RoomEvent.ConnectionStateChanged,
57-
).pipe(startWith(room));
57+
);
5858

5959
return observable;
6060
}

0 commit comments

Comments
 (0)