Skip to content

Commit d889927

Browse files
committed
Fixed: parts replay loading
1 parent 1e6df17 commit d889927

1 file changed

Lines changed: 11 additions & 1 deletion

File tree

src/app/elements/replay/parts/parts.component.ts

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -199,7 +199,17 @@ export class ElementsPartsComponent implements OnInit {
199199
let isFirstPush = true;
200200

201201
for (const item of file) {
202-
isFirstPush = await this.fetchSection(item, sessionId, isFirstPush);
202+
// 先拿第一个保证有东西可以播出来
203+
isFirstPush = await this.fetchSection(file[0], sessionId, isFirstPush);
204+
205+
// 其他的放到异步任务中
206+
Promise.resolve().then(async () => {
207+
for(const item of file.slice(1)) {
208+
await this.fetchSection(item, sessionId, isFirstPush);
209+
}
210+
})
211+
212+
// isFirstPush = await this.fetchSection(item, sessionId, isFirstPush);
203213
}
204214
}
205215

0 commit comments

Comments
 (0)