remotion 4.0.420 → 4.0.421

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.
@@ -15,10 +15,12 @@ const enableProxy = (api) => {
15
15
  apply(target, thisArg, argArray) {
16
16
  if (componentsToAddStacksTo.includes(argArray[0])) {
17
17
  const [first, props, ...rest] = argArray;
18
- const newProps = {
19
- ...(props !== null && props !== void 0 ? props : {}),
20
- stack: new Error().stack,
21
- };
18
+ const newProps = props.stack
19
+ ? props
20
+ : {
21
+ ...(props !== null && props !== void 0 ? props : {}),
22
+ stack: new Error().stack,
23
+ };
22
24
  return Reflect.apply(target, thisArg, [first, newProps, ...rest]);
23
25
  }
24
26
  return Reflect.apply(target, thisArg, argArray);
@@ -73,11 +73,11 @@ const Loop = ({ durationInFrames, times = Infinity, children, name, ...props })
73
73
  const from = Math.min(start, maxFrame);
74
74
  const loopDisplay = (0, react_1.useMemo)(() => {
75
75
  return {
76
- numberOfTimes: actualTimes,
76
+ numberOfTimes: Math.min(compDuration / durationInFrames, times),
77
77
  startOffset: -from,
78
78
  durationInFrames,
79
79
  };
80
- }, [actualTimes, durationInFrames, from]);
80
+ }, [compDuration, durationInFrames, from, times]);
81
81
  const loopContext = (0, react_1.useMemo)(() => {
82
82
  return {
83
83
  iteration: Math.floor(currentFrame / durationInFrames),
@@ -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.420";
6
+ export declare const VERSION = "4.0.421";
@@ -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.420';
10
+ exports.VERSION = '4.0.421';
@@ -27,7 +27,7 @@ export declare const Html5Video: React.ForwardRefExoticComponent<Omit<import("./
27
27
  }, "ref"> & React.RefAttributes<HTMLVideoElement>>;
28
28
  /**
29
29
  * @deprecated This component has been renamed to `Html5Video`.
30
- * @see [Documentation](https://remotion.dev/docs/mediabunny/new-video)
30
+ * @see [Documentation](https://www.remotion.dev/docs/html5-video)
31
31
  */
32
32
  export declare const Video: React.ForwardRefExoticComponent<Omit<import("./props").NativeVideoProps & {
33
33
  name?: string;
@@ -18,7 +18,7 @@ const VideoForPreview_js_1 = require("./VideoForPreview.js");
18
18
  const VideoForRendering_js_1 = require("./VideoForRendering.js");
19
19
  const duration_state_js_1 = require("./duration-state.js");
20
20
  const VideoForwardingFunction = (props, ref) => {
21
- var _a, _b;
21
+ var _a, _b, _c;
22
22
  const { startFrom, endAt, trimBefore, trimAfter, name, pauseWhenBuffering, stack, _remotionInternalNativeLoopPassed, showInTimeline, onAutoPlayError, ...otherProps } = props;
23
23
  const { loop, ...propsOtherThanLoop } = props;
24
24
  const { fps } = (0, use_video_config_js_1.useVideoConfig)();
@@ -48,7 +48,7 @@ const VideoForwardingFunction = (props, ref) => {
48
48
  });
49
49
  if (loop && durationFetched !== undefined) {
50
50
  if (!Number.isFinite(durationFetched)) {
51
- return ((0, jsx_runtime_1.jsx)(exports.Html5Video, { ...propsOtherThanLoop, ref: ref, _remotionInternalNativeLoopPassed: true }));
51
+ return ((0, jsx_runtime_1.jsx)(exports.Html5Video, { ...propsOtherThanLoop, ref: ref, stack: stack, _remotionInternalNativeLoopPassed: true }));
52
52
  }
53
53
  const mediaDuration = durationFetched * fps;
54
54
  return ((0, jsx_runtime_1.jsx)(index_js_1.Loop, { durationInFrames: (0, calculate_media_duration_js_1.calculateMediaDuration)({
@@ -56,11 +56,13 @@ const VideoForwardingFunction = (props, ref) => {
56
56
  mediaDurationInFrames: mediaDuration,
57
57
  playbackRate: (_b = props.playbackRate) !== null && _b !== void 0 ? _b : 1,
58
58
  trimBefore: trimBeforeValue,
59
- }), layout: "none", name: name, children: (0, jsx_runtime_1.jsx)(exports.Html5Video, { ...propsOtherThanLoop, ref: ref, _remotionInternalNativeLoopPassed: true }) }));
59
+ }), layout: "none", name: name, children: (0, jsx_runtime_1.jsx)(exports.Html5Video, { ...propsOtherThanLoop, ref: ref, stack: stack, _remotionInternalNativeLoopPassed: true }) }));
60
60
  }
61
61
  if (typeof trimBeforeValue !== 'undefined' ||
62
62
  typeof trimAfterValue !== 'undefined') {
63
- return ((0, jsx_runtime_1.jsx)(Sequence_js_1.Sequence, { layout: "none", from: 0 - (trimBeforeValue !== null && trimBeforeValue !== void 0 ? trimBeforeValue : 0), showInTimeline: false, durationInFrames: trimAfterValue, name: name, children: (0, jsx_runtime_1.jsx)(exports.Html5Video, { pauseWhenBuffering: pauseWhenBuffering !== null && pauseWhenBuffering !== void 0 ? pauseWhenBuffering : false, ...otherProps, ref: ref }) }));
63
+ return ((0, jsx_runtime_1.jsx)(Sequence_js_1.Sequence, { layout: "none", from: 0 - (trimBeforeValue !== null && trimBeforeValue !== void 0 ? trimBeforeValue : 0), showInTimeline: false, durationInFrames: trimAfterValue === undefined
64
+ ? undefined
65
+ : trimAfterValue / ((_c = props.playbackRate) !== null && _c !== void 0 ? _c : 1), name: name, children: (0, jsx_runtime_1.jsx)(exports.Html5Video, { pauseWhenBuffering: pauseWhenBuffering !== null && pauseWhenBuffering !== void 0 ? pauseWhenBuffering : false, ...otherProps, ref: ref, stack: stack }) }));
64
66
  }
