mirror of
https://github.com/HChaZZY/PiliPlus.git
synced 2025-12-06 09:13:48 +08:00
opt: video gesture
Closes #586 Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
This commit is contained in:
@@ -746,6 +746,9 @@ class _PLVideoPlayerState extends State<PLVideoPlayer>
|
|||||||
if (plPlayerController.controlsLock.value) return;
|
if (plPlayerController.controlsLock.value) return;
|
||||||
// 如果起点太靠上则屏蔽
|
// 如果起点太靠上则屏蔽
|
||||||
if (details.localFocalPoint.dy < 40) return;
|
if (details.localFocalPoint.dy < 40) return;
|
||||||
|
if (details.localFocalPoint.dx < 40) return;
|
||||||
|
if (details.localFocalPoint.dx > context.width - 40) return;
|
||||||
|
if (details.localFocalPoint.dy > context.height - 40) return;
|
||||||
if (details.pointerCount == 2) {
|
if (details.pointerCount == 2) {
|
||||||
interacting = true;
|
interacting = true;
|
||||||
}
|
}
|
||||||
@@ -1163,6 +1166,9 @@ class _PLVideoPlayerState extends State<PLVideoPlayer>
|
|||||||
onVerticalDragStart: (details) {
|
onVerticalDragStart: (details) {
|
||||||
if (plPlayerController.controlsLock.value) return;
|
if (plPlayerController.controlsLock.value) return;
|
||||||
if (details.localPosition.dy < 40) return;
|
if (details.localPosition.dy < 40) return;
|
||||||
|
if (details.localPosition.dx < 40) return;
|
||||||
|
if (details.localPosition.dx > context.width - 40) return;
|
||||||
|
if (details.localPosition.dy > context.height - 40) return;
|
||||||
_initialFocalPoint = details.localPosition;
|
_initialFocalPoint = details.localPosition;
|
||||||
_gestureType = null;
|
_gestureType = null;
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in New Issue
Block a user