VEX-5044: Allow exoplayer to preinit with empty source (#6)
- Allow player to be init before source is provided, and later update once a source is provided. - Adds handling for providing a empty source in order to stop playback and clear out any existing content
This commit is contained in:
@@ -147,6 +147,7 @@ public class ReactExoplayerViewManager extends ViewGroupManager<ReactExoplayerVi
|
||||
Map<String, String> headers = src.hasKey(PROP_SRC_HEADERS) ? toStringMap(src.getMap(PROP_SRC_HEADERS)) : null;
|
||||
|
||||
if (TextUtils.isEmpty(uriString)) {
|
||||
videoView.clearSrc();
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user