From 621a597d8f9b95a72c58bb0d32efab0a9a02add9 Mon Sep 17 00:00:00 2001 From: orz12 Date: Thu, 21 Dec 2023 12:23:01 +0800 Subject: [PATCH] =?UTF-8?q?=E7=AB=96=E5=B1=8F=E5=85=A8=E5=B1=8F=E4=B9=9F?= =?UTF-8?q?=E9=9A=90=E8=97=8F=E7=8A=B6=E6=80=81=E6=A0=8F=E4=B8=8E=E5=AF=BC?= =?UTF-8?q?=E8=88=AA=E6=A0=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/plugin/pl_player/controller.dart | 33 ++++++---------------------- 1 file changed, 7 insertions(+), 26 deletions(-) diff --git a/lib/plugin/pl_player/controller.dart b/lib/plugin/pl_player/controller.dart index ff3857ba..61155ad6 100644 --- a/lib/plugin/pl_player/controller.dart +++ b/lib/plugin/pl_player/controller.dart @@ -937,32 +937,13 @@ class PlPlayerController { if (!isFullScreen.value && status) { /// 按照视频宽高比决定全屏方向 toggleFullScreen(true); - switch (mode) { - case FullScreenMode.auto: - if (direction.value == 'horizontal') { - /// 进入全屏 - await enterFullScreen(); - // 横屏 - await landScape(); - } else { - // 竖屏 - await verticalScreen(); - } - break; - case FullScreenMode.vertical: - - /// 进入全屏 - await enterFullScreen(); - // 竖屏 - await verticalScreen(); - break; - case FullScreenMode.horizontal: - - /// 进入全屏 - await enterFullScreen(); - // 横屏 - await landScape(); - break; + /// 进入全屏 + await enterFullScreen(); + if(mode == FullScreenMode.vertical || + (mode == FullScreenMode.auto && direction.value == 'vertical')) { + await verticalScreen(); + } else { + await landScape(); } // bool isValid =