Why does mediaPlayer.seekTo (msec) not update the surfaceView when pausing the media player?

I use MediaPlayerin my android application to play videos. When playback is paused by a method mediaPlayer.pause()and I call mediaPlayer.seekTo(msec), the display on the surfaceView screen is not updated. It displays the frame where the video was stopped when I called the method pause().

When I start()again only then, it starts with a previously set frame seekTo().

How can I force MediaPlayerupdates surfaceViewwhen MediaPlayer is paused and not playing?

+5
source share
1 answer

OS Gingerbread. onProgressChanged , , , .

public void onProgressChanged(SeekBar seekBar, int progress, boolean fromUser) 
{
    if(fromUser)
    {
    videoPlayer.seekTo(progress);
    setRemainingTime(progress);
    setPreviousTime(progress);
    playerPausedAt = progress;
    videoPlayer.start();
     }

}

.

0

All Articles