Remove cameraView from superview

Remove from superview when camera subview is dismantled. Otherwise inputs on webview are broken after scanning.
pull/1945/head
Dominik Roessler 9 months ago committed by GitHub
parent cfd48b3b2e
commit ce7a883ce8
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

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

Loading…
Cancel
Save