             if let validCaptureSession = self.captureSession {
                 validCaptureSession.beginConfiguration()
                 validCaptureSession.sessionPreset = AVCaptureSessionPresetHigh
-                self._updateCameraDevice(.Back)
+                self._updateCameraDevice(self.cameraDevice)
                 self._setupOutputs()
                 self._setupOutputMode(self._cameraOutputMode)
-                self.cameraOutputQuality = self._cameraOutputQuality
                 self._setupPreviewLayer()
                 validCaptureSession.commitConfiguration()
                 self._updateFlasMode(self.flashMode)

    private var cameraIsObservingDeviceOrientation = false

    private var _cameraOutputMode = CameraOutputMode.StillImage
    private var _cameraOutputQuality = CameraOutputQuality.High

    private var tempFilePath: NSURL = {
        let tempPath = NSURL(fileURLWithPath: NSTemporaryDirectory()).URLByAppendingPathComponent("tempMovie").URLByAppendingPathExtension("mp4").absoluteString

    /// Property to change camera device between front and back.
    public var cameraDevice = CameraDevice.Back {
        didSet {
            if cameraDevice != oldValue {
                _updateCameraDevice(cameraDevice)
            }
        }
    }

