fix(android): re-layout controls after fullscreen dismiss (#3490)
* fix(android): re-layout controls after fullscreen dismiss
This commit is contained in:
parent
e63c7cbd30
commit
135d97ce50
@ -387,7 +387,7 @@ public class ReactExoplayerView extends FrameLayout implements
|
||||
*/
|
||||
private void togglePlayerControlVisibility() {
|
||||
if (player == null) return;
|
||||
reLayout(playerControlView);
|
||||
reLayoutControls();
|
||||
if (playerControlView.isVisible()) {
|
||||
playerControlView.hide();
|
||||
} else {
|
||||
@ -500,6 +500,11 @@ public class ReactExoplayerView extends FrameLayout implements
|
||||
view.layout(view.getLeft(), view.getTop(), view.getMeasuredWidth(), view.getMeasuredHeight());
|
||||
}
|
||||
|
||||
private void reLayoutControls() {
|
||||
reLayout(exoPlayerView);
|
||||
reLayout(playerControlView);
|
||||
}
|
||||
|
||||
private class RNVLoadControl extends DefaultLoadControl {
|
||||
private final int availableHeapInBytes;
|
||||
private final Runtime runtime;
|
||||
@ -725,7 +730,8 @@ public class ReactExoplayerView extends FrameLayout implements
|
||||
player.prepare();
|
||||
playerNeedsSource = false;
|
||||
|
||||
reLayout(exoPlayerView);
|
||||
reLayoutControls();
|
||||
|
||||
eventEmitter.loadStart();
|
||||
loadVideoStarted = true;
|
||||
|
||||
@ -1992,7 +1998,7 @@ public class ReactExoplayerView extends FrameLayout implements
|
||||
eventEmitter.fullscreenWillDismiss();
|
||||
if (controls && fullScreenPlayerView != null) {
|
||||
fullScreenPlayerView.dismiss();
|
||||
reLayout(exoPlayerView);
|
||||
reLayoutControls();
|
||||
}
|
||||
UiThreadUtil.runOnUiThread(() -> {
|
||||
WindowCompat.setDecorFitsSystemWindows(window, true);
|
||||
|
Loading…
Reference in New Issue
Block a user