Add a comment about why we send onEnd from onPositionDiscontinuity when repeat is on
This commit is contained in:
parent
5a43f62253
commit
39d8c4384b
@ -471,6 +471,8 @@ class ReactExoplayerView extends FrameLayout implements
|
|||||||
// which they seeked.
|
// which they seeked.
|
||||||
updateResumePosition();
|
updateResumePosition();
|
||||||
}
|
}
|
||||||
|
// When repeat is turned on, reaching the end of the video will not cause a state change
|
||||||
|
// so we need to explicitly detect it.
|
||||||
if (reason == ExoPlayer.DISCONTINUITY_REASON_PERIOD_TRANSITION
|
if (reason == ExoPlayer.DISCONTINUITY_REASON_PERIOD_TRANSITION
|
||||||
&& player.getRepeatMode() == Player.REPEAT_MODE_ONE) {
|
&& player.getRepeatMode() == Player.REPEAT_MODE_ONE) {
|
||||||
eventEmitter.end();
|
eventEmitter.end();
|
||||||
|
Loading…
Reference in New Issue
Block a user