From 9029f37bdfd309250aba3452fd88acf66c132d70 Mon Sep 17 00:00:00 2001 From: orz12 Date: Tue, 9 Jan 2024 15:52:22 +0800 Subject: [PATCH] =?UTF-8?q?=E5=B0=9D=E8=AF=95=E4=BC=98=E5=8C=96=E5=A4=9A?= =?UTF-8?q?=E5=B1=82=E5=BC=B9=E5=B9=95=E6=89=80=E5=8D=A0=E8=B5=84=E6=BA=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/pages/danmaku/view.dart | 4 ++-- lib/pages/video/detail/view.dart | 2 ++ 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/lib/pages/danmaku/view.dart b/lib/pages/danmaku/view.dart index 5c3f97d04..83d6020ee 100644 --- a/lib/pages/danmaku/view.dart +++ b/lib/pages/danmaku/view.dart @@ -125,7 +125,7 @@ class _PlDanmakuState extends State { duration: const Duration(milliseconds: 100), child: DanmakuView( createdController: (DanmakuController e) async { - widget.playerController.danmakuController = _controller = e; + playerController.danmakuController = _controller = e; }, option: DanmakuOption( fontSize: 15 * fontSizeVal, @@ -135,7 +135,7 @@ class _PlDanmakuState extends State { hideScroll: blockTypes.contains(2), hideBottom: blockTypes.contains(4), duration: - danmakuDurationVal / widget.playerController.playbackSpeed, + danmakuDurationVal / playerController.playbackSpeed, // initDuration / // (danmakuSpeedVal * widget.playerController.playbackSpeed), ), diff --git a/lib/pages/video/detail/view.dart b/lib/pages/video/detail/view.dart index 38b813789..ceaa26481 100644 --- a/lib/pages/video/detail/view.dart +++ b/lib/pages/video/detail/view.dart @@ -213,6 +213,8 @@ class _VideoDetailPageState extends State videoIntroController.isPaused = true; plPlayerController!.removeStatusLister(playerListener); plPlayerController!.pause(); + plPlayerController!.danmakuController?.pause(); + plPlayerController!.danmakuController?.clear(); } super.didPushNext(); }