[Android] Go to previous media if current is not seekable
Geoffrey Métais
git at videolan.org
Fri Apr 8 15:05:55 CEST 2016
vlc-android | branch: master | Geoffrey Métais <geoffrey.metais at gmail.com> | Fri Apr 8 14:58:42 2016 +0200| [dd0ca244eda0fc338d1a23a3376a3c04e123d4e9] | committer: Geoffrey Métais
Go to previous media if current is not seekable
> https://code.videolan.org/videolan/vlc-android/commit/dd0ca244eda0fc338d1a23a3376a3c04e123d4e9
---
vlc-android/src/org/videolan/vlc/PlaybackService.java | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/vlc-android/src/org/videolan/vlc/PlaybackService.java b/vlc-android/src/org/videolan/vlc/PlaybackService.java
index 0397f42..81f5abc 100644
--- a/vlc-android/src/org/videolan/vlc/PlaybackService.java
+++ b/vlc-android/src/org/videolan/vlc/PlaybackService.java
@@ -1221,7 +1221,8 @@ public class PlaybackService extends Service implements IVLCVout.Callback {
@MainThread
public void previous() {
int size = mMediaList.size();
- if (hasPrevious() && mCurrentIndex > 0 && mMediaPlayer.getTime() < 2000l) {
+ if (hasPrevious() && mCurrentIndex > 0 &&
+ (!mMediaPlayer.isSeekable() || mMediaPlayer.getTime() < 2000l)) {
mCurrentIndex = mPrevIndex;
if (mPrevious.size() > 0)
mPrevious.pop();
More information about the Android
mailing list