title: How to record a video with the react-native-camera
body: <p>So I was working on a project that used the react-native video camera from <a href="https://github.com/lwansbrough/react-native-camera" rel="noreferrer">https://github.com/lwansbrough/react-native-camera</a> and had it working.  The component would take videos and the data would print in Xcode's console.  Unfortunately I lost this file and a couple others on my computer and am starting the app back from scratch. I have been attempting to recreate the camera with video recording capabilities but cannot get it to work. Does anybody know what I am doing wrong because I cannot seem to figure it out. The data will print out when I change the captureMode to camera but nothing will happen for video.  Here is my component:</p>
  
  <pre><code>let startVideo = false;
  
  class VideoCamera extends Component {
    constructor() {
      super()
      this.state = {
        captureMode: Camera.constants.CaptureMode.video,
      }
    }
    render() {
      return (
        &lt;Camera
            captureMode={this.state.captureMode}
            ref="camera"
            style={styles.container}
        &gt;
        &lt;TouchableHighlight
            onPressIn={this._startRecord.bind(this)}
            onPressOut={this._endVideo.bind(this)}
        &gt;
        &lt;Icon
            name={'video-camera'}
            size={40}
            style={styles.recordButton}
        /&gt;
          &lt;/TouchableHighlight&gt;
          &lt;/Camera&gt;
        )
    }
  
    _startRecord() {
      startVideo = setTimeout(this._recordVideo.bind(this), 50)
    }
  
    _recordVideo() {
      this.refs.camera.capture({})
        .then((data) =&gt; console.log(data))
        .catch((err) =&gt; console.log(err))
    }
  
    _endVideo() {
      this.refs.camera.stopCapture()
    }
  
  }
  </code></pre>