Allow to use content:// schema as source.

This commit is contained in:
Igor Ivanov 2016-05-11 12:25:50 +03:00
parent ad29d3ea9f
commit 1d67b7959e

View File

@ -144,7 +144,12 @@ public class ReactVideoView extends ScalableVideoView implements MediaPlayer.OnP
setDataSource(mThemedReactContext, parsedUrl, headers);
} else if (isAsset) {
setDataSource(uriString);
if (uriString.startsWith("content://")) {
Uri parsedUrl = Uri.parse(uriString);
setDataSource(mThemedReactContext, parsedUrl);
} else {
setDataSource(uriString);
}
} else {
setRawData(mThemedReactContext.getResources().getIdentifier(
uriString,