Skip to content

Commit

Permalink
Merge branch 'try-opt-deep-router-danmaku'
Browse files Browse the repository at this point in the history
  • Loading branch information
orz12 committed Jan 10, 2024
2 parents 72d894d + 5ecfb0a commit 60f03fe
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/pages/danmaku/view.dart
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ class _PlDanmakuState extends State<PlDanmaku> {
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,
Expand All @@ -135,7 +135,7 @@ class _PlDanmakuState extends State<PlDanmaku> {
hideScroll: blockTypes.contains(2),
hideBottom: blockTypes.contains(4),
duration:
danmakuDurationVal / widget.playerController.playbackSpeed,
danmakuDurationVal / playerController.playbackSpeed,
// initDuration /
// (danmakuSpeedVal * widget.playerController.playbackSpeed),
),
Expand Down
2 changes: 2 additions & 0 deletions lib/pages/video/detail/view.dart
Original file line number Diff line number Diff line change
Expand Up @@ -215,6 +215,8 @@ class _VideoDetailPageState extends State<VideoDetailPage>
videoIntroController.isPaused = true;
plPlayerController!.removeStatusLister(playerListener);
plPlayerController!.pause();
plPlayerController!.danmakuController?.pause();
plPlayerController!.danmakuController?.clear();
}
super.didPushNext();
}
Expand Down

0 comments on commit 60f03fe

Please sign in to comment.