Repository navigation
Fix SCTP SNAP preservation during ICE configuration updates - #482
Open
MSNexploder wants to merge 1 commit into
Open
MSNexploder wants to merge 1 commit into
MSNexploder wants to merge 1 commit into
Conversation
🦋 Changeset detectedLatest commit: bfd2c9b 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 |
MSNexploder
marked this pull request as ready for review
October 23, 2026 19:23
MSNexploder
requested review from
changt,
davidliu,
hiroshihorie and
xianshijing-lk
as code owners
October 23, 2026 19:23
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.
Preserve SCTP SNAP through React Native configuration updates
registerGlobals()enables SCTP SNAP in its peer-connection constructor shim. Later join/reconnect ICE updates omit the option becauselivekit-clientowns a separate configuration object. Native parsing defaults the missing option to false, but SCTP SNAP is immutable, so the ICE update can be rejected.Change
Extend the existing
SctpSnapPeerConnectionshim to remember the boolean selected at construction and supply it as the default insetConfiguration(). Explicit constructor false and explicit update values still win. This keeps ownership beside the SDK code that introduces the default; the shared JavaScript SDK and native WebRTC wrapper need no changes.The native configuration default, equality check, and immutable-field validation explain the rejected update. The React Native constructor shim and JavaScript SDK configuration creation show the concrete path.
Minimal reproduction
Use the registered global constructor. The STUN URI is a placeholder. Before the fix, construction sends
enableSctpSnap: true, but the update omits it. Afterward, both send true.Testing
The regression uses the real
registerGlobals()shim and unpatched WebRTC class with native-boundary mocks. Six cases cover default/explicit values, repeated ICE updates, explicit change requests, separate connections, and frozen update objects.yarn install --immutable yarn typescript yarn lint yarn test --runInBand yarn prepare yarn build-docs --treatWarningsAsErrorsNative join/reconnect validation remains outstanding.