opt: video: long press

Closes #423

Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
This commit is contained in:
bggRGjQaUbCoE
2025-03-11 13:54:22 +08:00
parent 4aa3d5f273
commit c1ab273478
2 changed files with 11 additions and 6 deletions

View File

@@ -1356,12 +1356,19 @@ class PlPlayerController {
if (controlsLock.value) {
return;
}
_doubleSpeedStatus.value = val;
if (_doubleSpeedStatus.value == val) {
return;
}
if (val) {
await setPlaybackSpeed(
enableAutoLongPressSpeed ? playbackSpeed * 2 : longPressSpeed);
if (playerStatus.status.value == PlayerStatus.playing) {
_doubleSpeedStatus.value = val;
HapticFeedback.lightImpact();
await setPlaybackSpeed(
enableAutoLongPressSpeed ? playbackSpeed * 2 : longPressSpeed);
}
} else {
debugPrint('$playbackSpeed');
// debugPrint('$playbackSpeed');
_doubleSpeedStatus.value = val;
await setPlaybackSpeed(playbackSpeed);
}
}