I'm working on a reading book app, which will automatically take a picture every 5 seconds then play audio from that picture.
I use this code from this answer https://stackoverflow.com/a/55235949/2172546 dispose the shutter sound.
extension PhotoCaptureService: AVCapturePhotoCaptureDelegate {
    func photoOutput(_ output: AVCapturePhotoOutput, willCapturePhotoFor resolvedSettings: AVCaptureResolvedPhotoSettings) {
        // dispose system shutter sound
        AudioServicesDisposeSystemSoundID(1108)
    }
}
The problem is that, when the app is playing the audio for the book page using AVPlayer, this "dispose" action also makes the audio silent for 2 or 3 seconds. But it just happens on iOS 12 only and works perfectly on iOS 13.
So my question is, how can I make it works on iOS 12 as well? Thank you in advance for the answers.
