remotion 4.0.484 → 4.0.486

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/LICENSE.md ADDED
@@ -0,0 +1,49 @@
1
+ # Remotion License
2
+
3
+ In Remotion 5.0, the license will slightly change. [View the changes here](https://github.com/remotion-dev/remotion/pull/3750).
4
+
5
+ ---
6
+
7
+ Depending on the type of your legal entity, you are granted permission to use Remotion for your project. Individuals and small companies are allowed to use Remotion to create videos for free (even commercial), while a company license is required for for-profit organizations of a certain size. This two-tier system was designed to ensure funding for this project while still allowing the source code to be available and the program to be free for most. Read below for the exact terms of use.
8
+
9
+ - [Free License](#free-license)
10
+ - [Company License](#company-license)
11
+
12
+ ## Free License
13
+
14
+ Copyright © 2026 [Remotion](https://www.remotion.dev)
15
+
16
+ ### Eligibility
17
+
18
+ You are eligible to use Remotion for free if you are:
19
+
20
+ - an individual
21
+ - a for-profit organization with up to 3 employees
22
+ - a non-profit or not-for-profit organization
23
+ - evaluating whether Remotion is a good fit, and are not yet using it in a commercial way
24
+
25
+ ### Allowed use cases
26
+
27
+ Permission is hereby granted, free of charge, to any person eligible for the "Free License", to use the software non-commercially or commercially for the purpose of creating videos and images and to modify the software to their own liking, for the purpose of fulfilling their custom use case or to contribute bug fixes or improvements back to Remotion.
28
+
29
+ ### Disallowed use cases
30
+
31
+ It is not allowed to copy or modify Remotion code for the purpose of selling, renting, licensing, relicensing, or sublicensing your own derivate of Remotion.
32
+
33
+ ### Warranty notice
34
+
35
+ The software is provided "as is", without warranty of any kind, express or implied, including but not limited to the warranties of merchantability, fitness for a particular purpose, and non-infringement. In no event shall the author or copyright holders be liable for any claim, damages or other liability, whether in an action of contract, tort or otherwise, arising from, out of or in connection with the software or the use or other dealings in the software.
36
+
37
+ ### Support
38
+
39
+ Support is provided on a best-we-can-do basis via GitHub Issues and Discord.
40
+
41
+ ## Company License
42
+
43
+ You are required to obtain a Company License to use Remotion if you are not within the group of entities eligible for a Free License. This license will enable you to use Remotion for the allowed use cases specified in the Free License, and give you access to prioritized support (read the [Support Policy](https://www.remotion.dev/docs/support)).
44
+
45
+ Visit [remotion.pro](https://www.remotion.pro/license) for pricing and to buy a license.
46
+
47
+ ### FAQs
48
+
49
+ Are you not sure whether you need a Company License because of an edge case? Here are some [frequently asked questions](https://www.remotion.pro/faq).
package/README.md CHANGED
@@ -12,31 +12,21 @@
12
12
  [![NPM Downloads](https://img.shields.io/npm/dm/remotion.svg?style=flat&color=black&label=Downloads)](https://npmcharts.com/compare/remotion?minimal=true)
13
13
  <a href="https://twitter.com/remotion"><img src="https://img.shields.io/twitter/follow/remotion?label=Twitter&color=black" alt="Twitter"></a>
14
14
 
15
- Remotion is a framework for **creating videos programmatically using React.**
16
-
17
- ## Why create videos in React?
18
-
19
- - **Leverage web technologies**: Use all of CSS, Canvas, SVG, WebGL, etc.
20
- - **Leverage programming**: Use variables, functions, APIs, math and algorithms to create new effects
21
- - **Leverage React**: Reusable components, Powerful composition, Fast Refresh, Package ecosystem
22
-
23
- ## Created with Remotion
24
-
25
- <table>
26
- <tr>
27
- <td align="center">
28
- <img style="width: 290px" src="https://pub-646d808d9cb240cea53bedc76dd3cd0c.r2.dev/fireship-quick.gif" />
29
- <p>"This video was made with code" <em>- Fireship</em> <a href="https://youtu.be/deg8bOoziaE">Watch</a> <a href="https://github.com/wcandillon/remotion-fireship">Source</a></p>
30
- </td>
31
- <td align="center">
32
- <img style="width: 240px" src="https://pub-646d808d9cb240cea53bedc76dd3cd0c.r2.dev/unwrapped-2023.gif" />
33
- <p>GitHub Unwrapped - Personalized Year in Review <a href="https://www.githubunwrapped.com">Try</a> • <a href="https://github.com/remotion-dev/github-unwrapped">Source</a></p>
34
- </td>
35
- <td align="center">
36
- <em>View more in the <a href="https://remotion.dev/showcase">Remotion Showcase</a>!</em>
37
- </td>
38
- </tr>
39
- </table>
15
+ Video tools for the agent era.
16
+
17
+ ## Video Creation
18
+
19
+ - **Make videos agentically**: Turn your idea into a video using your coding agent.
20
+ - **Make videos interactively**: Edit and animate using drag and drop.
21
+ - **Make videos programmatically**: Connect to data, and manage complexity with code.
22
+
23
+ React Code is the source of truth. Switch your workflow at any point.
24
+
25
+ ## Video Automation
26
+
27
+ - **Design systems**: Create a library of animated assets for your organization.
28
+ - **Batch rendering**: Render millions of videos on your own infrastructure.
29
+ - **Applications**: Publish a simple tool or a complex video editor.
40
30
 
41
31
  ## Get started
42
32
 
@@ -48,6 +38,50 @@ npx create-video@latest
48
38
 
49
39
  to get started. Otherwise, read the [installation page](https://www.remotion.dev/docs/) in the documentation.
50
40
 
41
+ ## Discover Remotion
42
+
43
+ Remotion is extensively documented over more than 1000 pages.
44
+
45
+ - Get Started
46
+ - [Installation](https://remotion.dev/docs)
47
+ - [Agent Skills](https://www.remotion.dev/docs/ai/skills)
48
+ - [Prompts](https://www.remotion.dev/prompts)
49
+ - [Templates](https://remotion.dev/templates)
50
+ - Components
51
+ - [Effects](https://remotion.dev/effects)
52
+ - [Shapes](https://remotion.dev/docs/shapes)
53
+ - [Transitions](https://remotion.dev/transitions)
54
+ - [Sound Effects](https://remotion.dev/docs/sfx)
55
+ - [Captions](https://remotion.dev/docs/captions)
56
+ - [Fonts](https://remotion.dev/docs/fonts)
57
+ - Rendering
58
+ - [Node.js APIs](https://www.remotion.dev/docs/ssr)
59
+ - [Lambda](https://www.remotion.dev/docs/lambda)
60
+ - [Vercel](https://www.remotion.dev/docs/vercel-sandbox)
61
+ - [Client-side rendering](https://www.remotion.dev/docs/client-side-rendering/)
62
+ - [Comparison of options](https://remotion.dev/docs/compare-ssr)
63
+ - Making apps
64
+ - [Player](https://remotion.dev/docs/player)
65
+ - [Editor Starter](https://remotion.dev/editor-starter)
66
+ - [Mediabunny](https://remotion.dev/docs/mediabunny)
67
+ - Community
68
+ - [Discord](https://remotion.dev/discord)
69
+ - [Experts](https://remotion.dev/experts)
70
+ - [Resources](https://remotion.dev/resources)
71
+ - [Contributing](https://remotion.dev/contributing)
72
+ - Follow us on [X](https://x.com/remotion), [YouTube](https://youtube.com/@remotion_dev), [Instagram](https://instagram.com/remotion), [LinkedIn](https://linkedin.com/company/remotion)
73
+ - Commercial
74
+ - [License](https://remotion.dev/license)
75
+ - [Store](https://remotion.pro/store)
76
+ - [About Remotion](https://remotion.dev/about)
77
+ - [Showcase](https://remotion.dev/showcase)
78
+ - Help
79
+ - [Support](https://remotion.dev/support)
80
+ - [Discord](https://remotion.dev/discord)
81
+ - [Search](https://remotion.dev/search)
82
+ - [Ask AI](https://remotion.dev/ai)
83
+ - [GitHub Issues](https://remotion.dev/issues)
84
+
51
85
  ## Documentation
52
86
 
53
87
  Documentation: [**remotion.dev/docs**](https://www.remotion.dev/docs)
@@ -1,4 +1,4 @@
1
- import type { FC } from 'react';
1
+ import type { FC, ReactNode } from 'react';
2
2
  import type { NonceHistory } from './nonce.js';
3
3
  export type TFolder = {
4
4
  name: string;
@@ -13,6 +13,6 @@ type FolderContextType = {
13
13
  export declare const FolderContext: import("react").Context<FolderContextType>;
14
14
  export declare const Folder: FC<{
15
15
  readonly name: string;
16
- readonly children: React.ReactNode;
16
+ readonly children?: ReactNode;
17
17
  }>;
18
18
  export {};
@@ -94,6 +94,12 @@ export declare const Interactive: {
94
94
  readonly default: undefined;
95
95
  readonly description: "Color";
96
96
  };
97
+ readonly 'style.fontFamily': {
98
+ readonly type: "font-family";
99
+ readonly default: undefined;
100
+ readonly description: "Font family";
101
+ readonly keyframable: false;
102
+ };
97
103
  readonly 'style.fontSize': {
98
104
  readonly type: "number";
99
105
  readonly default: undefined;
@@ -44,6 +44,7 @@ const interactiveElementSchema = {
44
44
  ...interactivity_schema_js_1.baseSchema,
45
45
  ...interactivity_schema_js_1.transformSchema,
46
46
  ...interactivity_schema_js_1.textSchema,
47
+ ...interactivity_schema_js_1.textContentSchema,
47
48
  };
48
49
  const setRef = (ref, value) => {
49
50
  if (typeof ref === 'function') {
@@ -5,6 +5,7 @@ export declare const ResolveCompositionContext: import("react").Context<ResolveC
5
5
  export declare const resolveCompositionsRef: import("react").RefObject<{
6
6
  setCurrentRenderModalComposition: (compositionId: string | null) => void;
7
7
  reloadCurrentlySelectedComposition: () => void;
8
+ resolveComposition: (compositionId: string) => Promise<VideoConfig>;
8
9
  } | null>;
9
10
  type VideoConfigState = {
10
11
  type: 'loading';
@@ -86,6 +86,14 @@ const loadImage = ({ src, signal, }) => {
86
86
  function exponentialBackoff(errorCount) {
87
87
  return 1000 * 2 ** (errorCount - 1);
88
88
  }
89
+ const waitForNextFrame = ({ onFrame, }) => {
90
+ if (typeof requestAnimationFrame === 'undefined') {
91
+ onFrame();
92
+ return () => undefined;
93
+ }
94
+ const frame = requestAnimationFrame(onFrame);
95
+ return () => cancelAnimationFrame(frame);
96
+ };
89
97
  const CanvasImageContent = (0, react_1.forwardRef)(({ src, width, height, fit = 'fill', effects, controls, onError, className, style, id, pauseWhenLoading, maxRetries = 2, delayRenderRetries, delayRenderTimeoutInMilliseconds, refForOutline, ...canvasProps }, ref) => {
90
98
  var _a;
91
99
  const { delayRender, continueRender, cancelRender } = (0, use_delay_render_js_1.useDelayRender)();
@@ -99,6 +107,17 @@ const CanvasImageContent = (0, react_1.forwardRef)(({ src, width, height, fit =
99
107
  overrideId: (_a = controls === null || controls === void 0 ? void 0 : controls.overrideId) !== null && _a !== void 0 ? _a : null,
100
108
  });
101
109
  const sequenceContext = (0, react_1.useContext)(SequenceContext_js_1.SequenceContext);
110
+ const pendingLoadDelayRef = (0, react_1.useRef)(null);
111
+ const continuePendingLoadDelay = (0, react_1.useCallback)(() => {
112
+ const pending = pendingLoadDelayRef.current;
113
+ if (!pending || pending.continued) {
114
+ return;
115
+ }
116
+ pending.continued = true;
117
+ pending.unblock();
118
+ continueRender(pending.handle);
119
+ pendingLoadDelayRef.current = null;
120
+ }, [continueRender]);
102
121
  const sourceCanvas = (0, react_1.useMemo)(() => {
103
122
  if (typeof document === 'undefined') {
104
123
  return null;
@@ -117,7 +136,7 @@ const CanvasImageContent = (0, react_1.forwardRef)(({ src, width, height, fit =
117
136
  ref.current = canvas;
118
137
  }
119
138
  }, [ref, refForOutline]);
120
- (0, react_1.useEffect)(() => {
139
+ (0, react_1.useLayoutEffect)(() => {
121
140
  const isPremounting = Boolean(sequenceContext === null || sequenceContext === void 0 ? void 0 : sequenceContext.premounting);
122
141
  const isPostmounting = Boolean(sequenceContext === null || sequenceContext === void 0 ? void 0 : sequenceContext.postmounting);
123
142
  const handle = delayRender(`Rendering <CanvasImage> with src="${(0, truncate_src_for_label_js_1.truncateSrcForLabel)(actualSrc)}"`, {
@@ -129,17 +148,13 @@ const CanvasImageContent = (0, react_1.forwardRef)(({ src, width, height, fit =
129
148
  : () => undefined;
130
149
  const controller = new AbortController();
131
150
  let cancelled = false;
132
- let continued = false;
133
151
  let errorCount = 0;
134
152
  let timeoutId = null;
135
153
  setLoadedImage(null);
136
- const continueRenderOnce = () => {
137
- if (continued) {
138
- return;
139
- }
140
- continued = true;
141
- unblock();
142
- continueRender(handle);
154
+ pendingLoadDelayRef.current = {
155
+ handle,
156
+ unblock,
157
+ continued: false,
143
158
  };
144
159
  const attemptLoad = () => {
145
160
  loadImage({ src: actualSrc, signal: controller.signal })
@@ -148,15 +163,10 @@ const CanvasImageContent = (0, react_1.forwardRef)(({ src, width, height, fit =
148
163
  return;
149
164
  }
150
165
  setLoadedImage(image);
151
- })
152
- .then(() => {
153
- if (!cancelled) {
154
- continueRenderOnce();
155
- }
156
166
  })
157
167
  .catch((err) => {
158
168
  if (err.name === 'AbortError') {
159
- continueRenderOnce();
169
+ continuePendingLoadDelay();
160
170
  return;
161
171
  }
162
172
  errorCount++;
@@ -172,7 +182,7 @@ const CanvasImageContent = (0, react_1.forwardRef)(({ src, width, height, fit =
172
182
  }
173
183
  else if (onError) {
174
184
  onError(err);
175
- continueRenderOnce();
185
+ continuePendingLoadDelay();
176
186
  }
177
187
  else {
178
188
  cancelRender(err);
@@ -186,12 +196,12 @@ const CanvasImageContent = (0, react_1.forwardRef)(({ src, width, height, fit =
186
196
  clearTimeout(timeoutId);
187
197
  }
188
198
  controller.abort();
189
- continueRenderOnce();
199
+ continuePendingLoadDelay();
190
200
  };
191
201
  }, [
192
202
  actualSrc,
193
203
  cancelRender,
194
- continueRender,
204
+ continuePendingLoadDelay,
195
205
  delayPlayback,
196
206
  delayRender,
197
207
  delayRenderRetries,
@@ -202,13 +212,14 @@ const CanvasImageContent = (0, react_1.forwardRef)(({ src, width, height, fit =
202
212
  sequenceContext === null || sequenceContext === void 0 ? void 0 : sequenceContext.postmounting,
203
213
  sequenceContext === null || sequenceContext === void 0 ? void 0 : sequenceContext.premounting,
204
214
  ]);
205
- (0, react_1.useEffect)(() => {
215
+ (0, react_1.useLayoutEffect)(() => {
206
216
  if (!loadedImage || !outputCanvas || !sourceCanvas) {
207
217
  return;
208
218
  }
209
219
  const handle = delayRender(`Applying effects to <CanvasImage> with src="${(0, truncate_src_for_label_js_1.truncateSrcForLabel)(actualSrc)}"`);
210
220
  let cancelled = false;
211
221
  let continued = false;
222
+ let cancelWaitForNextFrame = () => undefined;
212
223
  const continueRenderOnce = () => {
213
224
  if (continued) {
214
225
  return;
@@ -244,7 +255,15 @@ const CanvasImageContent = (0, react_1.forwardRef)(({ src, width, height, fit =
244
255
  })
245
256
  .then((completed) => {
246
257
  if (completed && !cancelled) {
247
- continueRenderOnce();
258
+ cancelWaitForNextFrame = waitForNextFrame({
259
+ onFrame: () => {
260
+ if (cancelled) {
261
+ return;
262
+ }
263
+ continueRenderOnce();
264
+ continuePendingLoadDelay();
265
+ },
266
+ });
248
267
  }
249
268
  })
250
269
  .catch((err) => {
@@ -254,6 +273,7 @@ const CanvasImageContent = (0, react_1.forwardRef)(({ src, width, height, fit =
254
273
  if (onError) {
255
274
  onError(err);
256
275
  continueRenderOnce();
276
+ continuePendingLoadDelay();
257
277
  }
258
278
  else {
259
279
  cancelRender(err);
@@ -261,6 +281,7 @@ const CanvasImageContent = (0, react_1.forwardRef)(({ src, width, height, fit =
261
281
  });
262
282
  return () => {
263
283
  cancelled = true;
284
+ cancelWaitForNextFrame();
264
285
  continueRenderOnce();
265
286
  };
266
287
  }, [
@@ -268,6 +289,7 @@ const CanvasImageContent = (0, react_1.forwardRef)(({ src, width, height, fit =
268
289
  cancelRender,
269
290
  chainState,
270
291
  continueRender,
292
+ continuePendingLoadDelay,
271
293
  delayRender,
272
294
  fit,
273
295
  height,
@@ -13,7 +13,7 @@ const getTimelineDuration = ({ compositionDurationInFrames, playbackRate, trimBe
13
13
  trimAfter,
14
14
  });
15
15
  if (parentSequenceDurationInFrames !== null) {
16
- const cappedDuration = Math.min(parentSequenceDurationInFrames * playbackRate, mediaDuration);
16
+ const cappedDuration = Math.min(parentSequenceDurationInFrames, mediaDuration);
17
17
  return Number(cappedDuration.toFixed(10));
18
18
  }
19
19
  return mediaDuration;
@@ -82,6 +82,18 @@ export type ColorFieldSchema = {
82
82
  description?: string;
83
83
  keyframable?: boolean;
84
84
  };
85
+ export type TextContentFieldSchema = {
86
+ type: 'text-content';
87
+ default: string;
88
+ description?: string;
89
+ keyframable?: false;
90
+ };
91
+ export type FontFamilyFieldSchema = {
92
+ type: 'font-family';
93
+ default: string | undefined;
94
+ description?: string;
95
+ keyframable?: false;
96
+ };
85
97
  export type EnumFieldSchema = {
86
98
  type: 'enum';
87
99
  default: string;
@@ -111,7 +123,7 @@ export type ArrayFieldSchema = {
111
123
  description?: string;
112
124
  keyframable?: false;
113
125
  };
114
- export type VisibleFieldSchema = NumberFieldSchema | BooleanFieldSchema | RotationCssFieldSchema | RotationDegreesFieldSchema | TranslateFieldSchema | TransformOriginFieldSchema | ScaleFieldSchema | UvCoordinateFieldSchema | ColorFieldSchema | ArrayFieldSchema | EnumFieldSchema;
126
+ export type VisibleFieldSchema = NumberFieldSchema | BooleanFieldSchema | RotationCssFieldSchema | RotationDegreesFieldSchema | TranslateFieldSchema | TransformOriginFieldSchema | ScaleFieldSchema | UvCoordinateFieldSchema | ColorFieldSchema | TextContentFieldSchema | FontFamilyFieldSchema | ArrayFieldSchema | EnumFieldSchema;
115
127
  export type InteractivitySchemaField = VisibleFieldSchema | HiddenFieldSchema;
116
128
  export type InteractivitySchema = {
117
129
  [key: string]: InteractivitySchemaField;
@@ -195,6 +207,12 @@ export declare const textSchema: {
195
207
  readonly default: undefined;
196
208
  readonly description: "Color";
197
209
  };
210
+ readonly 'style.fontFamily': {
211
+ readonly type: "font-family";
212
+ readonly default: undefined;
213
+ readonly description: "Font family";
214
+ readonly keyframable: false;
215
+ };
198
216
  readonly 'style.fontSize': {
199
217
  readonly type: "number";
200
218
  readonly default: undefined;
@@ -260,6 +278,14 @@ export declare const textSchema: {
260
278
  readonly hiddenFromList: false;
261
279
  };
262
280
  };
281
+ export declare const textContentSchema: {
282
+ readonly children: {
283
+ readonly type: "text-content";
284
+ readonly default: "";
285
+ readonly description: "Text";
286
+ readonly keyframable: false;
287
+ };
288
+ };
263
289
  export declare const premountSchema: {
264
290
  readonly premountFor: {
265
291
  readonly type: "number";
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.sequenceSchemaDefaultLayoutNone = exports.sequenceSchemaWithoutFrom = exports.baseSchemaWithoutFrom = exports.sequenceSchema = exports.baseSchema = exports.freezeField = exports.trimBeforeField = exports.fromField = exports.durationInFramesField = exports.extendSchemaWithSequenceName = exports.sequenceNameField = exports.hiddenField = exports.sequenceStyleSchema = exports.sequencePremountSchema = exports.premountSchema = exports.textSchema = exports.sequenceVisualStyleSchema = exports.transformSchema = void 0;
3
+ exports.sequenceSchemaDefaultLayoutNone = exports.sequenceSchemaWithoutFrom = exports.baseSchemaWithoutFrom = exports.sequenceSchema = exports.baseSchema = exports.freezeField = exports.trimBeforeField = exports.fromField = exports.durationInFramesField = exports.extendSchemaWithSequenceName = exports.sequenceNameField = exports.hiddenField = exports.sequenceStyleSchema = exports.sequencePremountSchema = exports.premountSchema = exports.textContentSchema = exports.textSchema = exports.sequenceVisualStyleSchema = exports.transformSchema = void 0;
4
4
  exports.transformSchema = {
5
5
  'style.transformOrigin': {
6
6
  type: 'transform-origin',
@@ -44,6 +44,12 @@ exports.textSchema = {
44
44
  default: undefined,
45
45
  description: 'Color',
46
46
  },
47
+ 'style.fontFamily': {
48
+ type: 'font-family',
49
+ default: undefined,
50
+ description: 'Font family',
51
+ keyframable: false,
52
+ },
47
53
  'style.fontSize': {
48
54
  type: 'number',
49
55
  default: undefined,
@@ -109,6 +115,14 @@ exports.textSchema = {
109
115
  hiddenFromList: false,
110
116
  },
111
117
  };
118
+ exports.textContentSchema = {
119
+ children: {
120
+ type: 'text-content',
121
+ default: '',
122
+ description: 'Text',
123
+ keyframable: false,
124
+ },
125
+ };
112
126
  exports.premountSchema = {
113
127
  premountFor: {
114
128
  type: 'number',
@@ -327,6 +327,12 @@ export declare const Internals: {
327
327
  readonly default: undefined;
328
328
  readonly description: "Color";
329
329
  };
330
+ readonly 'style.fontFamily': {
331
+ readonly type: "font-family";
332
+ readonly default: undefined;
333
+ readonly description: "Font family";
334
+ readonly keyframable: false;
335
+ };
330
336
  readonly 'style.fontSize': {
331
337
  readonly type: "number";
332
338
  readonly default: undefined;
@@ -659,6 +665,7 @@ export declare const Internals: {
659
665
  readonly resolveCompositionsRef: import("react").RefObject<{
660
666
  setCurrentRenderModalComposition: (compositionId: string | null) => void;
661
667
  reloadCurrentlySelectedComposition: () => void;
668
+ resolveComposition: (compositionId: string) => Promise<import("./video-config.js").VideoConfig>;
662
669
  } | null>;
663
670
  readonly REMOTION_STUDIO_CONTAINER_ELEMENT: "__remotion-studio-container";
664
671
  readonly RenderAssetManager: import("react").Context<import("./RenderAssetManager.js").RenderAssetManagerContext>;
@@ -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.484";
6
+ export declare const VERSION = "4.0.486";
@@ -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.484';
10
+ exports.VERSION = '4.0.486';
@@ -2,9 +2,15 @@ import React from 'react';
2
2
  import type { SequenceControls } from './CompositionManager.js';
3
3
  import { type InteractivitySchema } from './interactivity-schema.js';
4
4
  export declare const getNestedValue: (obj: Record<string, unknown>, key: string) => unknown;
5
- export declare const readValuesFromProps: (props: Record<string, unknown>, keys: string[]) => Record<string, unknown>;
5
+ export declare const getRuntimeValueForSchemaKey: ({ flatSchema, key, props, }: {
6
+ flatSchema: InteractivitySchema;
7
+ key: string;
8
+ props: Record<string, unknown>;
9
+ }) => unknown;
10
+ export declare const readValuesFromProps: (props: Record<string, unknown>, keys: string[], flatSchema?: InteractivitySchema | undefined) => Record<string, unknown>;
6
11
  export declare const selectActiveKeys: (schema: InteractivitySchema, values: Record<string, unknown>) => string[];
7
- export declare const mergeValues: ({ props, valuesDotNotation, schemaKeys, propsToDelete, }: {
12
+ export declare const mergeValues: ({ flatSchema, props, valuesDotNotation, schemaKeys, propsToDelete, }: {
13
+ flatSchema: InteractivitySchema;
8
14
  props: Record<string, unknown>;
9
15
  valuesDotNotation: Record<string, unknown>;
10
16
  schemaKeys: string[];
@@ -33,7 +33,7 @@ var __importStar = (this && this.__importStar) || (function () {
33
33
  };
34
34
  })();
35
35
  Object.defineProperty(exports, "__esModule", { value: true });
36
- exports.withInteractivitySchema = exports.mergeValues = exports.selectActiveKeys = exports.readValuesFromProps = exports.getNestedValue = void 0;
36
+ exports.withInteractivitySchema = exports.mergeValues = exports.selectActiveKeys = exports.readValuesFromProps = exports.getRuntimeValueForSchemaKey = exports.getNestedValue = void 0;
37
37
  const react_1 = __importStar(require("react"));
38
38
  const delete_nested_key_js_1 = require("./delete-nested-key.js");
39
39
  const use_memoized_effects_js_1 = require("./effects/use-memoized-effects.js");
@@ -57,10 +57,21 @@ const getNestedValue = (obj, key) => {
57
57
  return current;
58
58
  };
59
59
  exports.getNestedValue = getNestedValue;
60
- const readValuesFromProps = (props, keys) => {
60
+ const getRuntimeValueForSchemaKey = ({ flatSchema, key, props, }) => {
61
+ var _a;
62
+ const value = (0, exports.getNestedValue)(props, key);
63
+ if (((_a = flatSchema[key]) === null || _a === void 0 ? void 0 : _a.type) === 'text-content' && typeof value !== 'string') {
64
+ return undefined;
65
+ }
66
+ return value;
67
+ };
68
+ exports.getRuntimeValueForSchemaKey = getRuntimeValueForSchemaKey;
69
+ const readValuesFromProps = (props, keys, flatSchema) => {
61
70
  const out = {};
62
71
  for (const key of keys) {
63
- out[key] = (0, exports.getNestedValue)(props, key);
72
+ out[key] = flatSchema
73
+ ? (0, exports.getRuntimeValueForSchemaKey)({ flatSchema, key, props })
74
+ : (0, exports.getNestedValue)(props, key);
64
75
  }
65
76
  return out;
66
77
  };
@@ -69,10 +80,14 @@ const selectActiveKeys = (schema, values) => {
69
80
  return Object.keys((0, flatten_schema_js_1.flattenActiveSchema)(schema, (key) => values[key]));
70
81
  };
71
82
  exports.selectActiveKeys = selectActiveKeys;
72
- const mergeValues = ({ props, valuesDotNotation, schemaKeys, propsToDelete, }) => {
83
+ const mergeValues = ({ flatSchema, props, valuesDotNotation, schemaKeys, propsToDelete, }) => {
84
+ var _a;
73
85
  const merged = { ...props };
74
86
  for (const key of schemaKeys) {
75
87
  const value = valuesDotNotation[key];
88
+ if (((_a = flatSchema[key]) === null || _a === void 0 ? void 0 : _a.type) === 'text-content' && value === undefined) {
89
+ continue;
90
+ }
76
91
  const parts = key.split('.');
77
92
  if (parts.length === 1) {
78
93
  merged[key] = value;
@@ -93,7 +108,12 @@ const mergeValues = ({ props, valuesDotNotation, schemaKeys, propsToDelete, }) =
93
108
  }
94
109
  current[parts[parts.length - 1]] = value;
95
110
  }
96
- (0, delete_nested_key_js_1.deleteNestedKey)(merged, propsToDelete);
111
+ const propsToDeleteWithoutTextContent = new Set([...propsToDelete].filter((key) => {
112
+ var _a;
113
+ return !(((_a = flatSchema[key]) === null || _a === void 0 ? void 0 : _a.type) === 'text-content' &&
114
+ valuesDotNotation[key] === undefined);
115
+ }));
116
+ (0, delete_nested_key_js_1.deleteNestedKey)(merged, propsToDeleteWithoutTextContent);
97
117
  return merged;
98
118
  };
99
119
  exports.mergeValues = mergeValues;
@@ -148,9 +168,13 @@ const withInteractivitySchema = ({ Component, componentName, componentIdentity,
148
168
  // memoized on the leaf values so the object reference is stable
149
169
  // when nothing changed — otherwise downstream `useMemo`s churn and
150
170
  // effects (e.g. Sequence registration) re-fire every render.
151
- const runtimeValues = flatKeys.map((k) => (0, exports.getNestedValue)(props, k));
171
+ const runtimeValues = flatKeys.map((key) => (0, exports.getRuntimeValueForSchemaKey)({
172
+ flatSchema,
173
+ key,
174
+ props: props,
175
+ }));
152
176
  // eslint-disable-next-line react-hooks/rules-of-hooks
153
- const currentRuntimeValueDotNotation = (0, react_1.useMemo)(() => (0, exports.readValuesFromProps)(props, flatKeys),
177
+ const currentRuntimeValueDotNotation = (0, react_1.useMemo)(() => (0, exports.readValuesFromProps)(props, flatKeys, flatSchema),
154
178
  // eslint-disable-next-line react-hooks/exhaustive-deps
155
179
  runtimeValues);
156
180
  // eslint-disable-next-line react-hooks/rules-of-hooks
@@ -187,6 +211,7 @@ const withInteractivitySchema = ({ Component, componentName, componentIdentity,
187
211
  const activeKeys = (0, exports.selectActiveKeys)(schemaWithSequenceName, valuesDotNotation);
188
212
  // 5. Apply the active values back onto the props.
189
213
  const mergedProps = (0, exports.mergeValues)({
214
+ flatSchema,
190
215
  props: props,
191
216
  valuesDotNotation,
192
217
  schemaKeys: activeKeys,
@@ -1291,7 +1291,7 @@ var addSequenceStackTraces = (component) => {
1291
1291
  };
1292
1292
 
1293
1293
  // src/version.ts
1294
- var VERSION = "4.0.484";
1294
+ var VERSION = "4.0.486";
1295
1295
 
1296
1296
  // src/multiple-versions-warning.ts
1297
1297
  var checkMultipleRemotionVersions = () => {
@@ -1756,6 +1756,12 @@ var textSchema = {
1756
1756
  default: undefined,
1757
1757
  description: "Color"
1758
1758
  },
1759
+ "style.fontFamily": {
1760
+ type: "font-family",
1761
+ default: undefined,
1762
+ description: "Font family",
1763
+ keyframable: false
1764
+ },
1759
1765
  "style.fontSize": {
1760
1766
  type: "number",
1761
1767
  default: undefined,
@@ -1821,6 +1827,14 @@ var textSchema = {
1821
1827
  hiddenFromList: false
1822
1828
  }
1823
1829
  };
1830
+ var textContentSchema = {
1831
+ children: {
1832
+ type: "text-content",
1833
+ default: "",
1834
+ description: "Text",
1835
+ keyframable: false
1836
+ }
1837
+ };
1824
1838
  var premountSchema = {
1825
1839
  premountFor: {
1826
1840
  type: "number",
@@ -4246,10 +4260,21 @@ var getNestedValue = (obj, key) => {
4246
4260
  }
4247
4261
  return current;
4248
4262
  };
4249
- var readValuesFromProps = (props, keys) => {
4263
+ var getRuntimeValueForSchemaKey = ({
4264
+ flatSchema,
4265
+ key,
4266
+ props
4267
+ }) => {
4268
+ const value = getNestedValue(props, key);
4269
+ if (flatSchema[key]?.type === "text-content" && typeof value !== "string") {
4270
+ return;
4271
+ }
4272
+ return value;
4273
+ };
4274
+ var readValuesFromProps = (props, keys, flatSchema) => {
4250
4275
  const out = {};
4251
4276
  for (const key of keys) {
4252
- out[key] = getNestedValue(props, key);
4277
+ out[key] = flatSchema ? getRuntimeValueForSchemaKey({ flatSchema, key, props }) : getNestedValue(props, key);
4253
4278
  }
4254
4279
  return out;
4255
4280
  };
@@ -4257,6 +4282,7 @@ var selectActiveKeys = (schema, values) => {
4257
4282
  return Object.keys(flattenActiveSchema(schema, (key) => values[key]));
4258
4283
  };
4259
4284
  var mergeValues = ({
4285
+ flatSchema,
4260
4286
  props,
4261
4287
  valuesDotNotation,
4262
4288
  schemaKeys,
@@ -4265,6 +4291,9 @@ var mergeValues = ({
4265
4291
  const merged = { ...props };
4266
4292
  for (const key of schemaKeys) {
4267
4293
  const value = valuesDotNotation[key];
4294
+ if (flatSchema[key]?.type === "text-content" && value === undefined) {
4295
+ continue;
4296
+ }
4268
4297
  const parts = key.split(".");
4269
4298
  if (parts.length === 1) {
4270
4299
  merged[key] = value;
@@ -4282,7 +4311,8 @@ var mergeValues = ({
4282
4311
  }
4283
4312
  current[parts[parts.length - 1]] = value;
4284
4313
  }
4285
- deleteNestedKey(merged, propsToDelete);
4314
+ const propsToDeleteWithoutTextContent = new Set([...propsToDelete].filter((key) => !(flatSchema[key]?.type === "text-content" && valuesDotNotation[key] === undefined)));
4315
+ deleteNestedKey(merged, propsToDeleteWithoutTextContent);
4286
4316
  return merged;
4287
4317
  };
4288
4318
  var stackToOverrideMap = {};
@@ -4329,8 +4359,12 @@ var withInteractivitySchema = ({
4329
4359
  return newOverrideId;
4330
4360
  });
4331
4361
  const nodePath = nodePathMapping.overrideIdToNodePathMappings[overrideId] ?? null;
4332
- const runtimeValues = flatKeys.map((k) => getNestedValue(props, k));
4333
- const currentRuntimeValueDotNotation = useMemo13(() => readValuesFromProps(props, flatKeys), runtimeValues);
4362
+ const runtimeValues = flatKeys.map((key) => getRuntimeValueForSchemaKey({
4363
+ flatSchema,
4364
+ key,
4365
+ props
4366
+ }));
4367
+ const currentRuntimeValueDotNotation = useMemo13(() => readValuesFromProps(props, flatKeys, flatSchema), runtimeValues);
4334
4368
  const controls = useMemo13(() => {
4335
4369
  return {
4336
4370
  schema: schemaWithSequenceName,
@@ -4358,6 +4392,7 @@ var withInteractivitySchema = ({
4358
4392
  ]);
4359
4393
  const activeKeys = selectActiveKeys(schemaWithSequenceName, valuesDotNotation);
4360
4394
  const mergedProps = mergeValues({
4395
+ flatSchema,
4361
4396
  props,
4362
4397
  valuesDotNotation,
4363
4398
  schemaKeys: activeKeys,
@@ -7130,7 +7165,7 @@ var getTimelineDuration = ({
7130
7165
  trimAfter
7131
7166
  });
7132
7167
  if (parentSequenceDurationInFrames !== null) {
7133
- const cappedDuration = Math.min(parentSequenceDurationInFrames * playbackRate, mediaDuration);
7168
+ const cappedDuration = Math.min(parentSequenceDurationInFrames, mediaDuration);
7134
7169
  return Number(cappedDuration.toFixed(10));
7135
7170
  }
7136
7171
  return mediaDuration;
@@ -9291,8 +9326,8 @@ import {
9291
9326
  forwardRef as forwardRef10,
9292
9327
  useCallback as useCallback17,
9293
9328
  useContext as useContext32,
9294
- useEffect as useEffect17,
9295
9329
  useImperativeHandle as useImperativeHandle7,
9330
+ useLayoutEffect as useLayoutEffect10,
9296
9331
  useMemo as useMemo31,
9297
9332
  useRef as useRef23,
9298
9333
  useState as useState16
@@ -9380,6 +9415,18 @@ var loadImage = ({
9380
9415
  function exponentialBackoff(errorCount) {
9381
9416
  return 1000 * 2 ** (errorCount - 1);
9382
9417
  }
9418
+ var waitForNextFrame = ({
9419
+ onFrame
9420
+ }) => {
9421
+ if (typeof requestAnimationFrame === "undefined") {
9422
+ onFrame();
9423
+ return () => {
9424
+ return;
9425
+ };
9426
+ }
9427
+ const frame = requestAnimationFrame(onFrame);
9428
+ return () => cancelAnimationFrame(frame);
9429
+ };
9383
9430
  var CanvasImageContent = forwardRef10(({
9384
9431
  src,
9385
9432
  width,
@@ -9409,6 +9456,17 @@ var CanvasImageContent = forwardRef10(({
9409
9456
  overrideId: controls?.overrideId ?? null
9410
9457
  });
9411
9458
  const sequenceContext = useContext32(SequenceContext);
9459
+ const pendingLoadDelayRef = useRef23(null);
9460
+ const continuePendingLoadDelay = useCallback17(() => {
9461
+ const pending = pendingLoadDelayRef.current;
9462
+ if (!pending || pending.continued) {
9463
+ return;
9464
+ }
9465
+ pending.continued = true;
9466
+ pending.unblock();
9467
+ continueRender2(pending.handle);
9468
+ pendingLoadDelayRef.current = null;
9469
+ }, [continueRender2]);
9412
9470
  const sourceCanvas = useMemo31(() => {
9413
9471
  if (typeof document === "undefined") {
9414
9472
  return null;
@@ -9426,7 +9484,7 @@ var CanvasImageContent = forwardRef10(({
9426
9484
  ref.current = canvas;
9427
9485
  }
9428
9486
  }, [ref, refForOutline]);
9429
- useEffect17(() => {
9487
+ useLayoutEffect10(() => {
9430
9488
  const isPremounting = Boolean(sequenceContext?.premounting);
9431
9489
  const isPostmounting = Boolean(sequenceContext?.postmounting);
9432
9490
  const handle = delayRender2(`Rendering <CanvasImage> with src="${truncateSrcForLabel(actualSrc)}"`, {
@@ -9438,17 +9496,13 @@ var CanvasImageContent = forwardRef10(({
9438
9496
  };
9439
9497
  const controller = new AbortController;
9440
9498
  let cancelled = false;
9441
- let continued = false;
9442
9499
  let errorCount = 0;
9443
9500
  let timeoutId = null;
9444
9501
  setLoadedImage(null);
9445
- const continueRenderOnce = () => {
9446
- if (continued) {
9447
- return;
9448
- }
9449
- continued = true;
9450
- unblock();
9451
- continueRender2(handle);
9502
+ pendingLoadDelayRef.current = {
9503
+ handle,
9504
+ unblock,
9505
+ continued: false
9452
9506
  };
9453
9507
  const attemptLoad = () => {
9454
9508
  loadImage({ src: actualSrc, signal: controller.signal }).then((image) => {
@@ -9456,13 +9510,9 @@ var CanvasImageContent = forwardRef10(({
9456
9510
  return;
9457
9511
  }
9458
9512
  setLoadedImage(image);
9459
- }).then(() => {
9460
- if (!cancelled) {
9461
- continueRenderOnce();
9462
- }
9463
9513
  }).catch((err) => {
9464
9514
  if (err.name === "AbortError") {
9465
- continueRenderOnce();
9515
+ continuePendingLoadDelay();
9466
9516
  return;
9467
9517
  }
9468
9518
  errorCount++;
@@ -9476,7 +9526,7 @@ var CanvasImageContent = forwardRef10(({
9476
9526
  }, backoff);
9477
9527
  } else if (onError) {
9478
9528
  onError(err);
9479
- continueRenderOnce();
9529
+ continuePendingLoadDelay();
9480
9530
  } else {
9481
9531
  cancelRender2(err);
9482
9532
  }
@@ -9489,12 +9539,12 @@ var CanvasImageContent = forwardRef10(({
9489
9539
  clearTimeout(timeoutId);
9490
9540
  }
9491
9541
  controller.abort();
9492
- continueRenderOnce();
9542
+ continuePendingLoadDelay();
9493
9543
  };
9494
9544
  }, [
9495
9545
  actualSrc,
9496
9546
  cancelRender2,
9497
- continueRender2,
9547
+ continuePendingLoadDelay,
9498
9548
  delayPlayback,
9499
9549
  delayRender2,
9500
9550
  delayRenderRetries,
@@ -9505,13 +9555,16 @@ var CanvasImageContent = forwardRef10(({
9505
9555
  sequenceContext?.postmounting,
9506
9556
  sequenceContext?.premounting
9507
9557
  ]);
9508
- useEffect17(() => {
9558
+ useLayoutEffect10(() => {
9509
9559
  if (!loadedImage || !outputCanvas || !sourceCanvas) {
9510
9560
  return;
9511
9561
  }
9512
9562
  const handle = delayRender2(`Applying effects to <CanvasImage> with src="${truncateSrcForLabel(actualSrc)}"`);
9513
9563
  let cancelled = false;
9514
9564
  let continued = false;
9565
+ let cancelWaitForNextFrame = () => {
9566
+ return;
9567
+ };
9515
9568
  const continueRenderOnce = () => {
9516
9569
  if (continued) {
9517
9570
  return;
@@ -9546,7 +9599,15 @@ var CanvasImageContent = forwardRef10(({
9546
9599
  height: canvasHeight
9547
9600
  }).then((completed) => {
9548
9601
  if (completed && !cancelled) {
9549
- continueRenderOnce();
9602
+ cancelWaitForNextFrame = waitForNextFrame({
9603
+ onFrame: () => {
9604
+ if (cancelled) {
9605
+ return;
9606
+ }
9607
+ continueRenderOnce();
9608
+ continuePendingLoadDelay();
9609
+ }
9610
+ });
9550
9611
  }
9551
9612
  }).catch((err) => {
9552
9613
  if (cancelled) {
@@ -9555,12 +9616,14 @@ var CanvasImageContent = forwardRef10(({
9555
9616
  if (onError) {
9556
9617
  onError(err);
9557
9618
  continueRenderOnce();
9619
+ continuePendingLoadDelay();
9558
9620
  } else {
9559
9621
  cancelRender2(err);
9560
9622
  }
9561
9623
  });
9562
9624
  return () => {
9563
9625
  cancelled = true;
9626
+ cancelWaitForNextFrame();
9564
9627
  continueRenderOnce();
9565
9628
  };
9566
9629
  }, [
@@ -9568,6 +9631,7 @@ var CanvasImageContent = forwardRef10(({
9568
9631
  cancelRender2,
9569
9632
  chainState,
9570
9633
  continueRender2,
9634
+ continuePendingLoadDelay,
9571
9635
  delayRender2,
9572
9636
  fit,
9573
9637
  height,
@@ -9737,7 +9801,7 @@ var IFrameRefForwarding = ({
9737
9801
  };
9738
9802
  var IFrame = forwardRef11(IFrameRefForwarding);
9739
9803
  // src/Img.tsx
9740
- import { useCallback as useCallback19, useContext as useContext33, useLayoutEffect as useLayoutEffect10, useRef as useRef24 } from "react";
9804
+ import { useCallback as useCallback19, useContext as useContext33, useLayoutEffect as useLayoutEffect11, useRef as useRef24 } from "react";
9741
9805
  import { jsx as jsx28 } from "react/jsx-runtime";
9742
9806
  function exponentialBackoff2(errorCount) {
9743
9807
  return 1000 * 2 ** (errorCount - 1);
@@ -9814,7 +9878,7 @@ var ImgContent = ({
9814
9878
  if (typeof window !== "undefined") {
9815
9879
  const isPremounting = Boolean(sequenceContext?.premounting);
9816
9880
  const isPostmounting = Boolean(sequenceContext?.postmounting);
9817
- useLayoutEffect10(() => {
9881
+ useLayoutEffect11(() => {
9818
9882
  if (window.process?.env?.NODE_ENV === "test") {
9819
9883
  if (imageRef.current) {
9820
9884
  imageRef.current.src = actualSrc;
@@ -10084,7 +10148,8 @@ import { jsx as jsx29 } from "react/jsx-runtime";
10084
10148
  var interactiveElementSchema = {
10085
10149
  ...baseSchema,
10086
10150
  ...transformSchema,
10087
- ...textSchema
10151
+ ...textSchema,
10152
+ ...textContentSchema
10088
10153
  };
10089
10154
  var setRef = (ref, value) => {
10090
10155
  if (typeof ref === "function") {
@@ -10783,8 +10848,8 @@ import { useCallback as useCallback24 } from "react";
10783
10848
  import {
10784
10849
  useCallback as useCallback22,
10785
10850
  useContext as useContext36,
10786
- useEffect as useEffect18,
10787
- useLayoutEffect as useLayoutEffect11,
10851
+ useEffect as useEffect17,
10852
+ useLayoutEffect as useLayoutEffect12,
10788
10853
  useMemo as useMemo35,
10789
10854
  useState as useState19
10790
10855
  } from "react";
@@ -10846,7 +10911,7 @@ var OffthreadVideoForRendering = ({
10846
10911
  mediaVolume: 1
10847
10912
  });
10848
10913
  warnAboutTooHighVolume(volume);
10849
- useEffect18(() => {
10914
+ useEffect17(() => {
10850
10915
  if (!src) {
10851
10916
  throw new Error("No src passed");
10852
10917
  }
@@ -10903,7 +10968,7 @@ var OffthreadVideoForRendering = ({
10903
10968
  }, [toneMapped, currentTime, src, transparent]);
10904
10969
  const [imageSrc, setImageSrc] = useState19(null);
10905
10970
  const { delayRender: delayRender2, continueRender: continueRender2 } = useDelayRender();
10906
- useLayoutEffect11(() => {
10971
+ useLayoutEffect12(() => {
10907
10972
  if (!window.remotion_videoEnabled) {
10908
10973
  return;
10909
10974
  }
@@ -11009,7 +11074,7 @@ import React37, {
11009
11074
  forwardRef as forwardRef13,
11010
11075
  useCallback as useCallback23,
11011
11076
  useContext as useContext37,
11012
- useEffect as useEffect20,
11077
+ useEffect as useEffect19,
11013
11078
  useImperativeHandle as useImperativeHandle9,
11014
11079
  useMemo as useMemo36,
11015
11080
  useRef as useRef27,
@@ -11017,12 +11082,12 @@ import React37, {
11017
11082
  } from "react";
11018
11083
 
11019
11084
  // src/video/emit-video-frame.ts
11020
- import { useEffect as useEffect19 } from "react";
11085
+ import { useEffect as useEffect18 } from "react";
11021
11086
  var useEmitVideoFrame = ({
11022
11087
  ref,
11023
11088
  onVideoFrame
11024
11089
  }) => {
11025
- useEffect19(() => {
11090
+ useEffect18(() => {
11026
11091
  const { current } = ref;
11027
11092
  if (!current) {
11028
11093
  return;
@@ -11201,7 +11266,7 @@ var VideoForDevelopmentRefForwardingFunction = (props2, ref) => {
11201
11266
  tag: "video",
11202
11267
  mountTime
11203
11268
  }));
11204
- useEffect20(() => {
11269
+ useEffect19(() => {
11205
11270
  const { current } = videoRef;
11206
11271
  if (!current) {
11207
11272
  return;
@@ -11244,7 +11309,7 @@ var VideoForDevelopmentRefForwardingFunction = (props2, ref) => {
11244
11309
  const currentOnDurationCallback = useRef27(onDuration);
11245
11310
  currentOnDurationCallback.current = onDuration;
11246
11311
  useEmitVideoFrame({ ref: videoRef, onVideoFrame });
11247
- useEffect20(() => {
11312
+ useEffect19(() => {
11248
11313
  const { current } = videoRef;
11249
11314
  if (!current) {
11250
11315
  return;
@@ -11261,7 +11326,7 @@ var VideoForDevelopmentRefForwardingFunction = (props2, ref) => {
11261
11326
  current.removeEventListener("loadedmetadata", onLoadedMetadata);
11262
11327
  };
11263
11328
  }, [src]);
11264
- useEffect20(() => {
11329
+ useEffect19(() => {
11265
11330
  const { current } = videoRef;
11266
11331
  if (!current) {
11267
11332
  return;
@@ -11951,9 +12016,9 @@ import { forwardRef as forwardRef16, useCallback as useCallback25, useContext as
11951
12016
  import {
11952
12017
  forwardRef as forwardRef15,
11953
12018
  useContext as useContext38,
11954
- useEffect as useEffect21,
12019
+ useEffect as useEffect20,
11955
12020
  useImperativeHandle as useImperativeHandle10,
11956
- useLayoutEffect as useLayoutEffect12,
12021
+ useLayoutEffect as useLayoutEffect13,
11957
12022
  useMemo as useMemo39,
11958
12023
  useRef as useRef28
11959
12024
  } from "react";
@@ -12128,7 +12193,7 @@ var VideoForRenderingForwardFunction = ({
12128
12193
  mediaVolume: 1
12129
12194
  });
12130
12195
  warnAboutTooHighVolume(volume);
12131
- useEffect21(() => {
12196
+ useEffect20(() => {
12132
12197
  if (!props2.src) {
12133
12198
  throw new Error("No src passed");
12134
12199
  }
@@ -12172,7 +12237,7 @@ var VideoForRenderingForwardFunction = ({
12172
12237
  return videoRef.current;
12173
12238
  }, []);
12174
12239
  useEmitVideoFrame({ ref: videoRef, onVideoFrame });
12175
- useEffect21(() => {
12240
+ useEffect20(() => {
12176
12241
  if (!window.remotion_videoEnabled) {
12177
12242
  return;
12178
12243
  }
@@ -12262,7 +12327,7 @@ var VideoForRenderingForwardFunction = ({
12262
12327
  ]);
12263
12328
  const { src } = props2;
12264
12329
  if (environment.isRendering) {
12265
- useLayoutEffect12(() => {
12330
+ useLayoutEffect13(() => {
12266
12331
  if (window.process?.env?.NODE_ENV === "test") {
12267
12332
  return;
12268
12333
  }
@@ -1,5 +1,5 @@
1
1
  // src/version.ts
2
- var VERSION = "4.0.484";
2
+ var VERSION = "4.0.486";
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.484",
6
+ "version": "4.0.486",
7
7
  "description": "Make videos programmatically",
8
8
  "main": "dist/cjs/index.js",
9
9
  "types": "dist/cjs/index.d.ts",
@@ -11,7 +11,7 @@
11
11
  "scripts": {
12
12
  "formatting": "oxfmt src --check",
13
13
  "format": "oxfmt src",
14
- "prepublishOnly": "bun ensure-correct-version.ts && cp ../../README.md .",
14
+ "prepublishOnly": "bun ensure-correct-version.ts && cp ../../README.md . && cp ../../LICENSE.md .",
15
15
  "lint": "eslint src",
16
16
  "test": "bun test src/test",
17
17
  "make": "tsgo -d && bun --env-file=../.env.bundle bundle.ts"
@@ -35,7 +35,7 @@
35
35
  "react-dom": "19.2.3",
36
36
  "webpack": "5.105.0",
37
37
  "zod": "4.3.6",
38
- "@remotion/eslint-config-internal": "4.0.484",
38
+ "@remotion/eslint-config-internal": "4.0.486",
39
39
  "eslint": "9.19.0",
40
40
  "@typescript/native-preview": "7.0.0-dev.20260217.1"
41
41
  },