[Android] Do not seek on loading if resume point is too far
Geoffrey Métais
git at videolan.org
Wed Aug 30 13:50:55 CEST 2017
vlc-android | branch: master | Geoffrey Métais <geoffrey.metais at gmail.com> | Wed Aug 30 12:00:30 2017 +0200| [8bb06bc7f5f73bf7c56a0bb6cf7b55ac096c0fbd] | committer: Geoffrey Métais
Do not seek on loading if resume point is too far
> https://code.videolan.org/videolan/vlc-android/commit/8bb06bc7f5f73bf7c56a0bb6cf7b55ac096c0fbd
---
vlc-android/src/org/videolan/vlc/PlaybackService.java | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
diff --git a/vlc-android/src/org/videolan/vlc/PlaybackService.java b/vlc-android/src/org/videolan/vlc/PlaybackService.java
index 19d287da1..4775750ac 100644
--- a/vlc-android/src/org/videolan/vlc/PlaybackService.java
+++ b/vlc-android/src/org/videolan/vlc/PlaybackService.java
@@ -586,9 +586,11 @@ public class PlaybackService extends MediaBrowserServiceCompat implements IVLCVo
case MediaPlayer.Event.Playing:
mStopped = false;
loadMediaMeta();
- if (mSavedTime > 0L)
- seek(mSavedTime);
- mSavedTime = 0L;
+ if (mSavedTime > 0L) {
+ if (mSavedTime < 0.95*getLength())
+ seek(mSavedTime);
+ mSavedTime = 0L;
+ }
Log.i(TAG, "MediaPlayer.Event.Playing");
executeUpdate();
More information about the Android
mailing list