From 2a9431e4b6f941ad6f6162e0387d5101fbd25cd4 Mon Sep 17 00:00:00 2001 From: orz12 Date: Wed, 6 Mar 2024 10:46:33 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E7=94=BB=E9=9D=A2=E6=AF=94=E4=BE=8B?= =?UTF-8?q?=E6=94=B9=E5=8F=98=E6=97=A0=E6=B3=95=E7=AB=8B=E5=8D=B3=E7=94=9F?= =?UTF-8?q?=E6=95=88=EF=BC=8C=E5=88=A0=E9=99=A4=E5=86=97=E4=BD=99=E4=BB=A3?= =?UTF-8?q?=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/plugin/pl_player/controller.dart | 4 ---- lib/plugin/pl_player/view.dart | 1 + 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/lib/plugin/pl_player/controller.dart b/lib/plugin/pl_player/controller.dart index 7f8688258..c5ff881b3 100644 --- a/lib/plugin/pl_player/controller.dart +++ b/lib/plugin/pl_player/controller.dart @@ -81,7 +81,6 @@ class PlPlayerController { final Rx _direction = 'horizontal'.obs; - Rx videoFitChanged = false.obs; final Rx _videoFit = Rx(BoxFit.contain); final Rx _videoFitDesc = Rx('包含'); @@ -106,7 +105,6 @@ class PlPlayerController { Timer? _timerForShowingVolume; Timer? _timerForGettingVolume; Timer? timerForTrackingMouse; - Timer? videoFitChangedTimer; // final Durations durations; @@ -1028,7 +1026,6 @@ class PlPlayerController { _timerForGettingVolume?.cancel(); timerForTrackingMouse?.cancel(); _timerForSeek?.cancel(); - videoFitChangedTimer?.cancel(); } // 记录播放记录 @@ -1079,7 +1076,6 @@ class PlPlayerController { _timerForGettingVolume?.cancel(); timerForTrackingMouse?.cancel(); _timerForSeek?.cancel(); - videoFitChangedTimer?.cancel(); // _position.close(); _playerEventSubs?.cancel(); // _sliderPosition.close(); diff --git a/lib/plugin/pl_player/view.dart b/lib/plugin/pl_player/view.dart index e011d8747..a700c3e1c 100644 --- a/lib/plugin/pl_player/view.dart +++ b/lib/plugin/pl_player/view.dart @@ -223,6 +223,7 @@ class _PLVideoPlayerState extends State children: [ Obx( () => Video( + key: ValueKey(_.videoFit.value), controller: videoController, controls: NoVideoControls, pauseUponEnteringBackgroundMode: !enableBackgroundPlay,