diff --git a/lib/pages/video/detail/view.dart b/lib/pages/video/detail/view.dart index 203f147a2..a1784fb23 100644 --- a/lib/pages/video/detail/view.dart +++ b/lib/pages/video/detail/view.dart @@ -822,6 +822,16 @@ class _VideoDetailPageState extends State } }, ); + if (!horizontalScreen) { + if (Platform.isAndroid) { + return PiPSwitcher( + childWhenDisabled: childWhenDisabled, + childWhenEnabled: childWhenEnabled, + floating: floating, + ); + } + return childWhenDisabled; + } return OrientationBuilder( builder: (BuildContext context, Orientation orientation) { if (orientation == Orientation.landscape) { @@ -831,7 +841,7 @@ class _VideoDetailPageState extends State return PiPSwitcher( childWhenDisabled: Container( key: UniqueKey(), - child: !horizontalScreen || orientation == Orientation.portrait + child: orientation == Orientation.portrait ? childWhenDisabled : childWhenDisabledLandscape, ), @@ -841,7 +851,7 @@ class _VideoDetailPageState extends State } return Container( key: UniqueKey(), - child: !horizontalScreen || orientation == Orientation.portrait + child: orientation == Orientation.portrait ? childWhenDisabled : childWhenDisabledLandscape, );