mirror of
https://github.com/HChaZZY/PiliPlus.git
synced 2025-12-06 09:13:48 +08:00
opt: 减少长按倍速卡顿的情况(玄学)
This commit is contained in:
@@ -1128,7 +1128,7 @@ class PlPlayerController {
|
||||
}
|
||||
|
||||
/// 设置长按倍速状态 live模式下禁用
|
||||
void setDoubleSpeedStatus(bool val) {
|
||||
void setDoubleSpeedStatus(bool val) async {
|
||||
if (videoType.value == 'live') {
|
||||
return;
|
||||
}
|
||||
@@ -1137,11 +1137,11 @@ class PlPlayerController {
|
||||
}
|
||||
_doubleSpeedStatus.value = val;
|
||||
if (val) {
|
||||
setPlaybackSpeed(
|
||||
await setPlaybackSpeed(
|
||||
enableAutoLongPressSpeed ? playbackSpeed * 2 : longPressSpeed);
|
||||
} else {
|
||||
print(playbackSpeed);
|
||||
setPlaybackSpeed(playbackSpeed);
|
||||
await setPlaybackSpeed(playbackSpeed);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -901,8 +901,8 @@ class _PLVideoPlayerState extends State<PLVideoPlayer>
|
||||
doubleTapFuc(type);
|
||||
},
|
||||
onLongPressStart: (LongPressStartDetails detail) {
|
||||
feedBack();
|
||||
_.setDoubleSpeedStatus(true);
|
||||
feedBack();
|
||||
},
|
||||
onLongPressEnd: (LongPressEndDetails details) {
|
||||
_.setDoubleSpeedStatus(false);
|
||||
|
||||
Reference in New Issue
Block a user