I am working on an application in which the video pauses at three different intervals. After the second pause, if the button is pressed, it should start from the previous place.
Eg. if it is currently paused at 1:30, and then by pressing a single button, it goes to the previous bookmark, i.e. 00:45.
I thought using MediaPlayer.seekTo () would help me with this. But seekTo () is not looking for a position at all. CurrentPosition remains unchanged even after calling seekTo ();
Here is my code.
mediaPlayer.setOnSeekCompleteListener(new OnSeekCompleteListener() { @Override public void onSeekComplete(MediaPlayer mp) { Log.d("VID_PLAYER","Seek Complete. Current Position: " + mp.getCurrentPosition()); mp.start(); } });
and somewhere below, I have this ...
mediaPlayer.seekTo(45000);
What is the problem? Why not seekTo (); working? Any help would be appreciated.
I am currently testing it on Android v4.0.3 (ICS)
source share