react-native-vision-camera icon indicating copy to clipboard operation
react-native-vision-camera copied to clipboard

Letting users switch audio input device on ios [android is expreimental]

Open ISnowFoxI opened this issue 4 months ago • 3 comments

What

  • This PR adds support for audio level listening for selected audio inputs
  • This Pr adds support for audio input device switching

Changes

  • This PR updates AvAudioSession category to make it possible to record using Bluetooth/headset mics
  • This PR moves AVAudioSession category change to the init function constructor in CameraSession class
  • This PR adds extra audioInputDevice prop to the Camera component
  • This PR adds minimum example for microphone selection

Tested on

  • iPhone 11 Pro Max

Related issues

https://github.com/mrousavy/react-native-vision-camera/issues/3304

ISnowFoxI avatar Sep 30 '25 18:09 ISnowFoxI

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Preview Comments Updated (UTC)
react-native-vision-camera Ready Ready Preview Comment Sep 30, 2025 6:58pm

vercel[bot] avatar Sep 30 '25 18:09 vercel[bot]

I turned this pr to draft, as we are not going to use the final implementation for Android. We will be waiting for v5 of the library, and go from there. I am keeping this pr for anyone looking to implement it for themselves. Our video files can be large, so we decided not to use them on the Android side, but maybe someone might find it useful.

If you find any issues with the code, feel free to tag me on this thread.

ISnowFoxI avatar Sep 30 '25 19:09 ISnowFoxI

For anyone who wants to use this lib, I've published the changes to npm https://www.npmjs.com/package/steplab-react-native-vision-camera

ISnowFoxI avatar Sep 30 '25 19:09 ISnowFoxI