diff --git a/src/android/QRScanner.java b/src/android/QRScanner.java index 0dca25c4..f2e37d7d 100755 --- a/src/android/QRScanner.java +++ b/src/android/QRScanner.java @@ -425,7 +425,7 @@ private void makeOpaque() { this.cordova.getActivity().runOnUiThread(new Runnable() { @Override public void run() { - webView.getView().setBackgroundColor(Color.WHITE); + webView.getView().setBackgroundColor(Color.TRANSPARENT); } }); showing = false; diff --git a/src/ios/QRScanner.swift b/src/ios/QRScanner.swift index 4e860809..27f4d717 100644 --- a/src/ios/QRScanner.swift +++ b/src/ios/QRScanner.swift @@ -129,7 +129,7 @@ class QRScanner : CDVPlugin, AVCaptureMetadataOutputObjectsDelegate { } do { if (captureSession?.isRunning != true){ - cameraView.backgroundColor = UIColor.white + cameraView.backgroundColor = UIColor.clear self.webView!.superview!.insertSubview(cameraView, belowSubview: self.webView!) let availableVideoDevices = AVCaptureDevice.devices(withMediaType: AVMediaTypeVideo) for device in availableVideoDevices as! [AVCaptureDevice] { @@ -195,8 +195,8 @@ class QRScanner : CDVPlugin, AVCaptureMetadataOutputObjectsDelegate { } func makeOpaque(){ - self.webView?.isOpaque = true - self.webView?.backgroundColor = UIColor.white + self.webView?.isOpaque = false + self.webView?.backgroundColor = UIColor.clear } func boolToNumberString(bool: Bool) -> String{