remotion 4.0.150 → 4.0.152

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.
@@ -12,6 +12,9 @@ type VideoConfigState = {
12
12
  } | {
13
13
  type: 'success';
14
14
  result: VideoConfig;
15
+ } | {
16
+ type: 'success-and-refreshing';
17
+ result: VideoConfig;
15
18
  } | {
16
19
  type: 'error';
17
20
  error: Error;
@@ -55,12 +55,25 @@ const ResolveCompositionConfig = ({ children }) => {
55
55
  signal,
56
56
  });
57
57
  if (typeof promOrNot === 'object' && 'then' in promOrNot) {
58
- setResolvedConfigs((r) => ({
59
- ...r,
60
- [composition.id]: {
61
- type: 'loading',
62
- },
63
- }));
58
+ setResolvedConfigs((r) => {
59
+ const prev = r[composition.id];
60
+ if ((prev === null || prev === void 0 ? void 0 : prev.type) === 'success' ||
61
+ (prev === null || prev === void 0 ? void 0 : prev.type) === 'success-and-refreshing') {
62
+ return {
63
+ ...r,
64
+ [composition.id]: {
65
+ type: 'success-and-refreshing',
66
+ result: prev.result,
67
+ },
68
+ };
69
+ }
70
+ return {
71
+ ...r,
72
+ [composition.id]: {
73
+ type: 'loading',
74
+ },
75
+ };
76
+ });
64
77
  promOrNot
65
78
  .then((c) => {
66
79
  if (controller.signal.aborted) {
@@ -14,7 +14,7 @@ const volume_prop_js_1 = require("../volume-prop.js");
14
14
  const use_audio_frame_js_1 = require("./use-audio-frame.js");
15
15
  const AudioForRenderingRefForwardingFunction = (props, ref) => {
16
16
  const audioRef = (0, react_1.useRef)(null);
17
- const { volume: volumeProp, playbackRate, allowAmplificationDuringRender, onDuration, toneFrequency, _remotionInternalNeedsDurationCalculation, _remotionInternalNativeLoopPassed, acceptableTimeShiftInSeconds, name, onError, delayRenderRetries, delayRenderTimeoutInMilliseconds, loopVolumeCurveBehavior, ...nativeProps } = props;
17
+ const { volume: volumeProp, playbackRate, allowAmplificationDuringRender, onDuration, toneFrequency, _remotionInternalNeedsDurationCalculation, _remotionInternalNativeLoopPassed, acceptableTimeShiftInSeconds, name, onError, delayRenderRetries, delayRenderTimeoutInMilliseconds, loopVolumeCurveBehavior, pauseWhenBuffering, ...nativeProps } = props;
18
18
  const absoluteFrame = (0, timeline_position_state_js_1.useTimelinePosition)();
19
19
  const volumePropFrame = (0, use_audio_frame_js_1.useFrameForVolumeProp)(loopVolumeCurveBehavior !== null && loopVolumeCurveBehavior !== void 0 ? loopVolumeCurveBehavior : 'repeat');
20
20
  const frame = (0, use_current_frame_js_1.useCurrentFrame)();
@@ -99,6 +99,9 @@ export declare const Internals: {
99
99
  } | {
100
100
  type: "success";
101
101
  result: import("./video-config.js").VideoConfig;
102
+ } | {
103
+ type: "success-and-refreshing";
104
+ result: import("./video-config.js").VideoConfig;
102
105
  } | {
103
106
  type: "error";
104
107
  error: Error;
@@ -3,4 +3,4 @@
3
3
  * @see [Documentation](https://remotion.dev/docs/version)
4
4
  * @returns {string} The current version of the remotion package
5
5
  */
6
- export declare const VERSION = "4.0.150";
6
+ export declare const VERSION = "4.0.152";
@@ -7,4 +7,4 @@ exports.VERSION = void 0;
7
7
  * @see [Documentation](https://remotion.dev/docs/version)
8
8
  * @returns {string} The current version of the remotion package
9
9
  */
10
- exports.VERSION = '4.0.150';
10
+ exports.VERSION = '4.0.152';
@@ -16,6 +16,9 @@ export declare function useRemotionContexts(): {
16
16
  } | {
17
17
  type: "success";
18
18
  result: import("./video-config.js").VideoConfig;
19
+ } | {
20
+ type: "success-and-refreshing";
21
+ result: import("./video-config.js").VideoConfig;
19
22
  } | {
20
23
  type: "error";
21
24
  error: Error;
@@ -132,7 +132,7 @@ function truthy(value) {
132
132
  }
133
133
 
134
134
  // src/version.ts
135
- var VERSION = "4.0.150";
135
+ var VERSION = "4.0.152";
136
136
 
137
137
  // src/multiple-versions-warning.ts
138
138
  var checkMultipleRemotionVersions = () => {
@@ -751,12 +751,24 @@ var ResolveCompositionConfig = ({ children }) => {
751
751
  signal
752
752
  });
753
753
  if (typeof promOrNot === "object" && "then" in promOrNot) {
754
- setResolvedConfigs((r) => ({
755
- ...r,
756
- [composition.id]: {
757
- type: "loading"
754
+ setResolvedConfigs((r) => {
755
+ const prev = r[composition.id];
756
+ if (prev?.type === "success" || prev?.type === "success-and-refreshing") {
757
+ return {
758
+ ...r,
759
+ [composition.id]: {
760
+ type: "success-and-refreshing",
761
+ result: prev.result
762
+ }
763
+ };
758
764
  }
759
- }));
765
+ return {
766
+ ...r,
767
+ [composition.id]: {
768
+ type: "loading"
769
+ }
770
+ };
771
+ });
760
772
  promOrNot.then((c) => {
761
773
  if (controller.signal.aborted) {
762
774
  return;
@@ -3024,6 +3036,7 @@ var AudioForRenderingRefForwardingFunction = (props, ref) => {
3024
3036
  delayRenderRetries,
3025
3037
  delayRenderTimeoutInMilliseconds,
3026
3038
  loopVolumeCurveBehavior,
3039
+ pauseWhenBuffering,
3027
3040
  ...nativeProps
3028
3041
  } = props;
3029
3042
  const absoluteFrame = useTimelinePosition();
@@ -1,5 +1,5 @@
1
1
  // src/version.ts
2
- var VERSION = "4.0.150";
2
+ var VERSION = "4.0.152";
3
3
  export {
4
4
  VERSION
5
5
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "remotion",
3
- "version": "4.0.150",
3
+ "version": "4.0.152",
4
4
  "description": "Render videos in React",
5
5
  "main": "dist/cjs/index.js",
6
6
  "types": "dist/cjs/index.d.ts",