[Android] VideoPlayerActivity: fix video playlist formats
Edward Wang
git at videolan.org
Thu Aug 29 18:26:36 CEST 2013
vlc-ports/android | branch: master | Edward Wang <edward.c.wang at compdigitec.com> | Thu Aug 29 17:27:21 2013 +0200| [a7d87dbf210b82444e5c18623cdba3fc131ae48a] | committer: Edward Wang
VideoPlayerActivity: fix video playlist formats
This fixes opening video streams wrapped in a playlist by intent (e.g. asf).
> http://git.videolan.org/gitweb.cgi/vlc-ports/android.git/?a=commit;h=a7d87dbf210b82444e5c18623cdba3fc131ae48a
---
.../videolan/vlc/gui/video/VideoPlayerActivity.java | 16 +++++++++++++---
1 file changed, 13 insertions(+), 3 deletions(-)
diff --git a/vlc-android/src/org/videolan/vlc/gui/video/VideoPlayerActivity.java b/vlc-android/src/org/videolan/vlc/gui/video/VideoPlayerActivity.java
index 37f10d3..f974c5b 100644
--- a/vlc-android/src/org/videolan/vlc/gui/video/VideoPlayerActivity.java
+++ b/vlc-android/src/org/videolan/vlc/gui/video/VideoPlayerActivity.java
@@ -742,9 +742,19 @@ public class VideoPlayerActivity extends Activity implements IVideoPlayer {
}
private void endReached() {
- /* Exit player when reach the end */
- mEndReached = true;
- finish();
+ if(mLibVLC.getMediaList().expandMedia(savedIndexPosition) == 0) {
+ Log.d(TAG, "Found a video playlist, expanding it");
+ eventHandler.postDelayed(new Runnable() {
+ @Override
+ public void run() {
+ load();
+ }
+ }, 1000);
+ } else {
+ /* Exit player when reaching the end */
+ mEndReached = true;
+ finish();
+ }
}
private void encounteredError() {
More information about the Android
mailing list