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:
parent
a0bcdb75d3
commit
1af12f9dfb
@ -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() {
|
||||||
|
Loading…
Reference in New Issue
Block a user