Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

iOS Microphone permission requested automatically upon room connection without publishing

Đang mở
#1,080 1 bình luận 3 reaction 0 người được giao Xem trên GitHub

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

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

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. 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.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của livekit/client-sdk-flutter

Tất cả issue của livekit/client-sdk-flutter

Issue tương tự

Thêm issue về Dart

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.