diff --git a/android/modules/media/src/java/ti/modules/titanium/media/TiUIVideoView.java b/android/modules/media/src/java/ti/modules/titanium/media/TiUIVideoView.java index b3e1edaee54..2b7c6f91b7a 100644 --- a/android/modules/media/src/java/ti/modules/titanium/media/TiUIVideoView.java +++ b/android/modules/media/src/java/ti/modules/titanium/media/TiUIVideoView.java @@ -19,7 +19,9 @@ import android.media.MediaPlayer.OnCompletionListener; import android.media.MediaPlayer.OnErrorListener; import android.media.MediaPlayer.OnPreparedListener; +import android.media.PlaybackParams; import android.net.Uri; +import android.os.Build; import android.view.MotionEvent; import android.view.View; import android.view.View.OnTouchListener; @@ -330,6 +332,13 @@ public void release() @Override public void onPrepared(MediaPlayer mp) { + + if (proxy.hasPropertyAndNotNull(TiC.PROPERTY_SPEED) && Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) { + PlaybackParams myPlayBackParams = new PlaybackParams(); + myPlayBackParams.setSpeed(TiConvert.toFloat(proxy.getProperty(TiC.PROPERTY_SPEED))); + mp.setPlaybackParams(myPlayBackParams); + } + getPlayerProxy().onPlaybackReady(mp.getDuration()); }