From 11c2a69e610d7617272b005dcb2d3e90c0406eb8 Mon Sep 17 00:00:00 2001 From: orz12 Date: Tue, 27 Feb 2024 13:52:48 +0800 Subject: [PATCH] =?UTF-8?q?mod:=20=E7=A7=BB=E9=99=A4=E5=86=97=E4=BD=99?= =?UTF-8?q?=E9=A2=9D=E5=A4=96=E6=A8=AA=E5=B1=8F=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/pages/setting/play_setting.dart | 9 --------- lib/plugin/pl_player/utils/fullscreen.dart | 11 ----------- lib/utils/storage.dart | 1 - 3 files changed, 21 deletions(-) diff --git a/lib/pages/setting/play_setting.dart b/lib/pages/setting/play_setting.dart index 350f42309..143bb90cb 100644 --- a/lib/pages/setting/play_setting.dart +++ b/lib/pages/setting/play_setting.dart @@ -26,7 +26,6 @@ class _PlaySettingState extends State { late dynamic defaultAudioQa; late dynamic defaultDecode; late int defaultFullScreenMode; - late bool lockLandscape; late int defaultBtmProgressBehavior; @override @@ -40,8 +39,6 @@ class _PlaySettingState extends State { defaultValue: VideoDecodeFormats.values.last.code); defaultFullScreenMode = setting.get(SettingBoxKey.fullScreenMode, defaultValue: FullScreenMode.values.first.code); - lockLandscape = setting.get(SettingBoxKey.lockLandscape, - defaultValue: false); defaultBtmProgressBehavior = setting.get(SettingBoxKey.btmProgressBehavior, defaultValue: BtmProgresBehavior.values.first.code); } @@ -136,12 +133,6 @@ class _PlaySettingState extends State { } } ), - const SetSwitchItem( - title: '额外横屏', - subTitle: '执行播放器横屏前,额外施加屏幕旋转方向限制', - setKey: SettingBoxKey.lockLandscape, - defaultVal: false, - ), const SetSwitchItem( title: '开启硬解', subTitle: '以较低功耗播放视频', diff --git a/lib/plugin/pl_player/utils/fullscreen.dart b/lib/plugin/pl_player/utils/fullscreen.dart index d58dfde85..aa7e47689 100644 --- a/lib/plugin/pl_player/utils/fullscreen.dart +++ b/lib/plugin/pl_player/utils/fullscreen.dart @@ -5,9 +5,6 @@ import 'package:auto_orientation/auto_orientation.dart'; import 'package:flutter/foundation.dart'; import 'package:flutter/services.dart'; -import '../../../common/widgets/custom_toast.dart'; -import '../../../utils/storage.dart'; - //横屏 Future landScape() async { dynamic document; @@ -15,14 +12,6 @@ Future landScape() async { if (kIsWeb) { await document.documentElement?.requestFullscreen(); } else if (Platform.isAndroid || Platform.isIOS) { - if (setting.get(SettingBoxKey.lockLandscape, defaultValue: false)) { - await SystemChrome.setPreferredOrientations( - [ - DeviceOrientation.landscapeLeft, - DeviceOrientation.landscapeRight, - ], - ); - } await AutoOrientation.landscapeAutoMode(forceSensor: true); } else if (Platform.isMacOS || Platform.isWindows || Platform.isLinux) { await const MethodChannel('com.alexmercerind/media_kit_video') diff --git a/lib/utils/storage.dart b/lib/utils/storage.dart index 80a8e7135..cb2d1018a 100644 --- a/lib/utils/storage.dart +++ b/lib/utils/storage.dart @@ -81,7 +81,6 @@ class SettingBoxKey { defaultAudioQa = 'defaultAudioQa', autoPlayEnable = 'autoPlayEnable', fullScreenMode = 'fullScreenMode', - lockLandscape = 'lockLandscape', defaultDecode = 'defaultDecode', danmakuEnable = 'danmakuEnable', defaultToastOp = 'defaultToastOp',