mirror of
https://github.com/HChaZZY/PiliPlus.git
synced 2025-12-06 09:13:48 +08:00
mod: custom enableSlideVolumeBrightness
Closes #439 Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
This commit is contained in:
@@ -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;
|
||||
|
||||
@@ -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';
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user