Skip to content

[camerax] enableAudio has no effect on video recording, can not mute video recording if microphone permission granted #168551

@mzdm

Description

@mzdm

Steps to reproduce

  1. Clone camerax example app https://github.com/flutter/packages/tree/main/packages/camera/camera_android_camerax
  2. Enable camera and microphone permission via app settings
  3. Also observe that enableAudio in example has no effect, as its value does not get passed to CameraController's MediaSettings. 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!

Metadata

Metadata

Assignees

Labels

P1High-priority issues at the top of the work listfound in release: 3.29Found to occur in 3.29found in release: 3.32Found to occur in 3.32has reproducible stepsThe issue has been confirmed reproducible and is ready to work onp: cameraThe camera pluginplatform-androidAndroid applications specificallyr: fixedIssue is closed as already fixed in a newer versionteam-androidOwned by Android platform teamtriaged-androidTriaged by Android platform team

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions