fix: video page v

Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
This commit is contained in:
bggRGjQaUbCoE
2025-02-27 16:26:54 +08:00
parent 29c47cee78
commit 609fab345a
2 changed files with 13 additions and 3 deletions

View File

@@ -150,6 +150,9 @@ class VideoDetailController extends GetxController
? 'horizontal' ? 'horizontal'
: 'vertical' : 'vertical'
: 'horizontal'; : 'horizontal';
if (GStorage.collapsibleVideoPage.not || scrollCtr.hasClients.not) {
return;
}
if (_direction != direction) { if (_direction != direction) {
_direction = direction; _direction = direction;
double videoHeight = double videoHeight =

View File

@@ -1138,16 +1138,23 @@ class _PLVideoPlayerState extends State<PLVideoPlayer>
final double totalWidth = renderBox.size.width; final double totalWidth = renderBox.size.width;
final double tapPosition = details.localPosition.dx; final double tapPosition = details.localPosition.dx;
final double sectionWidth = totalWidth / 3; final double sectionWidth = totalWidth / 3;
late String gestureType;
if (tapPosition < sectionWidth) { if (tapPosition < sectionWidth) {
// 左边区域 // 左边区域
_gestureType = 'left'; gestureType = 'left';
} else if (tapPosition < sectionWidth * 2) { } else if (tapPosition < sectionWidth * 2) {
// 全屏 // 全屏
_gestureType = 'center'; gestureType = 'center';
} else { } else {
// 右边区域 // 右边区域
_gestureType = 'right'; gestureType = 'right';
} }
if (_gestureType != null && _gestureType != gestureType) {
return;
}
_gestureType = gestureType;
if (_gestureType == 'left') { if (_gestureType == 'left') {
// 左边区域 👈 // 左边区域 👈
final double level = renderBox.size.height * 3; final double level = renderBox.size.height * 3;