Repository navigation
fix: negotiate Opus NACK in single and dual PC modes - #1296
Merged
Merged
Conversation
xianshijing-lk
requested review from
changt,
cloudwebrtc and
hiroshihorie
as code owners
November 18, 2026 01:48
changt
approved these changes
Nov 18, 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.
Single-PC offers omit plain NACK feedback for Opus, including when the first audio section is send-only. Dual-PC subscriber answers also need to restore NACK when the server offers it. This adds NACK to every Opus payload in single-PC audio offers and accepts server-offered NACK in the corresponding dual-PC answer sections. With RED disabled, this enables retransmission of lost audio.
This PR targets
hiroshi/single-pc, which contains Flutter's single-PC implementation and has not yet merged intomain. It ports livekit/client-sdk-js#2270 and aligns dual-PC answers with the existing JS and Swift behavior.The offer setting follows the effective connection mode, preserving dual-PC publisher offers after fallback. Subscriber answers match sections by MID and resolve their own Opus payload types. Existing plain or wildcard feedback is retained, NACK PLI does not suppress plain NACK, and repeated munging does not duplicate feedback.
The existing SDP fallback handles rejection of modified offers and answers. Only the applied description is signaled; if both modified and original descriptions are rejected, negotiation fails without signaling an unapplied description. Includes a changeset.
Validation: