[Android] PlayerController: Don't dispatch mediaplayer evts

Geoffrey Métais git at videolan.org
Mon Feb 11 15:11:17 CET 2019


vlc-android | branch: master | Geoffrey Métais <geoffrey.metais at gmail.com> | Mon Feb 11 15:08:48 2019 +0100| [5cf1c7052dd048ceee522d6332752cc563309baf] | committer: Geoffrey Métais

PlayerController: Don't dispatch mediaplayer evts

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

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

diff --git a/vlc-android/src/org/videolan/vlc/media/PlayerController.kt b/vlc-android/src/org/videolan/vlc/media/PlayerController.kt
index f3fc47d98..971b11261 100644
--- a/vlc-android/src/org/videolan/vlc/media/PlayerController.kt
+++ b/vlc-android/src/org/videolan/vlc/media/PlayerController.kt
@@ -285,7 +285,7 @@ class PlayerController(val context: Context) : IVLCVout.Callback, MediaPlayer.Ev
     }
 
     private var lastTime = 0L
-    private val eventActor = actor<MediaPlayer.Event>(capacity = Channel.UNLIMITED) {
+    private val eventActor = actor<MediaPlayer.Event>(capacity = Channel.UNLIMITED, start = CoroutineStart.UNDISPATCHED) {
         for (event in channel) {
             when (event.type) {
                 MediaPlayer.Event.Playing -> playbackState = PlaybackStateCompat.STATE_PLAYING



More information about the Android mailing list