Created
December 21, 2019 05:08
-
-
Save trilliwon/2d39f95f8fe0d5a943421290322111ad to your computer and use it in GitHub Desktop.
How to turn off the shutter sound when capture? AVFoundation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class PhotoCapture { | |
// here some stuff for capture image, such as capture session, configurations, photo output | |
// More detail : https://github.com/trilliwon/ArtCamera/blob/master/Camera/Controllers/PhotoCapture.swift | |
} | |
// MARK: - AVCapturePhotoCaptureDelegate | |
extension PhotoCapture: AVCapturePhotoCaptureDelegate { | |
func photoOutput(_ output: AVCapturePhotoOutput, willCapturePhotoFor resolvedSettings: AVCaptureResolvedPhotoSettings) { | |
AudioServicesDisposeSystemSoundID(1108) | |
} | |
func photoOutput(_ output: AVCapturePhotoOutput, didCapturePhotoFor resolvedSettings: AVCaptureResolvedPhotoSettings) { | |
AudioServicesDisposeSystemSoundID(1108) | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment