Merge fcec04f96d793ce1dd6406e79c46263bf3bcdbaa into 35b70c5e9e8d791ae268bac677a3b760b1b4e8bf
This commit is contained in:
commit
8a12ddd519
@ -234,7 +234,6 @@ public final class MainPlayerUi extends VideoPlayerUi implements View.OnLayoutCh
|
||||
@Override
|
||||
public void destroy() {
|
||||
super.destroy();
|
||||
|
||||
// Exit from fullscreen when user closes the player via notification
|
||||
if (isFullscreen) {
|
||||
toggleFullscreen();
|
||||
@ -943,6 +942,15 @@ public final class MainPlayerUi extends VideoPlayerUi implements View.OnLayoutCh
|
||||
binding.metadataView.setVisibility(isFullscreen ? View.VISIBLE : View.GONE);
|
||||
binding.playerCloseButton.setVisibility(isFullscreen ? View.GONE : View.VISIBLE);
|
||||
setupScreenRotationButton();
|
||||
|
||||
// When the video ends, the player exits fullscreen mode but remains in landscape mode.
|
||||
// This corrects the orientation. See #13057.
|
||||
if (player.getCurrentState() == STATE_COMPLETED) {
|
||||
player.getFragmentListener()
|
||||
.ifPresent(PlayerServiceEventListener::onScreenRotationButtonClicked);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
public void checkLandscape() {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user