feat: custom preinit player

Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
This commit is contained in:
bggRGjQaUbCoE
2025-01-18 21:45:06 +08:00
parent 434a898c36
commit 13b17778ef
4 changed files with 24 additions and 1 deletions

View File

@@ -225,6 +225,7 @@ class VideoDetailController extends GetxController
bool get showReply =>
videoType == SearchType.video ? _showVideoReply : _showBangumiReply;
late final preInitPlayer = GStorage.preInitPlayer;
late final horizontalSeasonPanel = GStorage.horizontalSeasonPanel;
int? seasonCid;
late RxInt seasonIndex = 0.obs;
@@ -1205,6 +1206,8 @@ class VideoDetailController extends GetxController
if (autoPlay.value) {
isShowCover.value = false;
await playerInit();
} else if (preInitPlayer) {
await playerInit();
}
isQuerying = false;
return;
@@ -1313,6 +1316,8 @@ class VideoDetailController extends GetxController
if (autoPlay.value) {
isShowCover.value = false;
await playerInit();
} else if (preInitPlayer) {
await playerInit();
}
} else {
autoPlay.value = false;