title: FileReader.readAsDataURL() not working for Video in React
body: <p>I am writing this piece of code to convert a file (image/video) to base64string and then pass into react components of image and Video.</p>
  <p>But this is only working for Image and not for Videos.</p>
  <pre><code>
    captureFile(event){
      const file = event.target.files[0]
      const reader = new window.FileReader()
  
      reader.onloadend = () =&gt; {
        console.log(reader.result)
        this.setState({ image:  reader.result })
        
      }
  
      reader.readAsDataURL(file)
    }
  
  </code></pre>
  <p>Please help.</p>