I'm using Exoplayer with a base of the DemoPlayer. I want to restart/replay the video from beginning on some user action after that ExoPlayer.STATE_ENDED is dispatched.
I've tried to use seekTo(0)
and mPlayer.setPlayWhenReady(true);
after but it didn't do anything, at all.
1 Answer. Show activity on this post. 3] Just check by clicking next button from the media controller if that works then you are done, now the videos will be played automatically once finished the current one.
As per the Exo player developer console, it's mentioned that Exo player only used for the Audio and Video. Add ImageView and Exoplayer in Framelayout. Show Image (That is knows as thumbnails) in imageView and on tap of ImageView Hide it and show ExoPlayer and play it.
I've updated the library to ExoPlayer r1.4.2
and it does the job...
mPlayer.seekTo(0); mPlayer.setPlayWhenReady(true); // replay from start
// Pause video after restart
mPlayer.seekTo(0); mPlayer.setPlayWhenReady(false);
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With