From e63a004ee62f95ab74b61e76115ac4fbbda4ad63 Mon Sep 17 00:00:00 2001 From: Baris Sencan Date: Fri, 13 Nov 2015 14:35:52 -0800 Subject: [PATCH] [Android] Prepare media player asynchronously --- .../main/java/com/brentvatne/react/ReactVideoView.java | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/android/src/main/java/com/brentvatne/react/ReactVideoView.java b/android/src/main/java/com/brentvatne/react/ReactVideoView.java index e4e8d1af..ecfeb190 100644 --- a/android/src/main/java/com/brentvatne/react/ReactVideoView.java +++ b/android/src/main/java/com/brentvatne/react/ReactVideoView.java @@ -88,12 +88,8 @@ public class ReactVideoView extends ScalableVideoView implements MediaPlayer.OnP } } - public void reset() { - mMediaPlayer.reset(); - } - public void setSrc(final String uriString, final boolean isNetwork) throws IOException { - reset(); + mMediaPlayer.reset(); if (isNetwork) { setDataSource(uriString); @@ -105,7 +101,7 @@ public class ReactVideoView extends ScalableVideoView implements MediaPlayer.OnP )); } - prepare(this); + prepareAsync(this); } public void setResizeModeModifier(final ScalableType resizeMode) {