mirror of
https://github.com/HChaZZY/PiliPlus.git
synced 2025-12-06 09:13:48 +08:00
fix: 画面比例改变无法立即生效,删除冗余代码
This commit is contained in:
@@ -81,7 +81,6 @@ class PlPlayerController {
|
||||
|
||||
final Rx<String> _direction = 'horizontal'.obs;
|
||||
|
||||
Rx<bool> videoFitChanged = false.obs;
|
||||
final Rx<BoxFit> _videoFit = Rx(BoxFit.contain);
|
||||
final Rx<String> _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();
|
||||
|
||||
@@ -223,6 +223,7 @@ class _PLVideoPlayerState extends State<PLVideoPlayer>
|
||||
children: <Widget>[
|
||||
Obx(
|
||||
() => Video(
|
||||
key: ValueKey(_.videoFit.value),
|
||||
controller: videoController,
|
||||
controls: NoVideoControls,
|
||||
pauseUponEnteringBackgroundMode: !enableBackgroundPlay,
|
||||
|
||||
Reference in New Issue
Block a user