diff options
Diffstat (limited to 'apps')
| -rw-r--r-- | apps/web/src/lib/media-processing.ts | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/apps/web/src/lib/media-processing.ts b/apps/web/src/lib/media-processing.ts index 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);
|
