     }
     
     internal func updateVideoStabilization() {
-        if let videoOutput = self.videoOutput {
+        if let videoOutput = self._videoOutput {
             if let videoConnection = videoOutput.connection(withMediaType: AVMediaTypeVideo) {
                 if videoConnection.isVideoStabilizationSupported {
                     videoConnection.preferredVideoStabilizationMode = .standard

    
    private func addVideoOutput() -> Bool {
        
        if self.videoOutput == nil {
            self.videoOutput = AVCaptureVideoDataOutput()
            self.videoOutput?.alwaysDiscardsLateVideoFrames = false
            
            var videoSettings = [String(kCVPixelBufferPixelFormatTypeKey):Int(kCVPixelFormatType_32BGRA)]
            if let formatTypes = self.videoOutput?.availableVideoCVPixelFormatTypes as? [Int] {
                var supportsFullRange = false
                var supportsVideoRange = false
                for format: Int in formatTypes {

            case .video:
                break
            case .photo:
                if let audioOutput = self._audioOutput {
                    if session.outputs.contains(where: { (audioOutput) -> Bool in
                        return true
                    }) {
                        session.removeOutput(audioOutput)
                        self._audioOutput = nil
                    }
                }
                break
            case .audio:
                if let videoOutput = self._videoOutput {
                    if session.outputs.contains(where: { (videoOutput) -> Bool in
                        return true
                    }) {
                        session.removeOutput(videoOutput)
                        self._videoOutput = nil
                    }
                }
                break
