seekTo is relative to the start of the file - NOT the current position according to the docs
public void seekTo (int msec) Since: API Level 1 Seeks to specified time position. Parameters msec the offset in milliseconds from the start to seek to for your 30s file, the range is 0 to 30000 try seekTo(15000) On Jan 17, 6:53 pm, Ganesh <ganesh.vija...@gmail.com> wrote: > Dear Experts, > > I am currently trying to understand the Media Player and had a > question on the seeking part in Media Player. Basically, "seekTo" > method can be invoked from any state except Idle, Initialized, > Stopped, Error. > > Consider a case where playback has been completed (30 s file) i.e. > Looping was set to FALSE and the player is in PlaybackCompleted state. > I intend to jump to middle of the file and play it back from there. If > I invoke a seekTo(-15000) and invoke a mediaPlayer.start() in > onSeekComplete callback, what is the expected behavior of the system? > > From the documentation, it wasn't clear as invoking a start from > PlaybackCompleted starts the playback from starting of the file and > successful call of seekTo doesn't alter the state of the player. > > If this has been answered/discussed earlier, kindly pardon me for > posting the same. Any pointers or information about the same would be > extremely helpful. > > Thanks, > Ganesh -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en