Skip to content

Improved data tracks depacketizer to support mutliple in flight packets#1923

Open
1egoman wants to merge 7 commits intomainfrom
improved-depacketizer
Open

Improved data tracks depacketizer to support mutliple in flight packets#1923
1egoman wants to merge 7 commits intomainfrom
improved-depacketizer

Conversation

@1egoman
Copy link
Copy Markdown
Contributor

@1egoman 1egoman commented Apr 27, 2026

  • Updates the depacketizer to take a maxPartialFrames which controls how many frames are being stored at once.
  • Exposes this as a RemoteDataTrack level setting - there is one pipeline per track, not one pipeline per subscription, so this is where it makes most sense (also given that you won't really need to configure it differently by subscription since this is fully dependant on the data being received from the sender).

Code example:

const remoteDataTrack: RemoteDataTrack = /* ... */;

// The new bit:
remoteDataTrack.setMaxPartialFrames(10); // Defaults to 1 to maintain backwards compatibility.

for await (const frame of remoteDataTrack.subscribe()) {
  // ...
}

Todo

  • Add changeset

1egoman added 7 commits April 27, 2026 16:04
…Start" packets being stored (fixes the last failing test)
- Use map insertion order instead of a timestamp for sorting
- Add comments
Also rename some fields which came up during writing the tests.
…es into the Depacketizer from the RemoteDataTrack
@changeset-bot
Copy link
Copy Markdown

changeset-bot Bot commented Apr 27, 2026

⚠️ No Changeset found

Latest commit: 64daceb

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

Click here to learn what changesets are, and how to add one.

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

@1egoman 1egoman requested a review from ladvoc April 27, 2026 21:28
@github-actions
Copy link
Copy Markdown
Contributor

size-limit report 📦

Path Size
dist/livekit-client.esm.mjs 97.13 KB (+0.2% 🔺)
dist/livekit-client.umd.js 105.99 KB (+0.1% 🔺)

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.

1 participant