1

I have cams which is AVCaptureDevice, I made sure the flash was off but now I need to shut the camera noise up, is there a way to do that?

NSArray* cams = [AVCaptureDevice devicesWithMediaType:AVMediaTypeVideo];
    AVCaptureDevice* device = nil;
    if(isBackCamera)
    {
        device = [possibleCameras objectAtIndex:0];
    }
    else
    {
        device = [possibleCameras objectAtIndex:1];
    }

    device.flashMode = AVCaptureFlashModeOff;
RollRoll
  • 8,133
  • 20
  • 76
  • 135

2 Answers2

0

I figured that apple doesn't allow you to do that

RollRoll
  • 8,133
  • 20
  • 76
  • 135
0

I was able to disable/mute the camera shutter sound while taking screenshot programmatically using the below code. Confirmed to work on iOS8.3 on iPhone 5 and accepted in App store.

MPVolumeView* volumeView = [[MPVolumeView alloc] init];
//find the volumeSlider
UISlider* volumeViewSlider = nil;
for (UIView *view in [volumeView subviews]){
    if ([view.class.description isEqualToString:@"MPVolumeSlider"]){
        volumeViewSlider = (UISlider*)view;
        break;
    }
}

[volumeViewSlider setValue:0.0f animated:YES];
[volumeViewSlider sendActionsForControlEvents:UIControlEventTouchUpInside];
Frak
  • 832
  • 1
  • 11
  • 32