[Android] [PATCH] Browser: Open videos directly via VideoPlayerActivity
Thomas Guillem
thomas at gllm.fr
Fri May 1 19:12:55 CEST 2015
For video, use directly VideoPlayerActivity to avoid to switch from
AudioService.
For audio, open via AudioService with the list of files in the directory.
It's temporary as everything should be opened via a future PlaybackService.
---
vlc-android/src/org/videolan/vlc/gui/browser/BaseBrowserAdapter.java | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/vlc-android/src/org/videolan/vlc/gui/browser/BaseBrowserAdapter.java b/vlc-android/src/org/videolan/vlc/gui/browser/BaseBrowserAdapter.java
index e4d4f0a..ae6dd8d 100644
--- a/vlc-android/src/org/videolan/vlc/gui/browser/BaseBrowserAdapter.java
+++ b/vlc-android/src/org/videolan/vlc/gui/browser/BaseBrowserAdapter.java
@@ -94,7 +94,9 @@ public class BaseBrowserAdapter extends RecyclerView.Adapter<RecyclerView.ViewH
MediaWrapper mw = (MediaWrapper) getItem(holder.getPosition());
if (mw.getType() == MediaWrapper.TYPE_DIR)
fragment.browse(mw, holder.getPosition());
- else {
+ else if (mw.getType() == MediaWrapper.TYPE_VIDEO) {
+ Util.openMedia(v.getContext(), mw);
+ } else {
int position = 0;
LinkedList<String> mediaLocations = new LinkedList<String>();
MediaWrapper mediaItem;
--
2.1.4
More information about the Android
mailing list