title: Camera Video not Working - React Native
body: <h1>Question</h1>
  
  <p>I have been trying to figure out why this is not working for some time. I have used a lot of example code, however I still cannot figure it out. </p>
  
  <h1>Code</h1>
  
  <pre><code> takeVideo() {
      console.log('started to take video');
      this.camera.capture({
        audio: true,
        mode: Camera.constants.CaptureMode.video,
        target: Camera.constants.CaptureTarget.disk
      }).then((data) =&gt; {
        this.setState({ path: data.path });
        console.log(data);
      }).catch((err) =&gt; console.log(err));
    }
  
    stopVideo() {
      this.camera.stopCapture();
      console.log(this.state.path);
    }
  
    renderCamera() {
      return (
        &lt;View&gt;
          &lt;Camera
            ref={(cam) =&gt; {
              this.camera = cam;
            }}
            style={styles.preview}
            aspect={Camera.constants.Aspect.fill}
            captureTarget={Camera.constants.CaptureTarget.disk}
            captureMode={Camera.constants.CaptureMode.video}
          &gt;
            &lt;TouchableHighlight
              style={styles.capture}
              onPressIn={this.takeVideo.bind(this)}
              onPressOut={this.stopVideo.bind(this)}
              underlayColor="rgba(255, 255, 255, 0.5)"
            &gt;
              &lt;View /&gt;
            &lt;/TouchableHighlight&gt;
          &lt;/Camera&gt;
        &lt;/View&gt;
      );
    }
  </code></pre>
  
  <h3>Whats not working</h3>
  
  <p>When I <code>console.log(this.state.path)</code> it outputs <code>false</code> which means that it does not change and the video did not record.</p>
  
  <h1>Info</h1>
  
  <ul>
  <li>This is on IOS</li>
  <li>This <strong>works</strong> if I change <code>Camera.constants.CaptureMode.video</code> to <code>Camera.constants.CaptureMode.still</code> (<code>.video</code> => <code>.still</code>)</li>
  <li>RN version:
  <code>react-native-cli: 2.0.1</code>
  <code>react-native: 0.44.0</code></li>
  </ul>
  
  <h1>Repo</h1>
  
  <p>I found this repo that is trying to do almost the exact same thing as me and is having the same issue. Here is the repo: <a href="https://github.com/MiLeung/record" rel="nofollow noreferrer">https://github.com/MiLeung/record</a>  </p>