fix(barcode-scanner): fix the cameraView is not removed after scanning in iOS

pull/2440/head
Kingsword 3 months ago
parent f81e8003c0
commit 1c66cba91b
No known key found for this signature in database
GPG Key ID: 4874E921904AC200

@ -0,0 +1,6 @@
---
"barcode-scanner": patch
"barcode-scanner-js": patch
---
Fix the `cameraView` is not removed after scanning in iOS.

@ -170,6 +170,7 @@ class BarcodeScannerPlugin: Plugin, AVCaptureMetadataOutputObjectsDelegate {
if self.captureSession != nil {
self.captureSession!.stopRunning()
self.cameraView.removePreviewLayer()
self.cameraView.removeFromSuperview()
self.captureVideoPreviewLayer = nil
self.metaOutput = nil
self.captureSession = nil

Loading…
Cancel
Save