mirror of
https://github.com/bggRGjQaUbCoE/PiliPlus.git
synced 2026-06-01 00:28:18 +08:00
@@ -184,20 +184,17 @@ class _VideoDetailPageVState extends State<VideoDetailPageV>
|
|||||||
videoDetailController.plPlayerController.showDanmaku = true;
|
videoDetailController.plPlayerController.showDanmaku = true;
|
||||||
|
|
||||||
// 修复从后台恢复时全屏状态下屏幕方向错误的问题
|
// 修复从后台恢复时全屏状态下屏幕方向错误的问题
|
||||||
if (plPlayerController?.isFullScreen.value == true) {
|
if (isFullScreen && Platform.isIOS) {
|
||||||
// 延迟一点执行,确保应用完全恢复
|
WidgetsBinding.instance.addPostFrameCallback((_) {
|
||||||
Future.delayed(const Duration(milliseconds: 100), () async {
|
|
||||||
// 根据视频方向重新设置屏幕方向
|
// 根据视频方向重新设置屏幕方向
|
||||||
final isVertical = plPlayerController?.isVertical ?? false;
|
final isVertical = videoDetailController.isVertical.value;
|
||||||
final mode = plPlayerController?.mode;
|
final mode = plPlayerController?.mode;
|
||||||
|
|
||||||
if (mode == FullScreenMode.vertical ||
|
if (!(mode == FullScreenMode.vertical ||
|
||||||
(mode == FullScreenMode.auto && isVertical) ||
|
(mode == FullScreenMode.auto && isVertical) ||
|
||||||
(mode == FullScreenMode.ratio &&
|
(mode == FullScreenMode.ratio &&
|
||||||
(Get.height / Get.width < 1.25 || isVertical))) {
|
(Get.height / Get.width < 1.25 || isVertical)))) {
|
||||||
await verticalScreenForTwoSeconds();
|
landScape();
|
||||||
} else {
|
|
||||||
await landScape();
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user