Generate an onEnd event when the end of the video is reached while repeat is on

This commit is contained in:
Hampton Maxwell 2018-05-28 21:22:47 -07:00
parent db0a17f4a9
commit 5a43f62253

View File

@ -471,6 +471,10 @@ class ReactExoplayerView extends FrameLayout implements
// which they seeked. // which they seeked.
updateResumePosition(); updateResumePosition();
} }
if (reason == ExoPlayer.DISCONTINUITY_REASON_PERIOD_TRANSITION
&& player.getRepeatMode() == Player.REPEAT_MODE_ONE) {
eventEmitter.end();
}
} }
@Override @Override