[Android] Fix play video from start ctx option
Geoffrey Métais
git at videolan.org
Fri Dec 23 10:29:11 CET 2016
vlc-android | branch: master | Geoffrey Métais <geoffrey.metais at gmail.com> | Wed Dec 21 17:26:44 2016 +0100| [08f9e5a1b004f1b230bd22415268666d657c2556] | committer: Geoffrey Métais
Fix play video from start ctx option
> https://code.videolan.org/videolan/vlc-android/commit/08f9e5a1b004f1b230bd22415268666d657c2556
---
vlc-android/src/org/videolan/vlc/gui/video/VideoGridFragment.java | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/vlc-android/src/org/videolan/vlc/gui/video/VideoGridFragment.java b/vlc-android/src/org/videolan/vlc/gui/video/VideoGridFragment.java
index 3ddb3a4..3b4948c 100644
--- a/vlc-android/src/org/videolan/vlc/gui/video/VideoGridFragment.java
+++ b/vlc-android/src/org/videolan/vlc/gui/video/VideoGridFragment.java
@@ -233,6 +233,9 @@ public class VideoGridFragment extends MediaBrowserFragment implements MediaUpda
protected void playVideo(MediaWrapper media, boolean fromStart) {
+ Activity activity = getActivity()
+ if (activity instanceof PlaybackService.Callback)
+ mService.removeCallback((PlaybackService.Callback) activity;
media.removeFlags(MediaWrapper.MEDIA_FORCE_AUDIO);
VideoPlayerActivity.start(getActivity(), media.getUri(), fromStart);
}
@@ -604,9 +607,7 @@ public class VideoGridFragment extends MediaBrowserFragment implements MediaUpda
ArrayList<MediaWrapper> playList = new ArrayList<>();
MediaUtils.openList(activity, playList, mVideoAdapter.getListWithPosition(playList, position));
} else {
- if (activity instanceof PlaybackService.Callback)
- mService.removeCallback((PlaybackService.Callback) activity);
- VideoPlayerActivity.start(activity, media.getUri());
+ playVideo(media, false);
}
}
}
More information about the Android
mailing list