[Android] Do not change playback state on EndReached event

Geoffrey Métais git at videolan.org
Fri Feb 2 15:57:53 CET 2018


vlc-android | branch: master | Geoffrey Métais <geoffrey.metais at gmail.com> | Fri Feb  2 15:44:41 2018 +0100| [dcdcc6e4608fafd03edac660e1d62e42d54217a3] | committer: Geoffrey Métais

Do not change playback state on EndReached event

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

 vlc-android/src/org/videolan/vlc/media/PlayerController.kt | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/vlc-android/src/org/videolan/vlc/media/PlayerController.kt b/vlc-android/src/org/videolan/vlc/media/PlayerController.kt
index 8185de7fd..74b13678f 100644
--- a/vlc-android/src/org/videolan/vlc/media/PlayerController.kt
+++ b/vlc-android/src/org/videolan/vlc/media/PlayerController.kt
@@ -250,9 +250,7 @@ class PlayerController : IVLCVout.Callback, MediaPlayer.EventListener {
         when(event.type) {
             MediaPlayer.Event.Playing -> playbackState = PlaybackStateCompat.STATE_PLAYING
             MediaPlayer.Event.Paused -> playbackState = PlaybackStateCompat.STATE_PAUSED
-            MediaPlayer.Event.Stopped -> return
-            MediaPlayer.Event.EncounteredError,
-            MediaPlayer.Event.EndReached -> playbackState = PlaybackStateCompat.STATE_STOPPED
+            MediaPlayer.Event.EncounteredError -> playbackState = PlaybackStateCompat.STATE_STOPPED
             MediaPlayer.Event.PausableChanged -> pausable = event.pausable
             MediaPlayer.Event.SeekableChanged -> seekable = event.seekable
         }



More information about the Android mailing list