I turn off camera shutter sound but it not working
Describe the bug
In Camera component I give shutterPhotoSound props to false value but it not working.
To Reproduce
Expected behavior
I want to fix shutterPhotoSound props is working well
Screenshots
Desktop (please complete the following information):
- OS: Mac Os
- Browser chrome
- Version 14.3 (Sonoma)
Smartphone (please complete the following information):
- Device: Redmi Note 12 Turbo
- OS: MIUI
- Browser Chrome
- Version 14.0.27
Additional context I have been tested in other phone like Samsung note 10+ and also same issues.
facing same issue
The code only adds a sound if true, it doesn't remove it if false
https://github.com/teslamotors/react-native-camera-kit/blob/master/android/src/main/java/com/rncamerakit/CKCamera.kt#L401
if (shutterPhotoSound) {
val audio = getActivity().getSystemService(Context.AUDIO_SERVICE) as AudioManager
if (audio.ringerMode == AudioManager.RINGER_MODE_NORMAL) {
MediaActionSound().play(MediaActionSound.SHUTTER_CLICK)
}
}
You can try to do something along the line of
} else if (camera?.cameraInfo?.canDisableShutterSound == true) {
camera.enableShutterSound(false)
}
I am unable to reproduce with it set to ={false} or omitting it, with v14.1.0 of the library, so closing this for now.