title: React.js - audio.duration returns NaN & How to upload blobUrl to amazon s3
body: <p>I'm using the react component <code>ReactMediaRecorder</code> to capture audio using the following code. it returns a blobUrl which I have set in my state.</p>
  
  <pre><code>&lt;ReactMediaRecorder  
    audio
    whenStopped={blobUrl=&gt;this.setState({ blobUrl })}
    render={({ status, startRecording, stopRecording, mediaBlob }) =&gt; (
      &lt;div&gt;
        &lt;p&gt;{status}&lt;/p&gt;
        &lt;button onClick={startRecording}&gt;Start Recording&lt;/button&gt;  
        &lt;button onClick={stopRecording}&gt;Stop Recording&lt;/button&gt;  
        &lt;audio src={mediaBlob} controls /&gt;  
      &lt;/div&gt;  
    )}  
  /&gt; 
  </code></pre>
  
  <p>My First Question is Why does audio.play() works but audio.duration returns NaN ?</p>
  
  <pre><code>let audio = new Audio(mediaBlob);
  audio.play(); // this works
  audio.duration //but this returns NaN
  </code></pre>
  
  <p>Second, I want to upload this audio to my amazon s3 storage using rest-api. Is there any other way to convert this blobUrl to audio and then upload it to s3 storage ?</p>