Skip to content

Fix dynacast never pausing video layers on React Native - #2163

Merged
davidliu merged 1 commit into
mainfrom
dl/rn_start_monitor_fix
Oct 21, 2026
Merged

davidliu merged 1 commit into
mainfrom
dl/rn_start_monitor_fix

Conversation

@davidliu

Copy link
Copy Markdown
Contributor

LocalVideoTrack.startMonitor() returned early when !isWeb(), before it saved the sender's original encodings to this.encodings. On React Native, setPublishingLayers() then found this.encodings unset and returned without doing anything. Dynacast updates from the SFU were ignored, and every simulcast layer kept sending even when no one was subscribed to it.

This PR moves the isWeb() check below the point where the encodings are saved. React Native now stores them at publish time, so dynacast can pause and resume layers. The stats monitor interval still runs only on web.

@changeset-bot

changeset-bot Bot commented Oct 20, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 4a859d8

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: 1 flag

Not posted on this PR by your GitHub settings — view it in Devin Review. (Configure)

Devin Review

@github-actions

Copy link
Copy Markdown
Contributor

size-limit report 📦

Path Size
dist/livekit-client.esm.mjs 115.86 KB (+0.02% 🔺)
dist/livekit-client.umd.js 125.1 KB (-0.06% 🔽)
dist/core/core.mjs 78.55 KB (0%)

@lukasIO lukasIO 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.

great catch!

@davidliu
davidliu merged commit f86ccca into main Oct 21, 2026
6 checks passed
@davidliu
davidliu deleted the dl/rn_start_monitor_fix branch October 21, 2026 06:13
@github-actions github-actions Bot mentioned this pull request Oct 21, 2026
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