     
     var microPhontIsAvailable = true
     
+    var focusCursorTapGes = UITapGestureRecognizer()
+    
+    var cameraFocusPanGes: UIPanGestureRecognizer?
+    
+    var recordLongGes: UILongPressGestureRecognizer?
+    
     // 仅支持竖屏
     public override var supportedInterfaceOrientations: UIInterfaceOrientationMask {
         return .portrait

    
    // 调整焦距
    @objc func adjustCameraFocus(_ pan: UIPanGestureRecognizer) {
        let convertRect = self.bottomView.convert(self.largeCircleView.frame, to: self.view)
        let point = pan.location(in: self.view)
        
        if pan.state == .began {
            if !convertRect.contains(point) {
                return
            }
            self.dragStart = true
            self.startRecord()
        } else if pan.state == .changed {
            guard self.dragStart else {
                return
            }
            let maxZoomFactor = self.getMaxZoomFactor()
            var zoomFactor = (convertRect.midY - point.y) / convertRect.midY * maxZoomFactor
            zoomFactor = max(1, min(zoomFactor, maxZoomFactor))
            self.setVideoZoomFactor(zoomFactor)
        } else if pan.state == .cancelled || pan.state == .ended {
            guard self.dragStart else {
                return
            }
            self.dragStart = false
            self.finishRecord()
        }
    }
    

extension ZLCustomCamera: UIGestureRecognizerDelegate {
    
    public func gestureRecognizer(_ gestureRecognizer: UIGestureRecognizer, shouldRecognizeSimultaneouslyWith otherGestureRecognizer: UIGestureRecognizer) -> Bool {
        let gesTuples: [(UIGestureRecognizer?, UIGestureRecognizer?)] = [(recordLongGes, cameraFocusPanGes), (recordLongGes, focusCursorTapGes), (cameraFocusPanGes, focusCursorTapGes)]
        
        let result = gesTuples.map { (ges1, ges2) in
            return (ges1 == gestureRecognizer && ges2 == otherGestureRecognizer) ||
            (ges2 == otherGestureRecognizer && ges1 == gestureRecognizer)
        }.filter { $0 == true}
        
        return result.count > 0
    }
    
}
