Android MediaPlayer : info/warning (703, 0),info/warning (702, 0),info/warning (701, 0),ProtocolException when try to seek from a random position

后端 未结 1 1099
醉话见心
醉话见心 2021-01-25 18:26

Im streaming an mp3 audio from a url by using mediaplayer, Now im able to play music , But when i select seekbar at a random position, music getting stopped and

相关标签:
1条回答
  • 2021-01-25 19:08

    try this:

    mediaPlayer.setOnSeekCompleteListener(new MediaPlayer.OnSeekCompleteListener() {
        @Override
        public void onSeekComplete(MediaPlayer arg0) {
            Log.d(TAG, "onSeekComplete() current pos : " + arg0.getCurrentPosition());
            SystemClock.sleep(200);
            mediaPlayer.start();
        }
    });
    
    0 讨论(0)
提交回复
热议问题