title: Audio stops streaming after a while
body: <p>Just start streaming audio...starts playing, buffer goes ahead, but suddenly stops. When song catches up to the buffer, music stops. Pressing next goes to the nest songs but same thing happens. any idea?</p>
  
  <pre><code>private void startPlay(String file, String name) 
      {
          Log.i("Selected: ", file);
  
          tv_selelctedFile.setText(name);
  
          //progressControlSeekbar.setProgress(0);
  
          int maxVolume = mediaPlayer.getDuration();
          int curVolume = mediaPlayer.getCurrentPosition();
  
          progressControlSeekbar.setMax(maxVolume);
          progressControlSeekbar.setProgress(curVolume);
          progressControlSeekbar.setOnSeekBarChangeListener(new SeekBar.OnSeekBarChangeListener() {
  
              public void onStopTrackingTouch(SeekBar seekBar) 
              {
                  isMoveingSeekBar = false;
              }
              public void onStartTrackingTouch(SeekBar seekBar) 
              {
                  isMoveingSeekBar = true;
              }
              public void onProgressChanged(SeekBar seekBar, int progress,boolean fromUser) 
              {
                  if(isMoveingSeekBar)
                  {
                      mediaPlayer.seekTo(progress);
                      Log.i("OnSeekBarChangeListener","onProgressChanged");
                  }
              }
          });     
  
          mediaPlayer.stop();
          mediaPlayer.reset();
  
          try {
              mediaPlayer.setDataSource(file);
              mediaPlayer.prepare();
              mediaPlayer.start();
          } catch (IllegalArgumentException e) {
              e.printStackTrace();
          } catch (IllegalStateException e) {
              e.printStackTrace();
          } catch (IOException e) {
              e.printStackTrace();
          }
  
          progressControlSeekbar.setMax(mediaPlayer.getDuration());
          playButton.setImageResource(android.R.drawable.ic_media_pause);
  
          updatePosition();
  
          isStarted = true;
      }
  </code></pre>