iOS Microphone permission requested automatically upon room connection without publishing
Maintainer thường phản hồi trong vòng 2 ngày
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức phù hợp với người mới
- 48/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Khá rõ ràng
- Mức độ hoạt động
- Ít trao đổi
- Công nghệ
- dart
- Lĩnh vực
- audio-video-rtc, mobile-dev
Hướng nghiên cứu
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.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
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.
- Ngôn ngữ chính
- Dart
- Star
- 421
- Fork
- 260
- Merge trung bình
- 2 ngày 5 giờ
- Pull request đã merge (30 ngày)
- 20
Chuẩn bị môi trường
Dự án này không cung cấp dev container, Dockerfile hay hướng dẫn đóng góp, nên bạn cần tự thiết lập môi trường: hãy bắt đầu từ README và xem hướng dẫn đóng góp lần đầu của chúng tôi để biết các bước chung.
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của livekit/client-sdk-flutter
-
`jwtPayload.roomConfiguration` returns null fields for tokens from LiveKit server SDKsCó thể đã có người làm @RaphaelFakhri đã nhận 13 ngày trước. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
livekit/client-sdk-flutter#1243 ·
Maintainer thường phản hồi trong vòng 2 ngày
-
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 38/100
livekit/client-sdk-flutter#1265 ·
Maintainer thường phản hồi trong vòng 2 ngày
-
A full reconnect that is in progress when disconnect() is called reopens the closed engine and retries up to reconnectAttemptsCó thể đã có người làm @hiroshihorie đã nhận 3 ngày trước. Đang mở
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 57/100
livekit/client-sdk-flutter#1245 ·
Maintainer thường phản hồi trong vòng 2 ngày
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 48/100
livekit/client-sdk-flutter#1227 ·
Maintainer thường phản hồi trong vòng 2 ngày
-
Inbound data packets never delivered while media flows normally (2.13.0, LiveKit Cloud 1.13.7)Đang mở
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 45/100
livekit/client-sdk-flutter#1221 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 2 ngày
Tất cả issue của livekit/client-sdk-flutter
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
aaronified/fluenough#918 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
Maintainer thường phản hồi trong vòng 5 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
Maintainer thường phản hồi trong vòng 4 ngày
-
enhancement
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 69/100
Maintainer thường phản hồi trong vòng 3 ngày
-
area-clientside-dartpad
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 65/100
Maintainer thường phản hồi trong vòng 2 ngày