[Android] Execute seek after Playing event

Geoffrey Métais git at videolan.org
Thu Jun 9 17:12:46 CEST 2016


vlc-android | branch: master | Geoffrey Métais <geoffrey.metais at gmail.com> | Thu Jun  9 17:12:14 2016 +0200| [bee7a8f65a25ed378dd80aab0fb95e501d949ee5] | committer: Geoffrey Métais

Execute seek after Playing event

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

 vlc-android/src/org/videolan/vlc/PlaybackService.java | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/vlc-android/src/org/videolan/vlc/PlaybackService.java b/vlc-android/src/org/videolan/vlc/PlaybackService.java
index 9d4d106..7c0126a 100644
--- a/vlc-android/src/org/videolan/vlc/PlaybackService.java
+++ b/vlc-android/src/org/videolan/vlc/PlaybackService.java
@@ -595,6 +595,9 @@ public class PlaybackService extends Service implements IVLCVout.Callback {
         public void onEvent(MediaPlayer.Event event) {
             switch (event.type) {
                 case MediaPlayer.Event.Playing:
+                    if(mSavedTime != 0l)
+                        seek(mSavedTime);
+                    mSavedTime = 0l;
 
                     Log.i(TAG, "MediaPlayer.Event.Playing");
                     executeUpdate();
@@ -1740,9 +1743,6 @@ public class PlaybackService extends Service implements IVLCVout.Callback {
             changeAudioFocus(true);
             mMediaPlayer.setEventListener(mMediaPlayerListener);
             mMediaPlayer.play();
-            if(mSavedTime != 0l)
-                seek(mSavedTime);
-            mSavedTime = 0l;
 
             determinePrevAndNextIndices();
             if (mSettings.getBoolean(PreferencesFragment.PLAYBACK_HISTORY, true))



More information about the Android mailing list