fix: improve UI responsiveness during media file processing

This commit is contained in:
DevloperAmanSingh
2025-06-25 21:50:12 +05:30
parent 0723623eaf
commit 181d3fca06

View File

@ -62,6 +62,9 @@ export async function processMediaFiles(
aspectRatio,
});
// Yield back to the event loop to keep the UI responsive
await new Promise((resolve) => setTimeout(resolve, 0));
completed += 1;
if (onProgress) {
const percent = Math.round((completed / total) * 100);