     var width:CGFloat = 0.0
     var height:CGFloat = 0.0
     
+    override func pluginInitialize() {
+        super.pluginInitialize()
+        self.webView!.backgroundColor = UIColor.clear
+        self.webView!.isOpaque = false
+    }
+    
     func startReading(_ command: CDVInvokedUrlCommand) {
-        cameraPreview = CameraPreview();
         let captureDevice = AVCaptureDevice.defaultDevice(withMediaType: AVMediaTypeVideo)
 
         do {


@objc(EmbeddedBarcodeReader) class EmbeddedBarcodeReader: CDVPlugin, AVCaptureMetadataOutputObjectsDelegate {
    
    class CameraPreview: UIViewController {
        var videoPreviewLayer:AVCaptureVideoPreviewLayer?
        var qrCodeFrameView:UIView?
        
        override func viewDidLoad() {
            super.viewDidLoad()
        }
    }
    

    func stopReading(_ command: CDVInvokedUrlCommand) {
        //stop camera
        captureSession?.stopRunning()
        cameraPreview.removePreviewLayer()
        cameraPreview.videoPreviewLayer = nil
        self.barcodeReadCallback = nil
        let pluginResult = CDVPluginResult(status: CDVCommandStatus_OK, messageAs: "Camera Stopped")
