The open-source CapCut alternative
fix: improve UI responsiveness during media file processing
DevloperAmanSingh181d3fca06b4
diff --git a/apps/web/src/lib/media-processing.ts b/apps/web/src/lib/media-processing.tsindex f0f80fe4..daf22b34 100644--- a/apps/web/src/lib/media-processing.ts+++ b/apps/web/src/lib/media-processing.ts@@ -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);