remotion 4.0.475 → 4.0.477

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.
Files changed (38) hide show
  1. package/dist/cjs/CompositionManager.d.ts +2 -0
  2. package/dist/cjs/HtmlInCanvas.js +3 -3
  3. package/dist/cjs/Img.d.ts +8 -2
  4. package/dist/cjs/Img.js +7 -5
  5. package/dist/cjs/Interactive.d.ts +1 -1
  6. package/dist/cjs/Interactive.js +4 -2
  7. package/dist/cjs/Sequence.d.ts +1 -0
  8. package/dist/cjs/Sequence.js +35 -5
  9. package/dist/cjs/SequenceContext.d.ts +1 -0
  10. package/dist/cjs/animated-image/AnimatedImage.js +2 -0
  11. package/dist/cjs/audio/AudioForPreview.js +1 -1
  12. package/dist/cjs/canvas-image/CanvasImage.d.ts +7 -1
  13. package/dist/cjs/canvas-image/CanvasImage.js +4 -2
  14. package/dist/cjs/canvas-image/props.d.ts +1 -1
  15. package/dist/cjs/easing.d.ts +3 -0
  16. package/dist/cjs/easing.js +18 -0
  17. package/dist/cjs/effects/Solid.d.ts +1 -1
  18. package/dist/cjs/effects/Solid.js +4 -2
  19. package/dist/cjs/index.d.ts +2 -2
  20. package/dist/cjs/internals.d.ts +19 -3
  21. package/dist/cjs/internals.js +1 -0
  22. package/dist/cjs/interpolate-translate.d.ts +8 -0
  23. package/dist/cjs/interpolate-translate.js +70 -0
  24. package/dist/cjs/loop/index.js +1 -1
  25. package/dist/cjs/no-react.d.ts +9 -0
  26. package/dist/cjs/sequence-field-schema.d.ts +29 -1
  27. package/dist/cjs/sequence-field-schema.js +28 -5
  28. package/dist/cjs/series/index.d.ts +1 -1
  29. package/dist/cjs/series/index.js +1 -0
  30. package/dist/cjs/version.d.ts +1 -1
  31. package/dist/cjs/version.js +1 -1
  32. package/dist/cjs/video/VideoForPreview.js +4 -6
  33. package/dist/cjs/wrap-in-schema.d.ts +3 -2
  34. package/dist/cjs/wrap-in-schema.js +8 -5
  35. package/dist/esm/index.mjs +650 -547
  36. package/dist/esm/no-react.mjs +26 -4
  37. package/dist/esm/version.mjs +1 -1
  38. package/package.json +2 -2
@@ -1291,7 +1291,7 @@ var addSequenceStackTraces = (component) => {
1291
1291
  };
1292
1292
 
1293
1293
  // src/version.ts
1294
- var VERSION = "4.0.475";
1294
+ var VERSION = "4.0.477";
1295
1295
 
1296
1296
  // src/multiple-versions-warning.ts
