From 21542b729de6ed1d1c1f3aef36c7613bac2d399a Mon Sep 17 00:00:00 2001 From: guozhigq Date: Thu, 13 Jun 2024 23:13:47 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E6=92=AD=E6=94=BE=E5=99=A8=E5=85=A8?= =?UTF-8?q?=E5=B1=8F=E5=9B=9E=E8=B0=83?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/pages/video/detail/view.dart | 7 +++++++ lib/plugin/pl_player/view.dart | 7 ++++++- 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/lib/pages/video/detail/view.dart b/lib/pages/video/detail/view.dart index 22271c2b..ef067d1b 100644 --- a/lib/pages/video/detail/view.dart +++ b/lib/pages/video/detail/view.dart @@ -514,6 +514,13 @@ class _VideoDetailPageState extends State showEposideCb: () => vdCtr.videoType == SearchType.video ? videoIntroController.showEposideHandler() : bangumiIntroController.showEposideHandler(), + fullScreenCb: (bool status) { + if (status) { + videoHeight.value = Get.size.height; + } else { + videoHeight.value = defaultVideoHeight; + } + }, ), ); }, diff --git a/lib/plugin/pl_player/view.dart b/lib/plugin/pl_player/view.dart index fa0dc444..f3e0946b 100644 --- a/lib/plugin/pl_player/view.dart +++ b/lib/plugin/pl_player/view.dart @@ -39,6 +39,7 @@ class PLVideoPlayer extends StatefulWidget { this.customWidget, this.customWidgets, this.showEposideCb, + this.fullScreenCb, super.key, }); @@ -52,6 +53,7 @@ class PLVideoPlayer extends StatefulWidget { final Widget? customWidget; final List? customWidgets; final Function? showEposideCb; + final Function? fullScreenCb; @override State createState() => _PLVideoPlayerState(); @@ -335,7 +337,10 @@ class _PLVideoPlayerState extends State color: Colors.white, ), ), - fuc: () => _.triggerFullScreen(status: !_.isFullScreen.value), + fuc: () { + _.triggerFullScreen(status: !_.isFullScreen.value); + widget.fullScreenCb?.call(!_.isFullScreen.value); + }, ), }; final List list = [];