[Android] Fix require(...)
file resource on production (#429)
* Fix require(...) file resource on Android production * Update example (use require for ./broadchurch.mp4) * Fix MainApplication.java of example * Add default source type
This commit is contained in:
committed by
Matt Apperson
parent
201335f05c
commit
d450afc83b
@@ -84,10 +84,17 @@ public class ReactExoplayerViewManager extends ViewGroupManager<ReactExoplayerVi
|
||||
}
|
||||
} else {
|
||||
int identifier = context.getResources().getIdentifier(
|
||||
uriString,
|
||||
"drawable",
|
||||
context.getPackageName()
|
||||
);
|
||||
if (identifier == 0) {
|
||||
identifier = context.getResources().getIdentifier(
|
||||
uriString,
|
||||
"raw",
|
||||
context.getPackageName()
|
||||
);
|
||||
);
|
||||
}
|
||||
if (identifier > 0) {
|
||||
Uri srcUri = RawResourceDataSource.buildRawResourceUri(identifier);
|
||||
if (srcUri != null) {
|
||||
|
Reference in New Issue
Block a user