[Android] Create MediaWrapper for playback

Geoffrey Métais git at videolan.org
Mon Feb 1 17:18:02 CET 2016


vlc-android | branch: master | Geoffrey Métais <geoffrey.metais at gmail.com> | Mon Feb  1 15:48:23 2016 +0100| [e0fad4dc7fab143d65f7522140b4401ddcba5b6e] | committer: Geoffrey Métais

Create MediaWrapper for playback

Allow to display proper title

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

 vlc-android/src/org/videolan/vlc/gui/browser/ExtensionAdapter.java | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/vlc-android/src/org/videolan/vlc/gui/browser/ExtensionAdapter.java b/vlc-android/src/org/videolan/vlc/gui/browser/ExtensionAdapter.java
index 71612f3..6d35ea4 100644
--- a/vlc-android/src/org/videolan/vlc/gui/browser/ExtensionAdapter.java
+++ b/vlc-android/src/org/videolan/vlc/gui/browser/ExtensionAdapter.java
@@ -55,7 +55,11 @@ public class ExtensionAdapter extends RecyclerView.Adapter<ExtensionAdapter.View
             if (item.type == VLCExtensionItem.TYPE_DIRECTORY) {
                 mFragment.browseItem(item);
             } else if (item.type == VLCExtensionItem.TYPE_AUDIO || item.type == VLCExtensionItem.TYPE_VIDEO){
-                MediaUtils.openUri(v.getContext(), Uri.parse(item.link)); //TODO fix path in playbackservice !
+                MediaWrapper mw = new MediaWrapper(Uri.parse(item.link));
+                mw.setTitle(item.getTitle());
+                mw.setDescription(item.getSubTitle());
+                mw.setType(getTypeAccordingToItem(item.type));
+                MediaUtils.openMedia(v.getContext(), mw);
             }
         }
 



More information about the Android mailing list