From f2a05bb97069993ffe906ccfa0d282842a4fd5a4 Mon Sep 17 00:00:00 2001 From: bggRGjQaUbCoE Date: Thu, 16 Oct 2025 18:48:06 +0800 Subject: [PATCH] fix #1593 Signed-off-by: bggRGjQaUbCoE --- lib/pages/video/send_danmaku/view.dart | 12 ++++++++---- lib/plugin/pl_player/controller.dart | 3 ++- lib/plugin/pl_player/view.dart | 4 ++++ 3 files changed, 14 insertions(+), 5 deletions(-) diff --git a/lib/pages/video/send_danmaku/view.dart b/lib/pages/video/send_danmaku/view.dart index 8c9219109..85b0925d3 100644 --- a/lib/pages/video/send_danmaku/view.dart +++ b/lib/pages/video/send_danmaku/view.dart @@ -458,6 +458,13 @@ class _SendDanmakuPanelState extends CommonTextPubPageState { hasPub = true; Get.back(); SmartDialog.showToast('发送成功'); + VideoDanmaku? extra; + if (res['dmid'] case int dmid) { + extra = VideoDanmaku( + id: dmid, + mid: PlPlayerController.instance!.midHash, + ); + } widget.callback( DanmakuContentItem( editController.text, @@ -469,10 +476,7 @@ class _SendDanmakuPanelState extends CommonTextPubPageState { }, selfSend: true, isColorful: isColorful, - extra: VideoDanmaku( - id: res['dmid'], - mid: PlPlayerController.instance!.midHash, - ), + extra: extra, ), ); } else { diff --git a/lib/plugin/pl_player/controller.dart b/lib/plugin/pl_player/controller.dart index a934ef949..e3a9f6fbb 100644 --- a/lib/plugin/pl_player/controller.dart +++ b/lib/plugin/pl_player/controller.dart @@ -1244,9 +1244,10 @@ class PlPlayerController { await seekTo(Duration.zero, isSeek: false); } - await audioSessionHandler?.setActive(true); await _videoPlayerController?.play(); + audioSessionHandler?.setActive(true); + playerStatus.status.value = PlayerStatus.playing; // screenManager.setOverlays(false); } diff --git a/lib/plugin/pl_player/view.dart b/lib/plugin/pl_player/view.dart index 1adc068bb..fdb001e19 100644 --- a/lib/plugin/pl_player/view.dart +++ b/lib/plugin/pl_player/view.dart @@ -1145,6 +1145,10 @@ class _PLVideoPlayerState extends State _removeDmAction(); } } else if (item != _suspendedDm) { + if (item.content.extra == null) { + _removeDmAction(); + return; + } _suspendedDm?.suspend = false; _suspendedDm = item..suspend = true; _dmOffset = pos;