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
This commit is contained in:
YangJH 2024-04-16 21:42:34 +09:00 committed by GitHub
parent a0bcdb75d3
commit 1af12f9dfb
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -325,21 +325,6 @@ public class ReactExoplayerView extends FrameLayout implements
mainHandler = new Handler(); 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 // LifecycleEventListener implementation
@Override @Override
public void onHostResume() { public void onHostResume() {