iOS Microphone permission requested automatically upon room connection without publishing
维护者通常 1 天内回复
还没有人认领这个 Issue。
评估
- 难度
- 4/5
- 预计耗时
- 3-5 天
- 新手友好度
- 48/100
- Issue 类型
- 缺陷
- 描述清晰度
- 基本清楚
- 活跃度
- 冷清
- 技术栈
- dart
调研方向
Start by tracing the iOS audio-session handling reached during room.connect() and compare it with the explicit microphone paths setMicrophoneEnabled(true) and LocalAudioTrack.create(). Reproduce on a physical iOS device with a token that has canPublish: false, without calling either publishing API. Done means connecting as a listener does not prompt for microphone permission, while explicit microphone use can still request it.
由索引模型根据 Issue 内容生成。
描述
Describe the bug
When joining a LiveKit room as a viewer (listener-only), the iOS system triggers a Microphone permission popup immediately upon calling room.connect(). This occurs even when autoSubscribe is handled correctly and no local tracks (audio or video) are being published by the client. For a "viewer" experience, no permission should be requested until the user explicitly attempts to publish.
To Reproduce
Initialize a Room object.
Call room.connect(url, token) with a token that has canPublish: false.
Observe that on a physical iOS device, the system prompts for Microphone access immediately during the connection phase.
Ensure room.localParticipant.setMicrophoneEnabled(true) is not called anywhere in the code.
Expected behavior
The room should connect silently. The microphone permission should only be requested when setMicrophoneEnabled(true) or LocalAudioTrack.create() is explicitly invoked.
Platform information
Flutter 3.41.6 • channel stable • https://github.com/flutter/flutter.git
Framework • revision db50e20168 (7 weeks ago) • 2026-03-25 16:21:00 -0700
Engine • hash 5cdd32777948fa7a648fac915f8da7120ac7e97a (revision 425cfb54d0) (1 months ago) • 2026-03-25 20:14:42.000Z
Tools • Dart 3.11.4 • DevTools 2.54.2
Plugin version: livekit_client: ^2.7.0
Flutter target OS: iOS [Real Device]
Flutter target OS version: iOS 26.4.2
- Flutter version:
Flutter (Channel stable, 3.41.6, on macOS 26.2 25C56 darwin-arm64, locale en-US) [583ms]
• Flutter version 3.41.6 on channel stable at /Users/bisharatjunejo/flutter
• Upstream repository https://github.com/flutter/flutter.git
• Framework revision db50e20168 (7 weeks ago), 2026-03-25 16:21:00 -0700
• Engine revision 425cfb54d0
• Dart version 3.11.4
• DevTools version 2.54.2
• Feature flags: enable-web, enable-linux-desktop, enable-macos-desktop, enable-windows-desktop, enable-android, enable-ios, cli-animations, enable-native-assets, omit-legacy-version-file, enable-lldb-debugging,
enable-uiscene-migration
[!] Android toolchain - develop for Android devices (Android SDK version 36.0.0) [3.4s]
• Android SDK at /Users/bisharatjunejo/Library/Android/sdk
• Emulator version 35.5.10.0 (build_id 13402964) (CL:N/A)
• Platform android-36, build-tools 36.0.0
• ANDROID_HOME = /Users/bisharatjunejo/Library/Android/sdk
• Java binary at: /Applications/Android Studio.app/Contents/jbr/Contents/Home/bin/java
This is the JDK bundled with the latest Android Studio installation on this machine.
To manually set the JDK path, use: flutter config --jdk-dir="path/to/jdk".
• Java version OpenJDK Runtime Environment (build 21.0.6+-13368085-b895.109)
! Some Android licenses not accepted. To resolve this, run: flutter doctor --android-licenses
[✓] Xcode - develop for iOS and macOS (Xcode 26.0.1) [1,279ms]
• Xcode at /Applications/Xcode.app/Contents/Developer
• Build 17A400
• CocoaPods version 1.16.2
[✓] Chrome - develop for the web [6ms]
• Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome
-
Plugin version:
Plugin version: livekit_client: ^2.7.0 -
Flutter target OS:
Flutter target OS: iOS [Real Device] -
Flutter target OS version:
Flutter target OS version: iOS 26.4.2 -
Flutter console log:
Why is this happening?
On iOS, if an app touches the AVAudioSession category "PlayAndRecord," the OS may trigger the permission check. If LiveKit's default connection state sets the category to playAndRecord (even with the mic muted), iOS 17+ is very aggressive about showing that popup.
- 主要语言
- Dart
- 星标
- 421
- 派生
- 260
- 平均合并
- 2 天 5 小时
- 30 天内合并 PR
- 17
环境准备
这个项目没有提供开发容器、Dockerfile 或贡献指南,环境需要你自己搭建:先看它的 README,通用步骤见我们的新手贡献指南。
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
livekit/client-sdk-flutter 的其他 Issue
-
`jwtPayload.video` returns null grants for tokens from LiveKit server SDKs可能已有人在做 @RaphaelFakhri 于 4 天前认领。 未关闭
难度 2/5 1-3 小时 新手友好度 76/100
livekit/client-sdk-flutter#1236 ·
维护者通常 1 天内回复
-
难度 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 于 29 天前认领。 未关闭
livekit/client-sdk-flutter#1206 · 2 条评论 · 已指派 1 人 ·
维护者通常 1 天内回复
查看 livekit/client-sdk-flutter 的全部 Issue
相似的 Issue
-
难度 2/5 1-3 小时 新手友好度 85/100
维护者通常 1 天内回复
-
[Bug]: The daily reminder keeps its old language after the app language changes可能已有人在做 关联的 PR 仍在进行中或已合并。 未关闭backlog:low bug localization
难度 2/5 1-3 小时 新手友好度 72/100
simonoppowa/OpenNutriTracker#1366 ·
维护者通常 1 天内回复
-
waiting for response
难度 2/5 1 小时以内 新手友好度 72/100
flutter/flutter#194381 · 1 条评论 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 72/100
newrelic/newrelic-flutter-agent#243 · 3 条评论 ·
-
backlog documentation good first issue priority: medium
难度 2/5 半天 新手友好度 78/100