fix(avoid): avoid early return in setSrc (#3759)
* perf: ensure we do not provide callback to native if no callback provided from app * chore: rework bufferConfig to make it more generic and reduce ReactExoplayerView code size * fix(android): avoid easly return in setSrc
This commit is contained in:
parent
e420418e8f
commit
2e623ca0fb
@ -1646,14 +1646,13 @@ public class ReactExoplayerView extends FrameLayout implements
|
||||
if (this.customMetadata != customMetadata && player != null) {
|
||||
MediaItem currentMediaItem = player.getCurrentMediaItem();
|
||||
|
||||
if (currentMediaItem == null) {
|
||||
return;
|
||||
if (currentMediaItem != null) {
|
||||
|
||||
MediaItem newMediaItem = currentMediaItem.buildUpon().setMediaMetadata(customMetadata).build();
|
||||
|
||||
// This will cause video blink/reload but won't louse progress
|
||||
player.setMediaItem(newMediaItem, false);
|
||||
}
|
||||
|
||||
MediaItem newMediaItem = currentMediaItem.buildUpon().setMediaMetadata(customMetadata).build();
|
||||
|
||||
// This will cause video blink/reload but won't louse progress
|
||||
player.setMediaItem(newMediaItem, false);
|
||||
}
|
||||
|
||||
if (uri != null) {
|
||||
|
Loading…
Reference in New Issue
Block a user