65
67
  (0, validate_media_props_js_1.validateMediaProps)({ playbackRate: props.playbackRate, volume: props.volume }, 'Html5Video');
66
68
  if (environment.isRendering) {
@@ -78,6 +80,6 @@ exports.Html5Video = (0, react_1.forwardRef)(VideoForwardingFunction);
78
80
  (0, enable_sequence_stack_traces_js_1.addSequenceStackTraces)(exports.Html5Video);
79
81
  /**
80
82
  * @deprecated This component has been renamed to `Html5Video`.
81
- * @see [Documentation](https://remotion.dev/docs/mediabunny/new-video)
83
+ * @see [Documentation](https://www.remotion.dev/docs/html5-video)
82
84
  */
83
85
  exports.Video = exports.Html5Video;
@@ -66,7 +66,7 @@ var enableProxy = (api) => {
66
66
  apply(target, thisArg, argArray) {
67
67
  if (componentsToAddStacksTo.includes(argArray[0])) {
68
68
  const [first, props, ...rest] = argArray;
69
- const newProps = {
69
+ const newProps = props.stack ? props : {
70
70
  ...props ?? {},
71
71
  stack: new Error().stack
72
72
  };
@@ -110,7 +110,7 @@ function truthy(value) {
110
110
  }
111
111
 
112
112
  // src/version.ts
113
- var VERSION = "4.0.420";
113
+ var VERSION = "4.0.421";
114
114
 
115
115
  // src/multiple-versions-warning.ts
116
116
  var checkMultipleRemotionVersions = () => {
@@ -2156,11 +2156,11 @@ var Loop = ({ durationInFrames, times = Infinity, children, name, ...props }) =>
2156
2156
  const from = Math.min(start, maxFrame);
2157
2157
  const loopDisplay = useMemo12(() => {
2158
2158
  return {
2159
- numberOfTimes: actualTimes,
2159
+ numberOfTimes: Math.min(compDuration / durationInFrames, times),
2160
2160
  startOffset: -from,
2161
2161
  durationInFrames
2162
2162
  };
2163
- }, [actualTimes, durationInFrames, from]);
2163
+ }, [compDuration, durationInFrames, from, times]);
2164
2164
  const loopContext = useMemo12(() => {
2165
2165
  return {
2166
2166
  iteration: Math.floor(currentFrame / durationInFrames),
@@ -8183,6 +8183,7 @@ var VideoForwardingFunction = (props2, ref) => {
8183
8183
  return /* @__PURE__ */ jsx35(Html5Video, {
8184
8184
  ...propsOtherThanLoop,
8185
8185
  ref,
8186
+ stack,
8186
8187
  _remotionInternalNativeLoopPassed: true
8187
8188
  });
8188
8189
  }
@@ -8199,6 +8200,7 @@ var VideoForwardingFunction = (props2, ref) => {
8199
8200
  children: /* @__PURE__ */ jsx35(Html5Video, {
8200
8201
  ...propsOtherThanLoop,
8201
8202
  ref,
8203
+ stack,
8202
8204
  _remotionInternalNativeLoopPassed: true
8203
8205
  })
8204
8206
  });
@@ -8208,12 +8210,13 @@ var VideoForwardingFunction = (props2, ref) => {
8208
8210
  layout: "none",
8209
8211
  from: 0 - (trimBeforeValue ?? 0),
8210
8212
  showInTimeline: false,
8211
- durationInFrames: trimAfterValue,
8213
+ durationInFrames: trimAfterValue === undefined ? undefined : trimAfterValue / (props2.playbackRate ?? 1),
8212
8214
  name,
8213
8215
  children: /* @__PURE__ */ jsx35(Html5Video, {
8214
8216
  pauseWhenBuffering: pauseWhenBuffering ?? false,
8215
8217
  ...otherProps,
8216
- ref
8218
+ ref,
8219
+ stack
8217
8220
  })
8218
8221
  });
8219
8222
  }
@@ -1,5 +1,5 @@
1
1
  // src/version.ts
2
- var VERSION = "4.0.420";
2
+ var VERSION = "4.0.421";
3
3
  export {
4
4
  VERSION
5
5
  };
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "url": "https://github.com/remotion-dev/remotion/tree/main/packages/core"
4
4
  },
5
5
  "name": "remotion",
6
- "version": "4.0.420",
6
+ "version": "4.0.421",
7
7
  "description": "Make videos programmatically",
8
8
  "main": "dist/cjs/index.js",
9
9
  "types": "dist/cjs/index.d.ts",
@@ -32,9 +32,9 @@
32
32
  "happy-dom": "20.0.2",
33
33
  "react": "19.2.3",
34
34
  "react-dom": "19.2.3",
35
- "webpack": "5.96.1",
35
+ "webpack": "5.105.0",
36
36
  "zod": "3.22.3",
37
- "@remotion/eslint-config-internal": "4.0.420",
37
+ "@remotion/eslint-config-internal": "4.0.421",
38
38
  "eslint": "9.19.0"
39
39
  },
40
40
  "keywords": [