feat: 播放器控制栏动画开关

This commit is contained in:
guozhigq
2024-03-02 11:19:18 +08:00
parent f815affff9
commit f0d8e2a122
4 changed files with 18 additions and 1 deletions

View File

@ -120,7 +120,11 @@ class _PLVideoPlayerState extends State<PLVideoPlayer>
super.initState();
screenWidth = Get.size.width;
animationController = AnimationController(
vsync: this, duration: const Duration(milliseconds: 300));
vsync: this,
duration: GlobalData().enablePlayerControlAnimation
? const Duration(milliseconds: 150)
: const Duration(milliseconds: 10),
);
videoController = widget.controller.videoController!;
widget.controller.headerControl = widget.headerControl;
widget.controller.bottomControl = widget.bottomControl;