mirror of
https://github.com/HChaZZY/PiliPlus.git
synced 2025-12-06 09:13:48 +08:00
mod: custom slide fs
Closes #585 Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
This commit is contained in:
@@ -255,6 +255,7 @@ class PlPlayerController {
|
||||
late final enableShrinkVideoSize = GStorage.enableShrinkVideoSize;
|
||||
late final darkVideoPage = GStorage.darkVideoPage;
|
||||
late final enableSlideVolumeBrightness = GStorage.enableSlideVolumeBrightness;
|
||||
late final enableSlideFS = GStorage.enableSlideFS;
|
||||
|
||||
/// 弹幕权重
|
||||
int danmakuWeight = 0;
|
||||
|
||||
@@ -767,6 +767,11 @@ class _PLVideoPlayerState extends State<PLVideoPlayer>
|
||||
|
||||
/// 锁定时禁用
|
||||
if (plPlayerController.controlsLock.value) return;
|
||||
if (plPlayerController.enableSlideVolumeBrightness.not &&
|
||||
plPlayerController.enableSlideFS.not) {
|
||||
return;
|
||||
}
|
||||
|
||||
RenderBox renderBox =
|
||||
_playerKey.currentContext!.findRenderObject() as RenderBox;
|
||||
|
||||
@@ -788,6 +793,9 @@ class _PLVideoPlayerState extends State<PLVideoPlayer>
|
||||
// 左边区域
|
||||
_gestureType = 'left';
|
||||
} else if (tapPosition < sectionWidth * 2) {
|
||||
if (plPlayerController.enableSlideFS.not) {
|
||||
return;
|
||||
}
|
||||
// 全屏
|
||||
_gestureType = 'center';
|
||||
} else {
|
||||
@@ -1160,6 +1168,10 @@ class _PLVideoPlayerState extends State<PLVideoPlayer>
|
||||
},
|
||||
onVerticalDragUpdate: (details) {
|
||||
if (plPlayerController.controlsLock.value) return;
|
||||
if (plPlayerController.enableSlideVolumeBrightness.not &&
|
||||
plPlayerController.enableSlideFS.not) {
|
||||
return;
|
||||
}
|
||||
RenderBox renderBox =
|
||||
_playerKey.currentContext!.findRenderObject() as RenderBox;
|
||||
final double totalWidth = renderBox.size.width;
|
||||
@@ -1173,6 +1185,9 @@ class _PLVideoPlayerState extends State<PLVideoPlayer>
|
||||
// 左边区域
|
||||
gestureType = 'left';
|
||||
} else if (tapPosition < sectionWidth * 2) {
|
||||
if (plPlayerController.enableSlideFS.not) {
|
||||
return;
|
||||
}
|
||||
// 全屏
|
||||
gestureType = 'center';
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user