[Android] Audio player now displays the remaining time if user chose it

Nicolas Pomepuy git at videolan.org
Mon May 15 13:21:38 UTC 2023


vlc-android | branch: master | Nicolas Pomepuy <nicolas at videolabs.io> | Mon May 15 14:29:34 2023 +0200| [b1051391becf829093a8262ef04d23f2b4f75acf] | committer: Nicolas Pomepuy

Audio player now displays the remaining time if user chose it

Fixes #2935

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

 application/vlc-android/src/org/videolan/vlc/gui/audio/AudioPlayer.kt | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/application/vlc-android/src/org/videolan/vlc/gui/audio/AudioPlayer.kt b/application/vlc-android/src/org/videolan/vlc/gui/audio/AudioPlayer.kt
index e2c6183976..fd0d6242ca 100644
--- a/application/vlc-android/src/org/videolan/vlc/gui/audio/AudioPlayer.kt
+++ b/application/vlc-android/src/org/videolan/vlc/gui/audio/AudioPlayer.kt
@@ -447,7 +447,7 @@ class AudioPlayer : Fragment(), PlaylistAdapter.IPlayer, TextWatcher, IAudioPlay
 
         if (!previewingSeek) {
             val displayTime = progress.timeText
-            binding.headerTime.text = displayTime
+            binding.headerTime.text = if (showRemainingTime) Tools.millisToString(progress.time - progress.length) else displayTime
             binding.time.text = displayTime
             if (!isDragging) binding.timeline.progress = progress.time.toInt()
             binding.progressBar.progress = progress.time.toInt()



More information about the Android mailing list