fix(android): random android crash (#3777)

* 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

* chore: improve issue template

* fix(android): avoid video view flickering at playback startup

* fix(android): fix random crash
This commit is contained in:
Olivier Bouillet 2024-05-17 15:16:48 +02:00 committed by GitHub
parent d716e1ab2a
commit d4c9be2ba0
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -1707,8 +1707,10 @@ public class ReactExoplayerView extends FrameLayout implements
public void clearSrc() { public void clearSrc() {
if (srcUri != null) { if (srcUri != null) {
player.stop(); if (player != null) {
player.clearMediaItems(); player.stop();
player.clearMediaItems();
}
this.srcUri = null; this.srcUri = null;
this.startPositionMs = -1; this.startPositionMs = -1;
this.cropStartMs = -1; this.cropStartMs = -1;