Muting AVCapture shutter sound on iPhone [duplicate] - iphone

This question already has answers here:
AVFoundation, how to turn off the shutter sound when captureStillImageAsynchronouslyFromConnection?
(9 answers)
Closed 8 years ago.
I'm using the Apple AVCam code with AVCamCaptureManger to capture a still image. I don't display any camera views to the user, the image is just automatically taken behind the scenes without the user's involvement. However, it still plays a shutter sound when I call [captureManger captureStillImage] and I don't want it to play a shutter sound.
There are many apps in the AppStore that "secretly" take a picture without a shutter sound, so I'm sure it's possible to somehow mute this sound. If I can't mute this sound directly, is there anyway to adjust not the volume of the phone, but the volume of my app itself (the output volume of the app)?

You have to use an AVCaptureVideoDataOutput if you want to avoid the shutter sound. Note that covertly capturing images is against App Store policy. You need to make sure you user is told in some way that your taking a picture.

Related

Background music closes on taking picture from camera UIImagePicker

When I take picture from camera using UIImagePicker, background music (from ipod app, pandora app) stops. It's not happening for facebook app. Is there a separate delegate for this? Please help
This might be due to your Audio Session policy. Taking a picture makes a "click" noise. Perhaps this is causing all other sound to be stopped because of your Audio Session.

Can I play sound from video if the screen is blank? iphone [duplicate]

This question already has an answer here:
Keep playing sound with MPMoviePlayerController and locked screen?
(1 answer)
Closed 9 years ago.
In an iPhone app I'm working on, I am playing an mp4 video and I want to be able to listen to the sound of the video after I press the sleep button. Is this possible?
I believe that it is possible only if you press the home button.
Then, you double press the home button again, the music controlling
is shown up. After that, you press the play button.
I don't think it will be any methods to do in the sleep mode.

play background music while playing video

I need to know is this: can I build an app that plays music once another video with sound is opened?
For ex. I put music on my ipod inside the iphone and can close it out and it plays anytime I open another app.
However, when I open youtube or any type of site like that and hit a video, the music on my iphone cuts off.
I want an app that allows the music to keep playng.
The design and all other parts of app are going to be simple.
Please advise if this is possible?
Thanks-
This is probably not possible to the extent you would hope for. There is a 10 minute limit for how long you can run your app in the background. So you could go into the app, have your app play music, and when you go to youtube or whatever and it would keep playing for up to 10 minutes. But that's probably not what you're hoping for, so the quick answer is no, you can't.

Change the sound from camera [duplicate]

In my iPhone app, I am using the UIImagePickerController with source type UIImagePickerControllerSourceTypeCamera. When the user takes a picture, the phone plays the familiar camera shutter sound. How can I replace this with my own custom sound? I know it's possible because I've seen other apps from the App Store do it (e.g. Red Laser).
I am quite certain it's not possible. AFAIK, Red Laser doesn't actually take a "normal" picture but uses UIGetScreenImage() (undocumented but nevertheless allowed for App Store apps) to make a screenshot of the live video feed. Since the OS does not play sound on this occasion, they are free to play their own sound.
Edit for clarification: As of OS 3.1, you are free to substitute the standard camera interface with your own controls. So you could place your own shutter button on the screen and play your own sound when the user taps it, but AFAIK there is now way to get rid of the OS's standard shutter sound.
AFAIK the standard camera shutter sound cannot be changed via SDK.
This answer supports that. You can replace your own sound by switching sound files, but not in an app.
Some answers such as this one suggest using AVCapture, but this method takes video screenshots, which reduces the image quality. I
t appears that you can't change the shutter sound because you could make it a silent sound, and capturing images covertly is against the App Store policy. See this answer.
TLDR:
The only way to change the shutter sound is to use a video screen grab.

Overriding iPhone shutter sound through SDK

In my iPhone app, I am using the UIImagePickerController with source type UIImagePickerControllerSourceTypeCamera. When the user takes a picture, the phone plays the familiar camera shutter sound. How can I replace this with my own custom sound? I know it's possible because I've seen other apps from the App Store do it (e.g. Red Laser).
I am quite certain it's not possible. AFAIK, Red Laser doesn't actually take a "normal" picture but uses UIGetScreenImage() (undocumented but nevertheless allowed for App Store apps) to make a screenshot of the live video feed. Since the OS does not play sound on this occasion, they are free to play their own sound.
Edit for clarification: As of OS 3.1, you are free to substitute the standard camera interface with your own controls. So you could place your own shutter button on the screen and play your own sound when the user taps it, but AFAIK there is now way to get rid of the OS's standard shutter sound.
AFAIK the standard camera shutter sound cannot be changed via SDK.
This answer supports that. You can replace your own sound by switching sound files, but not in an app.
Some answers such as this one suggest using AVCapture, but this method takes video screenshots, which reduces the image quality. I
t appears that you can't change the shutter sound because you could make it a silent sound, and capturing images covertly is against the App Store policy. See this answer.
TLDR:
The only way to change the shutter sound is to use a video screen grab.