From d889927b8cd314c902ab6b32ca4aa576983a57ec Mon Sep 17 00:00:00 2001 From: zhaojisen <1301338853@qq.com> Date: Mon, 18 Aug 2025 15:21:55 +0800 Subject: [PATCH] Fixed: parts replay loading --- src/app/elements/replay/parts/parts.component.ts | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/src/app/elements/replay/parts/parts.component.ts b/src/app/elements/replay/parts/parts.component.ts index 01aa4a448..e467e3e97 100644 --- a/src/app/elements/replay/parts/parts.component.ts +++ b/src/app/elements/replay/parts/parts.component.ts @@ -199,7 +199,17 @@ export class ElementsPartsComponent implements OnInit { let isFirstPush = true; for (const item of file) { - isFirstPush = await this.fetchSection(item, sessionId, isFirstPush); + // 先拿第一个保证有东西可以播出来 + isFirstPush = await this.fetchSection(file[0], sessionId, isFirstPush); + + // 其他的放到异步任务中 + Promise.resolve().then(async () => { + for(const item of file.slice(1)) { + await this.fetchSection(item, sessionId, isFirstPush); + } + }) + + // isFirstPush = await this.fetchSection(item, sessionId, isFirstPush); } }