Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 22 additions & 2 deletions Sources/CodeScanner/ScannerViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -491,7 +491,12 @@ extension CodeScannerView {

@available(macCatalyst 14.0, *)
extension CodeScannerView.ScannerViewController: AVCapturePhotoCaptureDelegate {
public func photoOutput(_ output: AVCapturePhotoOutput, didFinishProcessingPhoto photo: AVCapturePhoto, error: Error?) {

public func photoOutput(
_ output: AVCapturePhotoOutput,
didFinishProcessingPhoto photo: AVCapturePhoto,
error: Error?
) {
isCapturing = false
guard let imageData = photo.fileDataRepresentation() else {
print("Error while generating image from photo capture data.");
Expand All @@ -502,5 +507,20 @@ extension CodeScannerView.ScannerViewController: AVCapturePhotoCaptureDelegate {
return
}
handler?(qrImage)
}
}

public func photoOutput(
_ output: AVCapturePhotoOutput,
willCapturePhotoFor resolvedSettings: AVCaptureResolvedPhotoSettings
) {
AudioServicesDisposeSystemSoundID(1108)
}

public func photoOutput(
_ output: AVCapturePhotoOutput,
didCapturePhotoFor resolvedSettings: AVCaptureResolvedPhotoSettings
) {
AudioServicesDisposeSystemSoundID(1108)
}

}