Reduce preload timeout

This commit is contained in:
Varun Patil 2020-10-20 04:05:30 +05:30
parent eedee762b7
commit 0fa7a4e687
1 changed files with 8 additions and 8 deletions

View File

@ -280,15 +280,15 @@
return response.json(); return response.json();
}) })
.then(function(jsonResponse) { .then(function(jsonResponse) {
jsonResponse.forEach((f) => { setTimeout(() => {
const url = mapping[f.toLowerCase().replace(new RegExp("\\.[^/.]+$"), "")]; jsonResponse.forEach((f) => {
if (!url) return; const url = mapping[f.toLowerCase().replace(new RegExp("\\.[^/.]+$"), "")];
if (!url) return;
// Preload the asset // Preload the asset
setTimeout(() => { fetch('gameasync/' + url).then().catch();
fetch('gameasync/' + url).then().catch(); });
}, 1000); }, 200);
});
}); });
}; };