[Android] Fix popup starting from beginning when paused
Geoffrey Métais
git at videolan.org
Tue Jul 11 11:13:25 CEST 2017
vlc-android | branch: master | Geoffrey Métais <geoffrey.metais at gmail.com> | Tue Jul 11 11:12:00 2017 +0200| [9d1a6f2f9164e0afde20ae18a047b85d843eb86c] | committer: Geoffrey Métais
Fix popup starting from beginning when paused
Close #318
> https://code.videolan.org/videolan/vlc-android/commit/9d1a6f2f9164e0afde20ae18a047b85d843eb86c
---
vlc-android/src/org/videolan/vlc/gui/video/PopupManager.java | 11 ++++++++---
1 file changed, 8 insertions(+), 3 deletions(-)
diff --git a/vlc-android/src/org/videolan/vlc/gui/video/PopupManager.java b/vlc-android/src/org/videolan/vlc/gui/video/PopupManager.java
index f5965a593..c97e7bfb8 100644
--- a/vlc-android/src/org/videolan/vlc/gui/video/PopupManager.java
+++ b/vlc-android/src/org/videolan/vlc/gui/video/PopupManager.java
@@ -323,13 +323,18 @@ public class PopupManager implements PlaybackService.Callback, GestureDetector.O
mService.setVideoAspectRatio(null);
mService.setVideoScale(0);
mService.setVideoTrackEnabled(true);
- if (!mService.isPlaying())
- mService.playIndex(mService.getCurrentMediaPosition());
- else
+ if (mService.hasMedia()) {
mService.flush();
+ updatePlayIcon();
+ } else
+ mService.playIndex(mService.getCurrentMediaPosition());
showNotification();
}
+ private void updatePlayIcon() {
+ mPlayPauseButton.setImageResource(mService.isPlaying() ? R.drawable.ic_popup_pause : R.drawable.ic_popup_play);
+ }
+
@Override
public void onSurfacesDestroyed(IVLCVout vlcVout) {
vlcVout.removeCallback(this);
More information about the Android
mailing list