From 22c21ad249879fe4ff8fb119384ebc82766106c3 Mon Sep 17 00:00:00 2001 From: whdudtod1273 <52160645+whdudtod1273@users.noreply.github.com> Date: Wed, 4 Sep 2024 16:54:08 +0900 Subject: [PATCH] feat: Correct isBehindLiveWindow Error Handling (#4143) * feat: Correct isBehindLiveWindow Error Handling --------- Co-authored-by: young --- .../java/com/brentvatne/exoplayer/ReactExoplayerView.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/android/src/main/java/com/brentvatne/exoplayer/ReactExoplayerView.java b/android/src/main/java/com/brentvatne/exoplayer/ReactExoplayerView.java index 01d6a223b1..8c2e2e146b 100644 --- a/android/src/main/java/com/brentvatne/exoplayer/ReactExoplayerView.java +++ b/android/src/main/java/com/brentvatne/exoplayer/ReactExoplayerView.java @@ -1733,7 +1733,10 @@ public void onPlayerError(@NonNull PlaybackException e) { playerNeedsSource = true; if (isBehindLiveWindow(e)) { clearResumePosition(); - initializePlayer(); + if (player != null) { + player.seekToDefaultPosition(); + player.prepare(); + } } else { updateResumePosition(); }