Skip to content

Buffer stream events until connected#1867

Merged
lukasIO merged 2 commits intomainfrom
lukas/buffer-stream-events
Apr 7, 2026
Merged

Buffer stream events until connected#1867
lukasIO merged 2 commits intomainfrom
lukas/buffer-stream-events

Conversation

@lukasIO
Copy link
Copy Markdown
Contributor

@lukasIO lukasIO commented Apr 1, 2026

prevents streamhandler callbacks from firing before the room connection is fully established

@lukasIO lukasIO requested a review from 1egoman April 1, 2026 09:20
@changeset-bot
Copy link
Copy Markdown

changeset-bot bot commented Apr 1, 2026

🦋 Changeset detected

Latest commit: 7605954

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
livekit-client Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Apr 1, 2026

size-limit report 📦

Path Size
dist/livekit-client.esm.mjs 87.3 KB (+0.16% 🔺)
dist/livekit-client.umd.js 97.89 KB (+0.15% 🔺)

Copy link
Copy Markdown
Contributor

@1egoman 1egoman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it makes sense!

Just to make sure I properly understand the situation that can cause this, is it something like this?

  1. Participant A connects to room
  2. Participant B starts connecting to room
  3. Participant A sends participant B a data stream
  4. Participant B receives the data stream but the system is in a half set up state so when the handler callbacks fire, something is weird (not sure what the something is though) and it doesn't work.

@lukasIO
Copy link
Copy Markdown
Contributor Author

lukasIO commented Apr 7, 2026

yes, that's pretty much it.

The weird part is that the room.connect call hasn't succeeded yet so the userland code might not even be aware of the participant that is emitting the stream

@lukasIO lukasIO merged commit ff7a5e9 into main Apr 7, 2026
6 checks passed
@lukasIO lukasIO deleted the lukas/buffer-stream-events branch April 7, 2026 10:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants