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

✨ How do I enable/disable the shutter sound

Open jzxchiang1 opened this issue 4 years ago • 10 comments

Question

How do I enable or disable the shutter sound when taking a photo?

For some reason, when testing on my physical iPhone device, the sound plays when flash is off but doesn't play when flash is on.

Is this customizable? Thanks!

What I tried

No response

VisionCamera Version

2.4.1

Additional information

jzxchiang1 avatar Jul 31 '21 03:07 jzxchiang1

The shutter sound is always played in the image capture pipeline:

But it looks like this actually can be customized by disposing the sound (see this SO post). I'll mark this as a feature request and get to this soon

mrousavy avatar Jul 31 '21 09:07 mrousavy

yeah it's pretty easily possible - will take a look soon. Does the shutter sound also play on Android?

mrousavy avatar Jan 04 '22 13:01 mrousavy

On android native camera there is a shutter sound

PABourdais avatar Jan 04 '22 14:01 PABourdais

any update on this guys ?

siddharth-kt avatar Jan 26 '22 09:01 siddharth-kt

Hey @mrousavy, any update? This feature would be awesome! :)

JurianBoots avatar Feb 04 '22 12:02 JurianBoots

Hey @JurianBoots, unfortunately not yet. I've had higher priorities in the past few days, such as my agency Margelo, as well as other issues/PRs in VisionCamera/MMKV created by my GitHub sponsors.

mrousavy avatar Feb 04 '22 13:02 mrousavy

Could we please prioritize either this, or taking snapshots on iOS? I'm trying to make blurry previews of the camera, ideally this would be a low-quality snapshot but since that's not available on iOS I resorted to taking photos which plays the shutter sound even though the user did not trigger the photo.

wassgha avatar May 25 '22 20:05 wassgha

Could we please prioritize either this

Sure, you can prioritize this. Shoot me a PR if you have a working change.

mrousavy avatar May 27 '22 09:05 mrousavy

Yea just a sec

wassgha avatar May 31 '22 17:05 wassgha

Hello, any update?

wilav-dev avatar Jul 26 '22 17:07 wilav-dev

I found a way to disable the shutter should

  1. open PhotoCaptureDelegate
  2. find func photoOutput
  3. add given line into the function and rebuild the app
// dispose system shutter sound 
AudioServicesDisposeSystemSoundID(1108) 

RONAKDHOLARIYA avatar Oct 04 '22 10:10 RONAKDHOLARIYA

Hey! I just implemented this in V3! :) https://github.com/mrousavy/react-native-vision-camera/pull/1702

mrousavy avatar Aug 21 '23 13:08 mrousavy

file shoes merged but code not reflected in 2.16.1 version(for ios)

jagdeepChicmic avatar Sep 21 '23 09:09 jagdeepChicmic

@mrousavy any way we could update this for V2?

jeemercado avatar Dec 05 '23 08:12 jeemercado

Hey - no, this is a V3 feature. I'm not adding any more features to V2, as I already spend a lot of time on V3 and I don't have any more free time to dedicate to V2.

mrousavy avatar Dec 05 '23 19:12 mrousavy