[Android] TV: Poperly start media playback in Details view

Geoffrey Métais git at videolan.org
Thu Jun 2 15:13:03 CEST 2016


vlc-android | branch: master | Geoffrey Métais <geoffrey.metais at gmail.com> | Thu Jun  2 15:12:26 2016 +0200| [d60d7ba51bf37b6456c214014a3d5e3ba2fa5921] | committer: Geoffrey Métais

TV: Poperly start media playback in Details view

> https://code.videolan.org/videolan/vlc-android/commit/d60d7ba51bf37b6456c214014a3d5e3ba2fa5921
---

 .../src/org/videolan/vlc/gui/tv/MediaItemDetailsFragment.java  | 10 +---------
 1 file changed, 1 insertion(+), 9 deletions(-)

diff --git a/vlc-android/src/org/videolan/vlc/gui/tv/MediaItemDetailsFragment.java b/vlc-android/src/org/videolan/vlc/gui/tv/MediaItemDetailsFragment.java
index 08063fc..1d8190d 100644
--- a/vlc-android/src/org/videolan/vlc/gui/tv/MediaItemDetailsFragment.java
+++ b/vlc-android/src/org/videolan/vlc/gui/tv/MediaItemDetailsFragment.java
@@ -21,7 +21,6 @@
 package org.videolan.vlc.gui.tv;
 
 import android.annotation.TargetApi;
-import android.content.Intent;
 import android.content.res.Resources;
 import android.graphics.Bitmap;
 import android.net.Uri;
@@ -45,15 +44,12 @@ import org.videolan.vlc.R;
 import org.videolan.vlc.gui.PlaybackServiceFragment;
 import org.videolan.vlc.gui.helpers.AudioUtil;
 import org.videolan.vlc.gui.helpers.BitmapUtil;
-import org.videolan.vlc.gui.tv.audioplayer.AudioPlayerActivity;
 import org.videolan.vlc.media.MediaDatabase;
 import org.videolan.vlc.media.MediaLibrary;
 import org.videolan.vlc.media.MediaUtils;
 import org.videolan.vlc.media.MediaWrapper;
 import org.videolan.vlc.util.FileUtils;
 
-import java.util.ArrayList;
-
 @TargetApi(Build.VERSION_CODES.JELLY_BEAN_MR1)
 public class MediaItemDetailsFragment extends DetailsFragment implements PlaybackService.Client.Callback {
     private static final String TAG = "MediaItemDetailsFragment";
@@ -117,11 +113,7 @@ public class MediaItemDetailsFragment extends DetailsFragment implements Playbac
                         PlaybackServiceFragment.registerPlaybackService(MediaItemDetailsFragment.this, MediaItemDetailsFragment.this);
                         break;
                     case ID_PLAY:
-                        ArrayList<MediaWrapper> tracks = new ArrayList<MediaWrapper>();
-                        tracks.add(media);
-                        Intent intent = new Intent(getActivity(), AudioPlayerActivity.class);
-                        intent.putExtra(AudioPlayerActivity.MEDIA_LIST, tracks);
-                        startActivity(intent);
+                        TvUtil.playMedia(getActivity(), media);
                         break;
                     case ID_FAVORITE_ADD:
                         mDb.addNetworkFavItem(Uri.parse(mMedia.getLocation()), mMedia.getTitle(), mMedia.getArtworkUrl());



More information about the Android mailing list