mirror of
https://github.com/bggRGjQaUbCoE/PiliPlus.git
synced 2026-05-15 13:43:56 +08:00
fix: orientation (#1935)
This commit is contained in:
@@ -1484,21 +1484,7 @@ class PlPlayerController with BlockConfigMixin {
|
|||||||
if (orientation == null && mode == .none) {
|
if (orientation == null && mode == .none) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (!horizontalScreen) {
|
await resetScreenRotation();
|
||||||
await portraitUpMode();
|
|
||||||
} else {
|
|
||||||
switch (_orientation) {
|
|
||||||
case .portraitUp:
|
|
||||||
await portraitUpMode();
|
|
||||||
case .landscapeLeft:
|
|
||||||
await landscapeLeftMode();
|
|
||||||
case .portraitDown:
|
|
||||||
await portraitDownMode();
|
|
||||||
case .landscapeRight:
|
|
||||||
await landscapeRightMode();
|
|
||||||
case _:
|
|
||||||
}
|
|
||||||
}
|
|
||||||
} else {
|
} else {
|
||||||
await exitDesktopFullScreen();
|
await exitDesktopFullScreen();
|
||||||
}
|
}
|
||||||
@@ -1599,11 +1585,11 @@ class PlPlayerController with BlockConfigMixin {
|
|||||||
bool _isCloseAll = false;
|
bool _isCloseAll = false;
|
||||||
bool get isCloseAll => _isCloseAll;
|
bool get isCloseAll => _isCloseAll;
|
||||||
|
|
||||||
void resetScreenRotation() {
|
Future<void>? resetScreenRotation() {
|
||||||
if (horizontalScreen) {
|
if (horizontalScreen) {
|
||||||
fullMode();
|
return fullMode();
|
||||||
} else {
|
} else {
|
||||||
portraitUpMode();
|
return portraitUpMode();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1615,7 +1601,9 @@ class PlPlayerController with BlockConfigMixin {
|
|||||||
|
|
||||||
void dispose() {
|
void dispose() {
|
||||||
// 每次减1,最后销毁
|
// 每次减1,最后销毁
|
||||||
|
if (isFullScreen.value) {
|
||||||
resetScreenRotation();
|
resetScreenRotation();
|
||||||
|
}
|
||||||
cancelLongPressTimer();
|
cancelLongPressTimer();
|
||||||
_cancelSubForSeek();
|
_cancelSubForSeek();
|
||||||
if (!_isCloseAll && _playerCount > 1) {
|
if (!_isCloseAll && _playerCount > 1) {
|
||||||
|
|||||||
Reference in New Issue
Block a user