From 1d3a464c62259a399964cab1cd053957c7c34f23 Mon Sep 17 00:00:00 2001 From: dhk2 Date: Fri, 3 Jul 2020 21:48:43 -0700 Subject: [PATCH] Bug fix for DateUtils not working as documented --- .../peertube/fragment/VideoPlayerFragment.java | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/app/src/main/java/net/schueller/peertube/fragment/VideoPlayerFragment.java b/app/src/main/java/net/schueller/peertube/fragment/VideoPlayerFragment.java index 08e4275..9fad3b3 100644 --- a/app/src/main/java/net/schueller/peertube/fragment/VideoPlayerFragment.java +++ b/app/src/main/java/net/schueller/peertube/fragment/VideoPlayerFragment.java @@ -199,7 +199,11 @@ public class VideoPlayerFragment extends Fragment implements VideoRendererEventL } }); } - + public void useController(boolean value){ + if (mBound){ + simpleExoPlayerView.setUseController(value); + } + } private void playVideo(Video video) { Context context = getContext(); @@ -259,6 +263,11 @@ public class VideoPlayerFragment extends Fragment implements VideoRendererEventL mService.player.setPlayWhenReady(false); } } + public void pauseToggle() { + if (mBound) { + mService.player.setPlayWhenReady(!mService.player.getPlayWhenReady()); + } + } public void unPauseVideo() { if (mBound) { mService.player.setPlayWhenReady(true);