title: Android HLS Streaming - Different Android Versions Load Different Location in Stream
body: <p>I realise that there are some issues in terms of level of support of HLS in Android. I'm trying to write a small videoplayer demo (to work on as many devices as possible); preferably without using a third party library; that can stream HLS video.</p>
  
  <p><strong>NOTE</strong>: I'm currently testing on JellyBean 4.2.2, but have access to other versions</p>
  
  <p>I have managed to use the MediaPlayer class so that my app is able to start playing a stream (eg Apple's test video <a href="http://devimages.apple.com/iphone/samples/bipbop/bipbopall.m3u8">BipBopAll</a>), but it seems to be loading the wrong section of the stream, as the video seems to start at 29 minutes in (and so it finishes after about thirty seconds).</p>
  
  <p>The code that I've used is pretty basic:</p>
  
  <pre><code>private void playTrack()
  {   
      player = new MediaPlayer();
  
      try 
      {                   
          player.setDisplay(holder);
          player.setDataSource("http://devimages.apple.com/iphone/samples/bipbop
                                /bipbopall.m3u8");
          player.prepare();
  
      } 
      catch (...) 
      {
      }
      player.start();
  }
  </code></pre>
  
  <p><strong>Update:</strong> I've tested the same code on ICS 4.0.4, and it works correctly. Testing in 3.0.1, loads the stream at 15 minutes, and then runs correctly from there.</p>
  
  <p><strong>What can I do to ensure that the stream starts at the beginning, and plays correctly on multiple Android versions?</strong></p>
  
  <p><strong>Or, is there a better implementation that I should use?</strong></p>