[bug] iOS: `useiOSBroadcastExtension: false` ignored since 2.4.0, in-app capture unreachable
维护者通常 1 天内回复
还没有人认领这个 Issue。
评估
调研方向
Start in lib/src/participant/local.dart and trace how the effective ScreenShareCaptureOptions are chosen before the iOS broadcast branch; then read ios/Classes/BroadcastManager.swift to understand the missing-extension guard. Done means useiOSBroadcastExtension: false reaches in-app capture, while a requested broadcast flow without an extension reports an error rather than silently returning success. Check for existing screen-share tests before adding coverage.
由索引模型根据 Issue 内容生成。
描述
Describe the bug
Since 2.4.0, setScreenShareEnabled(true) on iOS unconditionally routes into the Broadcast Upload Extension flow. ScreenShareCaptureOptions.useiOSBroadcastExtension still exists, but false (the documented in-app RPScreenRecorder mode through 2.3.6) has no effect.
lib/src/participant/local.dart (2.4.0–2.10.0 and current main):
if (lkPlatformIs(PlatformType.iOS) && !BroadcastManager().isBroadcasting) {
// Wait until broadcasting to publish track
await BroadcastManager().requestActivation();
return null;
}
The branch precedes any capture options inspection; the in-app path below it is unreachable.
Worse, without an extension: requestActivation()'s native side (ios/Classes/BroadcastManager.swift) guard-returns when the RTCScreenSharingExtension Info.plist key is absent:
func requestActivation() {
guard let bundleIdentifier = BroadcastBundleInfo.screenSharingExtension else { return }
Task { await Self.showPicker(for: bundleIdentifier) }
}
No picker, no consent UI, no error, and no log so the call resolves null as success.
This appears to be an unintended side effect of #705 ("fix: Properly handle broadcast capture state"): the PR documents its async-return breaking change but never mentions useiOSBroadcastExtension or the in-app path. That capturer still works in flutter_webrtc, reachable via LocalVideoTrack.createScreenShareTrack() + publishVideoTrack() which is our current workaround.
Broadcast extension capture is always whole screen; in-app capture is scoped to the app's own UI. For privacy sensitive products (share this app with a support agent, never the user's other apps or notifications), app scoped capture is impossible through the public screenshare API on every released version.
To Reproduce
- Flutter app on a physical iPhone,
livekit_client≥ 2.4.0, no Broadcast Upload Extension target. - Connect to a room, then:
await room.localParticipant!.setScreenShareEnabled( true, screenShareCaptureOptions: const ScreenShareCaptureOptions(useiOSBroadcastExtension: false), ); - The call resolves (
null); no consent UI, no published track, nothing logged. Remote participants receive nothing. - On 2.3.6 the same code shows the ReplayKit consent alert and publishes an in-app screenshare track.
Expected behavior
useiOSBroadcastExtension: false(explicit or viaRoomOptions.defaultScreenShareCaptureOptions) uses the in-app capturer, as through 2.3.6 . The gate should consult the effective capture options before routing toBroadcastManager.- Independently: when the broadcast flow is requested but
RTCScreenSharingExtensionis missing, fail loudly (throw or error event) instead of a silentnull. Currently misconfiguration looks like success.
Platform information
- Flutter version: 3.44.2
- Plugin version: reproduced on 2.7.0 and 2.10.0 ; unchanged on
main, 2026-08-04 - Flutter target OS: iOS (real device, iPhone 17)
- Flutter target OS version: iOS 26.4
- Flutter console log: n/a, failure produces no output
- 主要语言
- Dart
- 星标
- 421
- 派生
- 260
- 平均合并
- 2 天 17 小时
- 30 天内合并 PR
- 14
环境准备
这个项目没有提供开发容器、Dockerfile 或贡献指南,环境需要你自己搭建:先看它的 README,通用步骤见我们的新手贡献指南。
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
livekit/client-sdk-flutter 的其他 Issue
-
难度 4/5 3-5 天 新手友好度 48/100
livekit/client-sdk-flutter#1227 ·
维护者通常 1 天内回复
-
难度 4/5 3-5 天 新手友好度 45/100
livekit/client-sdk-flutter#1221 · 1 条评论 ·
维护者通常 1 天内回复
-
难度 4/5 3-5 天 新手友好度 30/100
livekit/client-sdk-flutter#1219 · 1 个 reaction ·
维护者通常 1 天内回复
-
iOS: `audioDeviceModule` becomes permanently `nil`/unavailable after backgrounding, even though `AVAudioSession` is never interrupted可能已有人在做 @hiroshihorie 于 30 天前认领。 未关闭
livekit/client-sdk-flutter#1206 · 2 条评论 · 已指派 1 人 ·
维护者通常 1 天内回复
-
[bug]Early reconnect during the initial room connection可能重新可做 @hiroshihorie 于 42 天前认领,目前没有进行中的 PR。 未关闭
livekit/client-sdk-flutter#1189 · 已指派 1 人 ·
维护者通常 1 天内回复
查看 livekit/client-sdk-flutter 的全部 Issue
相似的 Issue
-
Documentation
难度 1/5 1 小时以内 新手友好度 82/100
维护者通常 1 天内回复
-
Kazakh (kk_KZ) and Georgian (ka_GE) system locales get English instead of the shipped translations未关闭bug
难度 2/5 1-3 小时 新手友好度 75/100
维护者通常 1 天内回复
-
area: docs eco: dart good first issue help wanted lane: free-agent roadmap size: XS type: docs
难度 2/5 1-3 小时 新手友好度 72/100
arminazimi/evergreen#430 ·
维护者通常 1 天内回复
-
area: rust-core bug priority: low
难度 2/5 1-3 小时 新手友好度 72/100
维护者通常 1 天内回复
-
bug direct-code
难度 2/5 1-3 小时 新手友好度 66/100
aaronified/fluenough#526 · 1 条评论 ·
维护者通常 1 天内回复