[bug] `AudioPublishOptions.red` is inverted: the default `red: true` sends `disableRed: true`, disabling RED for every audio publish
维护者通常 2 天内回复
评估
这个 Issue 还没有评估数据。
描述
Describe the bug
AudioPublishOptions.red (default true, documented as "red (Redundant Audio Data)") is passed into AddTrackRequest.disableRed without negation, so every audio publish with default options disables RED:
// lib/src/participant/local.dart
disableDtx: !publishOptions.dtx, // negated — correct
disableRed: room.e2eeManager != null ? true : publishOptions.red ?? true, // not negated
The JS SDK negates it (src/room/participant/LocalParticipant.ts):
disableRed: this.isE2EEEnabled || !(opts.red ?? true),
Evidence:
- Introduced by 6323ff7 (#453, 2024-01-23); the inverted line is that commit's only change to
lib/src/participant/local.dart. Before it the field was never set, and the protobuf default (false) left RED enabled — so RED has been off for Flutter publishers since v2.0.0. - The line is identical in 2.3.0–2.13.0, the v2.13.2 tag, and current main (checked 2026-10-30).
- The docs recommend RED enabled and document
red: falseas the opt-out: "LiveKit recommends enabling this feature because audio glitches are so distracting that the tradeoff is almost always worth it" — https://docs.livekit.io/transport/media/advanced/ - The E2EE force-disable branch matches the JS SDK; only the non-E2EE branch is inverted.
To Reproduce
Publish a microphone track with default options: the AddTrackRequest carries disableRed: true. Publish with red: false: it carries disableRed: false — inverted.
Expected behavior
red: true (the default) → disableRed: false. Proposed fix:
disableRed: room.e2eeManager != null || !(publishOptions.red ?? true),
Release-note caveat: apps that noticed and set red: false to force RED on will flip behavior when this is fixed.
Platform information
- Flutter version: 3.47.6
- Plugin version: 2.13.0
- Flutter target OS: Web — but the field is set in shared Dart, so all platforms are affected
- 主要语言
- Dart
- 星标
- 421
- 派生
- 260
- 平均合并
- 2 天 5 小时
- 30 天内合并 PR
- 20
环境准备
这个项目没有提供开发容器、Dockerfile 或贡献指南,环境需要你自己搭建:先看它的 README,通用步骤见我们的新手贡献指南。
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
livekit/client-sdk-flutter 的其他 Issue
-
`jwtPayload.roomConfiguration` returns null fields for tokens from LiveKit server SDKs可能已有人在做 @RaphaelFakhri 于 16 天前认领。 未关闭
难度 2/5 1-3 小时 新手友好度 78/100
livekit/client-sdk-flutter#1243 ·
维护者通常 2 天内回复
-
难度 5/5 一周以上 新手友好度 38/100
livekit/client-sdk-flutter#1265 ·
维护者通常 2 天内回复
-
A full reconnect that is in progress when disconnect() is called reopens the closed engine and retries up to reconnectAttempts可能已有人在做 @hiroshihorie 于 6 天前认领。 未关闭
难度 4/5 3-5 天 新手友好度 57/100
livekit/client-sdk-flutter#1245 ·
维护者通常 2 天内回复
-
难度 4/5 3-5 天 新手友好度 48/100
livekit/client-sdk-flutter#1227 ·
维护者通常 2 天内回复
-
难度 4/5 3-5 天 新手友好度 45/100
livekit/client-sdk-flutter#1221 · 1 条评论 ·
维护者通常 2 天内回复
查看 livekit/client-sdk-flutter 的全部 Issue
相似的 Issue
-
bot-found bug priority: P3
难度 2/5 1-3 小时 新手友好度 72/100
madenvel/KalinkaPlayer#498 ·
-
难度 2/5 1-3 小时 新手友好度 70/100
libnativeapi/nativeapi#21 ·
-
bug
难度 2/5 1-3 小时 新手友好度 72/100
chriskelly/wish-together#102 ·
维护者通常 1 天内回复
-
area/adaptivity kind/task priority/p1
难度 2/5 1-3 小时 新手友好度 85/100
-
bug
难度 2/5 1-3 小时 新手友好度 60/100
spotiflacapp/SpotiFLAC-Mobile#783 ·