@remotion/web-renderer 4.0.404 → 4.0.405
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/esm/index.mjs +10 -2
- package/dist/throttle-progress.d.ts +5 -1
- package/package.json +6 -6
package/dist/esm/index.mjs
CHANGED
|
@@ -3629,7 +3629,14 @@ var createThrottledProgressCallback = (callback, throttleMs = DEFAULT_THROTTLE_M
|
|
|
3629
3629
|
}, remainingTime);
|
|
3630
3630
|
}
|
|
3631
3631
|
};
|
|
3632
|
-
|
|
3632
|
+
const cleanup = () => {
|
|
3633
|
+
if (timeoutId !== null) {
|
|
3634
|
+
clearTimeout(timeoutId);
|
|
3635
|
+
timeoutId = null;
|
|
3636
|
+
}
|
|
3637
|
+
pendingUpdate = null;
|
|
3638
|
+
};
|
|
3639
|
+
return { throttled, [Symbol.dispose]: cleanup };
|
|
3633
3640
|
};
|
|
3634
3641
|
|
|
3635
3642
|
// src/validate-video-frame.ts
|
|
@@ -3850,6 +3857,8 @@ var internalRenderMediaOnWeb = async ({
|
|
|
3850
3857
|
format,
|
|
3851
3858
|
target
|
|
3852
3859
|
}), 0);
|
|
3860
|
+
const throttledProgress = __using(__stack2, createThrottledProgressCallback(onProgress), 0);
|
|
3861
|
+
const throttledOnProgress = throttledProgress?.throttled ?? null;
|
|
3853
3862
|
try {
|
|
3854
3863
|
let __stack = [];
|
|
3855
3864
|
try {
|
|
@@ -3893,7 +3902,6 @@ var internalRenderMediaOnWeb = async ({
|
|
|
3893
3902
|
renderedFrames: 0,
|
|
3894
3903
|
encodedFrames: 0
|
|
3895
3904
|
};
|
|
3896
|
-
const throttledOnProgress = createThrottledProgressCallback(onProgress);
|
|
3897
3905
|
for (let frame = realFrameRange[0];frame <= realFrameRange[1]; frame++) {
|
|
3898
3906
|
if (signal?.aborted) {
|
|
3899
3907
|
throw new Error("renderMediaOnWeb() was cancelled");
|
|
@@ -1,6 +1,10 @@
|
|
|
1
1
|
import type { RenderMediaOnWebProgressCallback } from './render-media-on-web';
|
|
2
|
+
export type ThrottledProgressResult = {
|
|
3
|
+
throttled: RenderMediaOnWebProgressCallback;
|
|
4
|
+
[Symbol.dispose]: () => void;
|
|
5
|
+
};
|
|
2
6
|
/**
|
|
3
7
|
* Creates a throttled version of a progress callback that ensures it's not called
|
|
4
8
|
* more frequently than the specified interval (default: 250ms)
|
|
5
9
|
*/
|
|
6
|
-
export declare const createThrottledProgressCallback: (callback: RenderMediaOnWebProgressCallback | null, throttleMs?: number) =>
|
|
10
|
+
export declare const createThrottledProgressCallback: (callback: RenderMediaOnWebProgressCallback | null, throttleMs?: number) => ThrottledProgressResult | null;
|
package/package.json
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"url": "https://github.com/remotion-dev/remotion/tree/main/packages/web-renderer"
|
|
4
4
|
},
|
|
5
5
|
"name": "@remotion/web-renderer",
|
|
6
|
-
"version": "4.0.
|
|
6
|
+
"version": "4.0.405",
|
|
7
7
|
"main": "dist/index.js",
|
|
8
8
|
"type": "module",
|
|
9
9
|
"sideEffects": false,
|
|
@@ -18,14 +18,14 @@
|
|
|
18
18
|
"author": "Remotion <jonny@remotion.dev>",
|
|
19
19
|
"license": "UNLICENSED",
|
|
20
20
|
"dependencies": {
|
|
21
|
-
"@remotion/licensing": "4.0.
|
|
22
|
-
"remotion": "4.0.
|
|
21
|
+
"@remotion/licensing": "4.0.405",
|
|
22
|
+
"remotion": "4.0.405",
|
|
23
23
|
"mediabunny": "1.27.3"
|
|
24
24
|
},
|
|
25
25
|
"devDependencies": {
|
|
26
|
-
"@remotion/eslint-config-internal": "4.0.
|
|
27
|
-
"@remotion/player": "4.0.
|
|
28
|
-
"@remotion/media": "4.0.
|
|
26
|
+
"@remotion/eslint-config-internal": "4.0.405",
|
|
27
|
+
"@remotion/player": "4.0.405",
|
|
28
|
+
"@remotion/media": "4.0.405",
|
|
29
29
|
"@typescript/native-preview": "7.0.0-dev.20260105.1",
|
|
30
30
|
"@vitejs/plugin-react": "4.1.0",
|
|
31
31
|
"@vitest/browser-playwright": "4.0.9",
|