     }
 
     private func _currentVideoOrientation() -> AVCaptureVideoOrientation {
-        switch UIApplication.sharedApplication().statusBarOrientation {
+        switch UIDevice.currentDevice().orientation {
         case .LandscapeLeft:
             return .LandscapeRight
         case .LandscapeRight:

            movieOutput = AVCaptureMovieFileOutput()
            movieOutput!.movieFragmentInterval = kCMTimeInvalid

            captureSession?.beginConfiguration()
            captureSession?.addOutput(movieOutput)
            captureSession?.commitConfiguration()
        }
        return movieOutput!
    }

        if shouldReinitializeStillImageOutput {
            stillImageOutput = AVCaptureStillImageOutput()
            
            if let captureSession = captureSession {
                if captureSession.canAddOutput(stillImageOutput) {
                    captureSession.beginConfiguration()
                    captureSession.addOutput(stillImageOutput)
                    captureSession.commitConfiguration()
                }
            }
        }
        return stillImageOutput!
    }
