There was a need to create your own custom player, with a controller that could control the change in the current playback point. However, the main methods of VideoView , such as .getCurrentPosition() , seekTo(millis) , etc. only work in the life cycle method of the media player - onPrepared(MediaPlayer mp) . I need to ensure that I can rewind video from anywhere in the code, how to do it?

  • Try to read here: tyk - YuriySPb

1 answer 1

they work not only in onPrepared(MediaPlayer mp) , but only after calling the onPrepared onPrepared(MediaPlayer mp) , which means that the file (or stream) has successfully loaded and initialized by the player