mrousavy / react-native-vision-camera

📸 A powerful, high-performance React Native Camera library.
https://react-native-vision-camera.com
MIT License
6.64k stars 983 forks source link

feat: Added option to consider ringer mode in Android #2811

Open imjihun opened 3 weeks ago

imjihun commented 3 weeks ago

What

When using the takePhoto function in Android, ringerMode is not applied by default, but is applied when a value is received as an option

If isAppliedRingerMode option is set to true in takePhoto function, When ringerMode is RINGER_MODE_NORMAL, the shutterSound option is applied. When the ringer mode is RINGER_MODE_SILENT or RINGER MODE VIBRATE, the shutter Sound option is ignored.

Changes

Tested on

Related issues

vercel[bot] commented 3 weeks ago

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
react-native-vision-camera ✅ Ready (Inspect) Visit Preview 💬 Add feedback Apr 27, 2024 5:31am
mrousavy commented 2 weeks ago

Hey - thank you for your contribution, this is much appreciated. I always prioritize PRs over issues to discuss such things.

In this case, I think the prop can be a bit confusing. The naming, especially combined with the description, isn't very obvious.

I think that the current behaviour is perfectly fine - it is exactly how it is on iOS. When the phone is on silent, we don't want any sound. What is your use-case that you need shutter sound anyways? Is that really what users expect to happen?