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:
parent
d716e1ab2a
commit
d4c9be2ba0
@ -1707,8 +1707,10 @@ public class ReactExoplayerView extends FrameLayout implements
|
|||||||
|
|
||||||
public void clearSrc() {
|
public void clearSrc() {
|
||||||
if (srcUri != null) {
|
if (srcUri != null) {
|
||||||
|
if (player != null) {
|
||||||
player.stop();
|
player.stop();
|
||||||
player.clearMediaItems();
|
player.clearMediaItems();
|
||||||
|
}
|
||||||
this.srcUri = null;
|
this.srcUri = null;
|
||||||
this.startPositionMs = -1;
|
this.startPositionMs = -1;
|
||||||
this.cropStartMs = -1;
|
this.cropStartMs = -1;
|
||||||
|
Loading…
Reference in New Issue
Block a user