I am working on ExoPlayer, I want to customize the ExoPlayer and listen for the Event next, previous, rewind, forward so that when the user clicks the next button next video
You might be able to add a ExoPlayer.Listener() and use constants from the PlaybackstateCompat class.
Override the onPlayerStateChanged listener and check the playbackState with rewind/fastforward/etc
player.addListener(new ExoPlayer.Listener() {
@Override
public void onPlayerStateChanged(boolean playWhenReady, int playbackState) {
if (playbackState == PlaybackStateCompat.STATE_FAST_FORWARDING) {
//do something
}
if (playbackState == PlaybackStateCompat.STATE_REWINDING) {
//do something else
}
}
@Override
public void onPlayWhenReadyCommitted() {
}
@Override
public void onPlayerError(ExoPlaybackException error) {
mExoPlayer.stop();
}
});
Also:
STATE_SKIPPING_TO_NEXTSTATE_SKIPPING_TO_PREVIOUS