From 1af12f9dfb107c58a1896ee3181cb2c1a4fe300f Mon Sep 17 00:00:00 2001 From: YangJH Date: Tue, 16 Apr 2024 21:42:34 +0900 Subject: [PATCH] fix(android): fixed bug where video would not be visible after remount and change of drm source (#3668) * refactor(android): remove redundant lifecycle (onDetachedFromWindow) * fix: remove initPlayer within onAttachedToWindow and remove lifecycle --- .../brentvatne/exoplayer/ReactExoplayerView.java | 15 --------------- 1 file changed, 15 deletions(-) diff --git a/android/src/main/java/com/brentvatne/exoplayer/ReactExoplayerView.java b/android/src/main/java/com/brentvatne/exoplayer/ReactExoplayerView.java index cfd61b6f..37770b34 100644 --- a/android/src/main/java/com/brentvatne/exoplayer/ReactExoplayerView.java +++ b/android/src/main/java/com/brentvatne/exoplayer/ReactExoplayerView.java @@ -325,21 +325,6 @@ public class ReactExoplayerView extends FrameLayout implements mainHandler = new Handler(); } - @Override - protected void onAttachedToWindow() { - super.onAttachedToWindow(); - initializePlayer(); - } - - @Override - protected void onDetachedFromWindow() { - super.onDetachedFromWindow(); - /* We want to be able to continue playing audio when switching tabs. - * Leave this here in case it causes issues. - */ - // stopPlayback(); - } - // LifecycleEventListener implementation @Override public void onHostResume() {