     ///
     /// - Parameter adjustedPoint: The point of interest.
     public func focusExposeAndAdjustWhiteBalance(atAdjustedPoint adjustedPoint: CGPoint) {
-        if let device: AVCaptureDevice = self._currentDevice {
-            guard
-                !device.isAdjustingFocus,
-                !device.isAdjustingExposure
-                else {
-                    return
-            }
-            do {
-                try device.lockForConfiguration()
-                
-                let focusMode: AVCaptureDevice.FocusMode = .autoFocus
-                let exposureMode: AVCaptureDevice.ExposureMode = .continuousAutoExposure
-                let whiteBalanceMode: AVCaptureDevice.WhiteBalanceMode = .continuousAutoWhiteBalance
-                
-                if device.isFocusPointOfInterestSupported && device.isFocusModeSupported(focusMode) {
-                    device.focusPointOfInterest = adjustedPoint
-                    device.focusMode = focusMode
-                }
-                
-                if device.isExposurePointOfInterestSupported && device.isExposureModeSupported(exposureMode) {
-                    device.exposurePointOfInterest = adjustedPoint
-                    device.exposureMode = exposureMode
-                }
-                
-                if device.isWhiteBalanceModeSupported(whiteBalanceMode) {
-                    device.whiteBalanceMode = whiteBalanceMode
-                }
-                
-                device.isSubjectAreaChangeMonitoringEnabled = false
-                
-                device.unlockForConfiguration()
-            }
-            catch {
-                print("NextLevel, focusExposeAndAdjustWhiteBalance failed to lock device for configuration")
-            }
+        guard let device = self._currentDevice,
+            !device.isAdjustingFocus,
+            !device.isAdjustingExposure
+        else {
+            return
+        }
+        
+        do {
+            try device.lockForConfiguration()
+            
+            let focusMode: AVCaptureDevice.FocusMode = .autoFocus
+            let exposureMode: AVCaptureDevice.ExposureMode = .continuousAutoExposure
+            let whiteBalanceMode: AVCaptureDevice.WhiteBalanceMode = .continuousAutoWhiteBalance
+            
+            if device.isFocusPointOfInterestSupported && device.isFocusModeSupported(focusMode) {
+                device.focusPointOfInterest = adjustedPoint
+                device.focusMode = focusMode
+            }
+            
+            if device.isExposurePointOfInterestSupported && device.isExposureModeSupported(exposureMode) {
+                device.exposurePointOfInterest = adjustedPoint
+                device.exposureMode = exposureMode
+            }
+            
+            if device.isWhiteBalanceModeSupported(whiteBalanceMode) {
+                device.whiteBalanceMode = whiteBalanceMode
+            }
+            
+            device.isSubjectAreaChangeMonitoringEnabled = false
+            
+            device.unlockForConfiguration()
+        }
+        catch {
+            print("NextLevel, focusExposeAndAdjustWhiteBalance failed to lock device for configuration")
         }
     }
     

    ///
    /// - Parameter adjustedPoint: The point of interest for exposure.
    public func exposeAtAdjustedPointOfInterest(adjustedPoint: CGPoint) {
        if let device: AVCaptureDevice = self._currentDevice {
            guard
                !device.isAdjustingExposure
                else {
                    return
            }
            
            do {
                try device.lockForConfiguration()
                
                if device.isExposurePointOfInterestSupported && device.isExposureModeSupported(.continuousAutoExposure) {
                    let exposureMode = device.exposureMode
                    device.exposurePointOfInterest = adjustedPoint
                    device.exposureMode = exposureMode
                }
                
                device.unlockForConfiguration()
            }
            catch {
                print("NextLevel, exposeAtAdjustedPointOfInterest failed to lock device for configuration")
            }
        }
    }
    

            return .off
        }
        set {
            guard let _ = self._captureSession,
                  let videoOutput = self._videoOutput
            else {
                return
            }

            switch newValue {
            case .off:
                if let vc = videoOutput.connection(with: AVMediaType.video) {
                    if vc.isVideoMirroringSupported {
                        vc.isVideoMirrored = false
                    }
                }
                if let pc = self.previewLayer.connection {
                    if pc.isVideoMirroringSupported {
                        pc.automaticallyAdjustsVideoMirroring = false
                        pc.isVideoMirrored = false
                    }
                }
                break
            case .on:
                if let vc = videoOutput.connection(with: AVMediaType.video) {
                    if vc.isVideoMirroringSupported {
                        vc.isVideoMirrored = true
                    }
                }
                if let pc = self.previewLayer.connection {
                    if pc.isVideoMirroringSupported {
                        pc.automaticallyAdjustsVideoMirroring = false
                        pc.isVideoMirrored = true
                    }
                }
                break
            case .auto:
                if let vc = videoOutput.connection(with: AVMediaType.video), let device = self._currentDevice {
                    if vc.isVideoMirroringSupported {
                        vc.isVideoMirrored = (device.position == .front)
                    }
                }
                if let pc = self.previewLayer.connection {
                    if pc.isVideoMirroringSupported {
                        pc.automaticallyAdjustsVideoMirroring = true
                    }
                }
                break
            }
        }
    }
