From f271377f6b6f79be85b9cc37a589057c80471106 Mon Sep 17 00:00:00 2001 From: orz12 Date: Sat, 17 Feb 2024 13:31:56 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E5=BC=80=E5=90=AF=E5=90=8E=E5=8F=B0?= =?UTF-8?q?=E6=92=AD=E6=94=BE=E5=90=8E=E4=BA=8C=E6=AC=A1=E6=92=AD=E6=94=BE?= =?UTF-8?q?=EF=BC=8C=E6=9C=AA=E5=88=A4=E7=A9=BA=E5=AF=BC=E8=87=B4=E6=92=AD?= =?UTF-8?q?=E6=94=BE=E5=BC=82=E5=B8=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/plugin/pl_player/widgets/bottom_control.dart | 8 +++++--- lib/services/audio_handler.dart | 2 ++ 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/lib/plugin/pl_player/widgets/bottom_control.dart b/lib/plugin/pl_player/widgets/bottom_control.dart index 7105c82f..fa05c6d3 100644 --- a/lib/plugin/pl_player/widgets/bottom_control.dart +++ b/lib/plugin/pl_player/widgets/bottom_control.dart @@ -72,9 +72,11 @@ class BottomControl extends StatelessWidget implements PreferredSizeWidget { ), Row( children: [ - PlayOrPauseButton( - controller: _, - ), + controller != null + ? PlayOrPauseButton( + controller: _, + ) + : nil, const SizedBox(width: 4), // 播放时间 Obx(() { diff --git a/lib/services/audio_handler.dart b/lib/services/audio_handler.dart index ad510e7d..0b37d419 100644 --- a/lib/services/audio_handler.dart +++ b/lib/services/audio_handler.dart @@ -149,6 +149,8 @@ class VideoPlayerServiceHandler extends BaseAudioHandler with SeekHandler { )); if (_item.isNotEmpty) { _item.removeLast(); + } + if (_item.isNotEmpty) { setMediaItem(_item.last); } if (_item.isEmpty) {