[Android] Fix the video media progress being used upon repeats
Nicolas Pomepuy
git at videolan.org
Tue Dec 21 10:33:01 UTC 2021
vlc-android | branch: master | Nicolas Pomepuy <nicolas at videolabs.io> | Mon Dec 20 09:33:02 2021 +0100| [eb908679f76f8fd103ce761efb826f83d0f05628] | committer: Nicolas Pomepuy
Fix the video media progress being used upon repeats
Fixes #2282
> https://code.videolan.org/videolan/vlc-android/commit/eb908679f76f8fd103ce761efb826f83d0f05628
---
application/vlc-android/src/org/videolan/vlc/media/PlaylistManager.kt | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
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 f5fd77768..78ebc5de8 100644
--- a/application/vlc-android/src/org/videolan/vlc/media/PlaylistManager.kt
+++ b/application/vlc-android/src/org/videolan/vlc/media/PlaylistManager.kt
@@ -265,9 +265,6 @@ 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) }
}
@@ -944,6 +941,7 @@ class PlaylistManager(val service: PlaybackService) : MediaWrapperList.EventList
}
MediaPlayer.Event.EndReached -> {
clearABRepeat()
+ getCurrentMedia()?.addFlags(MediaWrapper.MEDIA_FROM_START)
if (currentIndex != nextIndex) {
saveMediaMeta()
if (isBenchmark) player.setPreviousStats()
More information about the Android
mailing list