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:
Nick Fujita
2021-06-30 10:24:21 +09:00
committed by GitHub
parent 80873102a4
commit cba88fa9d8
3 changed files with 21 additions and 4 deletions

View File

@@ -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;
}