From 52e44fb95bc8fdf38905352fc6cb843609fa7da8 Mon Sep 17 00:00:00 2001 From: guozhigq Date: Wed, 30 Aug 2023 09:01:21 +0800 Subject: [PATCH] =?UTF-8?q?mod:=20=E8=A7=86=E9=A2=91=E9=94=81=E5=AE=9A?= =?UTF-8?q?=E9=80=BB=E8=BE=91=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/plugin/pl_player/view.dart | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/lib/plugin/pl_player/view.dart b/lib/plugin/pl_player/view.dart index ea7315dd8..e6ba2e052 100644 --- a/lib/plugin/pl_player/view.dart +++ b/lib/plugin/pl_player/view.dart @@ -422,8 +422,8 @@ class _PLVideoPlayerState extends State _.controls = !_.showControls.value; }, onDoubleTapDown: (details) { - // live模式下禁用 - if (_.videoType.value == 'live') { + // live模式下禁用 锁定时🔒禁用 + if (_.videoType.value == 'live' || _.controlsLock.value) { return; } final totalWidth = MediaQuery.of(context).size.width; @@ -453,7 +453,8 @@ class _PLVideoPlayerState extends State /// 水平位置 快进 live模式下禁用 onHorizontalDragUpdate: (DragUpdateDetails details) { - if (_.videoType.value == 'live') { + // live模式下禁用 锁定时🔒禁用 + if (_.videoType.value == 'live' || _.controlsLock.value) { return; } final tapPosition = details.localPosition.dx; @@ -474,7 +475,7 @@ class _PLVideoPlayerState extends State _initTapPositoin = tapPosition; }, onHorizontalDragEnd: (DragEndDetails details) { - if (_.videoType.value == 'live') { + if (_.videoType.value == 'live' || _.controlsLock.value) { return; } _.onChangedSliderEnd(); @@ -486,6 +487,11 @@ class _PLVideoPlayerState extends State final tapPosition = details.localPosition.dx; final sectionWidth = totalWidth / 3; final delta = details.delta.dy; + + /// 锁定时禁用 + if (_.controlsLock.value) { + return; + } if (tapPosition < sectionWidth) { // 左边区域 👈 final brightness = _brightnessValue - delta / 100.0; @@ -621,7 +627,7 @@ class _PLVideoPlayerState extends State child: Align( alignment: Alignment.centerLeft, child: FractionalTranslation( - translation: const Offset(0.5, 0.0), + translation: const Offset(1, 0.0), child: Visibility( visible: _.showControls.value, child: ComBtn(