mod: custom enableSlideVolumeBrightness

Closes #439

Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
This commit is contained in:
bggRGjQaUbCoE
2025-03-14 19:47:22 +08:00
parent 21fe0ef288
commit 0ebe976b8a
4 changed files with 24 additions and 0 deletions

View File

@@ -257,6 +257,7 @@ class PlPlayerController {
late final showFSActionItem = GStorage.showFSActionItem;
late final enableShrinkVideoSize = GStorage.enableShrinkVideoSize;
late final darkVideoPage = GStorage.darkVideoPage;
late final enableSlideVolumeBrightness = GStorage.enableSlideVolumeBrightness;
/// 弹幕权重
int danmakuWeight = 0;

View File

@@ -747,12 +747,18 @@ class _PLVideoPlayerState extends State<PLVideoPlayer>
final double tapPosition = details.localFocalPoint.dx;
final double sectionWidth = totalWidth / 3;
if (tapPosition < sectionWidth) {
if (plPlayerController.enableSlideVolumeBrightness.not) {
return;
}
// 左边区域
_gestureType = 'left';
} else if (tapPosition < sectionWidth * 2) {
// 全屏
_gestureType = 'center';
} else {
if (plPlayerController.enableSlideVolumeBrightness.not) {
return;
}
// 右边区域
_gestureType = 'right';
}
@@ -1142,12 +1148,18 @@ class _PLVideoPlayerState extends State<PLVideoPlayer>
final double sectionWidth = totalWidth / 3;
late String gestureType;
if (tapPosition < sectionWidth) {
if (plPlayerController.enableSlideVolumeBrightness.not) {
return;
}
// 左边区域
gestureType = 'left';
} else if (tapPosition < sectionWidth * 2) {
// 全屏
gestureType = 'center';
} else {
if (plPlayerController.enableSlideVolumeBrightness.not) {
return;
}
// 右边区域
gestureType = 'right';
}