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模式下禁用
|
/// 设置长按倍速状态 live模式下禁用
|
||||||
void setDoubleSpeedStatus(bool val) {
|
void setDoubleSpeedStatus(bool val) async {
|
||||||
if (videoType.value == 'live') {
|
if (videoType.value == 'live') {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -1137,11 +1137,11 @@ class PlPlayerController {
|
|||||||
}
|
}
|
||||||
_doubleSpeedStatus.value = val;
|
_doubleSpeedStatus.value = val;
|
||||||
if (val) {
|
if (val) {
|
||||||
setPlaybackSpeed(
|
await setPlaybackSpeed(
|
||||||
enableAutoLongPressSpeed ? playbackSpeed * 2 : longPressSpeed);
|
enableAutoLongPressSpeed ? playbackSpeed * 2 : longPressSpeed);
|
||||||
} else {
|
} else {
|
||||||
print(playbackSpeed);
|
print(playbackSpeed);
|
||||||
setPlaybackSpeed(playbackSpeed);
|
await setPlaybackSpeed(playbackSpeed);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -901,8 +901,8 @@ class _PLVideoPlayerState extends State<PLVideoPlayer>
|
|||||||
doubleTapFuc(type);
|
doubleTapFuc(type);
|
||||||
},
|
},
|
||||||
onLongPressStart: (LongPressStartDetails detail) {
|
onLongPressStart: (LongPressStartDetails detail) {
|
||||||
feedBack();
|
|
||||||
_.setDoubleSpeedStatus(true);
|
_.setDoubleSpeedStatus(true);
|
||||||
|
feedBack();
|
||||||
},
|
},
|
||||||
onLongPressEnd: (LongPressEndDetails details) {
|
onLongPressEnd: (LongPressEndDetails details) {
|
||||||
_.setDoubleSpeedStatus(false);
|
_.setDoubleSpeedStatus(false);
|
||||||
|
|||||||
Reference in New Issue
Block a user