[Android] Execute seek after Playing event
Geoffrey Métais
git at videolan.org
Thu Jun 9 17:13:59 CEST 2016
vlc-android | branch: 2.0.x | Geoffrey Métais <geoffrey.metais at gmail.com> | Thu Jun 9 17:12:14 2016 +0200| [27dd11dfaccdb19f894d1edf987b10c082097373] | committer: Geoffrey Métais
Execute seek after Playing event
(cherry picked from commit bee7a8f65a25ed378dd80aab0fb95e501d949ee5)
> https://code.videolan.org/videolan/vlc-android/commit/27dd11dfaccdb19f894d1edf987b10c082097373
---
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 1166335..8dad3db 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