Skip to content

Honor per-call publishOptions.preConnectBuffer in setTrackEnabled - #2132

Open
lukasIO wants to merge 1 commit into
mainfrom
fix/preconnect-buffer-publish-options
Open

lukasIO wants to merge 1 commit into
mainfrom
fix/preconnect-buffer-publish-options

Conversation

@lukasIO

@lukasIO lukasIO commented Oct 5, 2026

Copy link
Copy Markdown
Contributor

setMicrophoneEnabled(true, undefined, { preConnectBuffer: true }) starts the preconnect buffer on the new audio track, while a stray preConnectBuffer in the capture-options argument does not.

setMicrophoneEnabled(true, undefined, { preConnectBuffer: true }) starts the preconnect buffer on the new audio track, while a stray preConnectBuffer in the capture-options argument does not.
@changeset-bot

changeset-bot Bot commented Oct 5, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 6958239

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

@devin-ai-integration devin-ai-integration Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

✅ Devin Review: No Issues Found

Devin Review analyzed this PR and found no bugs or issues to report.

Devin Review

@github-actions

github-actions Bot commented Oct 5, 2026

Copy link
Copy Markdown
Contributor

size-limit report 📦

Path Size
dist/livekit-client.esm.mjs 112.21 KB (-0.1% 🔽)
dist/livekit-client.umd.js 121.42 KB (-0.03% 🔽)

Comment on lines +586 to 591
const opts: TrackPublishOptions = {
...this.roomOptions.publishDefaults,
...publishOptions,
};
for (const localTrack of localTracks) {
const opts: TrackPublishOptions = {
...this.roomOptions.publishDefaults,
...options,
};
if (

@1egoman 1egoman Oct 5, 2026 •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

thought: Would it be worth a preConnectBuffer: never in publishOptions or similar to ensure that a user doesn't pass options.publishDefaults by accident anymore? My understanding is that while this is a breaking change, it's actually a fix for a regression here so it's probably worth it.

I suppose another option could be to add publishDefaults in both places but I suspect that's probably more trouble than it is worth.

This branch has not been deployed

No deployments
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