From db703907f57957d4a2eeb1e747b8b613a6eea9d4 Mon Sep 17 00:00:00 2001 From: orz12 Date: Sun, 18 Aug 2024 17:10:25 +0800 Subject: [PATCH] =?UTF-8?q?opt:=20=E5=87=8F=E5=B0=91=E9=95=BF=E6=8C=89?= =?UTF-8?q?=E5=80=8D=E9=80=9F=E5=8D=A1=E9=A1=BF=E7=9A=84=E6=83=85=E5=86=B5?= =?UTF-8?q?=EF=BC=88=E7=8E=84=E5=AD=A6=EF=BC=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/plugin/pl_player/controller.dart | 6 +++--- lib/plugin/pl_player/view.dart | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/plugin/pl_player/controller.dart b/lib/plugin/pl_player/controller.dart index 94e849db1..2143029a4 100644 --- a/lib/plugin/pl_player/controller.dart +++ b/lib/plugin/pl_player/controller.dart @@ -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); } } diff --git a/lib/plugin/pl_player/view.dart b/lib/plugin/pl_player/view.dart index 662bcea1f..ba0b8a4d0 100644 --- a/lib/plugin/pl_player/view.dart +++ b/lib/plugin/pl_player/view.dart @@ -901,8 +901,8 @@ class _PLVideoPlayerState extends State doubleTapFuc(type); }, onLongPressStart: (LongPressStartDetails detail) { - feedBack(); _.setDoubleSpeedStatus(true); + feedBack(); }, onLongPressEnd: (LongPressEndDetails details) { _.setDoubleSpeedStatus(false);