title: How to know the Duration of audio song before streaming?
body: <p>I am making an application for Stream audio song. In Custom media player, i have to show the total duration of that audio file.
  If a audio song will be SDCard , i can know its duration using </p>
  
  <pre><code>MediaPlayer player;
  
  public double duration() {
          return player.getDuration();
      }
  </code></pre>
  
  <p>But in my case audio file is on the server, so i have to stream it. </p>
  
  <p>What is the best approach?</p>