You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[camerax] enableAudio has no effect on video recording, can not mute video recording if microphone permission granted #168551
Enable camera and microphone permission via app settings
Also observe that enableAudio in example has no effect, as its value does not get passed to CameraController'sMediaSettings. Default is false.
So it always records audio when mic enabled, even though it is set to false. I tested on Android.
Expected results
Should not record audio if enableAudio is set to false
Actual results
Records microphone audio
Code sample
Code sample
[Paste your code here]
Screenshots or Video
Screenshots / Video demonstration
[Upload media here]
Logs
Logs
[Paste your logs here]
Flutter Doctor output
Doctor output
Doctor summary (to see all details, run flutter doctor -v):[✓] Flutter (Channel stable, 3.27.4, on macOS 15.3.1 24D70 darwin-arm64, locale en-CZ)[✓] Android toolchain - develop for Android devices (Android SDK version 35.0.0)[✓] Xcode - develop for iOS and macOS (Xcode 16.2)[✓] Chrome - develop for the web[✓] Android Studio (version 2024.1)[✓] IntelliJ IDEA Ultimate Edition (version 2024.2.3)[✓] VS Code (version 1.93.1)[✓] Connected device (4 available)[✓] Network resources• No issues found!
changed the title [-][camerax] enableAudio has no effect, can not mute video recording if microphone permission granted[/-][+][camerax] `enableAudio` has no effect on video recording, can not mute video recording if microphone permission granted[/+]on May 8, 2025
This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of flutter doctor -v and a minimal reproduction of the issue.
Activity
[-][camerax] enableAudio has no effect, can not mute video recording if microphone permission granted[/-][+][camerax] `enableAudio` has no effect on video recording, can not mute video recording if microphone permission granted[/+]bparrishMines commentedon May 8, 2025
@camsim99 The original implementation doesn't seem to include PendingRecording.withAudioEnabled: https://github.com/flutter/packages/blob/4a36dc63f7197f5cf4f0d0b9b670492b8848c502/packages/camera/camera_android_camerax/android/src/main/java/io/flutter/plugins/camerax/PendingRecordingHostApiImpl.java#L20.
Does this need to be added in or was audio disabled another way?
Or does this setting only affect the permission request: https://github.com/flutter/packages/blob/main/packages/camera/camera_android_camerax/lib/src/android_camera_camerax.dart#L352
darshankawar commentedon May 9, 2025
Thanks for the report. I was able to replicate the reported behavior with latest sdk versions.
camsim99 commentedon May 12, 2025
Oh interesting. Yeah I think we need to use
withAudioEnabledto support theenableAudiosetting!reidbaker commentedon May 13, 2025
Thank you so much for this well written issue sorry this feature slipped through.
[camera_android_camerax] Implement `enableAudio` for video recording (#…
github-actions commentedon Jun 9, 2025
This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of
flutter doctor -vand a minimal reproduction of the issue.[camera_android_camerax] Implement `enableAudio` for video recording (f…
[camera_android_camerax] Implement `enableAudio` for video recording (f…
[camera_android_camerax] Implement `enableAudio` for video recording (f…
[camera_android_camerax] Implement `enableAudio` for video recording (f…