diff --git a/lib/pages/video/detail/view.dart b/lib/pages/video/detail/view.dart index c7896480..72af55db 100644 --- a/lib/pages/video/detail/view.dart +++ b/lib/pages/video/detail/view.dart @@ -554,6 +554,11 @@ class _VideoDetailPageState extends State playerController: plPlayerController!, ), bottomList: vdCtr.bottomList, + fullScreenCb: (bool status) { + if (vdCtr.videoDirection.value == 'vertical') { + videoHeight.value = status ? Get.size.height : verticalHeight; + } + }, showEposideCb: () => vdCtr.videoType == SearchType.video ? videoIntroController.showEposideHandler() : bangumiIntroController.showEposideHandler(), diff --git a/lib/plugin/pl_player/controller.dart b/lib/plugin/pl_player/controller.dart index dab32b5c..e95fe647 100644 --- a/lib/plugin/pl_player/controller.dart +++ b/lib/plugin/pl_player/controller.dart @@ -81,7 +81,7 @@ class PlPlayerController { final Rx _subTitleOpen = false.obs; final Rx _subTitleCode = (-1).obs; // 默认投稿视频格式 - static Rx _videoType = 'archive'.obs; + static String _videoType = 'archive'; final Rx _direction = 'horizontal'.obs; @@ -127,7 +127,6 @@ class PlPlayerController { PreferredSizeWidget? bottomControl; Widget? danmuWidget; RxList subtitles = [].obs; - String videoType = 'archive'; /// 数据加载监听 Stream get onDataStatusChanged => dataStatus.status.stream; @@ -225,7 +224,7 @@ class PlPlayerController { Rx get playerCount => _playerCount; /// - // Rx get videoType => _videoType; + String get videoType => _videoType; /// 弹幕开关 Rx isOpenDanmu = false.obs; @@ -279,7 +278,7 @@ class PlPlayerController { } // 添加一个私有构造函数 - PlPlayerController._internal(this.videoType) { + PlPlayerController._internal() { isOpenDanmu.value = GlobalDataCache.isOpenDanmu; blockTypes = GlobalDataCache.blockTypes; showArea = GlobalDataCache.showArea; @@ -306,11 +305,11 @@ class PlPlayerController { String videoType = 'archive', }) { // 如果实例尚未创建,则创建一个新实例 - _instance ??= PlPlayerController._internal(videoType); + _instance ??= PlPlayerController._internal(); if (videoType != 'none') { _instance!._playerCount.value += 1; - _videoType.value = videoType; } + _videoType = videoType; return _instance!; }