title: pick video using ionic 3 native camera plugin
body: <pre><code>this.camera.getPicture({
        quality: 50,
        destinationType: this.camera.DestinationType.DATA_URL,
        mediaType: this.camera.MediaType.VIDEO,
        sourceType: this.camera.PictureSourceType.PHOTOLIBRARY,
      }).then((videoData) =&gt; {
  
      console.log('video data', videoData);
  </code></pre>
  
  <p>I can't send the video data to server.</p>
  
  <p>The very first thing I'm struggling with here is that how is destinationType affecting the returned result because no matter what I set (either DATA_URL or File_Uri) it always returns me some url of this structure <code>/storage/emulated/0/DCIM/Camera/VID_20180312_210545.mp4</code> . (FYI: I am currently testing this on android platform). I am able to preview the video by simply putting it in video src but I am unable to send this video to the server.</p>
  
  <p>This is the approach that I am using to get the video file from the returned <code>/storage</code> like URL and then to send the video to server.</p>
  
  <pre><code>return this.file.resolveLocalFilesystemUrl(data).then((entry:FileEntry)=&gt;{
        debugger;
        return new Promise((resolve, reject)=&gt;{
          entry.file((file)=&gt;{
            let fileReader = new FileReader();
            fileReader.onloadend = ()=&gt;{
              let blob = new Blob([fileReader.result], {type:file.type});
              resolve({blob: blob, file: file});
            };
            fileReader.readAsArrayBuffer(file);
          })
        })
      })
  </code></pre>
  
  <p>Where data parameter being passed to the resolveLocalFilesystemUrl is that same url (/storage/0..) that I mentioned earlier.</p>
  
  <p>But this throws an error with error code 5 &amp; error message ENCODING_ERR</p>
  
  <p>I am not passing the encoding type here on purpose as that is for image files.</p>
  
  <p><strong>Important Note:</strong> if I add 'file://' to the data and then pass it to <code>resolveLocalFilesystemUrl()</code> like this <code>this.file.resolveLocalFilesystemUrl('file://'+data).then(())</code> then I am able to create file entry which I've sent to the server and server has successfully saved the video. But I wanted to use more of a cross platform approach that will work both on Android &amp; iOS</p>