fix: auto play

Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
This commit is contained in:
bggRGjQaUbCoE
2025-01-06 12:08:21 +08:00
parent fee161e99b
commit d59c364ba6
2 changed files with 15 additions and 7 deletions

View File

@@ -59,9 +59,12 @@ class MediaController extends CommonController {
} }
@override @override
Future<LoadingState> customGetData() => UserHttp.userfavFolder( Future<LoadingState> customGetData() {
mid ??= GStorage.userInfo.get('userInfoCache')?.mid;
return UserHttp.userfavFolder(
pn: 1, pn: 1,
ps: 5, ps: 5,
mid: mid, mid: mid,
); );
} }
}

View File

@@ -1120,6 +1120,7 @@ class VideoDetailController extends GetxController
if (autoPlay.value && videoUrl != null && audioUrl != null) { if (autoPlay.value && videoUrl != null && audioUrl != null) {
isShowCover.value = false; isShowCover.value = false;
await playerInit(); await playerInit();
videoState.value = LoadingState.success(null);
} }
isQuerying = false; isQuerying = false;
} }
@@ -1175,7 +1176,9 @@ class VideoDetailController extends GetxController
// isShowCover.value = false; // isShowCover.value = false;
// await playerInit(); // await playerInit();
// } // }
if (autoPlay.value.not) {
videoState.value = LoadingState.success(null); videoState.value = LoadingState.success(null);
}
return; return;
} }
@@ -1288,7 +1291,9 @@ class VideoDetailController extends GetxController
// isShowCover.value = false; // isShowCover.value = false;
// await playerInit(); // await playerInit();
// } // }
if (autoPlay.value.not) {
videoState.value = LoadingState.success(null); videoState.value = LoadingState.success(null);
}
} else { } else {
autoPlay.value = false; autoPlay.value = false;
isShowCover.value = true; isShowCover.value = true;