Require livekit-client ^2.20.0 - #463
Merged
Merged
Conversation
livekit-client 2.19.x pre-allocates media sections in single peer connection mode, which React Native's libwebrtc doesn't support. Remote tracks then never get subscribed or render black. The fix landed in livekit-client 2.20.0 (livekit/client-sdk-js#1984). Bump the peer dependency, dev dependency, example and ci apps, and refresh the lockfiles. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
davidliu
requested review from
hiroshihorie and
xianshijing-lk
as code owners
September 23, 2026 17:53
🦋 Changeset detectedLatest commit: 3c91858 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
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 |
Since livekit-client 2.20.1, NonSharedUint8Array resolves to Uint8Array<ArrayBuffer> in the published types instead of silently being unresolved. The native data packet cryptor returns plain Uint8Array, so assert the non-shared type where we hand buffers back. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
1egoman
approved these changes
Sep 23, 2026
Replace the `Uint8Array<ArrayBuffer>` casts with a `NonSharedUint8Array` alias (`ReturnType<typeof Uint8Array.from>`), matching livekit-client. The alias stays valid on TypeScript versions before 5.7, where `Uint8Array` isn't generic. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
livekit-client 2.19.x (from 2.19.2 on) pre-allocates media sections in single peer connection mode (the default). React Native's libwebrtc doesn't support this, so remote tracks either render black or are never subscribed at all. livekit-client 2.20.0 skips this on React Native (livekit/client-sdk-js#1984).
The current
^2.19.0peer range still allows the broken versions, so users keep hitting it:TrackSubscribednever firesChanges
livekit-clientpeer dependency:^2.19.0→^2.20.0example/andci/yarn.lockandci/yarn.lock:livekit-client2.19.2 → 2.22.3, pulling in@livekit/protocol1.50.4,webrtc-adapter9.0.6 and a newmachinadependencyApps pinned to
livekit-client2.19.x will now get a peer dependency warning (an error on npm 7+) until they upgrade.Test plan
yarn install --immutablepasses in the repo root and inci/ci/postinstall (install-local ../) installs the local package with the new peer range, alongsidelivekit-client2.22.3tsc --noEmit: same 25 type errors as onmain, none new🤖 Generated with Claude Code