diff --git a/lib/pages/setting/play_setting.dart b/lib/pages/setting/play_setting.dart index a5fccb59d..10496f7c4 100644 --- a/lib/pages/setting/play_setting.dart +++ b/lib/pages/setting/play_setting.dart @@ -85,7 +85,7 @@ class _PlaySettingState extends State { ), const SetSwitchItem( title: '双击快退/快进', - subTitle: '左侧双击快退,右侧双击快进', + subTitle: '左侧双击快退/右侧双击快进,关闭则双击均为暂停/播放', leading: Icon(Icons.touch_app_outlined), setKey: SettingBoxKey.enableQuickDouble, defaultVal: true, @@ -139,6 +139,13 @@ class _PlaySettingState extends State { setKey: SettingBoxKey.enableAutoExit, defaultVal: true, ), + const SetSwitchItem( + title: '延长播放控件显示时间', + subTitle: '开启后延长至30秒,便于屏幕阅读器滑动切换控件焦点', + leading: Icon(Icons.timer_outlined), + setKey: SettingBoxKey.enableLongShowControl, + defaultVal: false + ), const SetSwitchItem( title: '全向旋转', subTitle: '小屏可受重力转为临时全屏,若系统锁定旋转仍触发请关闭,关闭会影响横屏适配', diff --git a/lib/pages/setting/style_setting.dart b/lib/pages/setting/style_setting.dart index a716ae9f7..d0fcaf131 100644 --- a/lib/pages/setting/style_setting.dart +++ b/lib/pages/setting/style_setting.dart @@ -69,7 +69,7 @@ class _StyleSettingState extends State { children: [ SetSwitchItem( title: '横屏适配', - subTitle: '启用横屏布局与逻辑,适用于平板等设备;推荐全屏方向设为【不改变当前方向】', + subTitle: '启用横屏布局与逻辑,平板、折叠屏等可开启;建议全屏方向设为【不改变当前方向】', leading: const Icon(Icons.phonelink_outlined), setKey: SettingBoxKey.horizontalScreen, defaultVal: false, diff --git a/lib/plugin/pl_player/controller.dart b/lib/plugin/pl_player/controller.dart index 5a86af827..9b98f0fd7 100644 --- a/lib/plugin/pl_player/controller.dart +++ b/lib/plugin/pl_player/controller.dart @@ -253,6 +253,7 @@ class PlPlayerController { late List speedsList; double? defaultDuration; late bool enableAutoLongPressSpeed = false; + late bool enableLongShowControl; // 播放顺序相关 PlayRepeat playRepeat = PlayRepeat.pause; @@ -361,6 +362,8 @@ class PlPlayerController { _longPressSpeed.value = videoStorage .get(VideoBoxKey.longPressSpeedDefault, defaultValue: 3.0); } + enableLongShowControl = + setting.get(SettingBoxKey.enableLongShowControl, defaultValue: false); speedsList = List.from(videoStorage .get(VideoBoxKey.customSpeedsList, defaultValue: [])); for (final PlaySpeed i in PlaySpeed.values) { @@ -927,7 +930,8 @@ class PlPlayerController { if (_timer != null) { _timer!.cancel(); } - _timer = Timer(const Duration(milliseconds: 3000), () { + Duration waitingTime = Duration(seconds: enableLongShowControl ? 30 : 3); + _timer = Timer(waitingTime, () { if (!isSliderMoving.value) { controls = false; } diff --git a/lib/utils/storage.dart b/lib/utils/storage.dart index 1a4924e51..61883da1f 100644 --- a/lib/utils/storage.dart +++ b/lib/utils/storage.dart @@ -112,6 +112,7 @@ class SettingBoxKey { enableAutoBrightness = 'enableAutoBrightness', enableAutoEnter = 'enableAutoEnter', enableAutoExit = 'enableAutoExit', + enableLongShowControl = 'enableLongShowControl', allowRotateScreen = 'allowRotateScreen', horizontalScreen = 'horizontalScreen', p1080 = 'p1080',