fix: app后台时自动pip

This commit is contained in:
guozhigq
2023-11-12 15:04:58 +08:00
parent ea38305793
commit db5132a568

View File

@ -218,7 +218,10 @@ class _VideoDetailPageState extends State<VideoDetailPage>
@override
void didChangeAppLifecycleState(AppLifecycleState lifecycleState) {
if (lifecycleState == AppLifecycleState.inactive && autoPiP) {
var routePath = Get.currentRoute;
if (lifecycleState == AppLifecycleState.inactive &&
autoPiP &&
routePath.startsWith('/video')) {
floating.enable(
aspectRatio: Rational(
videoDetailController.data.dash!.video!.first.width!,