I am trying to play videos in the form of a playlist one after the other. I am using android Exoplayer to play my files, but there are no listeners in mediaplayer to listen to an end of the media file. Is there a way to listen to the end of media file using exoplayer.
I know this is old, but just to expand on the accepted answer:
exoPlayer.addListener(this);
.....
@Override
public void onPlayerStateChanged(boolean playWhenReady, int state) {
if (state == ExoPlayer.STATE_ENDED){
//player back ended
}
}