[Android] Fix seekBar not updates on seek
Habib Kazemi
git at videolan.org
Mon Dec 17 09:54:35 CET 2018
vlc-android | branch: master | Habib Kazemi <kazemihabib1996 at gmail.com> | Thu Dec 13 20:17:14 2018 +0330| [f32010652926c6c80d56e763fab2e35b3092cf42] | committer: Geoffrey Métais
Fix seekBar not updates on seek
Signed-off-by: Geoffrey Métais <geoffrey.metais at gmail.com>
> https://code.videolan.org/videolan/vlc-android/commit/f32010652926c6c80d56e763fab2e35b3092cf42
---
vlc-android/src/org/videolan/vlc/gui/video/VideoPlayerActivity.java | 1 +
vlc-android/src/org/videolan/vlc/media/PlayerController.kt | 3 ++-
2 files changed, 3 insertions(+), 1 deletion(-)
diff --git a/vlc-android/src/org/videolan/vlc/gui/video/VideoPlayerActivity.java b/vlc-android/src/org/videolan/vlc/gui/video/VideoPlayerActivity.java
index 07356374c..c8c43f10b 100644
--- a/vlc-android/src/org/videolan/vlc/gui/video/VideoPlayerActivity.java
+++ b/vlc-android/src/org/videolan/vlc/gui/video/VideoPlayerActivity.java
@@ -2072,6 +2072,7 @@ public class VideoPlayerActivity extends AppCompatActivity implements IPlaybackS
mForcedTime = position;
mLastTime = mService.getTime();
mService.seek(position, length);
+ mService.getPlaylistManager().getPlayer().updateProgress(position);
}
void seekDelta(int delta) {
diff --git a/vlc-android/src/org/videolan/vlc/media/PlayerController.kt b/vlc-android/src/org/videolan/vlc/media/PlayerController.kt
index 08a7bb316..a3040c4a1 100644
--- a/vlc-android/src/org/videolan/vlc/media/PlayerController.kt
+++ b/vlc-android/src/org/videolan/vlc/media/PlayerController.kt
@@ -306,7 +306,8 @@ class PlayerController(val context: Context) : IVLCVout.Callback, MediaPlayer.Ev
}
}
- private fun updateProgress(newTime: Long = progress.value?.time ?: 0L, newLength: Long = progress.value?.length ?: 0L) {
+ @JvmOverloads
+ fun updateProgress(newTime: Long = progress.value?.time ?: 0L, newLength: Long = progress.value?.length ?: 0L) {
progress.value = progress.value?.apply { time = newTime; length = newLength }
}
More information about the Android
mailing list