opt auto fullscreen

opt video fit

Signed-off-by: dom <githubaccount56556@proton.me>
This commit is contained in:
dom
2026-03-04 14:22:51 +08:00
parent 8d312d8cf1
commit a802bc1cdf
7 changed files with 47 additions and 85 deletions

View File

@@ -160,7 +160,7 @@ class _PLVideoPlayerState extends State<PLVideoPlayer>
int? tmpSubtitlePaddingB;
StreamSubscription? _controlsListener;
void _controlListener(bool val) {
void _onControlChanged(bool val) {
final visible = val && !plPlayerController.controlsLock.value;
if ((widget.headerControl.key as GlobalKey<TimeBatteryMixin>).currentState
@@ -212,9 +212,11 @@ class _PLVideoPlayerState extends State<PLVideoPlayer>
WidgetsBinding.instance.addObserver(this);
_controlsListener = plPlayerController.showControls.listen(
_controlListener,
_onControlChanged,
);
transformationController = TransformationController();
animationController = AnimationController(
vsync: this,
duration: const Duration(milliseconds: 100),