title: cordova: media.getDuration returns -1
body: <p>I am using Media.getDuration() function to get duration of an audio file but I am always getting -1 as response.</p>
  
  <p>This works fine if I build using build.phonegap.com</p>
  
  <p>But whenever I build using cli I then getDuration does not work.</p>
  
  <p>Following are simple steps to reproduce this issue:</p>
  
  <p><strong>CLI:</strong></p>
  
  <pre><code>cordova start my_project
  cordova plugin add cordova-plugin-media
  cordova platform add android
  cordova build android
  </code></pre>
  
  <p><strong>www/index.html</strong></p>
  
  <pre><code>&lt;!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
                "http://www.w3.org/TR/html4/strict.dtd"&gt;
  &lt;html&gt;
    &lt;head&gt;
      &lt;title&gt;Media Example&lt;/title&gt;
  
      &lt;script type="text/javascript" charset="utf-8" src="cordova.js"&gt;&lt;/script&gt;
      &lt;script type="text/javascript" charset="utf-8"&gt;
  
      // Wait for device API libraries to load
      //
      document.addEventListener("deviceready", onDeviceReady, false);
  
  
      function deviceready()
      {
         var my_media = new Media('http://web.com/mp3');
         my_media.play();
         console.log(my_media.getDuration()); // this will produce -1
      }
  
  
      &lt;/script&gt;
    &lt;/head&gt;
    &lt;body&gt;
  
    &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>