[Android] Parse media when casting

Geoffrey Métais git at videolan.org
Wed Jan 31 15:36:52 CET 2018


vlc-android | branch: master | Geoffrey Métais <geoffrey.metais at gmail.com> | Wed Jan 31 15:25:43 2018 +0100| [c5a24ff45c115978ba8cafb67c70b9b9f461aeda] | committer: Geoffrey Métais

Parse media when casting

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

 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 623f5aead..e50841770 100644
--- a/vlc-android/src/org/videolan/vlc/media/PlayerController.kt
+++ b/vlc-android/src/org/videolan/vlc/media/PlayerController.kt
@@ -68,7 +68,7 @@ class PlayerController : IVLCVout.Callback, MediaPlayer.EventListener {
         pausable = true
         launch(playerContext+exceptionHandler) {
             mediaplayer.setEventListener(null)
-            mediaplayer.media = media
+            mediaplayer.media = media.apply { if (hasRenderer) parse() }
             mediaplayer.setEventListener(this at PlayerController)
             mediaplayer.setEqualizer(VLCOptions.getEqualizerSetFromSettings(VLCApplication.getAppContext()))
             mediaplayer.setVideoTitleDisplay(MediaPlayer.Position.Disable, 0)



More information about the Android mailing list