[Android] [PATCH] Browser: Open videos directly via VideoPlayerActivity

Jean-Baptiste Kempf jb at videolan.org
Fri May 1 19:16:46 CEST 2015


Please ship!

On 01 May, Thomas Guillem wrote :
> 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
> 
> _______________________________________________
> Android mailing list
> Android at videolan.org
> https://mailman.videolan.org/listinfo/android

-- 
With my kindest regards,

-- 
Jean-Baptiste Kempf
http://www.jbkempf.com/ - +33 672 704 734
Sent from my Electronic Device


More information about the Android mailing list