CameraManager
CameraManager copied to clipboard
Extend the startQRCodeDetection method to support customizing AVMetadataObject types.
Bugfix:
- fix a bug: the
qrOutputdoesn't get assigned in thestartQRCodeDetection, after AVCaptureMetadataOutput creation , which makesstopQRCodeDetectionuseless.
Feature:
- Extend the
startQRCodeDetectionmethod with awithTypesparameter to provide the ability to customize the code recognition types instead of the const type array[.qr, .ean8, .ean13, .pdf417]. And also provide a default value with the const types forwithTypesparameter to make code compatible with old versions.
Optimize:
-
Dispatch the session configuration operation into the
sessionQueueto make it more efficient (will not affect the main thread). -
Make the
qrOutputproperty accessible and type accurate, cause the user may need more configurations with the output (for example, therectOfInterest).