Add tap to pause to video trimming editor.

This commit is contained in:
Alan Evans
2020-03-05 09:49:14 -04:00
committed by Greyson Parrelli
parent 28bbfd88b2
commit 5038210d78
5 changed files with 69 additions and 19 deletions

View File

@@ -216,10 +216,15 @@ public class VideoPlayer extends FrameLayout {
this.playerCallback = playerCallback;
}
public void playFromStart() {
/**
* Resumes a paused video, or restarts if at end of video.
*/
public void play() {
if (exoPlayer != null) {
exoPlayer.setPlayWhenReady(true);
exoPlayer.seekTo(0);
if (exoPlayer.getCurrentPosition() >= exoPlayer.getDuration()) {
exoPlayer.seekTo(0);
}
}
}