         self._photoOutput = nil
     }
 
-    internal func removeOutputsIfNecessary(session: AVCaptureSession) {
+    internal func removeUnusedOutputsForCurrentCameraMode(session: AVCaptureSession) {
         guard let currentOutputs = session.outputs as? [AVCaptureOutput] else {
             return
         }

        if let session = self._captureSession {
            self.beginConfiguration()
            self.removeInputs(session: session)
            self.removeOutputsIfNecessary(session: session)
            self.commitConfiguration()
        }


        
            // setup preset and mode
            
            self.removeUnusedOutputsForCurrentCameraMode(session: session)
            
            switch self.cameraMode {
            case .video:
