[Android] Fix video progress when repeating one

Nicolas Pomepuy git at videolan.org
Fri Nov 13 07:31:03 CET 2020


vlc-android | branch: 3.3.x | Nicolas Pomepuy <nicolas at videolabs.io> | Thu Nov  5 07:28:15 2020 +0100| [65c6ace35e528df663eb238294b24742760fcfc1] | committer: Nicolas Pomepuy

Fix video progress when repeating one

Fixes #1527

(cherry picked from commit 86466ea41571f2ddf154974b98a287c2d40f8fdb)

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

 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