🎥 Make videos programmatically with React
updated onProgress
Patric Salvisberg086616814f4f
diff --git a/packages/renderer/src/ffmpeg-flags.ts b/packages/renderer/src/ffmpeg-flags.tsindex f747f62fee..f8d207f2a6 100644--- a/packages/renderer/src/ffmpeg-flags.ts+++ b/packages/renderer/src/ffmpeg-flags.ts@@ -166,13 +166,15 @@ export const downloadBinary = async (): Promise<string> => {const destinationPath = getFfmpegAbsolutePath(remotionRoot, binary);+ const onProgressCallback = (downloadedBytes: number, _totalBytes: number) => {+ onProgress(downloadedBytes, _totalBytes, binary);+ };+isDownloading[url] = true;const totalBytes = await _downloadFile(url,destinationPath,- (downloadedBytes) => {- onProgress(downloadedBytes, totalBytes, binary);- }+ onProgressCallback);onProgress(totalBytes, totalBytes, binary);if (os.platform() !== 'win32') {