[Android] Fix video progress when repeating one

Nicolas Pomepuy git at videolan.org
Thu Nov 5 11:45:33 CET 2020


vlc-android | branch: master | Nicolas Pomepuy <nicolas at videolabs.io> | Thu Nov  5 07:28:15 2020 +0100| [86466ea41571f2ddf154974b98a287c2d40f8fdb] | committer: Nicolas Pomepuy

Fix video progress when repeating one

Fixes #1527

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

 application/vlc-android/src/org/videolan/vlc/media/PlaylistManager.kt | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/application/vlc-android/src/org/videolan/vlc/media/PlaylistManager.kt b/application/vlc-android/src/org/videolan/vlc/media/PlaylistManager.kt
index 754f38b31..c85d01f7b 100644
--- a/application/vlc-android/src/org/videolan/vlc/media/PlaylistManager.kt
+++ b/application/vlc-android/src/org/videolan/vlc/media/PlaylistManager.kt
@@ -214,6 +214,9 @@ class PlaylistManager(val service: PlaybackService) : MediaWrapperList.EventList
             }
             videoBackground = videoBackground || (!player.isVideoPlaying() && player.canSwitchToVideo())
         }
+        if (repeating == PlaybackStateCompat.REPEAT_MODE_ONE) {
+            mediaList.getMedia(currentIndex)?.addFlags(MediaWrapper.MEDIA_FROM_START)
+        }
         launch { playIndex(currentIndex) }
     }
 



More information about the Android mailing list