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.
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 (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.