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
  • 7,737
  • 18
  • 70
  • 122

2 Answers2

0

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

RollRoll
  • 7,737
  • 18
  • 70
  • 122
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];
frakman1
  • 752
  • 1
  • 7
  • 27