fix: orientation (#1935)

This commit is contained in:
My-Responsitories
2026-05-01 13:07:41 +00:00
committed by dom
parent 49c6f01c87
commit 2a69bc9f0c

View File

@@ -1484,21 +1484,7 @@ class PlPlayerController with BlockConfigMixin {
if (orientation == null && mode == .none) {
return;
}
if (!horizontalScreen) {
await portraitUpMode();
} else {
switch (_orientation) {
case .portraitUp:
await portraitUpMode();
case .landscapeLeft:
await landscapeLeftMode();
case .portraitDown:
await portraitDownMode();
case .landscapeRight:
await landscapeRightMode();
case _:
}
}
await resetScreenRotation();
} else {
await exitDesktopFullScreen();
}
@@ -1599,11 +1585,11 @@ class PlPlayerController with BlockConfigMixin {
bool _isCloseAll = false;
bool get isCloseAll => _isCloseAll;
void resetScreenRotation() {
Future<void>? resetScreenRotation() {
if (horizontalScreen) {
fullMode();
return fullMode();
} else {
portraitUpMode();
return portraitUpMode();
}
}
@@ -1615,7 +1601,9 @@ class PlPlayerController with BlockConfigMixin {
void dispose() {
// 每次减1最后销毁
resetScreenRotation();
if (isFullScreen.value) {
resetScreenRotation();
}
cancelLongPressTimer();
_cancelSubForSeek();
if (!_isCloseAll && _playerCount > 1) {