Repository navigation
Send AddTrack before configuring fast publication senders - #1074
Open
xianshijing-lk wants to merge 1 commit into
Open
xianshijing-lk wants to merge 1 commit into
xianshijing-lk wants to merge 1 commit into
Conversation
xianshijing-lk
requested review from
MaxHeimbrock and
davidliu
as code owners
November 19, 2026 23:44
🦋 Changeset detectedLatest commit: 25ad83a 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 |
Contributor
There was a problem hiding this comment.
🔍 Devin Review: 1 flag
Not posted on this PR by your GitHub settings — view it in Devin Review. (Configure)
Contributor
|
Diffuse output: AARJAR |
davidliu
approved these changes
Nov 20, 2026
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.
Android already implements JS-style fast publication. The fast branch currently launches sender setup before scheduling AddTrack registration, allowing negotiation to precede the request. This follows up on livekit/rust-sdks#1704 by guaranteeing the registration phase starts first.
Start the AddTrack child coroutine with
CoroutineStart.UNDISPATCHED, then configure the sender in the parent coroutine and await acceptance.RTCEngine.addTrackregisters its cancellation-aware response waiter and sends AddTrack before its first suspension. This retains the overlap and structured cancellation while removing the separate negotiation child task. Existing sender ownership and rollback stay in use.No public API or publication eligibility changes. Fast publication works in both the default dual-PC mode and
ConnectOptions(singlePeerConnection = true); SPC does not need to become the default.Validation:
:livekit-android-sdk:detektReleasepassed using the repository baseline.git diff --checkpassed.detektDebugstill reports the repository's existing SDK-wide findings (133 weighted issues); this PR does not broaden the change to resolve them.Includes a patch changeset. Current main already contains the offer-with-join optimization; the separate local initial-track/connect edits remain untouched. This PR changes ordinary publication only.