1297
1297
  var checkMultipleRemotionVersions = () => {
@@ -1330,6 +1330,7 @@ var Null = () => {
1330
1330
  // src/Sequence.tsx
1331
1331
  import {
1332
1332
  forwardRef as forwardRef3,
1333
+ useCallback as useCallback6,
1333
1334
  useContext as useContext17,
1334
1335
  useEffect as useEffect3,
1335
1336
  useMemo as useMemo14,
@@ -1786,6 +1787,18 @@ var hiddenField = {
1786
1787
  default: false,
1787
1788
  description: "Hidden"
1788
1789
  };
1790
+ var showInTimelineField = {
1791
+ type: "hidden"
1792
+ };
1793
+ var sequenceNameField = {
1794
+ type: "hidden"
1795
+ };
1796
+ var extendSchemaWithSequenceName = (schema) => {
1797
+ return {
1798
+ name: sequenceNameField,
1799
+ ...schema
1800
+ };
1801
+ };
1789
1802
  var durationInFramesField = {
1790
1803
  type: "number",
1791
1804
  default: undefined,
@@ -1799,9 +1812,17 @@ var fromField = {
1799
1812
  step: 1,
1800
1813
  hiddenFromList: true
1801
1814
  };
1802
- var sequenceSchema = {
1815
+ var freezeField = {
1816
+ type: "number",
1817
+ default: null,
1818
+ step: 1,
1819
+ hiddenFromList: true
1820
+ };
1821
+ var sequenceSchema = extendSchemaWithSequenceName({
1803
1822
  hidden: hiddenField,
1823
+ showInTimeline: showInTimelineField,
1804
1824
  from: fromField,
1825
+ freeze: freezeField,
1805
1826
  durationInFrames: durationInFramesField,
1806
1827
  layout: {
1807
1828
  type: "enum",
@@ -1812,12 +1833,14 @@ var sequenceSchema = {
1812
1833
  none: {}
1813
1834
  }
1814
1835
  }
1815
- };
1816
- var sequenceSchemaWithoutFrom = {
1836
+ });
1837
+ var sequenceSchemaWithoutFrom = extendSchemaWithSequenceName({
1817
1838
  hidden: hiddenField,
1839
+ showInTimeline: showInTimelineField,
1840
+ freeze: freezeField,
1818
1841
  durationInFrames: durationInFramesField,
1819
1842
  layout: sequenceSchema.layout
1820
- };
1843
+ });
1821
1844
  var sequenceSchemaDefaultLayoutNone = {
1822
1845
  ...sequenceSchema,
1823
1846
  layout: {
@@ -2182,83 +2205,6 @@ function bezier(mX1, mY1, mX2, mY2) {
2182
2205
  };
2183
2206
  }
2184
2207
 
2185
- // src/easing.ts
2186
- var clampUnit = (t) => Math.min(1, Math.max(0, t));
2187
-
2188
- class Easing {
2189
- static step0(n) {
2190
- return n > 0 ? 1 : 0;
2191
- }
2192
- static step1(n) {
2193
- return n >= 1 ? 1 : 0;
2194
- }
2195
- static linear(t) {
2196
- return t;
2197
- }
2198
- static ease(t) {
2199
- return Easing.bezier(0.42, 0, 1, 1)(t);
2200
- }
2201
- static quad(t) {
2202
- return t * t;
2203
- }
2204
- static cubic(t) {
2205
- return t * t * t;
2206
- }
2207
- static poly(n) {
2208
- return (t) => t ** n;
2209
- }
2210
- static sin(t) {
2211
- return 1 - Math.cos(t * Math.PI / 2);
2212
- }
2213
- static circle(t) {
2214
- const u = clampUnit(t);
2215
- return 1 - Math.sqrt(1 - u * u);
2216
- }
2217
- static exp(t) {
2218
- return 2 ** (10 * (t - 1));
2219
- }
2220
- static elastic(bounciness = 1) {
2221
- const p = bounciness * Math.PI;
2222
- return (t) => 1 - Math.cos(t * Math.PI / 2) ** 3 * Math.cos(t * p);
2223
- }
2224
- static back(s = 1.70158) {
2225
- return (t) => t * t * ((s + 1) * t - s);
2226
- }
2227
- static bounce(t) {
2228
- const u = clampUnit(t);
2229
- if (u < 1 / 2.75) {
2230
- return 7.5625 * u * u;
2231
- }
2232
- if (u < 2 / 2.75) {
2233
- const t2_ = u - 1.5 / 2.75;
2234
- return 7.5625 * t2_ * t2_ + 0.75;
2235
- }
2236
- if (u < 2.5 / 2.75) {
2237
- const t2_ = u - 2.25 / 2.75;
2238
- return 7.5625 * t2_ * t2_ + 0.9375;
2239
- }
2240
- const t2 = u - 2.625 / 2.75;
2241
- return 7.5625 * t2 * t2 + 0.984375;
2242
- }
2243
- static bezier(x1, y1, x2, y2) {
2244
- return bezier(x1, y1, x2, y2);
2245
- }
2246
- static in(easing) {
2247
- return easing;
2248
- }
2249
- static out(easing) {
2250
- return (t) => 1 - easing(1 - t);
2251
- }
2252
- static inOut(easing) {
2253
- return (t) => {
2254
- if (t < 0.5) {
2255
- return easing(t * 2) / 2;
2256
- }
2257
- return 1 - easing((1 - t) * 2) / 2;
2258
- };
2259
- }
2260
- }
2261
-
2262
2208
  // src/normalize-number.ts
2263
2209
  var normalizeNumber = (value) => {
2264
2210
  return Math.round(value * 1e6) / 1e6;
@@ -2765,119 +2711,481 @@ function interpolate(input, inputRange, outputRange, options) {
2765
2711
  return interpolateNumber({ input, inputRange, outputRange, options });
2766
2712
  }
2767
2713
 
2768
- // src/interpolate-colors.ts
2769
- var NUMBER = "[-+]?\\d*\\.?\\d+";
2770
- var PERCENTAGE = NUMBER + "%";
2771
- function call(...args) {
2772
- return "\\(\\s*(" + args.join(")\\s*,\\s*(") + ")\\s*\\)";
2773
- }
2774
- var MODERN_VALUE = "(?:none|[-+]?\\d*\\.?\\d+(?:%|deg|rad|grad|turn)?)";
2775
- function modernColorCall(name) {
2776
- return new RegExp(name + "\\(\\s*(" + MODERN_VALUE + ")\\s+(" + MODERN_VALUE + ")\\s+(" + MODERN_VALUE + ")(?:\\s*\\/\\s*(" + MODERN_VALUE + "))?\\s*\\)");
2777
- }
2778
- function getMatchers() {
2779
- const cachedMatchers = {
2780
- rgb: undefined,
2781
- rgba: undefined,
2782
- hsl: undefined,
2783
- hsla: undefined,
2784
- hex3: undefined,
2785
- hex4: undefined,
2786
- hex5: undefined,
2787
- hex6: undefined,
2788
- hex8: undefined,
2789
- oklch: undefined,
2790
- oklab: undefined,
2791
- lab: undefined,
2792
- lch: undefined,
2793
- hwb: undefined
2794
- };
2795
- if (cachedMatchers.rgb === undefined) {
2796
- cachedMatchers.rgb = new RegExp("rgb" + call(NUMBER, NUMBER, NUMBER));
2797
- cachedMatchers.rgba = new RegExp("rgba" + call(NUMBER, NUMBER, NUMBER, NUMBER));
2798
- cachedMatchers.hsl = new RegExp("hsl" + call(NUMBER, PERCENTAGE, PERCENTAGE));
2799
- cachedMatchers.hsla = new RegExp("hsla" + call(NUMBER, PERCENTAGE, PERCENTAGE, NUMBER));
2800
- cachedMatchers.hex3 = /^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/;
2801
- cachedMatchers.hex4 = /^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/;
2802
- cachedMatchers.hex6 = /^#([0-9a-fA-F]{6})$/;
2803
- cachedMatchers.hex8 = /^#([0-9a-fA-F]{8})$/;
2804
- cachedMatchers.oklch = modernColorCall("oklch");
2805
- cachedMatchers.oklab = modernColorCall("oklab");
2806
- cachedMatchers.lab = modernColorCall("lab");
2807
- cachedMatchers.lch = modernColorCall("lch");
2808
- cachedMatchers.hwb = modernColorCall("hwb");
2714
+ // src/validate-frame.ts
2715
+ var validateFrame = ({
2716
+ allowFloats,
2717
+ durationInFrames,
2718
+ frame
2719
+ }) => {
2720
+ if (typeof frame === "undefined") {
2721
+ throw new TypeError(`Argument missing for parameter "frame"`);
2809
2722
  }
2810
- return cachedMatchers;
2811
- }
2812
- function hue2rgb(p, q, t) {
2813
- if (t < 0) {
2814
- t += 1;
2723
+ if (typeof frame !== "number") {
2724
+ throw new TypeError(`Argument passed for "frame" is not a number: ${frame}`);
2815
2725
  }
2816
- if (t > 1) {
2817
- t -= 1;
2726
+ if (!Number.isFinite(frame)) {
2727
+ throw new RangeError(`Frame ${frame} is not finite`);
2818
2728
  }
2819
- if (t < 1 / 6) {
2820
- return p + (q - p) * 6 * t;
2729
+ if (frame % 1 !== 0 && !allowFloats) {
2730
+ throw new RangeError(`Argument for frame must be an integer, but got ${frame}`);
2821
2731
  }
2822
- if (t < 1 / 2) {
2823
- return q;
2732
+ if (frame < 0 && frame < -durationInFrames) {
2733
+ throw new RangeError(`Cannot use frame ${frame}: Duration of composition is ${durationInFrames}, therefore the lowest frame that can be rendered is ${-durationInFrames}`);
2824
2734
  }
2825
- if (t < 2 / 3) {
2826
- return p + (q - p) * (2 / 3 - t) * 6;
2735
+ if (frame > durationInFrames - 1) {
2736
+ throw new RangeError(`Cannot use frame ${frame}: Duration of composition is ${durationInFrames}, therefore the highest frame that can be rendered is ${durationInFrames - 1}`);
2827
2737
  }
2828
- return p;
2829
- }
2830
- function hslToRgb(h, s, l) {
2831
- const q = l < 0.5 ? l * (1 + s) : l + s - l * s;
2832
- const p = 2 * l - q;
2833
- const r = hue2rgb(p, q, h + 1 / 3);
2834
- const g = hue2rgb(p, q, h);
2835
- const b2 = hue2rgb(p, q, h - 1 / 3);
2836
- return Math.round(r * 255) << 24 | Math.round(g * 255) << 16 | Math.round(b2 * 255) << 8;
2837
- }
2838
- function parse255(str) {
2839
- const int = Number.parseInt(str, 10);
2840
- if (int < 0) {
2841
- return 0;
2738
+ };
2739
+
2740
+ // src/validation/validation-spring-duration.ts
2741
+ var validateSpringDuration = (dur) => {
2742
+ if (typeof dur === "undefined") {
2743
+ return;
2842
2744
  }
2843
- if (int > 255) {
2844
- return 255;
2745
+ if (typeof dur !== "number") {
2746
+ throw new TypeError(`A "duration" of a spring must be a "number" but is "${typeof dur}"`);
2845
2747
  }
2846
- return int;
2847
- }
2848
- function parse360(str) {
2849
- const int = Number.parseFloat(str);
2850
- return (int % 360 + 360) % 360 / 360;
2851
- }
2852
- function parse1(str) {
2853
- const num = Number.parseFloat(str);
2854
- if (num < 0) {
2855
- return 0;
2748
+ if (Number.isNaN(dur)) {
2749
+ throw new TypeError('A "duration" of a spring is NaN, which it must not be');
2856
2750
  }
2857
- if (num > 1) {
2858
- return 255;
2751
+ if (!Number.isFinite(dur)) {
2752
+ throw new TypeError('A "duration" of a spring must be finite, but is ' + dur);
2859
2753
  }
2860
- return Math.round(num * 255);
2861
- }
2862
- function parsePercentage(str) {
2863
- const int = Number.parseFloat(str);
2864
- if (int < 0) {
2865
- return 0;
2754
+ if (dur <= 0) {
2755
+ throw new TypeError('A "duration" of a spring must be positive, but is ' + dur);
2866
2756
  }
2867
- if (int > 100) {
2868
- return 1;
2757
+ };
2758
+
2759
+ // src/spring/spring-utils.ts
2760
+ var defaultSpringConfig = {
2761
+ damping: 10,
2762
+ mass: 1,
2763
+ stiffness: 100,
2764
+ overshootClamping: false
2765
+ };
2766
+ var advanceCache = {};
2767
+ function advance({
2768
+ animation,
2769
+ now,
2770
+ config
2771
+ }) {
2772
+ const { toValue, lastTimestamp, current, velocity } = animation;
2773
+ const deltaTime = Math.min(now - lastTimestamp, 64);
2774
+ if (config.damping <= 0) {
2775
+ throw new Error("Spring damping must be greater than 0, otherwise the spring() animation will never end, causing an infinite loop.");
2869
2776
  }
2870
- return int / 100;
2871
- }
2872
- function parseModernComponent(str, percentScale) {
2873
- if (str === "none")
2874
- return 0;
2875
- if (str.endsWith("%")) {
2876
- return Number.parseFloat(str) / 100 * percentScale;
2777
+ const c2 = config.damping;
2778
+ const m = config.mass;
2779
+ const k = config.stiffness;
2780
+ const cacheKey = [
2781
+ toValue,
2782
+ lastTimestamp,
2783
+ current,
2784
+ velocity,
2785
+ c2,
2786
+ m,
2787
+ k,
2788
+ now
2789
+ ].join("-");
2790
+ if (advanceCache[cacheKey]) {
2791
+ return advanceCache[cacheKey];
2877
2792
  }
2878
- return Number.parseFloat(str);
2879
- }
2880
- function parseHueAngle(str) {
2793
+ const v0 = -velocity;
2794
+ const x0 = toValue - current;
2795
+ const zeta = c2 / (2 * Math.sqrt(k * m));
2796
+ const omega0 = Math.sqrt(k / m);
2797
+ const omega1 = omega0 * Math.sqrt(1 - zeta ** 2);
2798
+ const t = deltaTime / 1000;
2799
+ const sin1 = Math.sin(omega1 * t);
2800
+ const cos1 = Math.cos(omega1 * t);
2801
+ const underDampedEnvelope = Math.exp(-zeta * omega0 * t);
2802
+ const underDampedFrag1 = underDampedEnvelope * (sin1 * ((v0 + zeta * omega0 * x0) / omega1) + x0 * cos1);
2803
+ const underDampedPosition = toValue - underDampedFrag1;
2804
+ const underDampedVelocity = zeta * omega0 * underDampedFrag1 - underDampedEnvelope * (cos1 * (v0 + zeta * omega0 * x0) - omega1 * x0 * sin1);
2805
+ const criticallyDampedEnvelope = Math.exp(-omega0 * t);
2806
+ const criticallyDampedPosition = toValue - criticallyDampedEnvelope * (x0 + (v0 + omega0 * x0) * t);
2807
+ const criticallyDampedVelocity = criticallyDampedEnvelope * (v0 * (t * omega0 - 1) + t * x0 * omega0 * omega0);
2808
+ const animationNode = {
2809
+ toValue,
2810
+ prevPosition: current,
2811
+ lastTimestamp: now,
2812
+ current: zeta < 1 ? underDampedPosition : criticallyDampedPosition,
2813
+ velocity: zeta < 1 ? underDampedVelocity : criticallyDampedVelocity
2814
+ };
2815
+ advanceCache[cacheKey] = animationNode;
2816
+ return animationNode;
2817
+ }
2818
+ var calculationCache = {};
2819
+ function springCalculation({
2820
+ frame,
2821
+ fps,
2822
+ config = {}
2823
+ }) {
2824
+ const from = 0;
2825
+ const to = 1;
2826
+ const cacheKey = [
2827
+ frame,
2828
+ fps,
2829
+ config.damping,
2830
+ config.mass,
2831
+ config.overshootClamping,
2832
+ config.stiffness
2833
+ ].join("-");
2834
+ if (calculationCache[cacheKey]) {
2835
+ return calculationCache[cacheKey];
2836
+ }
2837
+ let animation = {
2838
+ lastTimestamp: 0,
2839
+ current: from,
2840
+ toValue: to,
2841
+ velocity: 0,
2842
+ prevPosition: 0
2843
+ };
2844
+ const frameClamped = Math.max(0, frame);
2845
+ const unevenRest = frameClamped % 1;
2846
+ for (let f = 0;f <= Math.floor(frameClamped); f++) {
2847
+ if (f === Math.floor(frameClamped)) {
2848
+ f += unevenRest;
2849
+ }
2850
+ const time = f / fps * 1000;
2851
+ animation = advance({
2852
+ animation,
2853
+ now: time,
2854
+ config: {
2855
+ ...defaultSpringConfig,
2856
+ ...config
2857
+ }
2858
+ });
2859
+ }
2860
+ calculationCache[cacheKey] = animation;
2861
+ return animation;
2862
+ }
2863
+
2864
+ // src/spring/measure-spring.ts
2865
+ var cache = new Map;
2866
+ function measureSpring({
2867
+ fps,
2868
+ config = {},
2869
+ threshold = 0.005
2870
+ }) {
2871
+ if (typeof threshold !== "number") {
2872
+ throw new TypeError(`threshold must be a number, got ${threshold} of type ${typeof threshold}`);
2873
+ }
2874
+ if (threshold === 0) {
2875
+ return Infinity;
2876
+ }
2877
+ if (threshold === 1) {
2878
+ return 0;
2879
+ }
2880
+ if (isNaN(threshold)) {
2881
+ throw new TypeError("Threshold is NaN");
2882
+ }
2883
+ if (!Number.isFinite(threshold)) {
2884
+ throw new TypeError("Threshold is not finite");
2885
+ }
2886
+ if (threshold < 0) {
2887
+ throw new TypeError("Threshold is below 0");
2888
+ }
2889
+ const cacheKey = [
2890
+ fps,
2891
+ config.damping,
2892
+ config.mass,
2893
+ config.overshootClamping,
2894
+ config.stiffness,
2895
+ threshold
2896
+ ].join("-");
2897
+ if (cache.has(cacheKey)) {
2898
+ return cache.get(cacheKey);
2899
+ }
2900
+ validateFps(fps, "to the measureSpring() function", false);
2901
+ let frame = 0;
2902
+ let finishedFrame = 0;
2903
+ const calc = () => {
2904
+ return springCalculation({
2905
+ fps,
2906
+ frame,
2907
+ config
2908
+ });
2909
+ };
2910
+ let animation = calc();
2911
+ const calcDifference = () => {
2912
+ return Math.abs(animation.current - animation.toValue);
2913
+ };
2914
+ let difference = calcDifference();
2915
+ while (difference >= threshold) {
2916
+ frame++;
2917
+ animation = calc();
2918
+ difference = calcDifference();
2919
+ }
2920
+ finishedFrame = frame;
2921
+ for (let i = 0;i < 20; i++) {
2922
+ frame++;
2923
+ animation = calc();
2924
+ difference = calcDifference();
2925
+ if (difference >= threshold) {
2926
+ i = 0;
2927
+ finishedFrame = frame + 1;
2928
+ }
2929
+ }
2930
+ cache.set(cacheKey, finishedFrame);
2931
+ return finishedFrame;
2932
+ }
2933
+
2934
+ // src/spring/index.ts
2935
+ function spring({
2936
+ frame: passedFrame,
2937
+ fps,
2938
+ config = {},
2939
+ from = 0,
2940
+ to = 1,
2941
+ durationInFrames: passedDurationInFrames,
2942
+ durationRestThreshold,
2943
+ delay = 0,
2944
+ reverse = false
2945
+ }) {
2946
+ validateSpringDuration(passedDurationInFrames);
2947
+ validateFrame({
2948
+ frame: passedFrame,
2949
+ durationInFrames: Infinity,
2950
+ allowFloats: true
2951
+ });
2952
+ validateFps(fps, "to spring()", false);
2953
+ const needsToCalculateNaturalDuration = reverse || typeof passedDurationInFrames !== "undefined";
2954
+ const naturalDuration = needsToCalculateNaturalDuration ? measureSpring({
2955
+ fps,
2956
+ config,
2957
+ threshold: durationRestThreshold
2958
+ }) : undefined;
2959
+ const naturalDurationGetter = needsToCalculateNaturalDuration ? {
2960
+ get: () => naturalDuration
2961
+ } : {
2962
+ get: () => {
2963
+ throw new Error("did not calculate natural duration, this is an error with Remotion. Please report");
2964
+ }
2965
+ };
2966
+ const reverseProcessed = reverse ? (passedDurationInFrames ?? naturalDurationGetter.get()) - passedFrame : passedFrame;
2967
+ const delayProcessed = reverseProcessed + (reverse ? delay : -delay);
2968
+ const durationProcessed = passedDurationInFrames === undefined ? delayProcessed : delayProcessed / (passedDurationInFrames / naturalDurationGetter.get());
2969
+ if (passedDurationInFrames && delayProcessed > passedDurationInFrames) {
2970
+ return to;
2971
+ }
2972
+ const spr = springCalculation({
2973
+ fps,
2974
+ frame: durationProcessed,
2975
+ config
2976
+ });
2977
+ const inner = config.overshootClamping ? to >= from ? Math.min(spr.current, to) : Math.max(spr.current, to) : spr.current;
2978
+ const interpolated = from === 0 && to === 1 ? inner : interpolate(inner, [0, 1], [from, to]);
2979
+ return interpolated;
2980
+ }
2981
+
2982
+ // src/easing.ts
2983
+ var clampUnit = (t) => Math.min(1, Math.max(0, t));
2984
+ var springEasingDurationInFrames = 30;
2985
+
2986
+ class Easing {
2987
+ static step0(n) {
2988
+ return n > 0 ? 1 : 0;
2989
+ }
2990
+ static step1(n) {
2991
+ return n >= 1 ? 1 : 0;
2992
+ }
2993
+ static linear(t) {
2994
+ return t;
2995
+ }
2996
+ static ease(t) {
2997
+ return Easing.bezier(0.42, 0, 1, 1)(t);
2998
+ }
2999
+ static quad(t) {
3000
+ return t * t;
3001
+ }
3002
+ static cubic(t) {
3003
+ return t * t * t;
3004
+ }
3005
+ static poly(n) {
3006
+ return (t) => t ** n;
3007
+ }
3008
+ static sin(t) {
3009
+ return 1 - Math.cos(t * Math.PI / 2);
3010
+ }
3011
+ static circle(t) {
3012
+ const u = clampUnit(t);
3013
+ return 1 - Math.sqrt(1 - u * u);
3014
+ }
3015
+ static exp(t) {
3016
+ return 2 ** (10 * (t - 1));
3017
+ }
3018
+ static elastic(bounciness = 1) {
3019
+ const p = bounciness * Math.PI;
3020
+ return (t) => 1 - Math.cos(t * Math.PI / 2) ** 3 * Math.cos(t * p);
3021
+ }
3022
+ static back(s = 1.70158) {
3023
+ return (t) => t * t * ((s + 1) * t - s);
3024
+ }
3025
+ static spring(config = {}) {
3026
+ return (t) => {
3027
+ if (t <= 0) {
3028
+ return 0;
3029
+ }
3030
+ if (t >= 1) {
3031
+ return 1;
3032
+ }
3033
+ return spring({
3034
+ fps: springEasingDurationInFrames,
3035
+ frame: t * springEasingDurationInFrames,
3036
+ config,
3037
+ durationInFrames: springEasingDurationInFrames
3038
+ });
3039
+ };
3040
+ }
3041
+ static bounce(t) {
3042
+ const u = clampUnit(t);
3043
+ if (u < 1 / 2.75) {
3044
+ return 7.5625 * u * u;
3045
+ }
3046
+ if (u < 2 / 2.75) {
3047
+ const t2_ = u - 1.5 / 2.75;
3048
+ return 7.5625 * t2_ * t2_ + 0.75;
3049
+ }
3050
+ if (u < 2.5 / 2.75) {
3051
+ const t2_ = u - 2.25 / 2.75;
3052
+ return 7.5625 * t2_ * t2_ + 0.9375;
3053
+ }
3054
+ const t2 = u - 2.625 / 2.75;
3055
+ return 7.5625 * t2 * t2 + 0.984375;
3056
+ }
3057
+ static bezier(x1, y1, x2, y2) {
3058
+ return bezier(x1, y1, x2, y2);
3059
+ }
3060
+ static in(easing) {
3061
+ return easing;
3062
+ }
3063
+ static out(easing) {
3064
+ return (t) => 1 - easing(1 - t);
3065
+ }
3066
+ static inOut(easing) {
3067
+ return (t) => {
3068
+ if (t < 0.5) {
3069
+ return easing(t * 2) / 2;
3070
+ }
3071
+ return 1 - easing((1 - t) * 2) / 2;
3072
+ };
3073
+ }
3074
+ }
3075
+
3076
+ // src/interpolate-colors.ts
3077
+ var NUMBER = "[-+]?\\d*\\.?\\d+";
3078
+ var PERCENTAGE = NUMBER + "%";
3079
+ function call(...args) {
3080
+ return "\\(\\s*(" + args.join(")\\s*,\\s*(") + ")\\s*\\)";
3081
+ }
3082
+ var MODERN_VALUE = "(?:none|[-+]?\\d*\\.?\\d+(?:%|deg|rad|grad|turn)?)";
3083
+ function modernColorCall(name) {
3084
+ return new RegExp(name + "\\(\\s*(" + MODERN_VALUE + ")\\s+(" + MODERN_VALUE + ")\\s+(" + MODERN_VALUE + ")(?:\\s*\\/\\s*(" + MODERN_VALUE + "))?\\s*\\)");
3085
+ }
3086
+ function getMatchers() {
3087
+ const cachedMatchers = {
3088
+ rgb: undefined,
3089
+ rgba: undefined,
3090
+ hsl: undefined,
3091
+ hsla: undefined,
3092
+ hex3: undefined,
3093
+ hex4: undefined,
3094
+ hex5: undefined,
3095
+ hex6: undefined,
3096
+ hex8: undefined,
3097
+ oklch: undefined,
3098
+ oklab: undefined,
3099
+ lab: undefined,
3100
+ lch: undefined,
3101
+ hwb: undefined
3102
+ };
3103
+ if (cachedMatchers.rgb === undefined) {
3104
+ cachedMatchers.rgb = new RegExp("rgb" + call(NUMBER, NUMBER, NUMBER));
3105
+ cachedMatchers.rgba = new RegExp("rgba" + call(NUMBER, NUMBER, NUMBER, NUMBER));
3106
+ cachedMatchers.hsl = new RegExp("hsl" + call(NUMBER, PERCENTAGE, PERCENTAGE));
3107
+ cachedMatchers.hsla = new RegExp("hsla" + call(NUMBER, PERCENTAGE, PERCENTAGE, NUMBER));
3108
+ cachedMatchers.hex3 = /^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/;
3109
+ cachedMatchers.hex4 = /^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/;
3110
+ cachedMatchers.hex6 = /^#([0-9a-fA-F]{6})$/;
3111
+ cachedMatchers.hex8 = /^#([0-9a-fA-F]{8})$/;
3112
+ cachedMatchers.oklch = modernColorCall("oklch");
3113
+ cachedMatchers.oklab = modernColorCall("oklab");
3114
+ cachedMatchers.lab = modernColorCall("lab");
3115
+ cachedMatchers.lch = modernColorCall("lch");
3116
+ cachedMatchers.hwb = modernColorCall("hwb");
3117
+ }
3118
+ return cachedMatchers;
3119
+ }
3120
+ function hue2rgb(p, q, t) {
3121
+ if (t < 0) {
3122
+ t += 1;
3123
+ }
3124
+ if (t > 1) {
3125
+ t -= 1;
3126
+ }
3127
+ if (t < 1 / 6) {
3128
+ return p + (q - p) * 6 * t;
3129
+ }
3130
+ if (t < 1 / 2) {
3131
+ return q;
3132
+ }
3133
+ if (t < 2 / 3) {
3134
+ return p + (q - p) * (2 / 3 - t) * 6;
3135
+ }
3136
+ return p;
3137
+ }
3138
+ function hslToRgb(h, s, l) {
3139
+ const q = l < 0.5 ? l * (1 + s) : l + s - l * s;
3140
+ const p = 2 * l - q;
3141
+ const r = hue2rgb(p, q, h + 1 / 3);
3142
+ const g = hue2rgb(p, q, h);
3143
+ const b2 = hue2rgb(p, q, h - 1 / 3);
3144
+ return Math.round(r * 255) << 24 | Math.round(g * 255) << 16 | Math.round(b2 * 255) << 8;
3145
+ }
3146
+ function parse255(str) {
3147
+ const int = Number.parseInt(str, 10);
3148
+ if (int < 0) {
3149
+ return 0;
3150
+ }
3151
+ if (int > 255) {
3152
+ return 255;
3153
+ }
3154
+ return int;
3155
+ }
3156
+ function parse360(str) {
3157
+ const int = Number.parseFloat(str);
3158
+ return (int % 360 + 360) % 360 / 360;
3159
+ }
3160
+ function parse1(str) {
3161
+ const num = Number.parseFloat(str);
3162
+ if (num < 0) {
3163
+ return 0;
3164
+ }
3165
+ if (num > 1) {
3166
+ return 255;
3167
+ }
3168
+ return Math.round(num * 255);
3169
+ }
3170
+ function parsePercentage(str) {
3171
+ const int = Number.parseFloat(str);
3172
+ if (int < 0) {
3173
+ return 0;
3174
+ }
3175
+ if (int > 100) {
3176
+ return 1;
3177
+ }
3178
+ return int / 100;
3179
+ }
3180
+ function parseModernComponent(str, percentScale) {
3181
+ if (str === "none")
3182
+ return 0;
3183
+ if (str.endsWith("%")) {
3184
+ return Number.parseFloat(str) / 100 * percentScale;
3185
+ }
3186
+ return Number.parseFloat(str);
3187
+ }
3188
+ function parseHueAngle(str) {
2881
3189
  if (str === "none")
2882
3190
  return 0;
2883
3191
  if (str.endsWith("rad")) {
@@ -3776,10 +4084,12 @@ var mergeValues = ({
3776
4084
  var stackToOverrideMap = {};
3777
4085
  var wrapInSchema = ({
3778
4086
  Component,
4087
+ componentIdentity,
3779
4088
  schema,
3780
4089
  supportsEffects
3781
4090
  }) => {
3782
- const flatSchema = getFlatSchemaWithAllKeys(schema);
4091
+ const schemaWithSequenceName = extendSchemaWithSequenceName(schema);
4092
+ const flatSchema = getFlatSchemaWithAllKeys(schemaWithSequenceName);
3783
4093
  const flatKeys = Object.keys(flatSchema);
3784
4094
  const Wrapped = forwardRef2((props, ref) => {
3785
4095
  const env = useRemotionEnvironment();
@@ -3818,15 +4128,16 @@ var wrapInSchema = ({
3818
4128
  const currentRuntimeValueDotNotation = useMemo13(() => readValuesFromProps(props, flatKeys), runtimeValues);
3819
4129
  const controls = useMemo13(() => {
3820
4130
  return {
3821
- schema,
4131
+ schema: schemaWithSequenceName,
3822
4132
  currentRuntimeValueDotNotation,
3823
4133
  overrideId,
3824
- supportsEffects
4134
+ supportsEffects,
4135
+ componentIdentity
3825
4136
  };
3826
4137
  }, [currentRuntimeValueDotNotation, overrideId]);
3827
4138
  const { merged: valuesDotNotation, propsToDelete } = useMemo13(() => {
3828
4139
  return computeEffectiveSchemaValuesDotNotation({
3829
- schema,
4140
+ schema: schemaWithSequenceName,
3830
4141
  currentValue: currentRuntimeValueDotNotation,
3831
4142
  overrideValues: nodePath === null ? {} : getDragOverrides(nodePath),
3832
4143
  propStatus: nodePath === null ? undefined : getPropStatusesCtx(propStatuses, nodePath),
@@ -3839,7 +4150,7 @@ var wrapInSchema = ({
3839
4150
  propStatuses,
3840
4151
  frame
3841
4152
  ]);
3842
- const activeKeys = selectActiveKeys(schema, valuesDotNotation);
4153
+ const activeKeys = selectActiveKeys(schemaWithSequenceName, valuesDotNotation);
3843
4154
  const mergedProps = mergeValues({
3844
4155
  props,
3845
4156
  valuesDotNotation,
@@ -3861,6 +4172,7 @@ import { jsx as jsx12 } from "react/jsx-runtime";
3861
4172
  var EMPTY_EFFECTS = [];
3862
4173
  var RegularSequenceRefForwardingFunction = ({
3863
4174
  from = 0,
4175
+ freeze,
3864
4176
  durationInFrames = Infinity,
3865
4177
  children,
3866
4178
  name,
@@ -3876,7 +4188,7 @@ var RegularSequenceRefForwardingFunction = ({
3876
4188
  _remotionInternalPremountDisplay: premountDisplay,
3877
4189
  _remotionInternalPostmountDisplay: postmountDisplay,
3878
4190
  _remotionInternalIsMedia: isMedia,
3879
- _remotionInternalRefForOutline: refForOutline,
4191
+ _remotionInternalRefForOutline: passedRefForOutline,
3880
4192
  ...other
3881
4193
  }, ref) => {
3882
4194
  const { layout = "absolute-fill" } = other;
@@ -3884,6 +4196,7 @@ var RegularSequenceRefForwardingFunction = ({
3884
4196
  const parentSequence = useContext17(SequenceContext);
3885
4197
  const { rootId } = useTimelineContext();
3886
4198
  const cumulatedFrom = parentSequence ? parentSequence.cumulatedFrom + parentSequence.relativeFrom : 0;
4199
+ const absoluteFrom = (parentSequence?.absoluteFrom ?? 0) + from;
3887
4200
  const nonce = useNonce();
3888
4201
  if (layout !== "absolute-fill" && layout !== "none") {
3889
4202
  throw new TypeError(`The layout prop of <Sequence /> expects either "absolute-fill" or "none", but you passed: ${layout}`);
@@ -3903,11 +4216,24 @@ var RegularSequenceRefForwardingFunction = ({
3903
4216
  if (!Number.isFinite(from)) {
3904
4217
  throw new TypeError(`The "from" prop of a sequence must be finite, but got ${from}.`);
3905
4218
  }
4219
+ if (typeof freeze !== "undefined" && freeze !== null) {
4220
+ if (typeof freeze !== "number") {
4221
+ throw new TypeError(`The "freeze" prop of <Sequence /> must be a number, but is of type ${typeof freeze}.`);
4222
+ }
4223
+ if (Number.isNaN(freeze)) {
4224
+ throw new TypeError(`The "freeze" prop of <Sequence /> must be a real number, but it is NaN.`);
4225
+ }
4226
+ if (!Number.isFinite(freeze)) {
4227
+ throw new TypeError(`The "freeze" prop of <Sequence /> must be finite, but it is ${freeze}.`);
4228
+ }
4229
+ }
3906
4230
  const absoluteFrame = useTimelinePosition();
3907
4231
  const videoConfig = useVideoConfig();
3908
4232
  const parentSequenceDuration = parentSequence ? Math.min(parentSequence.durationInFrames - from, durationInFrames) : durationInFrames;
3909
4233
  const actualDurationInFrames = Math.max(0, Math.min(videoConfig.durationInFrames - from, parentSequenceDuration));
3910
4234
  const { registerSequence, unregisterSequence } = useContext17(SequenceManager);
4235
+ const wrapperRefForOutline = useRef6(null);
4236
+ const refForOutline = other.layout === "none" ? passedRefForOutline ?? null : passedRefForOutline ?? wrapperRefForOutline;
3911
4237
  const premounting = useMemo14(() => {
3912
4238
  return parentSequence?.premounting || Boolean(other._remotionInternalIsPremounting);
3913
4239
  }, [other._remotionInternalIsPremounting, parentSequence?.premounting]);
@@ -3921,6 +4247,7 @@ var RegularSequenceRefForwardingFunction = ({
3921
4247
  const cumulatedNegativeFrom = currentSequenceStart - firstFrame;
3922
4248
  const contextValue = useMemo14(() => {
3923
4249
  return {
4250
+ absoluteFrom,
3924
4251
  cumulatedFrom,
3925
4252
  relativeFrom: from,
3926
4253
  cumulatedNegativeFrom,
@@ -3936,6 +4263,7 @@ var RegularSequenceRefForwardingFunction = ({
3936
4263
  };
3937
4264
  }, [
3938
4265
  cumulatedFrom,
4266
+ absoluteFrom,
3939
4267
  from,
3940
4268
  actualDurationInFrames,
3941
4269
  parentSequence,
@@ -3951,7 +4279,7 @@ var RegularSequenceRefForwardingFunction = ({
3951
4279
  const timelineClipName = useMemo14(() => {
3952
4280
  return name ?? "";
3953
4281
  }, [name]);
3954
- const resolvedDocumentationLink = documentationLink ?? (name === undefined ? "https://www.remotion.dev/docs/sequence" : null);
4282
+ const resolvedDocumentationLink = documentationLink ?? "https://www.remotion.dev/docs/sequence";
3955
4283
  const env = useRemotionEnvironment();
3956
4284
  const isInsideSeries = useContext17(IsInsideSeriesContext);
3957
4285
  const inheritedStack = other?.stack ?? null;
@@ -4064,7 +4392,19 @@ var RegularSequenceRefForwardingFunction = ({
4064
4392
  ]);
4065
4393
  const endThreshold = Math.ceil(cumulatedFrom + from + durationInFrames - 1);
4066
4394
  const content = absoluteFrame < cumulatedFrom + from ? null : absoluteFrame > endThreshold ? null : children;
4395
+ const frozenContent = content === null || typeof freeze === "undefined" || freeze === null ? content : /* @__PURE__ */ jsx12(Freeze, {
4396
+ frame: freeze,
4397
+ children: content
4398
+ });
4067
4399
  const styleIfThere = other.layout === "none" ? undefined : other.style;
4400
+ const sequenceRef = useCallback6((node) => {
4401
+ wrapperRefForOutline.current = node;
4402
+ if (typeof ref === "function") {
4403
+ ref(node);
4404
+ } else if (ref) {
4405
+ ref.current = node;
4406
+ }
4407
+ }, [ref]);
4068
4408
  const defaultStyle = useMemo14(() => {
4069
4409
  return {
4070
4410
  flexDirection: undefined,
@@ -4081,11 +4421,11 @@ var RegularSequenceRefForwardingFunction = ({
4081
4421
  }
4082
4422
  return /* @__PURE__ */ jsx12(SequenceContext.Provider, {
4083
4423
  value: contextValue,
4084
- children: content === null ? null : other.layout === "none" ? content : /* @__PURE__ */ jsx12(AbsoluteFill, {
4085
- ref,
4424
+ children: frozenContent === null ? null : other.layout === "none" ? frozenContent : /* @__PURE__ */ jsx12(AbsoluteFill, {
4425
+ ref: sequenceRef,
4086
4426
  style: defaultStyle,
4087
4427
  className: other.className,
4088
- children: content
4428
+ children: frozenContent
4089
4429
  })
4090
4430
  });
4091
4431
  };
@@ -4165,11 +4505,13 @@ var SequenceInner = forwardRef3(SequenceRefForwardingFunction);
4165
4505
  var SequenceWithoutSchema = SequenceInner;
4166
4506
  var Sequence = wrapInSchema({
4167
4507
  Component: SequenceInner,
4508
+ componentIdentity: "dev.remotion.remotion.Sequence",
4168
4509
  schema: sequenceSchema,
4169
4510
  supportsEffects: false
4170
4511
  });
4171
4512
  var SequenceWithoutFrom = wrapInSchema({
4172
4513
  Component: SequenceInner,
4514
+ componentIdentity: null,
4173
4515
  schema: sequenceSchemaWithoutFrom,
4174
4516
  supportsEffects: false
4175
4517
  });
@@ -4184,7 +4526,7 @@ import {
4184
4526
  } from "react";
4185
4527
 
4186
4528
  // src/animated-image/canvas.tsx
4187
- import React15, { useCallback as useCallback6, useImperativeHandle, useMemo as useMemo16, useRef as useRef8 } from "react";
4529
+ import React15, { useCallback as useCallback7, useImperativeHandle, useMemo as useMemo16, useRef as useRef8 } from "react";
4188
4530
 
4189
4531
  // src/calculate-image-fit.ts
4190
4532
  var calculateImageFit = (fit, imageSize, canvasSize) => {
@@ -4516,7 +4858,7 @@ var CanvasRefForwardingFunction = ({ width, height, fit, className, style, effec
4516
4858
  }
4517
4859
  return document.createElement("canvas");
4518
4860
  }, []);
4519
- const draw = useCallback6((imageData) => {
4861
+ const draw = useCallback7((imageData) => {
4520
4862
  const canvas = canvasRef.current;
4521
4863
  const canvasWidth = width ?? imageData.displayWidth;
4522
4864
  const canvasHeight = height ?? imageData.displayHeight;
@@ -4609,10 +4951,10 @@ var decodeImage = async ({
4609
4951
  if (!selectedTrack) {
4610
4952
  throw new Error("No selected track");
4611
4953
  }
4612
- const cache = [];
4954
+ const cache2 = [];
4613
4955
  let durationFound = null;
4614
4956
  const getFrameByIndex = async (frameIndex) => {
4615
- const foundInCache = cache.find((c2) => c2.frameIndex === frameIndex);
4957
+ const foundInCache = cache2.find((c2) => c2.frameIndex === frameIndex);
4616
4958
  if (foundInCache && foundInCache.frame) {
4617
4959
  return foundInCache;
4618
4960
  }
@@ -4623,7 +4965,7 @@ var decodeImage = async ({
4623
4965
  if (foundInCache) {
4624
4966
  foundInCache.frame = frame.image;
4625
4967
  } else {
4626
- cache.push({
4968
+ cache2.push({
4627
4969
  frame: frame.image,
4628
4970
  frameIndex,
4629
4971
  timeInSeconds: frame.image.timestamp / 1e6
@@ -4636,7 +4978,7 @@ var decodeImage = async ({
4636
4978
  };
4637
4979
  };
4638
4980
  const clearCache = (closeToTimeInSec) => {
4639
- const itemsInCache = cache.filter((c2) => c2.frame);
4981
+ const itemsInCache = cache2.filter((c2) => c2.frame);
4640
4982
  const sortByClosestToCurrentTime = itemsInCache.sort((a2, b2) => {
4641
4983
  const aDiff = Math.abs(a2.timeInSeconds - closeToTimeInSec);
4642
4984
  const bDiff = Math.abs(b2.timeInSeconds - closeToTimeInSec);
@@ -4659,7 +5001,7 @@ var decodeImage = async ({
4659
5001
  loopBehavior,
4660
5002
  timeInSec
4661
5003
  });
4662
- const framesBefore = cache.filter((c2) => c2.timeInSeconds <= actualTimeInSec);
5004
+ const framesBefore = cache2.filter((c2) => c2.timeInSeconds <= actualTimeInSec);
4663
5005
  const biggestIndex = framesBefore.map((c2) => c2.frameIndex).reduce((a2, b2) => Math.max(a2, b2), 0);
4664
5006
  let i = biggestIndex;
4665
5007
  while (true) {
@@ -4702,7 +5044,7 @@ var decodeImage = async ({
4702
5044
  timeInSec
4703
5045
  });
4704
5046
  await ensureFrameBeforeAndAfter({ timeInSec: actualTimeInSec, loopBehavior });
4705
- const itemsInCache = cache.filter((c2) => c2.frame);
5047
+ const itemsInCache = cache2.filter((c2) => c2.frame);
4706
5048
  const closest = itemsInCache.reduce((a2, b2) => {
4707
5049
  const aDiff = Math.abs(a2.timeInSeconds - actualTimeInSec);
4708
5050
  const bDiff = Math.abs(b2.timeInSeconds - actualTimeInSec);
@@ -4746,6 +5088,7 @@ import { jsx as jsx14 } from "react/jsx-runtime";
4746
5088
  var animatedImageSchema = {
4747
5089
  durationInFrames: durationInFramesField,
4748
5090
  from: fromField,
5091
+ freeze: freezeField,
4749
5092
  playbackRate: {
4750
5093
  type: "number",
4751
5094
  min: 0,
@@ -4945,6 +5288,7 @@ var AnimatedImageInner = ({
4945
5288
  };
4946
5289
  var AnimatedImage = wrapInSchema({
4947
5290
  Component: AnimatedImageInner,
5291
+ componentIdentity: "dev.remotion.remotion.AnimatedImage",
4948
5292
  schema: animatedImageSchema,
4949
5293
  supportsEffects: true
4950
5294
  });
@@ -4956,7 +5300,7 @@ import { useContext as useContext18, useLayoutEffect as useLayoutEffect4, useSta
4956
5300
  // src/RenderAssetManager.tsx
4957
5301
  import {
4958
5302
  createContext as createContext17,
4959
- useCallback as useCallback7,
5303
+ useCallback as useCallback8,
4960
5304
  useImperativeHandle as useImperativeHandle3,
4961
5305
  useLayoutEffect as useLayoutEffect3,
4962
5306
  useMemo as useMemo17,
@@ -5009,7 +5353,7 @@ var RenderAssetManager = createContext17({
5009
5353
  var RenderAssetManagerProvider = ({ children, collectAssets }) => {
5010
5354
  const [renderAssets, setRenderAssets] = useState7([]);
5011
5355
  const renderAssetsRef = useRef10([]);
5012
- const registerRenderAsset = useCallback7((renderAsset) => {
5356
+ const registerRenderAsset = useCallback8((renderAsset) => {
5013
5357
  validateRenderAsset(renderAsset);
5014
5358
  renderAssetsRef.current = [...renderAssetsRef.current, renderAsset];
5015
5359
  setRenderAssets(renderAssetsRef.current);
@@ -5026,7 +5370,7 @@ var RenderAssetManagerProvider = ({ children, collectAssets }) => {
5026
5370
  };
5027
5371
  }, []);
5028
5372
  }
5029
- const unregisterRenderAsset = useCallback7((id) => {
5373
+ const unregisterRenderAsset = useCallback8((id) => {
5030
5374
  renderAssetsRef.current = renderAssetsRef.current.filter((a2) => a2.id !== id);
5031
5375
  setRenderAssets(renderAssetsRef.current);
5032
5376
  }, []);
@@ -5113,7 +5457,7 @@ var Artifact = ({ filename, content, downloadBehavior }) => {
5113
5457
  };
5114
5458
  Artifact.Thumbnail = ArtifactThumbnail;
5115
5459
  // src/audio/html5-audio.tsx
5116
- import { forwardRef as forwardRef7, useCallback as useCallback13, useContext as useContext30 } from "react";
5460
+ import { forwardRef as forwardRef7, useCallback as useCallback14, useContext as useContext30 } from "react";
5117
5461
 
5118
5462
  // src/absolute-src.ts
5119
5463
  var getAbsoluteSrc = (relativeSrc) => {
@@ -5200,7 +5544,7 @@ var Loop = ({
5200
5544
  durationInFrames,
5201
5545
  from,
5202
5546
  name: name ?? "<Loop>",
5203
- _remotionInternalDocumentationLink: name === undefined ? "https://www.remotion.dev/docs/loop" : undefined,
5547
+ _remotionInternalDocumentationLink: "https://www.remotion.dev/docs/loop",
5204
5548
  _remotionInternalLoopDisplay: loopDisplay,
5205
5549
  layout: props.layout,
5206
5550
  style,
@@ -5583,7 +5927,7 @@ var DurationsContextProvider = ({ children }) => {
5583
5927
  };
5584
5928
 
5585
5929
  // src/audio/AudioForPreview.tsx
5586
- import { useCallback as useCallback12 } from "react";
5930
+ import { useCallback as useCallback13 } from "react";
5587
5931
  import React22, {
5588
5932
  forwardRef as forwardRef5,
5589
5933
  useContext as useContext28,
@@ -5619,7 +5963,7 @@ import { useContext as useContext21, useLayoutEffect as useLayoutEffect5, useRef
5619
5963
  import React19, {
5620
5964
  createContext as createContext21,
5621
5965
  createRef as createRef2,
5622
- useCallback as useCallback8,
5966
+ useCallback as useCallback9,
5623
5967
  useContext as useContext20,
5624
5968
  useEffect as useEffect7,
5625
5969
  useMemo as useMemo21,
@@ -5903,7 +6247,7 @@ var SharedAudioContextProvider = ({ children, audioLatencyHint, audioEnabled, pr
5903
6247
  }, []);
5904
6248
  const prevEndTimes = useRef12({ scheduledEndTime: null, mediaEndTime: null });
5905
6249
  const nodesToResume = useRef12(new Map);
5906
- const unscheduleAudioNode = useCallback8((node) => {
6250
+ const unscheduleAudioNode = useCallback9((node) => {
5907
6251
  nodesToResume.current.delete(node);
5908
6252
  }, []);
5909
6253
  const scheduleAudioNode = useMemo21(() => {
@@ -5957,7 +6301,7 @@ var SharedAudioContextProvider = ({ children, audioLatencyHint, audioEnabled, pr
5957
6301
  };
5958
6302
  };
5959
6303
  }, [ctxAndGain, logLevel]);
5960
- const resume = useCallback8(() => {
6304
+ const resume = useCallback9(() => {
5961
6305
  if (!ctxAndGain) {
5962
6306
  return Promise.resolve();
5963
6307
  }
@@ -5984,10 +6328,10 @@ var SharedAudioContextProvider = ({ children, audioLatencyHint, audioEnabled, pr
5984
6328
  });
5985
6329
  return resumePromise.catch(() => {});
5986
6330
  }, [ctxAndGain, logLevel]);
5987
- const getIsResumingAudioContext = useCallback8(() => {
6331
+ const getIsResumingAudioContext = useCallback9(() => {
5988
6332
  return isResuming.current;
5989
6333
  }, []);
5990
- const suspend = useCallback8(() => {
6334
+ const suspend = useCallback9(() => {
5991
6335
  if (!ctxAndGain) {
5992
6336
  return Promise.resolve();
5993
6337
  }
@@ -6061,7 +6405,7 @@ var SharedAudioTagsContextProvider = ({ children, numberOfAudioTags }) => {
6061
6405
  };
6062
6406
  }, [refs]);
6063
6407
  const takenAudios = useRef12(new Array(numberOfAudioTags).fill(false));
6064
- const rerenderAudios = useCallback8(() => {
6408
+ const rerenderAudios = useCallback9(() => {
6065
6409
  refs.forEach(({ ref, id }) => {
6066
6410
  const data = audios.current?.find((a2) => a2.id === id);
6067
6411
  const { current } = ref;
@@ -6082,7 +6426,7 @@ var SharedAudioTagsContextProvider = ({ children, numberOfAudioTags }) => {
6082
6426
  });
6083
6427
  });
6084
6428
  }, [refs]);
6085
- const registerAudio = useCallback8((options) => {
6429
+ const registerAudio = useCallback9((options) => {
6086
6430
  const { aud, audioId, premounting, postmounting } = options;
6087
6431
  const found = audios.current?.find((a2) => a2.audioId === audioId);
6088
6432
  if (found) {
@@ -6111,7 +6455,7 @@ var SharedAudioTagsContextProvider = ({ children, numberOfAudioTags }) => {
6111
6455
  rerenderAudios();
6112
6456
  return newElem;
6113
6457
  }, [numberOfAudioTags, refs, rerenderAudios]);
6114
- const unregisterAudio = useCallback8((id) => {
6458
+ const unregisterAudio = useCallback9((id) => {
6115
6459
  const cloned = [...takenAudios.current];
6116
6460
  const index = refs.findIndex((r) => r.id === id);
6117
6461
  if (index === -1) {
@@ -6122,7 +6466,7 @@ var SharedAudioTagsContextProvider = ({ children, numberOfAudioTags }) => {
6122
6466
  audios.current = audios.current?.filter((a2) => a2.id !== id);
6123
6467
  rerenderAudios();
6124
6468
  }, [refs, rerenderAudios]);
6125
- const updateAudio = useCallback8(({
6469
+ const updateAudio = useCallback9(({
6126
6470
  aud,
6127
6471
  audioId,
6128
6472
  id,
@@ -6156,7 +6500,7 @@ var SharedAudioTagsContextProvider = ({ children, numberOfAudioTags }) => {
6156
6500
  rerenderAudios();
6157
6501
  }
6158
6502
  }, [rerenderAudios]);
6159
- const playAllAudios = useCallback8(() => {
6503
+ const playAllAudios = useCallback9(() => {
6160
6504
  refs.forEach((ref) => {
6161
6505
  const audio = audios.current.find((a2) => a2.el === ref.ref);
6162
6506
  if (audio?.premounting) {
@@ -6721,7 +7065,7 @@ var useMediaInTimeline = ({
6721
7065
 
6722
7066
  // src/use-media-playback.ts
6723
7067
  import {
6724
- useCallback as useCallback11,
7068
+ useCallback as useCallback12,
6725
7069
  useContext as useContext26,
6726
7070
  useEffect as useEffect12,
6727
7071
  useLayoutEffect as useLayoutEffect7,
@@ -6729,14 +7073,14 @@ import {
6729
7073
  } from "react";
6730
7074
 
6731
7075
  // src/buffer-until-first-frame.ts
6732
- import { useCallback as useCallback10, useMemo as useMemo25, useRef as useRef16 } from "react";
7076
+ import { useCallback as useCallback11, useMemo as useMemo25, useRef as useRef16 } from "react";
6733
7077
 
6734
7078
  // src/use-buffer-state.ts
6735
7079
  import { useContext as useContext25, useMemo as useMemo24 } from "react";
6736
7080
 
6737
7081
  // src/buffering.tsx
6738
7082
  import React20, {
6739
- useCallback as useCallback9,
7083
+ useCallback as useCallback10,
6740
7084
  useContext as useContext24,
6741
7085
  useEffect as useEffect9,
6742
7086
  useLayoutEffect as useLayoutEffect6,
@@ -6752,7 +7096,7 @@ var useBufferManager = (logLevel, mountTime) => {
6752
7096
  const env = useRemotionEnvironment();
6753
7097
  const rendering = env.isRendering;
6754
7098
  const buffering = useRef15(false);
6755
- const addBlock = useCallback9((block) => {
7099
+ const addBlock = useCallback10((block) => {
6756
7100
  if (rendering) {
6757
7101
  return {
6758
7102
  unblock: () => {
@@ -6778,7 +7122,7 @@ var useBufferManager = (logLevel, mountTime) => {
6778
7122
  }
6779
7123
  };
6780
7124
  }, [rendering]);
6781
- const listenForBuffering = useCallback9((callback) => {
7125
+ const listenForBuffering = useCallback10((callback) => {
6782
7126
  setOnBufferingCallbacks((c2) => [...c2, callback]);
6783
7127
  return {
6784
7128
  remove: () => {
@@ -6786,7 +7130,7 @@ var useBufferManager = (logLevel, mountTime) => {
6786
7130
  }
6787
7131
  };
6788
7132
  }, []);
6789
- const listenForResume = useCallback9((callback) => {
7133
+ const listenForResume = useCallback10((callback) => {
6790
7134
  setOnResumeCallbacks((c2) => [...c2, callback]);
6791
7135
  return {
6792
7136
  remove: () => {
@@ -6904,7 +7248,7 @@ var useBufferUntilFirstFrame = ({
6904
7248
  }) => {
6905
7249
  const bufferingRef = useRef16(false);
6906
7250
  const { delayPlayback } = useBufferState();
6907
- const bufferUntilFirstFrame = useCallback10((requestedTime) => {
7251
+ const bufferUntilFirstFrame = useCallback11((requestedTime) => {
6908
7252
  if (mediaType !== "video") {
6909
7253
  return;
6910
7254
  }
@@ -7311,7 +7655,7 @@ var useMediaPlayback = ({
7311
7655
  throw new Error("useMediaPlayback must be used inside a <BufferingContext>");
7312
7656
  }
7313
7657
  const isVariableFpsVideoMap = useRef18({});
7314
- const onVariableFpsVideoDetected = useCallback11(() => {
7658
+ const onVariableFpsVideoDetected = useCallback12(() => {
7315
7659
  if (!src) {
7316
7660
  return;
7317
7661
  }
@@ -7713,7 +8057,7 @@ var AudioForDevelopmentForwardRefFunction = (props, ref) => {
7713
8057
  premounting: Boolean(sequenceContext?.premounting),
7714
8058
  postmounting: Boolean(sequenceContext?.postmounting)
7715
8059
  });
7716
- const getStack = useCallback12(() => {
8060
+ const getStack = useCallback13(() => {
7717
8061
  return _remotionInternalStack ?? null;
7718
8062
  }, [_remotionInternalStack]);
7719
8063
  useMediaInTimeline({
@@ -7729,7 +8073,7 @@ var AudioForDevelopmentForwardRefFunction = (props, ref) => {
7729
8073
  premountDisplay: sequenceContext?.premountDisplay ?? null,
7730
8074
  postmountDisplay: sequenceContext?.postmountDisplay ?? null,
7731
8075
  loopDisplay: undefined,
7732
- documentationLink: name === undefined ? "https://www.remotion.dev/docs/html5-audio" : null,
8076
+ documentationLink: "https://www.remotion.dev/docs/html5-audio",
7733
8077
  refForOutline: null
7734
8078
  });
7735
8079
  useMediaPlayback({
@@ -7974,7 +8318,7 @@ var AudioRefForwardingFunction = (props, ref) => {
7974
8318
  throw new TypeError(`The \`<Html5Audio>\` tag requires a string for \`src\`, but got ${JSON.stringify(props.src)} instead.`);
7975
8319
  }
7976
8320
  const preloadedSrc = usePreload(props.src);
7977
- const onError = useCallback13((e) => {
8321
+ const onError = useCallback14((e) => {
7978
8322
  console.log(e.currentTarget.error);
7979
8323
  const errMessage = `Could not play audio with src ${preloadedSrc}: ${e.currentTarget.error}. See https://remotion.dev/docs/media-playback-error for help.`;
7980
8324
  if (loop) {
@@ -7988,7 +8332,7 @@ var AudioRefForwardingFunction = (props, ref) => {
7988
8332
  console.warn(errMessage);
7989
8333
  }
7990
8334
  }, [loop, onRemotionError, preloadedSrc]);
7991
- const onDuration = useCallback13((src, durationInSeconds) => {
8335
+ const onDuration = useCallback14((src, durationInSeconds) => {
7992
8336
  setDurations({ type: "got-duration", durationInSeconds, src });
7993
8337
  }, [setDurations]);
7994
8338
  const durationFetched = durations[getAbsoluteSrc(preloadedSrc)] ?? durations[getAbsoluteSrc(props.src)];
@@ -8071,7 +8415,7 @@ var Audio = Html5Audio;
8071
8415
  // src/effects/Solid.tsx
8072
8416
  import {
8073
8417
  forwardRef as forwardRef8,
8074
- useCallback as useCallback14,
8418
+ useCallback as useCallback15,
8075
8419
  useEffect as useEffect16,
8076
8420
  useImperativeHandle as useImperativeHandle6,
8077
8421
  useMemo as useMemo29,
@@ -8091,6 +8435,7 @@ var resolveSolidPixelDensity = (pixelDensity) => {
8091
8435
  var solidSchema = {
8092
8436
  durationInFrames: durationInFramesField,
8093
8437
  from: fromField,
8438
+ freeze: freezeField,
8094
8439
  color: {
8095
8440
  type: "color",
8096
8441
  default: "transparent",
@@ -8145,7 +8490,7 @@ var SolidInner = ({
8145
8490
  return canvas;
8146
8491
  }, []);
8147
8492
  const chainState = useEffectChainState();
8148
- const canvasRef = useCallback14((canvas) => {
8493
+ const canvasRef = useCallback15((canvas) => {
8149
8494
  setOutputCanvas(canvas);
8150
8495
  if (typeof reference === "function") {
8151
8496
  reference(canvas);
@@ -8229,6 +8574,7 @@ var SolidOuter = forwardRef8(({
8229
8574
  style,
8230
8575
  name,
8231
8576
  from,
8577
+ freeze,
8232
8578
  hidden,
8233
8579
  showInTimeline,
8234
8580
  pixelDensity,
@@ -8242,6 +8588,7 @@ var SolidOuter = forwardRef8(({
8242
8588
  return /* @__PURE__ */ jsx24(Sequence, {
8243
8589
  layout: "none",
8244
8590
  from,
8591
+ freeze,
8245
8592
  hidden,
8246
8593
  showInTimeline,
8247
8594
  _experimentalControls: controls,
@@ -8249,7 +8596,7 @@ var SolidOuter = forwardRef8(({
8249
8596
  durationInFrames,
8250
8597
  name: name ?? "<Solid>",
8251
8598
  _remotionInternalRefForOutline: actualRef,
8252
- _remotionInternalDocumentationLink: name === undefined ? "https://www.remotion.dev/docs/solid" : undefined,
8599
+ _remotionInternalDocumentationLink: "https://www.remotion.dev/docs/solid",
8253
8600
  ...props2,
8254
8601
  children: /* @__PURE__ */ jsx24(SolidInner, {
8255
8602
  reference: actualRef,
@@ -8266,6 +8613,7 @@ var SolidOuter = forwardRef8(({
8266
8613
  });
8267
8614
  var Solid = wrapInSchema({
8268
8615
  Component: SolidOuter,
8616
+ componentIdentity: "dev.remotion.remotion.Solid",
8269
8617
  schema: solidSchema,
8270
8618
  supportsEffects: true
8271
8619
  });
@@ -8275,7 +8623,7 @@ addSequenceStackTraces(Solid);
8275
8623
  import {
8276
8624
  createContext as createContext23,
8277
8625
  forwardRef as forwardRef9,
8278
- useCallback as useCallback15,
8626
+ useCallback as useCallback16,
8279
8627
  useContext as useContext31,
8280
8628
  useLayoutEffect as useLayoutEffect9,
8281
8629
  useMemo as useMemo30,
@@ -8366,7 +8714,7 @@ var HtmlInCanvasContent = forwardRef9(({
8366
8714
  const offscreenRef = useRef22(null);
8367
8715
  const divRef = useRef22(null);
8368
8716
  const canvasSizeKey = `${width}x${height}@${resolvedPixelDensity}`;
8369
- const setLayoutCanvasRef = useCallback15((node) => {
8717
+ const setLayoutCanvasRef = useCallback16((node) => {
8370
8718
  canvas2dRef.current = node;
8371
8719
  if (typeof ref === "function") {
8372
8720
  ref(node);
@@ -8388,7 +8736,7 @@ var HtmlInCanvasContent = forwardRef9(({
8388
8736
  const initializedRef = useRef22(false);
8389
8737
  const onInitCleanupRef = useRef22(null);
8390
8738
  const unmountedRef = useRef22(false);
8391
- const onPaintCb = useCallback15(async () => {
8739
+ const onPaintCb = useCallback16(async () => {
8392
8740
  const element = divRef.current;
8393
8741
  if (!element) {
8394
8742
  throw new Error("Canvas or scene element not found");
@@ -8561,7 +8909,7 @@ var HtmlInCanvasInner = forwardRef9(({
8561
8909
  const resolvedDuration = durationInFrames ?? videoDuration;
8562
8910
  const memoizedEffectDefinitions = useMemoizedEffectDefinitions(effects);
8563
8911
  const actualRef = useRef22(null);
8564
- const setCanvasRef = useCallback15((node) => {
8912
+ const setCanvasRef = useCallback16((node) => {
8565
8913
  actualRef.current = node;
8566
8914
  if (typeof ref === "function") {
8567
8915
  ref(node);
@@ -8572,7 +8920,7 @@ var HtmlInCanvasInner = forwardRef9(({
8572
8920
  return /* @__PURE__ */ jsx25(Sequence, {
8573
8921
  durationInFrames: resolvedDuration,
8574
8922
  name: name ?? "<HtmlInCanvas>",
8575
- _remotionInternalDocumentationLink: name === undefined ? "https://www.remotion.dev/docs/remotion/html-in-canvas" : undefined,
8923
+ _remotionInternalDocumentationLink: "https://www.remotion.dev/docs/remotion/html-in-canvas",
8576
8924
  _experimentalControls: controls,
8577
8925
  _remotionInternalEffects: memoizedEffectDefinitions,
8578
8926
  _remotionInternalRefForOutline: actualRef,
@@ -8596,11 +8944,13 @@ HtmlInCanvasInner.displayName = "HtmlInCanvas";
8596
8944
  var htmlInCanvasSchema = {
8597
8945
  durationInFrames: durationInFramesField,
8598
8946
  from: fromField,
8947
+ freeze: freezeField,
8599
8948
  ...sequenceVisualStyleSchema,
8600
8949
  hidden: hiddenField
8601
8950
  };
8602
8951
  var HtmlInCanvasWrapped = wrapInSchema({
8603
8952
  Component: HtmlInCanvasInner,
8953
+ componentIdentity: "dev.remotion.remotion.HtmlInCanvas",
8604
8954
  schema: htmlInCanvasSchema,
8605
8955
  supportsEffects: true
8606
8956
  });
@@ -8612,7 +8962,7 @@ addSequenceStackTraces(HtmlInCanvas);
8612
8962
  // src/canvas-image/CanvasImage.tsx
8613
8963
  import {
8614
8964
  forwardRef as forwardRef10,
8615
- useCallback as useCallback16,
8965
+ useCallback as useCallback17,
8616
8966
  useContext as useContext32,
8617
8967
  useEffect as useEffect17,
8618
8968
  useImperativeHandle as useImperativeHandle7,
@@ -8634,6 +8984,7 @@ import { jsx as jsx26 } from "react/jsx-runtime";
8634
8984
  var canvasImageSchema = {
8635
8985
  durationInFrames: durationInFramesField,
8636
8986
  from: fromField,
8987
+ freeze: freezeField,
8637
8988
  fit: {
8638
8989
  type: "enum",
8639
8990
  default: "fill",
@@ -8739,7 +9090,7 @@ var CanvasImageContent = forwardRef10(({
8739
9090
  }
8740
9091
  return document.createElement("canvas");
8741
9092
  }, []);
8742
- const canvasRef = useCallback16((canvas) => {
9093
+ const canvasRef = useCallback17((canvas) => {
8743
9094
  setOutputCanvas(canvas);
8744
9095
  if (refForOutline) {
8745
9096
  refForOutline.current = canvas;
@@ -8886,6 +9237,7 @@ var CanvasImageInner = forwardRef10(({
8886
9237
  delayRenderTimeoutInMilliseconds,
8887
9238
  durationInFrames,
8888
9239
  from,
9240
+ freeze,
8889
9241
  hidden,
8890
9242
  name,
8891
9243
  showInTimeline,
@@ -8907,6 +9259,7 @@ var CanvasImageInner = forwardRef10(({
8907
9259
  layout: "none",
8908
9260
  from: from ?? 0,
8909
9261
  durationInFrames: durationInFrames ?? Infinity,
9262
+ freeze,
8910
9263
  hidden,
8911
9264
  showInTimeline: showInTimeline ?? true,
8912
9265
  name: name ?? "<CanvasImage>",
@@ -8939,6 +9292,7 @@ var CanvasImageInner = forwardRef10(({
8939
9292
  });
8940
9293
  var CanvasImage = wrapInSchema({
8941
9294
  Component: CanvasImageInner,
9295
+ componentIdentity: "dev.remotion.remotion.CanvasImage",
8942
9296
  schema: canvasImageSchema,
8943
9297
  supportsEffects: true
8944
9298
  });
@@ -8976,7 +9330,7 @@ var getStaticFiles = () => {
8976
9330
  return window.remotion_staticFiles;
8977
9331
  };
8978
9332
  // src/IFrame.tsx
8979
- import { forwardRef as forwardRef11, useCallback as useCallback17, useState as useState17 } from "react";
9333
+ import { forwardRef as forwardRef11, useCallback as useCallback18, useState as useState17 } from "react";
8980
9334
  import { jsx as jsx27 } from "react/jsx-runtime";
8981
9335
  var IFrameRefForwarding = ({
8982
9336
  onLoad,
@@ -8990,11 +9344,11 @@ var IFrameRefForwarding = ({
8990
9344
  retries: delayRenderRetries ?? undefined,
8991
9345
  timeoutInMilliseconds: delayRenderTimeoutInMilliseconds ?? undefined
8992
9346
  }));
8993
- const didLoad = useCallback17((e) => {
9347
+ const didLoad = useCallback18((e) => {
8994
9348
  continueRender2(handle);
8995
9349
  onLoad?.(e);
8996
9350
  }, [handle, onLoad, continueRender2]);
8997
- const didGetError = useCallback17((e) => {
9351
+ const didGetError = useCallback18((e) => {
8998
9352
  continueRender2(handle);
8999
9353
  if (onError) {
9000
9354
  onError(e);
@@ -9012,7 +9366,7 @@ var IFrameRefForwarding = ({
9012
9366
  };
9013
9367
  var IFrame = forwardRef11(IFrameRefForwarding);
9014
9368
  // src/Img.tsx
9015
- import { useCallback as useCallback18, useContext as useContext33, useLayoutEffect as useLayoutEffect10, useRef as useRef24 } from "react";
9369
+ import { useCallback as useCallback19, useContext as useContext33, useLayoutEffect as useLayoutEffect10, useRef as useRef24 } from "react";
9016
9370
  import { jsx as jsx28 } from "react/jsx-runtime";
9017
9371
  function exponentialBackoff2(errorCount) {
9018
9372
  return 1000 * 2 ** (errorCount - 1);
@@ -9039,7 +9393,7 @@ var ImgContent = ({
9039
9393
  if (!_propsValid) {
9040
9394
  throw new Error("typecheck error");
9041
9395
  }
9042
- const imageCallbackRef = useCallback18((img) => {
9396
+ const imageCallbackRef = useCallback19((img) => {
9043
9397
  imageRef.current = img;
9044
9398
  refForOutline.current = img;
9045
9399
  if (typeof ref === "function") {
@@ -9049,7 +9403,7 @@ var ImgContent = ({
9049
9403
  }
9050
9404
  }, [ref, refForOutline]);
9051
9405
  const actualSrc = usePreload(src);
9052
- const retryIn = useCallback18((timeout) => {
9406
+ const retryIn = useCallback19((timeout) => {
9053
9407
  if (!imageRef.current) {
9054
9408
  return;
9055
9409
  }
@@ -9067,7 +9421,7 @@ var ImgContent = ({
9067
9421
  }, timeout);
9068
9422
  }, []);
9069
9423
  const { delayRender: delayRender2, continueRender: continueRender2, cancelRender: cancelRender2 } = useDelayRender();
9070
- const didGetError = useCallback18((e) => {
9424
+ const didGetError = useCallback19((e) => {
9071
9425
  if (!errors.current) {
9072
9426
  return;
9073
9427
  }
@@ -9177,6 +9531,7 @@ var NativeImgInner = ({
9177
9531
  src,
9178
9532
  from,
9179
9533
  durationInFrames,
9534
+ freeze,
9180
9535
  _experimentalControls: controls,
9181
9536
  _remotionInternalRefForOutline: refForOutline,
9182
9537
  ...props2
@@ -9188,8 +9543,9 @@ var NativeImgInner = ({
9188
9543
  layout: "none",
9189
9544
  from: from ?? 0,
9190
9545
  durationInFrames: durationInFrames ?? Infinity,
9546
+ freeze,
9191
9547
  _remotionInternalStack: stack,
9192
- _remotionInternalDocumentationLink: name === undefined ? "https://www.remotion.dev/docs/img" : undefined,
9548
+ _remotionInternalDocumentationLink: "https://www.remotion.dev/docs/img",
9193
9549
  _remotionInternalIsMedia: { type: "image", src },
9194
9550
  name: name ?? "<Img>",
9195
9551
  _experimentalControls: controls,
@@ -9207,6 +9563,7 @@ var CanvasImageWithPrivateProps = CanvasImage;
9207
9563
  var imgSchema = {
9208
9564
  durationInFrames: durationInFramesField,
9209
9565
  from: fromField,
9566
+ freeze: freezeField,
9210
9567
  ...sequenceVisualStyleSchema,
9211
9568
  hidden: hiddenField
9212
9569
  };
@@ -9262,6 +9619,7 @@ var ImgInner = ({
9262
9619
  src,
9263
9620
  from,
9264
9621
  durationInFrames,
9622
+ freeze,
9265
9623
  _experimentalControls: controls,
9266
9624
  width,
9267
9625
  height,
@@ -9286,6 +9644,7 @@ var ImgInner = ({
9286
9644
  src,
9287
9645
  from,
9288
9646
  durationInFrames,
9647
+ freeze,
9289
9648
  _experimentalControls: controls,
9290
9649
  width,
9291
9650
  height,
@@ -9327,11 +9686,12 @@ var ImgInner = ({
9327
9686
  delayRenderTimeoutInMilliseconds,
9328
9687
  from,
9329
9688
  durationInFrames,
9689
+ freeze,
9330
9690
  hidden,
9331
9691
  name: name ?? "<Img>",
9332
9692
  showInTimeline,
9333
9693
  stack,
9334
- _remotionInternalDocumentationLink: name === undefined ? "https://www.remotion.dev/docs/img" : undefined,
9694
+ _remotionInternalDocumentationLink: "https://www.remotion.dev/docs/img",
9335
9695
  _experimentalControls: controls,
9336
9696
  _remotionInternalRefForOutline: refForOutline,
9337
9697
  ...canvasProps
@@ -9339,16 +9699,18 @@ var ImgInner = ({
9339
9699
  };
9340
9700
  var Img = wrapInSchema({
9341
9701
  Component: ImgInner,
9702
+ componentIdentity: "dev.remotion.remotion.Img",
9342
9703
  schema: imgSchema,
9343
9704
  supportsEffects: true
9344
9705
  });
9345
9706
  addSequenceStackTraces(Img);
9346
9707
  // src/Interactive.tsx
9347
- import React29, { forwardRef as forwardRef12, useCallback as useCallback19, useRef as useRef25 } from "react";
9708
+ import React29, { forwardRef as forwardRef12, useCallback as useCallback20, useRef as useRef25 } from "react";
9348
9709
  import { jsx as jsx29 } from "react/jsx-runtime";
9349
9710
  var interactiveElementSchema = {
9350
9711
  durationInFrames: durationInFramesField,
9351
9712
  from: fromField,
9713
+ freeze: freezeField,
9352
9714
  ...sequenceVisualStyleSchema,
9353
9715
  hidden: hiddenField
9354
9716
  };
@@ -9364,6 +9726,7 @@ var makeInteractiveElement = (tag, displayName) => {
9364
9726
  const {
9365
9727
  durationInFrames,
9366
9728
  from,
9729
+ freeze,
9367
9730
  hidden,
9368
9731
  name,
9369
9732
  showInTimeline,
@@ -9372,7 +9735,7 @@ var makeInteractiveElement = (tag, displayName) => {
9372
9735
  ...props2
9373
9736
  } = propsWithControls;
9374
9737
  const refForOutline = useRef25(null);
9375
- const callbackRef = useCallback19((element) => {
9738
+ const callbackRef = useCallback20((element) => {
9376
9739
  refForOutline.current = element;
9377
9740
  setRef(ref, element);
9378
9741
  }, [ref]);
@@ -9380,11 +9743,13 @@ var makeInteractiveElement = (tag, displayName) => {
9380
9743
  layout: "none",
9381
9744
  from: from ?? 0,
9382
9745
  durationInFrames: durationInFrames ?? Infinity,
9746
+ freeze,
9383
9747
  hidden,
9384
9748
  name: name ?? displayName,
9385
9749
  showInTimeline: showInTimeline ?? true,
9386
9750
  _experimentalControls,
9387
9751
  _remotionInternalStack: stack,
9752
+ _remotionInternalDocumentationLink: "https://www.remotion.dev/docs/interactive",
9388
9753
  _remotionInternalRefForOutline: refForOutline,
9389
9754
  children: React29.createElement(tag, {
9390
9755
  ...props2,
@@ -9395,6 +9760,7 @@ var makeInteractiveElement = (tag, displayName) => {
9395
9760
  Inner.displayName = displayName;
9396
9761
  const Wrapped = wrapInSchema({
9397
9762
  Component: Inner,
9763
+ componentIdentity: `dev.remotion.remotion.${displayName.slice(1, -1)}`,
9398
9764
  schema: interactiveElementSchema,
9399
9765
  supportsEffects: false
9400
9766
  });
@@ -9448,7 +9814,7 @@ var compositionsRef = React30.createRef();
9448
9814
 
9449
9815
  // src/CompositionManagerProvider.tsx
9450
9816
  import {
9451
- useCallback as useCallback20,
9817
+ useCallback as useCallback21,
9452
9818
  useImperativeHandle as useImperativeHandle8,
9453
9819
  useMemo as useMemo32,
9454
9820
  useRef as useRef26,
@@ -9466,14 +9832,14 @@ var CompositionManagerProvider = ({
9466
9832
  const [canvasContent, setCanvasContent] = useState18(initialCanvasContent);
9467
9833
  const [compositions, setCompositions] = useState18(initialCompositions);
9468
9834
  const currentcompositionsRef = useRef26(compositions);
9469
- const updateCompositions = useCallback20((updateComps) => {
9835
+ const updateCompositions = useCallback21((updateComps) => {
9470
9836
  setCompositions((comps) => {
9471
9837
  const updated = updateComps(comps);
9472
9838
  currentcompositionsRef.current = updated;
9473
9839
  return updated;
9474
9840
  });
9475
9841
  }, []);
9476
- const registerComposition = useCallback20((comp) => {
9842
+ const registerComposition = useCallback21((comp) => {
9477
9843
  updateCompositions((comps) => {
9478
9844
  if (comps.find((c2) => c2.id === comp.id)) {
9479
9845
  throw new Error(`Multiple composition with id ${comp.id} are registered.`);
@@ -9481,12 +9847,12 @@ var CompositionManagerProvider = ({
9481
9847
  return [...comps, comp];
9482
9848
  });
9483
9849
  }, [updateCompositions]);
9484
- const unregisterComposition = useCallback20((id) => {
9850
+ const unregisterComposition = useCallback21((id) => {
9485
9851
  setCompositions((comps) => {
9486
9852
  return comps.filter((c2) => c2.id !== id);
9487
9853
  });
9488
9854
  }, []);
9489
- const registerFolder = useCallback20((name, parent, nonce, stack) => {
9855
+ const registerFolder = useCallback21((name, parent, nonce, stack) => {
9490
9856
  setFolders((prevFolders) => {
9491
9857
  return [
9492
9858
  ...prevFolders,
@@ -9499,7 +9865,7 @@ var CompositionManagerProvider = ({
9499
9865
  ];
9500
9866
  });
9501
9867
  }, []);
9502
- const unregisterFolder = useCallback20((name, parent) => {
9868
+ const unregisterFolder = useCallback21((name, parent) => {
9503
9869
  setFolders((prevFolders) => {
9504
9870
  return prevFolders.filter((p) => !(p.name === name && p.parent === parent));
9505
9871
  });
@@ -10062,11 +10428,11 @@ var usePixelDensity = (options) => {
10062
10428
  };
10063
10429
 
10064
10430
  // src/video/OffthreadVideo.tsx
10065
- import { useCallback as useCallback23 } from "react";
10431
+ import { useCallback as useCallback24 } from "react";
10066
10432
 
10067
10433
  // src/video/OffthreadVideoForRendering.tsx
10068
10434
  import {
10069
- useCallback as useCallback21,
10435
+ useCallback as useCallback22,
10070
10436
  useContext as useContext36,
10071
10437
  useEffect as useEffect18,
10072
10438
  useLayoutEffect as useLayoutEffect11,
@@ -10259,7 +10625,7 @@ var OffthreadVideoForRendering = ({
10259
10625
  continueRender2,
10260
10626
  delayRender2
10261
10627
  ]);
10262
- const onErr = useCallback21(() => {
10628
+ const onErr = useCallback22(() => {
10263
10629
  if (onError) {
10264
10630
  onError?.(new Error("Failed to load image with src " + imageSrc));
10265
10631
  } else {
@@ -10269,7 +10635,7 @@ var OffthreadVideoForRendering = ({
10269
10635
  const className = useMemo35(() => {
10270
10636
  return [OBJECTFIT_CONTAIN_CLASS_NAME, props2.className].filter(truthy).join(" ");
10271
10637
  }, [props2.className]);
10272
- const onImageFrame = useCallback21((img) => {
10638
+ const onImageFrame = useCallback22((img) => {
10273
10639
  if (onVideoFrame) {
10274
10640
  onVideoFrame(img);
10275
10641
  }
@@ -10292,7 +10658,7 @@ var OffthreadVideoForRendering = ({
10292
10658
  // src/video/VideoForPreview.tsx
10293
10659
  import React37, {
10294
10660
  forwardRef as forwardRef13,
10295
- useCallback as useCallback22,
10661
+ useCallback as useCallback23,
10296
10662
  useContext as useContext37,
10297
10663
  useEffect as useEffect20,
10298
10664
  useImperativeHandle as useImperativeHandle9,
@@ -10421,7 +10787,7 @@ var VideoForDevelopmentRefForwardingFunction = (props2, ref) => {
10421
10787
  mediaVolume
10422
10788
  });
10423
10789
  warnAboutTooHighVolume(userPreferredVolume);
10424
- const getStack = useCallback22(() => {
10790
+ const getStack = useCallback23(() => {
10425
10791
  return _remotionInternalStack ?? null;
10426
10792
  }, [_remotionInternalStack]);
10427
10793
  useMediaInTimeline({
@@ -10437,7 +10803,7 @@ var VideoForDevelopmentRefForwardingFunction = (props2, ref) => {
10437
10803
  premountDisplay: parentSequence?.premountDisplay ?? null,
10438
10804
  postmountDisplay: parentSequence?.postmountDisplay ?? null,
10439
10805
  loopDisplay: undefined,
10440
- documentationLink: name === undefined ? onlyWarnForMediaSeekingError ? "https://www.remotion.dev/docs/offthreadvideo" : "https://www.remotion.dev/docs/html5-video" : null,
10806
+ documentationLink: onlyWarnForMediaSeekingError ? "https://www.remotion.dev/docs/offthreadvideo" : "https://www.remotion.dev/docs/html5-video",
10441
10807
  refForOutline: videoRef
10442
10808
  });
10443
10809
  useMediaPlayback({
@@ -10568,6 +10934,7 @@ var VideoForDevelopmentRefForwardingFunction = (props2, ref) => {
10568
10934
  isClientSideRendering: false
10569
10935
  });
10570
10936
  return /* @__PURE__ */ jsx34("video", {
10937
+ ...nativeProps,
10571
10938
  ref: videoRef,
10572
10939
  muted: muted || mediaMuted || userPreferredVolume <= 0,
10573
10940
  playsInline: true,
@@ -10576,7 +10943,7 @@ var VideoForDevelopmentRefForwardingFunction = (props2, ref) => {
10576
10943
  style: actualStyle,
10577
10944
  disableRemotePlayback: true,
10578
10945
  crossOrigin: crossOriginValue,
10579
- ...nativeProps
10946
+ controls: false
10580
10947
  });
10581
10948
  };
10582
10949
  var VideoForPreview = forwardRef13(VideoForDevelopmentRefForwardingFunction);
@@ -10599,7 +10966,7 @@ var InnerOffthreadVideo = (props2) => {
10599
10966
  if (environment.isClientSideRendering) {
10600
10967
  throw new Error("<OffthreadVideo> is not supported in @remotion/web-renderer. Use <Video> from @remotion/media instead. See https://remotion.dev/docs/client-side-rendering/limitations");
10601
10968
  }
10602
- const onDuration = useCallback23(() => {
10969
+ const onDuration = useCallback24(() => {
10603
10970
  return;
10604
10971
  }, []);
10605
10972
  if (typeof props2.src !== "string") {
@@ -11006,46 +11373,22 @@ var Internals = {
11006
11373
  createEffect,
11007
11374
  createWebGLContextError,
11008
11375
  createWebGL2ContextError,
11009
- computeEffectiveSchemaValuesDotNotation,
11010
- interpolateKeyframedStatus,
11011
- makeStaticDragOverride,
11012
- makeKeyframedDragOverride,
11013
- resolveDragOverrideValue,
11014
- getStaticDragOverrideValue,
11015
- OverrideIdsToNodePathsGettersContext,
11016
- OverrideIdsToNodePathsSettersContext,
11017
- findPropsToDelete,
11018
- makeSequencePropsSubscriptionKey,
11019
- getPropStatusesCtx,
11020
- getEffectPropStatusesCtx,
11021
- hiddenField,
11022
- durationInFramesField,
11023
- fromField
11024
- };
11025
- // src/validate-frame.ts
11026
- var validateFrame = ({
11027
- allowFloats,
11028
- durationInFrames,
11029
- frame
11030
- }) => {
11031
- if (typeof frame === "undefined") {
11032
- throw new TypeError(`Argument missing for parameter "frame"`);
11033
- }
11034
- if (typeof frame !== "number") {
11035
- throw new TypeError(`Argument passed for "frame" is not a number: ${frame}`);
11036
- }
11037
- if (!Number.isFinite(frame)) {
11038
- throw new RangeError(`Frame ${frame} is not finite`);
11039
- }
11040
- if (frame % 1 !== 0 && !allowFloats) {
11041
- throw new RangeError(`Argument for frame must be an integer, but got ${frame}`);
11042
- }
11043
- if (frame < 0 && frame < -durationInFrames) {
11044
- throw new RangeError(`Cannot use frame ${frame}: Duration of composition is ${durationInFrames}, therefore the lowest frame that can be rendered is ${-durationInFrames}`);
11045
- }
11046
- if (frame > durationInFrames - 1) {
11047
- throw new RangeError(`Cannot use frame ${frame}: Duration of composition is ${durationInFrames}, therefore the highest frame that can be rendered is ${durationInFrames - 1}`);
11048
- }
11376
+ computeEffectiveSchemaValuesDotNotation,
11377
+ interpolateKeyframedStatus,
11378
+ makeStaticDragOverride,
11379
+ makeKeyframedDragOverride,
11380
+ resolveDragOverrideValue,
11381
+ getStaticDragOverrideValue,
11382
+ OverrideIdsToNodePathsGettersContext,
11383
+ OverrideIdsToNodePathsSettersContext,
11384
+ findPropsToDelete,
11385
+ makeSequencePropsSubscriptionKey,
11386
+ getPropStatusesCtx,
11387
+ getEffectPropStatusesCtx,
11388
+ hiddenField,
11389
+ durationInFramesField,
11390
+ freezeField,
11391
+ fromField
11049
11392
  };
11050
11393
  // src/series/index.tsx
11051
11394
  import {
@@ -11142,253 +11485,13 @@ var SeriesInner = (props2) => {
11142
11485
  };
11143
11486
  var Series = Object.assign(wrapInSchema({
11144
11487
  Component: SeriesInner,
11488
+ componentIdentity: "dev.remotion.remotion.Series",
11145
11489
  schema: sequenceSchemaDefaultLayoutNone,
11146
11490
  supportsEffects: false
11147
11491
  }), {
11148
11492
  Sequence: SeriesSequence
11149
11493
  });
11150
11494
  addSequenceStackTraces(Series);
11151
- // src/validation/validation-spring-duration.ts
11152
- var validateSpringDuration = (dur) => {
11153
- if (typeof dur === "undefined") {
11154
- return;
11155
- }
11156
- if (typeof dur !== "number") {
11157
- throw new TypeError(`A "duration" of a spring must be a "number" but is "${typeof dur}"`);
11158
- }
11159
- if (Number.isNaN(dur)) {
11160
- throw new TypeError('A "duration" of a spring is NaN, which it must not be');
11161
- }
11162
- if (!Number.isFinite(dur)) {
11163
- throw new TypeError('A "duration" of a spring must be finite, but is ' + dur);
11164
- }
11165
- if (dur <= 0) {
11166
- throw new TypeError('A "duration" of a spring must be positive, but is ' + dur);
11167
- }
11168
- };
11169
-
11170
- // src/spring/spring-utils.ts
11171
- var defaultSpringConfig = {
11172
- damping: 10,
11173
- mass: 1,
11174
- stiffness: 100,
11175
- overshootClamping: false
11176
- };
11177
- var advanceCache = {};
11178
- function advance({
11179
- animation,
11180
- now,
11181
- config
11182
- }) {
11183
- const { toValue, lastTimestamp, current, velocity } = animation;
11184
- const deltaTime = Math.min(now - lastTimestamp, 64);
11185
- if (config.damping <= 0) {
11186
- throw new Error("Spring damping must be greater than 0, otherwise the spring() animation will never end, causing an infinite loop.");
11187
- }
11188
- const c2 = config.damping;
11189
- const m = config.mass;
11190
- const k = config.stiffness;
11191
- const cacheKey = [
11192
- toValue,
11193
- lastTimestamp,
11194
- current,
11195
- velocity,
11196
- c2,
11197
- m,
11198
- k,
11199
- now
11200
- ].join("-");
11201
- if (advanceCache[cacheKey]) {
11202
- return advanceCache[cacheKey];
11203
- }
11204
- const v0 = -velocity;
11205
- const x0 = toValue - current;
11206
- const zeta = c2 / (2 * Math.sqrt(k * m));
11207
- const omega0 = Math.sqrt(k / m);
11208
- const omega1 = omega0 * Math.sqrt(1 - zeta ** 2);
11209
- const t = deltaTime / 1000;
11210
- const sin1 = Math.sin(omega1 * t);
11211
- const cos1 = Math.cos(omega1 * t);
11212
- const underDampedEnvelope = Math.exp(-zeta * omega0 * t);
11213
- const underDampedFrag1 = underDampedEnvelope * (sin1 * ((v0 + zeta * omega0 * x0) / omega1) + x0 * cos1);
11214
- const underDampedPosition = toValue - underDampedFrag1;
11215
- const underDampedVelocity = zeta * omega0 * underDampedFrag1 - underDampedEnvelope * (cos1 * (v0 + zeta * omega0 * x0) - omega1 * x0 * sin1);
11216
- const criticallyDampedEnvelope = Math.exp(-omega0 * t);
11217
- const criticallyDampedPosition = toValue - criticallyDampedEnvelope * (x0 + (v0 + omega0 * x0) * t);
11218
- const criticallyDampedVelocity = criticallyDampedEnvelope * (v0 * (t * omega0 - 1) + t * x0 * omega0 * omega0);
11219
- const animationNode = {
11220
- toValue,
11221
- prevPosition: current,
11222
- lastTimestamp: now,
11223
- current: zeta < 1 ? underDampedPosition : criticallyDampedPosition,
11224
- velocity: zeta < 1 ? underDampedVelocity : criticallyDampedVelocity
11225
- };
11226
- advanceCache[cacheKey] = animationNode;
11227
- return animationNode;
11228
- }
11229
- var calculationCache = {};
11230
- function springCalculation({
11231
- frame,
11232
- fps,
11233
- config = {}
11234
- }) {
11235
- const from = 0;
11236
- const to = 1;
11237
- const cacheKey = [
11238
- frame,
11239
- fps,
11240
- config.damping,
11241
- config.mass,
11242
- config.overshootClamping,
11243
- config.stiffness
11244
- ].join("-");
11245
- if (calculationCache[cacheKey]) {
11246
- return calculationCache[cacheKey];
11247
- }
11248
- let animation = {
11249
- lastTimestamp: 0,
11250
- current: from,
11251
- toValue: to,
11252
- velocity: 0,
11253
- prevPosition: 0
11254
- };
11255
- const frameClamped = Math.max(0, frame);
11256
- const unevenRest = frameClamped % 1;
11257
- for (let f = 0;f <= Math.floor(frameClamped); f++) {
11258
- if (f === Math.floor(frameClamped)) {
11259
- f += unevenRest;
11260
- }
11261
- const time = f / fps * 1000;
11262
- animation = advance({
11263
- animation,
11264
- now: time,
11265
- config: {
11266
- ...defaultSpringConfig,
11267
- ...config
11268
- }
11269
- });
11270
- }
11271
- calculationCache[cacheKey] = animation;
11272
- return animation;
11273
- }
11274
-
11275
- // src/spring/measure-spring.ts
11276
- var cache = new Map;
11277
- function measureSpring({
11278
- fps,
11279
- config = {},
11280
- threshold = 0.005
11281
- }) {
11282
- if (typeof threshold !== "number") {
11283
- throw new TypeError(`threshold must be a number, got ${threshold} of type ${typeof threshold}`);
11284
- }
11285
- if (threshold === 0) {
11286
- return Infinity;
11287
- }
11288
- if (threshold === 1) {
11289
- return 0;
11290
- }
11291
- if (isNaN(threshold)) {
11292
- throw new TypeError("Threshold is NaN");
11293
- }
11294
- if (!Number.isFinite(threshold)) {
11295
- throw new TypeError("Threshold is not finite");
11296
- }
11297
- if (threshold < 0) {
11298
- throw new TypeError("Threshold is below 0");
11299
- }
11300
- const cacheKey = [
11301
- fps,
11302
- config.damping,
11303
- config.mass,
11304
- config.overshootClamping,
11305
- config.stiffness,
11306
- threshold
11307
- ].join("-");
11308
- if (cache.has(cacheKey)) {
11309
- return cache.get(cacheKey);
11310
- }
11311
- validateFps(fps, "to the measureSpring() function", false);
11312
- let frame = 0;
11313
- let finishedFrame = 0;
11314
- const calc = () => {
11315
- return springCalculation({
11316
- fps,
11317
- frame,
11318
- config
11319
- });
11320
- };
11321
- let animation = calc();
11322
- const calcDifference = () => {
11323
- return Math.abs(animation.current - animation.toValue);
11324
- };
11325
- let difference = calcDifference();
11326
- while (difference >= threshold) {
11327
- frame++;
11328
- animation = calc();
11329
- difference = calcDifference();
11330
- }
11331
- finishedFrame = frame;
11332
- for (let i = 0;i < 20; i++) {
11333
- frame++;
11334
- animation = calc();
11335
- difference = calcDifference();
11336
- if (difference >= threshold) {
11337
- i = 0;
11338
- finishedFrame = frame + 1;
11339
- }
11340
- }
11341
- cache.set(cacheKey, finishedFrame);
11342
- return finishedFrame;
11343
- }
11344
-
11345
- // src/spring/index.ts
11346
- function spring({
11347
- frame: passedFrame,
11348
- fps,
11349
- config = {},
11350
- from = 0,
11351
- to = 1,
11352
- durationInFrames: passedDurationInFrames,
11353
- durationRestThreshold,
11354
- delay = 0,
11355
- reverse = false
11356
- }) {
11357
- validateSpringDuration(passedDurationInFrames);
11358
- validateFrame({
11359
- frame: passedFrame,
11360
- durationInFrames: Infinity,
11361
- allowFloats: true
11362
- });
11363
- validateFps(fps, "to spring()", false);
11364
- const needsToCalculateNaturalDuration = reverse || typeof passedDurationInFrames !== "undefined";
11365
- const naturalDuration = needsToCalculateNaturalDuration ? measureSpring({
11366
- fps,
11367
- config,
11368
- threshold: durationRestThreshold
11369
- }) : undefined;
11370
- const naturalDurationGetter = needsToCalculateNaturalDuration ? {
11371
- get: () => naturalDuration
11372
- } : {
11373
- get: () => {
11374
- throw new Error("did not calculate natural duration, this is an error with Remotion. Please report");
11375
- }
11376
- };
11377
- const reverseProcessed = reverse ? (passedDurationInFrames ?? naturalDurationGetter.get()) - passedFrame : passedFrame;
11378
- const delayProcessed = reverseProcessed + (reverse ? delay : -delay);
11379
- const durationProcessed = passedDurationInFrames === undefined ? delayProcessed : delayProcessed / (passedDurationInFrames / naturalDurationGetter.get());
11380
- if (passedDurationInFrames && delayProcessed > passedDurationInFrames) {
11381
- return to;
11382
- }
11383
- const spr = springCalculation({
11384
- fps,
11385
- frame: durationProcessed,
11386
- config
11387
- });
11388
- const inner = config.overshootClamping ? to >= from ? Math.min(spr.current, to) : Math.max(spr.current, to) : spr.current;
11389
- const interpolated = from === 0 && to === 1 ? inner : interpolate(inner, [0, 1], [from, to]);
11390
- return interpolated;
11391
- }
11392
11495
  // src/static-file.ts
11393
11496
  var problematicCharacters = {
11394
11497
  "%3A": ":",
@@ -11489,7 +11592,7 @@ var Still = (props2) => {
11489
11592
  return React42.createElement(Composition, newProps);
11490
11593
  };
11491
11594
  // src/video/html5-video.tsx
11492
- import { forwardRef as forwardRef16, useCallback as useCallback24, useContext as useContext39 } from "react";
11595
+ import { forwardRef as forwardRef16, useCallback as useCallback25, useContext as useContext39 } from "react";
11493
11596
 
11494
11597
  // src/video/VideoForRendering.tsx
11495
11598
  import {
@@ -11879,7 +11982,7 @@ var VideoForwardingFunction = (props2, ref) => {
11879
11982
  throw new TypeError(`The \`<Html5Video>\` tag requires a string for \`src\`, but got ${JSON.stringify(props2.src)} instead.`);
11880
11983
  }
11881
11984
  const preloadedSrc = usePreload(props2.src);
11882
- const onDuration = useCallback24((src, durationInSeconds) => {
11985
+ const onDuration = useCallback25((src, durationInSeconds) => {
11883
11986
  setDurations({ type: "got-duration", durationInSeconds, src });
11884
11987
  }, [setDurations]);
11885
11988
  const durationFetched = durations[getAbsoluteSrc(preloadedSrc)] ?? durations[getAbsoluteSrc(props2.src)];