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,