Skip to content

Commit

Permalink
Fix/494 (#537)
Browse files Browse the repository at this point in the history
* Stop video autoplay when paused prop is 'true' on initial showing of video component

* Fix IOException - java.io.FileNotFoundException: No content provider: thrown in android.MediaPlayer, due to expected uri resource with content provider instead of only a URL
  • Loading branch information
gorjanz authored and Matt Apperson committed Mar 21, 2017
1 parent 911bc52 commit 9ce1f4b
Showing 1 changed file with 7 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,7 @@ public String toString() {
private float mRate = 1.0f;
private boolean mPlayInBackground = false;
private boolean mActiveStatePauseStatus = false;
private boolean mActiveStatePauseStatusInitialized = false;

private int mMainVer = 0;
private int mPatchVer = 0;
Expand Down Expand Up @@ -236,7 +237,7 @@ public void setSrc(final String uriString, final String type, final boolean isNe
headers.put("Cookie", cookie);
}

setDataSource(mThemedReactContext, parsedUrl, headers);
setDataSource(uriString);
} else if (isAsset) {
if (uriString.startsWith("content://")) {
Uri parsedUrl = Uri.parse(uriString);
Expand Down Expand Up @@ -325,6 +326,11 @@ public void setPausedModifier(final boolean paused) {

mPaused = paused;

if ( !mActiveStatePauseStatusInitialized ) {
mActiveStatePauseStatus = mPaused;
mActiveStatePauseStatusInitialized = true;
}

if (!mMediaPlayerValid) {
return;
}
Expand Down

0 comments on commit 9ce1f4b

Please sign in to comment.