remotion 4.0.361 → 4.0.363

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/cjs/Img.js CHANGED
@@ -110,7 +110,9 @@ const ImgRefForwarding = ({ onError, maxRetries = 2, src, pauseWhenLoading, dela
110
110
  onImageFrame === null || onImageFrame === void 0 ? void 0 : onImageFrame(current);
111
111
  }
112
112
  unblock();
113
- continueRender(newHandle);
113
+ requestAnimationFrame(() => {
114
+ continueRender(newHandle);
115
+ });
114
116
  };
115
117
  if (!imageRef.current) {
116
118
  onComplete();
@@ -8,4 +8,6 @@ export declare const RemotionRoot: React.FC<{
8
8
  readonly onlyRenderComposition: string | null;
9
9
  readonly currentCompositionMetadata: BaseMetadata | null;
10
10
  readonly audioLatencyHint: AudioContextLatencyCategory;
11
+ readonly videoEnabled: boolean | null;
12
+ readonly audioEnabled: boolean | null;
11
13
  }>;
@@ -12,8 +12,9 @@ const prefetch_state_js_1 = require("./prefetch-state.js");
12
12
  const random_js_1 = require("./random.js");
13
13
  const timeline_position_state_js_1 = require("./timeline-position-state.js");
14
14
  const use_delay_render_js_1 = require("./use-delay-render.js");
15
+ const use_media_enabled_js_1 = require("./use-media-enabled.js");
15
16
  const duration_state_js_1 = require("./video/duration-state.js");
16
- const RemotionRoot = ({ children, numberOfAudioTags, logLevel, onlyRenderComposition, currentCompositionMetadata, audioLatencyHint, }) => {
17
+ const RemotionRoot = ({ children, numberOfAudioTags, logLevel, onlyRenderComposition, currentCompositionMetadata, audioLatencyHint, videoEnabled, audioEnabled, }) => {
17
18
  const [remotionRootId] = (0, react_1.useState)(() => String((0, random_js_1.random)(null)));
18
19
  const [frame, setFrame] = (0, react_1.useState)(() => (0, timeline_position_state_js_1.getInitialFrameState)());
19
20
  const [playing, setPlaying] = (0, react_1.useState)(false);
@@ -100,6 +101,6 @@ const RemotionRoot = ({ children, numberOfAudioTags, logLevel, onlyRenderComposi
100
101
  const logging = (0, react_1.useMemo)(() => {
101
102
  return { logLevel, mountTime: Date.now() };
102
103
  }, [logLevel]);
103
- return ((0, jsx_runtime_1.jsx)(log_level_context_js_1.LogLevelContext.Provider, { value: logging, children: (0, jsx_runtime_1.jsx)(nonce_js_1.NonceContext.Provider, { value: nonceContext, children: (0, jsx_runtime_1.jsx)(nonce_js_1.SetNonceContext.Provider, { value: setNonceContext, children: (0, jsx_runtime_1.jsx)(timeline_position_state_js_1.TimelineContext.Provider, { value: timelineContextValue, children: (0, jsx_runtime_1.jsx)(timeline_position_state_js_1.SetTimelineContext.Provider, { value: setTimelineContextValue, children: (0, jsx_runtime_1.jsx)(EditorProps_js_1.EditorPropsProvider, { children: (0, jsx_runtime_1.jsx)(prefetch_state_js_1.PrefetchProvider, { children: (0, jsx_runtime_1.jsx)(CompositionManager_js_1.CompositionManagerProvider, { numberOfAudioTags: numberOfAudioTags, onlyRenderComposition: onlyRenderComposition, currentCompositionMetadata: currentCompositionMetadata, audioLatencyHint: audioLatencyHint, children: (0, jsx_runtime_1.jsx)(duration_state_js_1.DurationsContextProvider, { children: (0, jsx_runtime_1.jsx)(buffering_js_1.BufferingProvider, { children: children }) }) }) }) }) }) }) }) }) }));
104
+ return ((0, jsx_runtime_1.jsx)(log_level_context_js_1.LogLevelContext.Provider, { value: logging, children: (0, jsx_runtime_1.jsx)(nonce_js_1.NonceContext.Provider, { value: nonceContext, children: (0, jsx_runtime_1.jsx)(nonce_js_1.SetNonceContext.Provider, { value: setNonceContext, children: (0, jsx_runtime_1.jsx)(timeline_position_state_js_1.TimelineContext.Provider, { value: timelineContextValue, children: (0, jsx_runtime_1.jsx)(timeline_position_state_js_1.SetTimelineContext.Provider, { value: setTimelineContextValue, children: (0, jsx_runtime_1.jsx)(use_media_enabled_js_1.MediaEnabledProvider, { videoEnabled: videoEnabled, audioEnabled: audioEnabled, children: (0, jsx_runtime_1.jsx)(EditorProps_js_1.EditorPropsProvider, { children: (0, jsx_runtime_1.jsx)(prefetch_state_js_1.PrefetchProvider, { children: (0, jsx_runtime_1.jsx)(CompositionManager_js_1.CompositionManagerProvider, { numberOfAudioTags: numberOfAudioTags, onlyRenderComposition: onlyRenderComposition, currentCompositionMetadata: currentCompositionMetadata, audioLatencyHint: audioLatencyHint, children: (0, jsx_runtime_1.jsx)(duration_state_js_1.DurationsContextProvider, { children: (0, jsx_runtime_1.jsx)(buffering_js_1.BufferingProvider, { children: children }) }) }) }) }) }) }) }) }) }) }));
104
105
  };
105
106
  exports.RemotionRoot = RemotionRoot;
@@ -2,6 +2,7 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.getInputProps = void 0;
4
4
  const get_remotion_environment_js_1 = require("../get-remotion-environment.js");
5
+ const input_props_override_js_1 = require("../input-props-override.js");
5
6
  const input_props_serialization_js_1 = require("../input-props-serialization.js");
6
7
  let didWarnSSRImport = false;
7
8
  const warnOnceSSRImport = () => {
@@ -24,6 +25,10 @@ const getInputProps = () => {
24
25
  if ((0, get_remotion_environment_js_1.getRemotionEnvironment)().isPlayer) {
25
26
  throw new Error('You cannot call `getInputProps()` from a <Player>. Instead, the props are available as React props from component that you passed as `component` prop.');
26
27
  }
28
+ const override = (0, input_props_override_js_1.getInputPropsOverride)();
29
+ if (override) {
30
+ return override;
31
+ }
27
32
  const param = window.remotion_inputProps;
28
33
  if (!param) {
29
34
  return {};
@@ -5,16 +5,13 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
6
  exports.addSequenceStackTraces = exports.enableSequenceStackTraces = void 0;
7
7
  const react_1 = __importDefault(require("react"));
8
+ const jsx_runtime_1 = __importDefault(require("react/jsx-runtime"));
8
9
  const get_remotion_environment_1 = require("./get-remotion-environment");
9
10
  const originalCreateElement = react_1.default.createElement;
11
+ const originalJsx = jsx_runtime_1.default.jsx;
10
12
  const componentsToAddStacksTo = [];
11
- // Gets called when a new component is added,
12
- // also when the Studio is mounted
13
- const enableSequenceStackTraces = () => {
14
- if (!(0, get_remotion_environment_1.getRemotionEnvironment)().isStudio) {
15
- return;
16
- }
17
- const proxy = new Proxy(originalCreateElement, {
13
+ const enableProxy = (api) => {
14
+ return new Proxy(api, {
18
15
  apply(target, thisArg, argArray) {
19
16
  if (componentsToAddStacksTo.includes(argArray[0])) {
20
17
  const [first, props, ...rest] = argArray;
@@ -27,7 +24,15 @@ const enableSequenceStackTraces = () => {
27
24
  return Reflect.apply(target, thisArg, argArray);
28
25
  },
29
26
  });
30
- react_1.default.createElement = proxy;
27
+ };
28
+ // Gets called when a new component is added,
29
+ // also when the Studio is mounted
30
+ const enableSequenceStackTraces = () => {
31
+ if (!(0, get_remotion_environment_1.getRemotionEnvironment)().isStudio) {
32
+ return;
33
+ }
34
+ react_1.default.createElement = enableProxy(originalCreateElement);
35
+ jsx_runtime_1.default.jsx = enableProxy(originalJsx);
31
36
  };
32
37
  exports.enableSequenceStackTraces = enableSequenceStackTraces;
33
38
  const addSequenceStackTraces = (component) => {
@@ -0,0 +1,2 @@
1
+ export declare const getInputPropsOverride: () => Record<string, unknown> | null;
2
+ export declare const setInputPropsOverride: (override: Record<string, unknown> | null) => void;
@@ -0,0 +1,25 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.setInputPropsOverride = exports.getInputPropsOverride = void 0;
4
+ const getKey = () => {
5
+ return `remotion_inputPropsOverride` + window.location.origin;
6
+ };
7
+ const getInputPropsOverride = () => {
8
+ if (typeof localStorage === 'undefined')
9
+ return null;
10
+ const override = localStorage.getItem(getKey());
11
+ if (!override)
12
+ return null;
13
+ return JSON.parse(override);
14
+ };
15
+ exports.getInputPropsOverride = getInputPropsOverride;
16
+ const setInputPropsOverride = (override) => {
17
+ if (typeof localStorage === 'undefined')
18
+ return;
19
+ if (override === null) {
20
+ localStorage.removeItem(getKey());
21
+ return;
22
+ }
23
+ localStorage.setItem(getKey(), JSON.stringify(override));
24
+ };
25
+ exports.setInputPropsOverride = setInputPropsOverride;
@@ -78,6 +78,8 @@ export declare const Internals: {
78
78
  readonly onlyRenderComposition: string | null;
79
79
  readonly currentCompositionMetadata: import("./CompositionManagerContext.js").BaseMetadata | null;
80
80
  readonly audioLatencyHint: AudioContextLatencyCategory;
81
+ readonly videoEnabled: boolean | null;
82
+ readonly audioEnabled: boolean | null;
81
83
  }>;
82
84
  readonly useVideo: () => (import("./video-config.js").VideoConfig & {
83
85
  component: import("react").LazyExoticComponent<import("react").ComponentType<Record<string, unknown>>>;
@@ -350,5 +352,9 @@ export declare const Internals: {
350
352
  isStudio: boolean;
351
353
  finalDisplayName: string;
352
354
  };
355
+ readonly getInputPropsOverride: () => Record<string, unknown> | null;
356
+ readonly setInputPropsOverride: (override: Record<string, unknown> | null) => void;
357
+ readonly useVideoEnabled: () => boolean;
358
+ readonly useAudioEnabled: () => boolean;
353
359
  };
354
360
  export type { CompositionManagerContext, CompProps, LoggingContextValue, MediaVolumeContextValue, RemotionEnvironment, SerializedJSONWithCustomFields, SetMediaVolumeContextValue, SetTimelineContextValue, TCompMetadata, TComposition, TimelineContextValue, TRenderAsset, TSequence, WatchRemotionStaticFilesPayload, };
@@ -50,6 +50,7 @@ const EditorProps_js_1 = require("./EditorProps.js");
50
50
  const enable_sequence_stack_traces_js_1 = require("./enable-sequence-stack-traces.js");
51
51
  const get_preview_dom_element_js_1 = require("./get-preview-dom-element.js");
52
52
  const get_remotion_environment_js_1 = require("./get-remotion-environment.js");
53
+ const input_props_override_js_1 = require("./input-props-override.js");
53
54
  const is_player_js_1 = require("./is-player.js");
54
55
  const log_level_context_js_1 = require("./log-level-context.js");
55
56
  const log_js_1 = require("./log.js");
@@ -72,6 +73,7 @@ const timeline_position_state_js_1 = require("./timeline-position-state.js");
72
73
  const truthy_js_1 = require("./truthy.js");
73
74
  const use_current_scale_js_1 = require("./use-current-scale.js");
74
75
  const use_lazy_component_js_1 = require("./use-lazy-component.js");
76
+ const use_media_enabled_js_1 = require("./use-media-enabled.js");
75
77
  const use_media_in_timeline_js_1 = require("./use-media-in-timeline.js");
76
78
  const use_unsafe_video_config_js_1 = require("./use-unsafe-video-config.js");
77
79
  const use_video_js_1 = require("./use-video.js");
@@ -176,4 +178,8 @@ exports.Internals = {
176
178
  OBJECTFIT_CONTAIN_CLASS_NAME: default_css_js_1.OBJECTFIT_CONTAIN_CLASS_NAME,
177
179
  InnerOffthreadVideo: OffthreadVideo_js_1.InnerOffthreadVideo,
178
180
  useBasicMediaInTimeline: use_media_in_timeline_js_1.useBasicMediaInTimeline,
181
+ getInputPropsOverride: input_props_override_js_1.getInputPropsOverride,
182
+ setInputPropsOverride: input_props_override_js_1.setInputPropsOverride,
183
+ useVideoEnabled: use_media_enabled_js_1.useVideoEnabled,
184
+ useAudioEnabled: use_media_enabled_js_1.useAudioEnabled,
179
185
  };
package/dist/cjs/log.js CHANGED
@@ -17,7 +17,9 @@ const transformArgs = ({ args, logLevel, tag, }) => {
17
17
  !(0, get_remotion_environment_1.getRemotionEnvironment)().isClientSideRendering) {
18
18
  arr.unshift(Symbol.for(`__remotion_level_${logLevel}`));
19
19
  }
20
- if (tag) {
20
+ if (tag &&
21
+ (0, get_remotion_environment_1.getRemotionEnvironment)().isRendering &&
22
+ !(0, get_remotion_environment_1.getRemotionEnvironment)().isClientSideRendering) {
21
23
  arr.unshift(Symbol.for(`__remotion_tag_${tag}`));
22
24
  }
23
25
  return arr;
@@ -0,0 +1,2 @@
1
+ export declare const useVideoEnabled: () => boolean;
2
+ export declare const useAudioEnabled: () => boolean;
@@ -0,0 +1,11 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.useAudioEnabled = exports.useVideoEnabled = void 0;
4
+ const useVideoEnabled = () => {
5
+ return window.remotion_videoEnabled;
6
+ };
7
+ exports.useVideoEnabled = useVideoEnabled;
8
+ const useAudioEnabled = () => {
9
+ return window.remotion_audioEnabled;
10
+ };
11
+ exports.useAudioEnabled = useAudioEnabled;
@@ -0,0 +1,7 @@
1
+ export declare const useVideoEnabled: () => boolean;
2
+ export declare const useAudioEnabled: () => boolean;
3
+ export declare const MediaEnabledProvider: ({ children, videoEnabled, audioEnabled, }: {
4
+ readonly children: React.ReactNode;
5
+ readonly videoEnabled: boolean | null;
6
+ readonly audioEnabled: boolean | null;
7
+ }) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,33 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.MediaEnabledProvider = exports.useAudioEnabled = exports.useVideoEnabled = void 0;
4
+ const jsx_runtime_1 = require("react/jsx-runtime");
5
+ const react_1 = require("react");
6
+ const MediaEnabledContext = (0, react_1.createContext)(null);
7
+ const useVideoEnabled = () => {
8
+ const context = (0, react_1.useContext)(MediaEnabledContext);
9
+ if (!context) {
10
+ return window.remotion_videoEnabled;
11
+ }
12
+ if (context.videoEnabled === null) {
13
+ return window.remotion_videoEnabled;
14
+ }
15
+ return context.videoEnabled;
16
+ };
17
+ exports.useVideoEnabled = useVideoEnabled;
18
+ const useAudioEnabled = () => {
19
+ const context = (0, react_1.useContext)(MediaEnabledContext);
20
+ if (!context) {
21
+ return window.remotion_audioEnabled;
22
+ }
23
+ if (context.audioEnabled === null) {
24
+ return window.remotion_audioEnabled;
25
+ }
26
+ return context.audioEnabled;
27
+ };
28
+ exports.useAudioEnabled = useAudioEnabled;
29
+ const MediaEnabledProvider = ({ children, videoEnabled, audioEnabled, }) => {
30
+ const value = (0, react_1.useMemo)(() => ({ videoEnabled, audioEnabled }), [videoEnabled, audioEnabled]);
31
+ return ((0, jsx_runtime_1.jsx)(MediaEnabledContext.Provider, { value: value, children: children }));
32
+ };
33
+ exports.MediaEnabledProvider = MediaEnabledProvider;
@@ -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.361";
6
+ export declare const VERSION = "4.0.363";
@@ -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.361';
10
+ exports.VERSION = '4.0.363';
@@ -34,6 +34,7 @@ var Clipper = () => {
34
34
 
35
35
  // src/enable-sequence-stack-traces.ts
36
36
  import React from "react";
37
+ import JsxRuntime from "react/jsx-runtime";
37
38
 
38
39
  // src/get-remotion-environment.ts
39
40
  function getNodeEnvString() {
@@ -58,12 +59,10 @@ var getRemotionEnvironment = () => {
58
59
 
59
60
  // src/enable-sequence-stack-traces.ts
60
61
  var originalCreateElement = React.createElement;
62
+ var originalJsx = JsxRuntime.jsx;
61
63
  var componentsToAddStacksTo = [];
62
- var enableSequenceStackTraces = () => {
63
- if (!getRemotionEnvironment().isStudio) {
64
- return;
65
- }
66
- const proxy = new Proxy(originalCreateElement, {
64
+ var enableProxy = (api) => {
65
+ return new Proxy(api, {
67
66
  apply(target, thisArg, argArray) {
68
67
  if (componentsToAddStacksTo.includes(argArray[0])) {
69
68
  const [first, props, ...rest] = argArray;
@@ -76,7 +75,13 @@ var enableSequenceStackTraces = () => {
76
75
  return Reflect.apply(target, thisArg, argArray);
77
76
  }
78
77
  });
79
- React.createElement = proxy;
78
+ };
79
+ var enableSequenceStackTraces = () => {
80
+ if (!getRemotionEnvironment().isStudio) {
81
+ return;
82
+ }
83
+ React.createElement = enableProxy(originalCreateElement);
84
+ JsxRuntime.jsx = enableProxy(originalJsx);
80
85
  };
81
86
  var addSequenceStackTraces = (component) => {
82
87
  componentsToAddStacksTo.push(component);
@@ -105,7 +110,7 @@ function truthy(value) {
105
110
  }
106
111
 
107
112
  // src/version.ts
108
- var VERSION = "4.0.361";
113
+ var VERSION = "4.0.363";
109
114
 
110
115
  // src/multiple-versions-warning.ts
111
116
  var checkMultipleRemotionVersions = () => {
@@ -456,6 +461,28 @@ var EditorPropsProvider = ({ children }) => {
456
461
  });
457
462
  };
458
463
 
464
+ // src/input-props-override.ts
465
+ var getKey = () => {
466
+ return `remotion_inputPropsOverride` + window.location.origin;
467
+ };
468
+ var getInputPropsOverride = () => {
469
+ if (typeof localStorage === "undefined")
470
+ return null;
471
+ const override = localStorage.getItem(getKey());
472
+ if (!override)
473
+ return null;
474
+ return JSON.parse(override);
475
+ };
476
+ var setInputPropsOverride = (override) => {
477
+ if (typeof localStorage === "undefined")
478
+ return;
479
+ if (override === null) {
480
+ localStorage.removeItem(getKey());
481
+ return;
482
+ }
483
+ localStorage.setItem(getKey(), JSON.stringify(override));
484
+ };
485
+
459
486
  // src/input-props-serialization.ts
460
487
  var DATE_TOKEN = "remotion-date:";
461
488
  var FILE_TOKEN = "remotion-file:";
@@ -538,6 +565,10 @@ var getInputProps = () => {
538
565
  if (getRemotionEnvironment().isPlayer) {
539
566
  throw new Error("You cannot call `getInputProps()` from a <Player>. Instead, the props are available as React props from component that you passed as `component` prop.");
540
567
  }
568
+ const override = getInputPropsOverride();
569
+ if (override) {
570
+ return override;
571
+ }
541
572
  const param = window.remotion_inputProps;
542
573
  if (!param) {
543
574
  return {};
@@ -1643,7 +1674,7 @@ var transformArgs = ({
1643
1674
  if (getRemotionEnvironment().isRendering && !getRemotionEnvironment().isClientSideRendering) {
1644
1675
  arr.unshift(Symbol.for(`__remotion_level_${logLevel}`));
1645
1676
  }
1646
- if (tag) {
1677
+ if (tag && getRemotionEnvironment().isRendering && !getRemotionEnvironment().isClientSideRendering) {
1647
1678
  arr.unshift(Symbol.for(`__remotion_tag_${tag}`));
1648
1679
  }
1649
1680
  return arr;
@@ -5656,7 +5687,9 @@ var ImgRefForwarding = ({
5656
5687
  onImageFrame?.(current);
5657
5688
  }
5658
5689
  unblock();
5659
- continueRender2(newHandle);
5690
+ requestAnimationFrame(() => {
5691
+ continueRender2(newHandle);
5692
+ });
5660
5693
  };
5661
5694
  if (!imageRef.current) {
5662
5695
  onComplete();
@@ -5925,18 +5958,58 @@ var waitForRoot = (fn) => {
5925
5958
  import {
5926
5959
  useEffect as useEffect18,
5927
5960
  useLayoutEffect as useLayoutEffect8,
5928
- useMemo as useMemo25,
5961
+ useMemo as useMemo26,
5929
5962
  useRef as useRef15,
5930
5963
  useState as useState17
5931
5964
  } from "react";
5965
+
5966
+ // src/use-media-enabled.tsx
5967
+ import { createContext as createContext18, useContext as useContext30, useMemo as useMemo25 } from "react";
5932
5968
  import { jsx as jsx26 } from "react/jsx-runtime";
5969
+ var MediaEnabledContext = createContext18(null);
5970
+ var useVideoEnabled = () => {
5971
+ const context = useContext30(MediaEnabledContext);
5972
+ if (!context) {
5973
+ return window.remotion_videoEnabled;
5974
+ }
5975
+ if (context.videoEnabled === null) {
5976
+ return window.remotion_videoEnabled;
5977
+ }
5978
+ return context.videoEnabled;
5979
+ };
5980
+ var useAudioEnabled = () => {
5981
+ const context = useContext30(MediaEnabledContext);
5982
+ if (!context) {
5983
+ return window.remotion_audioEnabled;
5984
+ }
5985
+ if (context.audioEnabled === null) {
5986
+ return window.remotion_audioEnabled;
5987
+ }
5988
+ return context.audioEnabled;
5989
+ };
5990
+ var MediaEnabledProvider = ({
5991
+ children,
5992
+ videoEnabled,
5993
+ audioEnabled
5994
+ }) => {
5995
+ const value = useMemo25(() => ({ videoEnabled, audioEnabled }), [videoEnabled, audioEnabled]);
5996
+ return /* @__PURE__ */ jsx26(MediaEnabledContext.Provider, {
5997
+ value,
5998
+ children
5999
+ });
6000
+ };
6001
+
6002
+ // src/RemotionRoot.tsx
6003
+ import { jsx as jsx27 } from "react/jsx-runtime";
5933
6004
  var RemotionRoot = ({
5934
6005
  children,
5935
6006
  numberOfAudioTags,
5936
6007
  logLevel,
5937
6008
  onlyRenderComposition,
5938
6009
  currentCompositionMetadata,
5939
- audioLatencyHint
6010
+ audioLatencyHint,
6011
+ videoEnabled,
6012
+ audioEnabled
5940
6013
  }) => {
5941
6014
  const [remotionRootId] = useState17(() => String(random(null)));
5942
6015
  const [frame, setFrame] = useState17(() => getInitialFrameState());
@@ -5973,7 +6046,7 @@ var RemotionRoot = ({
5973
6046
  window.remotion_isPlayer = false;
5974
6047
  }, [continueRender2, delayRender2]);
5975
6048
  }
5976
- const timelineContextValue = useMemo25(() => {
6049
+ const timelineContextValue = useMemo26(() => {
5977
6050
  return {
5978
6051
  frame,
5979
6052
  playing,
@@ -5984,13 +6057,13 @@ var RemotionRoot = ({
5984
6057
  audioAndVideoTags
5985
6058
  };
5986
6059
  }, [frame, playbackRate, playing, remotionRootId]);
5987
- const setTimelineContextValue = useMemo25(() => {
6060
+ const setTimelineContextValue = useMemo26(() => {
5988
6061
  return {
5989
6062
  setFrame,
5990
6063
  setPlaying
5991
6064
  };
5992
6065
  }, []);
5993
- const nonceContext = useMemo25(() => {
6066
+ const nonceContext = useMemo26(() => {
5994
6067
  let counter = 0;
5995
6068
  return {
5996
6069
  getNonce: () => counter++,
@@ -5998,7 +6071,7 @@ var RemotionRoot = ({
5998
6071
  manualRefreshes
5999
6072
  };
6000
6073
  }, [fastRefreshes, manualRefreshes]);
6001
- const setNonceContext = useMemo25(() => {
6074
+ const setNonceContext = useMemo26(() => {
6002
6075
  return {
6003
6076
  increaseManualRefreshes: () => {
6004
6077
  setManualRefreshes((i) => i + 1);
@@ -6016,29 +6089,33 @@ var RemotionRoot = ({
6016
6089
  }
6017
6090
  }
6018
6091
  }, []);
6019
- const logging = useMemo25(() => {
6092
+ const logging = useMemo26(() => {
6020
6093
  return { logLevel, mountTime: Date.now() };
6021
6094
  }, [logLevel]);
6022
- return /* @__PURE__ */ jsx26(LogLevelContext.Provider, {
6095
+ return /* @__PURE__ */ jsx27(LogLevelContext.Provider, {
6023
6096
  value: logging,
6024
- children: /* @__PURE__ */ jsx26(NonceContext.Provider, {
6097
+ children: /* @__PURE__ */ jsx27(NonceContext.Provider, {
6025
6098
  value: nonceContext,
6026
- children: /* @__PURE__ */ jsx26(SetNonceContext.Provider, {
6099
+ children: /* @__PURE__ */ jsx27(SetNonceContext.Provider, {
6027
6100
  value: setNonceContext,
6028
- children: /* @__PURE__ */ jsx26(TimelineContext.Provider, {
6101
+ children: /* @__PURE__ */ jsx27(TimelineContext.Provider, {
6029
6102
  value: timelineContextValue,
6030
- children: /* @__PURE__ */ jsx26(SetTimelineContext.Provider, {
6103
+ children: /* @__PURE__ */ jsx27(SetTimelineContext.Provider, {
6031
6104
  value: setTimelineContextValue,
6032
- children: /* @__PURE__ */ jsx26(EditorPropsProvider, {
6033
- children: /* @__PURE__ */ jsx26(PrefetchProvider, {
6034
- children: /* @__PURE__ */ jsx26(CompositionManagerProvider, {
6035
- numberOfAudioTags,
6036
- onlyRenderComposition,
6037
- currentCompositionMetadata,
6038
- audioLatencyHint,
6039
- children: /* @__PURE__ */ jsx26(DurationsContextProvider, {
6040
- children: /* @__PURE__ */ jsx26(BufferingProvider, {
6041
- children
6105
+ children: /* @__PURE__ */ jsx27(MediaEnabledProvider, {
6106
+ videoEnabled,
6107
+ audioEnabled,
6108
+ children: /* @__PURE__ */ jsx27(EditorPropsProvider, {
6109
+ children: /* @__PURE__ */ jsx27(PrefetchProvider, {
6110
+ children: /* @__PURE__ */ jsx27(CompositionManagerProvider, {
6111
+ numberOfAudioTags,
6112
+ onlyRenderComposition,
6113
+ currentCompositionMetadata,
6114
+ audioLatencyHint,
6115
+ children: /* @__PURE__ */ jsx27(DurationsContextProvider, {
6116
+ children: /* @__PURE__ */ jsx27(BufferingProvider, {
6117
+ children
6118
+ })
6042
6119
  })
6043
6120
  })
6044
6121
  })
@@ -6079,9 +6156,9 @@ var setupEnvVariables = () => {
6079
6156
  };
6080
6157
 
6081
6158
  // src/use-current-scale.ts
6082
- import React26, { createContext as createContext18 } from "react";
6159
+ import React26, { createContext as createContext19 } from "react";
6083
6160
  var CurrentScaleContext = React26.createContext(null);
6084
- var PreviewSizeContext = createContext18({
6161
+ var PreviewSizeContext = createContext19({
6085
6162
  setSize: () => {
6086
6163
  return;
6087
6164
  },
@@ -6141,10 +6218,10 @@ import { useCallback as useCallback16 } from "react";
6141
6218
  // src/video/OffthreadVideoForRendering.tsx
6142
6219
  import {
6143
6220
  useCallback as useCallback15,
6144
- useContext as useContext30,
6221
+ useContext as useContext31,
6145
6222
  useEffect as useEffect19,
6146
6223
  useLayoutEffect as useLayoutEffect9,
6147
- useMemo as useMemo26,
6224
+ useMemo as useMemo27,
6148
6225
  useState as useState18
6149
6226
  } from "react";
6150
6227
 
@@ -6159,7 +6236,7 @@ var getOffthreadVideoSource = ({
6159
6236
  };
6160
6237
 
6161
6238
  // src/video/OffthreadVideoForRendering.tsx
6162
- import { jsx as jsx27 } from "react/jsx-runtime";
6239
+ import { jsx as jsx28 } from "react/jsx-runtime";
6163
6240
  var OffthreadVideoForRendering = ({
6164
6241
  onError,
6165
6242
  volume: volumeProp,
@@ -6183,13 +6260,13 @@ var OffthreadVideoForRendering = ({
6183
6260
  const frame = useCurrentFrame();
6184
6261
  const volumePropsFrame = useFrameForVolumeProp(loopVolumeCurveBehavior);
6185
6262
  const videoConfig = useUnsafeVideoConfig();
6186
- const sequenceContext = useContext30(SequenceContext);
6263
+ const sequenceContext = useContext31(SequenceContext);
6187
6264
  const mediaStartsAt = useMediaStartsAt();
6188
- const { registerRenderAsset, unregisterRenderAsset } = useContext30(RenderAssetManager);
6265
+ const { registerRenderAsset, unregisterRenderAsset } = useContext31(RenderAssetManager);
6189
6266
  if (!src) {
6190
6267
  throw new TypeError("No `src` was passed to <OffthreadVideo>.");
6191
6268
  }
6192
- const id = useMemo26(() => `offthreadvideo-${random(src)}-${sequenceContext?.cumulatedFrom}-${sequenceContext?.relativeFrom}-${sequenceContext?.durationInFrames}`, [
6269
+ const id = useMemo27(() => `offthreadvideo-${random(src)}-${sequenceContext?.cumulatedFrom}-${sequenceContext?.relativeFrom}-${sequenceContext?.durationInFrames}`, [
6193
6270
  src,
6194
6271
  sequenceContext?.cumulatedFrom,
6195
6272
  sequenceContext?.relativeFrom,
@@ -6244,14 +6321,14 @@ var OffthreadVideoForRendering = ({
6244
6321
  sequenceContext?.relativeFrom,
6245
6322
  audioStreamIndex
6246
6323
  ]);
6247
- const currentTime = useMemo26(() => {
6324
+ const currentTime = useMemo27(() => {
6248
6325
  return getExpectedMediaFrameUncorrected({
6249
6326
  frame,
6250
6327
  playbackRate: playbackRate || 1,
6251
6328
  startFrom: -mediaStartsAt
6252
6329
  }) / videoConfig.fps;
6253
6330
  }, [frame, mediaStartsAt, playbackRate, videoConfig.fps]);
6254
- const actualSrc = useMemo26(() => {
6331
+ const actualSrc = useMemo27(() => {
6255
6332
  return getOffthreadVideoSource({
6256
6333
  src,
6257
6334
  currentTime,
@@ -6339,7 +6416,7 @@ var OffthreadVideoForRendering = ({
6339
6416
  cancelRender("Failed to load image with src " + imageSrc);
6340
6417
  }
6341
6418
  }, [imageSrc, onError]);
6342
- const className = useMemo26(() => {
6419
+ const className = useMemo27(() => {
6343
6420
  return [OBJECTFIT_CONTAIN_CLASS_NAME, props2.className].filter(truthy).join(" ");
6344
6421
  }, [props2.className]);
6345
6422
  const onImageFrame = useCallback15((img) => {
@@ -6351,7 +6428,7 @@ var OffthreadVideoForRendering = ({
6351
6428
  return null;
6352
6429
  }
6353
6430
  continueRender2(imageSrc.handle);
6354
- return /* @__PURE__ */ jsx27(Img, {
6431
+ return /* @__PURE__ */ jsx28(Img, {
6355
6432
  src: imageSrc.src,
6356
6433
  delayRenderRetries,
6357
6434
  delayRenderTimeoutInMilliseconds,
@@ -6365,10 +6442,10 @@ var OffthreadVideoForRendering = ({
6365
6442
  // src/video/VideoForPreview.tsx
6366
6443
  import {
6367
6444
  forwardRef as forwardRef9,
6368
- useContext as useContext31,
6445
+ useContext as useContext32,
6369
6446
  useEffect as useEffect21,
6370
6447
  useImperativeHandle as useImperativeHandle9,
6371
- useMemo as useMemo27,
6448
+ useMemo as useMemo28,
6372
6449
  useRef as useRef16,
6373
6450
  useState as useState19
6374
6451
  } from "react";
@@ -6403,14 +6480,14 @@ var useEmitVideoFrame = ({
6403
6480
  };
6404
6481
 
6405
6482
  // src/video/VideoForPreview.tsx
6406
- import { jsx as jsx28 } from "react/jsx-runtime";
6483
+ import { jsx as jsx29 } from "react/jsx-runtime";
6407
6484
  var VideoForDevelopmentRefForwardingFunction = (props2, ref) => {
6408
- const context = useContext31(SharedAudioContext);
6485
+ const context = useContext32(SharedAudioContext);
6409
6486
  if (!context) {
6410
6487
  throw new Error("SharedAudioContext not found");
6411
6488
  }
6412
6489
  const videoRef = useRef16(null);
6413
- const sharedSource = useMemo27(() => {
6490
+ const sharedSource = useMemo28(() => {
6414
6491
  if (!context.audioContext) {
6415
6492
  return null;
6416
6493
  }
@@ -6453,8 +6530,8 @@ var VideoForDevelopmentRefForwardingFunction = (props2, ref) => {
6453
6530
  }
6454
6531
  const volumePropFrame = useFrameForVolumeProp(loopVolumeCurveBehavior ?? "repeat");
6455
6532
  const { fps, durationInFrames } = useVideoConfig();
6456
- const parentSequence = useContext31(SequenceContext);
6457
- const { hidden } = useContext31(SequenceVisibilityToggleContext);
6533
+ const parentSequence = useContext32(SequenceContext);
6534
+ const { hidden } = useContext32(SequenceVisibilityToggleContext);
6458
6535
  const logLevel = useLogLevel();
6459
6536
  const mountTime = useMountTime();
6460
6537
  const [timelineId] = useState19(() => String(Math.random()));
@@ -6588,7 +6665,7 @@ var VideoForDevelopmentRefForwardingFunction = (props2, ref) => {
6588
6665
  current.preload = "auto";
6589
6666
  }
6590
6667
  }, []);
6591
- const actualStyle = useMemo27(() => {
6668
+ const actualStyle = useMemo28(() => {
6592
6669
  return {
6593
6670
  ...style,
6594
6671
  opacity: isSequenceHidden ? 0 : style?.opacity ?? 1
@@ -6598,7 +6675,7 @@ var VideoForDevelopmentRefForwardingFunction = (props2, ref) => {
6598
6675
  crossOrigin,
6599
6676
  requestsVideoFrame: Boolean(onVideoFrame)
6600
6677
  });
6601
- return /* @__PURE__ */ jsx28("video", {
6678
+ return /* @__PURE__ */ jsx29("video", {
6602
6679
  ref: videoRef,
6603
6680
  muted: muted || mediaMuted || isSequenceHidden || userPreferredVolume <= 0,
6604
6681
  playsInline: true,
@@ -6613,7 +6690,7 @@ var VideoForDevelopmentRefForwardingFunction = (props2, ref) => {
6613
6690
  var VideoForPreview = forwardRef9(VideoForDevelopmentRefForwardingFunction);
6614
6691
 
6615
6692
  // src/video/OffthreadVideo.tsx
6616
- import { jsx as jsx29 } from "react/jsx-runtime";
6693
+ import { jsx as jsx30 } from "react/jsx-runtime";
6617
6694
  var InnerOffthreadVideo = (props2) => {
6618
6695
  const {
6619
6696
  startFrom,
@@ -6641,13 +6718,13 @@ var InnerOffthreadVideo = (props2) => {
6641
6718
  trimAfter
6642
6719
  });
6643
6720
  if (typeof trimBeforeValue !== "undefined" || typeof trimAfterValue !== "undefined") {
6644
- return /* @__PURE__ */ jsx29(Sequence, {
6721
+ return /* @__PURE__ */ jsx30(Sequence, {
6645
6722
  layout: "none",
6646
6723
  from: 0 - (trimBeforeValue ?? 0),
6647
6724
  showInTimeline: false,
6648
6725
  durationInFrames: trimAfterValue,
6649
6726
  name,
6650
- children: /* @__PURE__ */ jsx29(InnerOffthreadVideo, {
6727
+ children: /* @__PURE__ */ jsx30(InnerOffthreadVideo, {
6651
6728
  pauseWhenBuffering: pauseWhenBuffering ?? false,
6652
6729
  ...otherProps,
6653
6730
  trimAfter: undefined,
@@ -6662,7 +6739,7 @@ var InnerOffthreadVideo = (props2) => {
6662
6739
  }
6663
6740
  validateMediaProps(props2, "Video");
6664
6741
  if (environment.isRendering) {
6665
- return /* @__PURE__ */ jsx29(OffthreadVideoForRendering, {
6742
+ return /* @__PURE__ */ jsx30(OffthreadVideoForRendering, {
6666
6743
  pauseWhenBuffering: pauseWhenBuffering ?? false,
6667
6744
  ...otherProps,
6668
6745
  trimAfter: undefined,
@@ -6684,7 +6761,7 @@ var InnerOffthreadVideo = (props2) => {
6684
6761
  delayRenderTimeoutInMilliseconds,
6685
6762
  ...propsForPreview
6686
6763
  } = otherProps;
6687
- return /* @__PURE__ */ jsx29(VideoForPreview, {
6764
+ return /* @__PURE__ */ jsx30(VideoForPreview, {
6688
6765
  _remotionInternalStack: stack ?? null,
6689
6766
  onDuration,
6690
6767
  onlyWarnForMediaSeekingError: true,
@@ -6733,7 +6810,7 @@ var OffthreadVideo = ({
6733
6810
  if (imageFormat) {
6734
6811
  throw new TypeError(`The \`<OffthreadVideo>\` tag does no longer accept \`imageFormat\`. Use the \`transparent\` prop if you want to render a transparent video.`);
6735
6812
  }
6736
- return /* @__PURE__ */ jsx29(InnerOffthreadVideo, {
6813
+ return /* @__PURE__ */ jsx30(InnerOffthreadVideo, {
6737
6814
  acceptableTimeShiftInSeconds,
6738
6815
  allowAmplificationDuringRender: allowAmplificationDuringRender ?? true,
6739
6816
  audioStreamIndex: audioStreamIndex ?? 0,
@@ -6806,8 +6883,8 @@ var watchStaticFile = (fileName, callback) => {
6806
6883
  };
6807
6884
 
6808
6885
  // src/wrap-remotion-context.tsx
6809
- import React30, { useMemo as useMemo28 } from "react";
6810
- import { jsx as jsx30 } from "react/jsx-runtime";
6886
+ import React30, { useMemo as useMemo29 } from "react";
6887
+ import { jsx as jsx31 } from "react/jsx-runtime";
6811
6888
  function useRemotionContexts() {
6812
6889
  const compositionManagerCtx = React30.useContext(CompositionManager);
6813
6890
  const timelineContext = React30.useContext(TimelineContext);
@@ -6821,7 +6898,7 @@ function useRemotionContexts() {
6821
6898
  const sequenceManagerContext = React30.useContext(SequenceManager);
6822
6899
  const bufferManagerContext = React30.useContext(BufferingContextReact);
6823
6900
  const logLevelContext = React30.useContext(LogLevelContext);
6824
- return useMemo28(() => ({
6901
+ return useMemo29(() => ({
6825
6902
  compositionManagerCtx,
6826
6903
  timelineContext,
6827
6904
  setTimelineContext,
@@ -6851,29 +6928,29 @@ function useRemotionContexts() {
6851
6928
  }
6852
6929
  var RemotionContextProvider = (props2) => {
6853
6930
  const { children, contexts } = props2;
6854
- return /* @__PURE__ */ jsx30(LogLevelContext.Provider, {
6931
+ return /* @__PURE__ */ jsx31(LogLevelContext.Provider, {
6855
6932
  value: contexts.logLevelContext,
6856
- children: /* @__PURE__ */ jsx30(CanUseRemotionHooks.Provider, {
6933
+ children: /* @__PURE__ */ jsx31(CanUseRemotionHooks.Provider, {
6857
6934
  value: contexts.canUseRemotionHooksContext,
6858
- children: /* @__PURE__ */ jsx30(NonceContext.Provider, {
6935
+ children: /* @__PURE__ */ jsx31(NonceContext.Provider, {
6859
6936
  value: contexts.nonceContext,
6860
- children: /* @__PURE__ */ jsx30(PreloadContext.Provider, {
6937
+ children: /* @__PURE__ */ jsx31(PreloadContext.Provider, {
6861
6938
  value: contexts.preloadContext,
6862
- children: /* @__PURE__ */ jsx30(CompositionManager.Provider, {
6939
+ children: /* @__PURE__ */ jsx31(CompositionManager.Provider, {
6863
6940
  value: contexts.compositionManagerCtx,
6864
- children: /* @__PURE__ */ jsx30(SequenceManager.Provider, {
6941
+ children: /* @__PURE__ */ jsx31(SequenceManager.Provider, {
6865
6942
  value: contexts.sequenceManagerContext,
6866
- children: /* @__PURE__ */ jsx30(RenderAssetManager.Provider, {
6943
+ children: /* @__PURE__ */ jsx31(RenderAssetManager.Provider, {
6867
6944
  value: contexts.renderAssetManagerContext,
6868
- children: /* @__PURE__ */ jsx30(ResolveCompositionContext.Provider, {
6945
+ children: /* @__PURE__ */ jsx31(ResolveCompositionContext.Provider, {
6869
6946
  value: contexts.resolveCompositionContext,
6870
- children: /* @__PURE__ */ jsx30(TimelineContext.Provider, {
6947
+ children: /* @__PURE__ */ jsx31(TimelineContext.Provider, {
6871
6948
  value: contexts.timelineContext,
6872
- children: /* @__PURE__ */ jsx30(SetTimelineContext.Provider, {
6949
+ children: /* @__PURE__ */ jsx31(SetTimelineContext.Provider, {
6873
6950
  value: contexts.setTimelineContext,
6874
- children: /* @__PURE__ */ jsx30(SequenceContext.Provider, {
6951
+ children: /* @__PURE__ */ jsx31(SequenceContext.Provider, {
6875
6952
  value: contexts.sequenceContext,
6876
- children: /* @__PURE__ */ jsx30(BufferingContextReact.Provider, {
6953
+ children: /* @__PURE__ */ jsx31(BufferingContextReact.Provider, {
6877
6954
  value: contexts.bufferManagerContext,
6878
6955
  children
6879
6956
  })
@@ -6975,7 +7052,11 @@ var Internals = {
6975
7052
  AudioForPreview,
6976
7053
  OBJECTFIT_CONTAIN_CLASS_NAME,
6977
7054
  InnerOffthreadVideo,
6978
- useBasicMediaInTimeline
7055
+ useBasicMediaInTimeline,
7056
+ getInputPropsOverride,
7057
+ setInputPropsOverride,
7058
+ useVideoEnabled,
7059
+ useAudioEnabled
6979
7060
  };
6980
7061
  // src/interpolate-colors.ts
6981
7062
  var NUMBER = "[-+]?\\d*\\.?\\d+";
@@ -7341,7 +7422,7 @@ var validateFrame = ({
7341
7422
  }
7342
7423
  };
7343
7424
  // src/series/index.tsx
7344
- import { Children, forwardRef as forwardRef10, useMemo as useMemo29 } from "react";
7425
+ import { Children, forwardRef as forwardRef10, useMemo as useMemo30 } from "react";
7345
7426
 
7346
7427
  // src/series/flatten-children.tsx
7347
7428
  import React31 from "react";
@@ -7357,17 +7438,17 @@ var flattenChildren = (children) => {
7357
7438
  };
7358
7439
 
7359
7440
  // src/series/is-inside-series.tsx
7360
- import React32, { createContext as createContext19 } from "react";
7361
- import { jsx as jsx31 } from "react/jsx-runtime";
7362
- var IsInsideSeriesContext = createContext19(false);
7441
+ import React32, { createContext as createContext20 } from "react";
7442
+ import { jsx as jsx32 } from "react/jsx-runtime";
7443
+ var IsInsideSeriesContext = createContext20(false);
7363
7444
  var IsInsideSeriesContainer = ({ children }) => {
7364
- return /* @__PURE__ */ jsx31(IsInsideSeriesContext.Provider, {
7445
+ return /* @__PURE__ */ jsx32(IsInsideSeriesContext.Provider, {
7365
7446
  value: true,
7366
7447
  children
7367
7448
  });
7368
7449
  };
7369
7450
  var IsNotInsideSeriesProvider = ({ children }) => {
7370
- return /* @__PURE__ */ jsx31(IsInsideSeriesContext.Provider, {
7451
+ return /* @__PURE__ */ jsx32(IsInsideSeriesContext.Provider, {
7371
7452
  value: false,
7372
7453
  children
7373
7454
  });
@@ -7380,16 +7461,16 @@ var useRequireToBeInsideSeries = () => {
7380
7461
  };
7381
7462
 
7382
7463
  // src/series/index.tsx
7383
- import { jsx as jsx32 } from "react/jsx-runtime";
7464
+ import { jsx as jsx33 } from "react/jsx-runtime";
7384
7465
  var SeriesSequenceRefForwardingFunction = ({ children }, _ref) => {
7385
7466
  useRequireToBeInsideSeries();
7386
- return /* @__PURE__ */ jsx32(IsNotInsideSeriesProvider, {
7467
+ return /* @__PURE__ */ jsx33(IsNotInsideSeriesProvider, {
7387
7468
  children
7388
7469
  });
7389
7470
  };
7390
7471
  var SeriesSequence = forwardRef10(SeriesSequenceRefForwardingFunction);
7391
7472
  var Series = (props2) => {
7392
- const childrenValue = useMemo29(() => {
7473
+ const childrenValue = useMemo30(() => {
7393
7474
  let startFrame = 0;
7394
7475
  const flattenedChildren = flattenChildren(props2.children);
7395
7476
  return Children.map(flattenedChildren, (child, i) => {
@@ -7433,7 +7514,7 @@ var Series = (props2) => {
7433
7514
  }
7434
7515
  const currentStartFrame = startFrame + offset;
7435
7516
  startFrame += durationInFramesProp + offset;
7436
- return /* @__PURE__ */ jsx32(Sequence, {
7517
+ return /* @__PURE__ */ jsx33(Sequence, {
7437
7518
  name: name || "<Series.Sequence>",
7438
7519
  from: currentStartFrame,
7439
7520
  durationInFrames: durationInFramesProp,
@@ -7444,14 +7525,14 @@ var Series = (props2) => {
7444
7525
  });
7445
7526
  }, [props2.children]);
7446
7527
  if (ENABLE_V5_BREAKING_CHANGES) {
7447
- return /* @__PURE__ */ jsx32(IsInsideSeriesContainer, {
7448
- children: /* @__PURE__ */ jsx32(Sequence, {
7528
+ return /* @__PURE__ */ jsx33(IsInsideSeriesContainer, {
7529
+ children: /* @__PURE__ */ jsx33(Sequence, {
7449
7530
  ...props2,
7450
7531
  children: childrenValue
7451
7532
  })
7452
7533
  });
7453
7534
  }
7454
- return /* @__PURE__ */ jsx32(IsInsideSeriesContainer, {
7535
+ return /* @__PURE__ */ jsx33(IsInsideSeriesContainer, {
7455
7536
  children: childrenValue
7456
7537
  });
7457
7538
  };
@@ -7798,16 +7879,16 @@ var Still = (props2) => {
7798
7879
  return React34.createElement(Composition, newProps);
7799
7880
  };
7800
7881
  // src/video/Video.tsx
7801
- import { forwardRef as forwardRef12, useCallback as useCallback17, useContext as useContext33 } from "react";
7882
+ import { forwardRef as forwardRef12, useCallback as useCallback17, useContext as useContext34 } from "react";
7802
7883
 
7803
7884
  // src/video/VideoForRendering.tsx
7804
7885
  import {
7805
7886
  forwardRef as forwardRef11,
7806
- useContext as useContext32,
7887
+ useContext as useContext33,
7807
7888
  useEffect as useEffect22,
7808
7889
  useImperativeHandle as useImperativeHandle10,
7809
7890
  useLayoutEffect as useLayoutEffect10,
7810
- useMemo as useMemo30,
7891
+ useMemo as useMemo31,
7811
7892
  useRef as useRef17
7812
7893
  } from "react";
7813
7894
 
@@ -7936,7 +8017,7 @@ var seekToTimeMultipleUntilRight = ({
7936
8017
  };
7937
8018
 
7938
8019
  // src/video/VideoForRendering.tsx
7939
- import { jsx as jsx33 } from "react/jsx-runtime";
8020
+ import { jsx as jsx34 } from "react/jsx-runtime";
7940
8021
  var VideoForRenderingForwardFunction = ({
7941
8022
  onError,
7942
8023
  volume: volumeProp,
@@ -7957,14 +8038,14 @@ var VideoForRenderingForwardFunction = ({
7957
8038
  const volumePropsFrame = useFrameForVolumeProp(loopVolumeCurveBehavior ?? "repeat");
7958
8039
  const videoConfig = useUnsafeVideoConfig();
7959
8040
  const videoRef = useRef17(null);
7960
- const sequenceContext = useContext32(SequenceContext);
8041
+ const sequenceContext = useContext33(SequenceContext);
7961
8042
  const mediaStartsAt = useMediaStartsAt();
7962
8043
  const environment = useRemotionEnvironment();
7963
8044
  const logLevel = useLogLevel();
7964
8045
  const mountTime = useMountTime();
7965
8046
  const { delayRender: delayRender2, continueRender: continueRender2 } = useDelayRender();
7966
- const { registerRenderAsset, unregisterRenderAsset } = useContext32(RenderAssetManager);
7967
- const id = useMemo30(() => `video-${random(props2.src ?? "")}-${sequenceContext?.cumulatedFrom}-${sequenceContext?.relativeFrom}-${sequenceContext?.durationInFrames}`, [
8047
+ const { registerRenderAsset, unregisterRenderAsset } = useContext33(RenderAssetManager);
8048
+ const id = useMemo31(() => `video-${random(props2.src ?? "")}-${sequenceContext?.cumulatedFrom}-${sequenceContext?.relativeFrom}-${sequenceContext?.durationInFrames}`, [
7968
8049
  props2.src,
7969
8050
  sequenceContext?.cumulatedFrom,
7970
8051
  sequenceContext?.relativeFrom,
@@ -8140,7 +8221,7 @@ var VideoForRenderingForwardFunction = ({
8140
8221
  delayRender2
8141
8222
  ]);
8142
8223
  }
8143
- return /* @__PURE__ */ jsx33("video", {
8224
+ return /* @__PURE__ */ jsx34("video", {
8144
8225
  ref: videoRef,
8145
8226
  disableRemotePlayback: true,
8146
8227
  ...props2
@@ -8149,7 +8230,7 @@ var VideoForRenderingForwardFunction = ({
8149
8230
  var VideoForRendering = forwardRef11(VideoForRenderingForwardFunction);
8150
8231
 
8151
8232
  // src/video/Video.tsx
8152
- import { jsx as jsx34 } from "react/jsx-runtime";
8233
+ import { jsx as jsx35 } from "react/jsx-runtime";
8153
8234
  var VideoForwardingFunction = (props2, ref) => {
8154
8235
  const {
8155
8236
  startFrom,
@@ -8167,7 +8248,7 @@ var VideoForwardingFunction = (props2, ref) => {
8167
8248
  const { loop, ...propsOtherThanLoop } = props2;
8168
8249
  const { fps } = useVideoConfig();
8169
8250
  const environment = useRemotionEnvironment();
8170
- const { durations, setDurations } = useContext33(DurationsContext);
8251
+ const { durations, setDurations } = useContext34(DurationsContext);
8171
8252
  if (typeof ref === "string") {
8172
8253
  throw new Error("string refs are not supported");
8173
8254
  }
@@ -8189,14 +8270,14 @@ var VideoForwardingFunction = (props2, ref) => {
8189
8270
  });
8190
8271
  if (loop && durationFetched !== undefined) {
8191
8272
  if (!Number.isFinite(durationFetched)) {
8192
- return /* @__PURE__ */ jsx34(Html5Video, {
8273
+ return /* @__PURE__ */ jsx35(Html5Video, {
8193
8274
  ...propsOtherThanLoop,
8194
8275
  ref,
8195
8276
  _remotionInternalNativeLoopPassed: true
8196
8277
  });
8197
8278
  }
8198
8279
  const mediaDuration = durationFetched * fps;
8199
- return /* @__PURE__ */ jsx34(Loop, {
8280
+ return /* @__PURE__ */ jsx35(Loop, {
8200
8281
  durationInFrames: calculateMediaDuration({
8201
8282
  trimAfter: trimAfterValue,
8202
8283
  mediaDurationInFrames: mediaDuration,
@@ -8205,7 +8286,7 @@ var VideoForwardingFunction = (props2, ref) => {
8205
8286
  }),
8206
8287
  layout: "none",
8207
8288
  name,
8208
- children: /* @__PURE__ */ jsx34(Html5Video, {
8289
+ children: /* @__PURE__ */ jsx35(Html5Video, {
8209
8290
  ...propsOtherThanLoop,
8210
8291
  ref,
8211
8292
  _remotionInternalNativeLoopPassed: true
@@ -8213,13 +8294,13 @@ var VideoForwardingFunction = (props2, ref) => {
8213
8294
  });
8214
8295
  }
8215
8296
  if (typeof trimBeforeValue !== "undefined" || typeof trimAfterValue !== "undefined") {
8216
- return /* @__PURE__ */ jsx34(Sequence, {
8297
+ return /* @__PURE__ */ jsx35(Sequence, {
8217
8298
  layout: "none",
8218
8299
  from: 0 - (trimBeforeValue ?? 0),
8219
8300
  showInTimeline: false,
8220
8301
  durationInFrames: trimAfterValue,
8221
8302
  name,
8222
- children: /* @__PURE__ */ jsx34(Html5Video, {
8303
+ children: /* @__PURE__ */ jsx35(Html5Video, {
8223
8304
  pauseWhenBuffering: pauseWhenBuffering ?? false,
8224
8305
  ...otherProps,
8225
8306
  ref
@@ -8228,14 +8309,14 @@ var VideoForwardingFunction = (props2, ref) => {
8228
8309
  }
8229
8310
  validateMediaProps({ playbackRate: props2.playbackRate, volume: props2.volume }, "Html5Video");
8230
8311
  if (environment.isRendering) {
8231
- return /* @__PURE__ */ jsx34(VideoForRendering, {
8312
+ return /* @__PURE__ */ jsx35(VideoForRendering, {
8232
8313
  onDuration,
8233
8314
  onVideoFrame: onVideoFrame ?? null,
8234
8315
  ...otherProps,
8235
8316
  ref
8236
8317
  });
8237
8318
  }
8238
- return /* @__PURE__ */ jsx34(VideoForPreview, {
8319
+ return /* @__PURE__ */ jsx35(VideoForPreview, {
8239
8320
  onlyWarnForMediaSeekingError: false,
8240
8321
  ...otherProps,
8241
8322
  ref,
@@ -1,5 +1,5 @@
1
1
  // src/version.ts
2
- var VERSION = "4.0.361";
2
+ var VERSION = "4.0.363";
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.361",
6
+ "version": "4.0.363",
7
7
  "description": "Make videos programmatically",
8
8
  "main": "dist/cjs/index.js",
9
9
  "types": "dist/cjs/index.d.ts",
@@ -29,12 +29,12 @@
29
29
  "@testing-library/dom": "10.4.0",
30
30
  "@happy-dom/global-registrator": "14.5.1",
31
31
  "@types/dom-webcodecs": "0.1.11",
32
- "happy-dom": "15.10.2",
32
+ "happy-dom": "20.0.2",
33
33
  "react": "19.0.0",
34
34
  "react-dom": "19.0.0",
35
35
  "webpack": "5.96.1",
36
36
  "zod": "3.22.3",
37
- "@remotion/eslint-config-internal": "4.0.361",
37
+ "@remotion/eslint-config-internal": "4.0.363",
38
38
  "eslint": "9.19.0"
39
39
  },
40
40
  "keywords": [