         let outputSettings:Dictionary = [AVVideoCodecJPEG:AVVideoCodecKey]
         stillImageOutput?.outputSettings = outputSettings
     
-        session.sessionPreset = AVCaptureSession.Preset.high
+        session.sessionPreset = AVCaptureSessionPresetHigh
         
         //参数设置
         output.setMetadataObjectsDelegate(self, queue: DispatchQueue.main)

        })
    }
    
    open func connectionWithMediaType(mediaType:AVMediaType,connections:[AnyObject]) -> AVCaptureConnection?
    {
        for connection:AnyObject in connections
        {

        }

        previewLayer = AVCaptureVideoPreviewLayer(session: session)
        previewLayer?.videoGravity = AVLayerVideoGravityResizeAspectFill
        
        var frame:CGRect = videoPreView.frame
        frame.origin = CGPoint.zero
