Support repeat
Now that we have updated to a newer ExoPlayer, we can use the setRepeatMode that's available from 2.5 on
This commit is contained in:
parent
0fb2a5469e
commit
db0a17f4a9
@ -610,6 +610,13 @@ class ReactExoplayerView extends FrameLayout implements
|
|||||||
}
|
}
|
||||||
|
|
||||||
public void setRepeatModifier(boolean repeat) {
|
public void setRepeatModifier(boolean repeat) {
|
||||||
|
if (player != null) {
|
||||||
|
if (repeat) {
|
||||||
|
player.setRepeatMode(Player.REPEAT_MODE_ONE);
|
||||||
|
} else {
|
||||||
|
player.setRepeatMode(Player.REPEAT_MODE_OFF);
|
||||||
|
}
|
||||||
|
}
|
||||||
this.repeat = repeat;
|
this.repeat = repeat;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user