mod: fullscreen debounce

Closes #340

Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
This commit is contained in:
bggRGjQaUbCoE
2025-02-28 00:37:25 +08:00
parent 5b8c68303f
commit 7ad48570f0
2 changed files with 48 additions and 53 deletions

View File

@@ -629,8 +629,8 @@ class _PLVideoPlayerState extends State<PLVideoPlayer>
size: 24,
color: Colors.white,
),
fuc: () =>
plPlayerController.triggerFullScreen(status: !isFullScreen),
fuc: () => plPlayerController.triggerFullScreen(
status: !isFullScreen, duration: 800),
),
),
),
@@ -842,11 +842,8 @@ class _PLVideoPlayerState extends State<PLVideoPlayer>
details.localFocalPoint.dy - _initialFocalPoint.dy;
void fullScreenTrigger(bool status) {
EasyThrottle.throttle(
'fullScreen', const Duration(milliseconds: 800),
() async {
await plPlayerController.triggerFullScreen(status: status);
});
plPlayerController.triggerFullScreen(
status: status, duration: 800);
}
if (cumulativeDy > threshold) {
@@ -1170,12 +1167,7 @@ class _PLVideoPlayerState extends State<PLVideoPlayer>
details.localPosition.dy - _initialFocalPoint.dy;
void fullScreenTrigger(bool status) {
EasyThrottle.throttle(
'fullScreen', const Duration(milliseconds: 800),
() async {
await plPlayerController.triggerFullScreen(
status: status);
});
plPlayerController.triggerFullScreen(status: status);
}
if (cumulativeDy > threshold) {