title: Get duration of HLS
body: <p>I am trying to getDuration() of a stream but its always returning -1. I googled many links but none is having the issue solved. I am using videoview for streaming content in my app. However calling <code>getDuration()</code> in onPreparedListener is always returning -1.
  Here is my code: </p>
  
  <pre><code>mVideoView.setOnPreparedListener(new MediaPlayer.OnPreparedListener() {
          @Override
          public void onPrepared(MediaPlayer mp) {
              mSeekbar.setMax(mp.getDuration());
              Utils.dismissProgressDialog();
              mVideoView.start();
          }
      });
  </code></pre>
  
  <p>And here is what i am getting upon hitting my m3u8 link:</p>
  
  <pre><code>#EXTM3U
  #EXT-X-STREAM-INF:PROGRAM-ID=1,BANDWIDTH=1900000,RESOLUTION=1280x720
  720/720.m3u8
  #EXT-X-STREAM-INF:PROGRAM-ID=1,BANDWIDTH=514000,RESOLUTION=854x480
  480/480.m3u8
  </code></pre>
  
  <p>I need to have duration because of DVR implementation so need to figure out a way of doing it.</p>