                 self.device = device
             }
         }
-        
-        do {
-            
+
+
+
+        do {
+
             if let session = session {
                 
                 videoInput = try AVCaptureDeviceInput(device: device)

                        
                    }
                }
                
            }
            
            session?.commitConfiguration()

                session.addInput(videoInput)
                
                videoOutput = AVCaptureMovieFileOutput()
                let totalSeconds = 10.0 //Total Seconds of capture time
                let timeScale: Int32 = 30 //FPS
                
                let maxDuration = CMTimeMakeWithSeconds(totalSeconds, timeScale)
