fix: fix the system status bar when dismiss

This commit is contained in:
wood1986 2022-09-13 22:53:49 -07:00
parent 82e537085d
commit 2a77c5f0df

View File

@ -1796,22 +1796,22 @@ class ReactExoplayerView extends FrameLayout implements
| SYSTEM_UI_FLAG_FULLSCREEN;
}
eventEmitter.fullscreenWillPresent();
post(() -> {
decorView.setSystemUiVisibility(uiOptions);
if (controls) {
fullScreenPlayerView.show();
}
post(() -> {
decorView.setSystemUiVisibility(uiOptions);
eventEmitter.fullscreenDidPresent();
});
} else {
uiOptions = View.SYSTEM_UI_FLAG_VISIBLE;
eventEmitter.fullscreenWillDismiss();
post(() -> {
decorView.setSystemUiVisibility(uiOptions);
if (controls) {
fullScreenPlayerView.dismiss();
reLayout(exoPlayerView);
}
post(() -> {
decorView.setSystemUiVisibility(uiOptions);
eventEmitter.fullscreenDidDismiss();
});
}