fix: fix the default behaviour

This commit is contained in:
wood1986 2022-09-10 11:52:46 -07:00
parent 3e4e4e6a12
commit f0c40f9392

View File

@ -1796,15 +1796,24 @@ class ReactExoplayerView extends FrameLayout implements
| SYSTEM_UI_FLAG_FULLSCREEN;
}
eventEmitter.fullscreenWillPresent();
post(() -> {
decorView.setSystemUiVisibility(uiOptions);
if (controls) {
fullScreenPlayerView.show();
}
eventEmitter.fullscreenDidPresent();
});
} else {
uiOptions = View.SYSTEM_UI_FLAG_VISIBLE;
eventEmitter.fullscreenWillDismiss();
post(() -> {
decorView.setSystemUiVisibility(uiOptions);
if (controls) {
fullScreenPlayerView.dismiss();
eventEmitter.fullscreenDidDismiss();
}
post(() -> decorView.setSystemUiVisibility(uiOptions));
eventEmitter.fullscreenDidDismiss();
});
}
}
public void setUseTextureView(boolean useTextureView) {