Search code examples
androidmedia-playerbuffered

Buffering from arbitrary track position in Android Media Player


I've implemented a play/pause player based on Android media player API, with seek bar, both for local and remote (buffered) files

While remote files are correctly buffered from position 0, I would like to know how to buffer a remote file from arbitrary track position

for example, if I pull my seek bar to 2.30, I want the player to buffer the remote media file starting from 2.30


Solution

  • It seems that in order to buffer from arbitrary track position, I simply need to use seekTo() to move the track to that position, and the buffering will automatically start from that position