remotion 4.0.494 → 4.0.495

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.
@@ -1310,7 +1310,7 @@ var getSingleChildComponent = (children) => {
1310
1310
  };
1311
1311
 
1312
1312
  // src/version.ts
1313
- var VERSION = "4.0.494";
1313
+ var VERSION = "4.0.495";
1314
1314
 
1315
1315
  // src/multiple-versions-warning.ts
1316
1316
  var checkMultipleRemotionVersions = () => {
@@ -1350,9 +1350,9 @@ var Null = () => {
1350
1350
  import {
1351
1351
  forwardRef as forwardRef3,
1352
1352
  useCallback as useCallback6,
1353
- useContext as useContext17,
1353
+ useContext as useContext18,
1354
1354
  useEffect as useEffect3,
1355
- useMemo as useMemo14,
1355
+ useMemo as useMemo15,
1356
1356
  useRef as useRef6,
1357
1357
  useState as useState5
1358
1358
  } from "react";
@@ -1862,15 +1862,19 @@ var premountSchema = {
1862
1862
  description: "Premount For",
1863
1863
  min: 0,
1864
1864
  step: 1,
1865
- hiddenFromList: false
1865
+ hiddenFromList: false,
1866
+ keyframable: false
1866
1867
  },
1867
1868
  postmountFor: {
1868
1869
  type: "number",
1869
1870
  default: 0,
1870
1871
  min: 0,
1871
1872
  step: 1,
1872
- hiddenFromList: true
1873
- },
1873
+ hiddenFromList: true,
1874
+ keyframable: false
1875
+ }
1876
+ };
1877
+ var premountStyleSchema = {
1874
1878
  styleWhilePremounted: {
1875
1879
  type: "hidden"
1876
1880
  },
@@ -1878,10 +1882,13 @@ var premountSchema = {
1878
1882
  type: "hidden"
1879
1883
  }
1880
1884
  };
1881
- var sequencePremountSchema = premountSchema;
1885
+ var sequencePremountSchema = {
1886
+ ...premountSchema,
1887
+ ...premountStyleSchema
1888
+ };
1882
1889
  var sequenceStyleSchema = {
1883
1890
  ...transformSchema,
1884
- ...premountSchema
1891
+ ...sequencePremountSchema
1885
1892
  };
1886
1893
  var hiddenField = {
1887
1894
  type: "boolean",
@@ -1967,12 +1974,6 @@ var sequenceSchemaDefaultLayoutNone = {
1967
1974
  }
1968
1975
  };
1969
1976
 
1970
- // src/PremountContext.tsx
1971
- import { createContext as createContext14 } from "react";
1972
- var PremountContext = createContext14({
1973
- premountFramesRemaining: 0
1974
- });
1975
-
1976
1977
  // src/SequenceManager.tsx
1977
1978
  import React12, { useCallback as useCallback5, useMemo as useMemo12, useRef as useRef4, useState as useState3 } from "react";
1978
1979
  import { jsx as jsx10 } from "react/jsx-runtime";
@@ -2157,9 +2158,9 @@ var SequenceManagerProvider = ({ children }) => {
2157
2158
  };
2158
2159
 
2159
2160
  // src/series/is-inside-series.tsx
2160
- import React13, { createContext as createContext15 } from "react";
2161
+ import React13, { createContext as createContext14 } from "react";
2161
2162
  import { jsx as jsx11 } from "react/jsx-runtime";
2162
- var IsInsideSeriesContext = createContext15(false);
2163
+ var IsInsideSeriesContext = createContext14(false);
2163
2164
  var IsInsideSeriesContainer = ({ children }) => {
2164
2165
  return /* @__PURE__ */ jsx11(IsInsideSeriesContext.Provider, {
2165
2166
  value: true,
@@ -2179,11 +2180,73 @@ var useRequireToBeInsideSeries = () => {
2179
2180
  }
2180
2181
  };
2181
2182
 
2183
+ // src/use-premounting.ts
2184
+ import { useContext as useContext15, useMemo as useMemo13 } from "react";
2185
+
2186
+ // src/PremountContext.tsx
2187
+ import { createContext as createContext15 } from "react";
2188
+ var PremountContext = createContext15({
2189
+ premountFramesRemaining: 0
2190
+ });
2191
+
2182
2192
  // src/v5-flag.ts
2183
2193
  var ENABLE_V5_BREAKING_CHANGES = false;
2184
2194
 
2195
+ // src/use-premounting.ts
2196
+ var usePremounting = ({
2197
+ from,
2198
+ durationInFrames,
2199
+ premountFor,
2200
+ postmountFor,
2201
+ style,
2202
+ styleWhilePremounted,
2203
+ styleWhilePostmounted,
2204
+ hideWhilePremounted
2205
+ }) => {
2206
+ const parentPremountContext = useContext15(PremountContext);
2207
+ const frame = useCurrentFrame() - parentPremountContext.premountFramesRemaining;
2208
+ const environment = useRemotionEnvironment();
2209
+ const { fps } = useVideoConfig();
2210
+ const effectivePremountFor = ENABLE_V5_BREAKING_CHANGES ? premountFor ?? fps : premountFor ?? 0;
2211
+ const effectivePostmountFor = postmountFor ?? 0;
2212
+ const endThreshold = Math.ceil(from + durationInFrames - 1);
2213
+ const premountingActive = !environment.isRendering && frame < from && frame >= from - effectivePremountFor;
2214
+ const postmountingActive = !environment.isRendering && frame > endThreshold && frame <= endThreshold + effectivePostmountFor;
2215
+ const isPremountingOrPostmounting = premountingActive || postmountingActive;
2216
+ const freezeFrame = premountingActive ? from : postmountingActive ? from + durationInFrames - 1 : 0;
2217
+ const premountingStyle = useMemo13(() => {
2218
+ if (!isPremountingOrPostmounting) {
2219
+ return style;
2220
+ }
2221
+ return {
2222
+ ...style,
2223
+ ...hideWhilePremounted === "opacity" ? { opacity: 0 } : { display: "none" },
2224
+ pointerEvents: "none",
2225
+ ...premountingActive ? styleWhilePremounted : {},
2226
+ ...postmountingActive ? styleWhilePostmounted : {}
2227
+ };
2228
+ }, [
2229
+ isPremountingOrPostmounting,
2230
+ hideWhilePremounted,
2231
+ postmountingActive,
2232
+ premountingActive,
2233
+ style,
2234
+ styleWhilePostmounted,
2235
+ styleWhilePremounted
2236
+ ]);
2237
+ return {
2238
+ effectivePremountFor,
2239
+ effectivePostmountFor,
2240
+ premountingActive,
2241
+ postmountingActive,
2242
+ isPremountingOrPostmounting,
2243
+ freezeFrame,
2244
+ premountingStyle
2245
+ };
2246
+ };
2247
+
2185
2248
  // src/with-interactivity-schema.ts
2186
- import React14, { forwardRef as forwardRef2, useContext as useContext16, useMemo as useMemo13, useState as useState4 } from "react";
2249
+ import React14, { forwardRef as forwardRef2, useContext as useContext17, useMemo as useMemo14, useState as useState4 } from "react";
2187
2250
 
2188
2251
  // src/delete-nested-key.ts
2189
2252
  var deleteNestedKey = (obj, keysToRemove) => {
@@ -2219,7 +2282,7 @@ var deleteNestedKey = (obj, keysToRemove) => {
2219
2282
  };
2220
2283
 
2221
2284
  // src/effects/use-memoized-effects.ts
2222
- import { useContext as useContext15, useRef as useRef5 } from "react";
2285
+ import { useContext as useContext16, useRef as useRef5 } from "react";
2223
2286
 
2224
2287
  // src/bezier.ts
2225
2288
  var NEWTON_ITERATIONS = 4;
@@ -4041,10 +4104,10 @@ var useMemoizedEffects = ({
4041
4104
  overrideId
4042
4105
  }) => {
4043
4106
  const previousRef = useRef5(null);
4044
- const { propStatuses } = useContext15(VisualModePropStatusesContext);
4045
- const { getEffectDragOverrides } = useContext15(VisualModeDragOverridesContext);
4107
+ const { propStatuses } = useContext16(VisualModePropStatusesContext);
4108
+ const { getEffectDragOverrides } = useContext16(VisualModeDragOverridesContext);
4046
4109
  const frame = useCurrentFrame();
4047
- const { overrideIdToNodePathMappings } = useContext15(OverrideIdsToNodePathsGettersContext);
4110
+ const { overrideIdToNodePathMappings } = useContext16(OverrideIdsToNodePathsGettersContext);
4048
4111
  const previous = previousRef.current;
4049
4112
  const nodePath = overrideId ? overrideIdToNodePathMappings[overrideId] ?? null : null;
4050
4113
  const resolved = effects.map((descriptor, index) => {
@@ -4396,9 +4459,9 @@ var withInteractivitySchema = ({
4396
4459
  ref
4397
4460
  });
4398
4461
  }
4399
- const { propStatuses } = useContext16(VisualModePropStatusesContext);
4400
- const { getDragOverrides } = useContext16(VisualModeDragOverridesContext);
4401
- const nodePathMapping = useContext16(OverrideIdsToNodePathsGettersContext);
4462
+ const { propStatuses } = useContext17(VisualModePropStatusesContext);
4463
+ const { getDragOverrides } = useContext17(VisualModeDragOverridesContext);
4464
+ const nodePathMapping = useContext17(OverrideIdsToNodePathsGettersContext);
4402
4465
  const frame = useCurrentFrame();
4403
4466
  if (props.controls) {
4404
4467
  return React14.createElement(Component, {
@@ -4425,8 +4488,8 @@ var withInteractivitySchema = ({
4425
4488
  key,
4426
4489
  props
4427
4490
  }));
4428
- const currentRuntimeValueDotNotation = useMemo13(() => readValuesFromProps(props, flatKeys, flatSchema), runtimeValues);
4429
- const controls = useMemo13(() => {
4491
+ const currentRuntimeValueDotNotation = useMemo14(() => readValuesFromProps(props, flatKeys, flatSchema), runtimeValues);
4492
+ const controls = useMemo14(() => {
4430
4493
  return {
4431
4494
  schema: schemaWithSequenceName,
4432
4495
  currentRuntimeValueDotNotation,
@@ -4436,7 +4499,7 @@ var withInteractivitySchema = ({
4436
4499
  componentName
4437
4500
  };
4438
4501
  }, [currentRuntimeValueDotNotation, overrideId]);
4439
- const { merged: valuesDotNotation, propsToDelete } = useMemo13(() => {
4502
+ const { merged: valuesDotNotation, propsToDelete } = useMemo14(() => {
4440
4503
  return computeEffectiveSchemaValuesDotNotation({
4441
4504
  schema: schemaWithSequenceName,
4442
4505
  currentValue: currentRuntimeValueDotNotation,
@@ -4497,7 +4560,7 @@ var RegularSequenceRefForwardingFunction = ({
4497
4560
  }, ref) => {
4498
4561
  const { layout = "absolute-fill" } = other;
4499
4562
  const [id] = useState5(() => String(Math.random()));
4500
- const parentSequence = useContext17(SequenceContext);
4563
+ const parentSequence = useContext18(SequenceContext);
4501
4564
  const { rootId } = useTimelineContext();
4502
4565
  const cumulatedFrom = parentSequence ? parentSequence.cumulatedFrom + parentSequence.relativeFrom : 0;
4503
4566
  const nonce = useNonce();
@@ -4548,13 +4611,13 @@ var RegularSequenceRefForwardingFunction = ({
4548
4611
  const absoluteFrom = (parentSequence?.absoluteFrom ?? 0) + effectiveRelativeFrom;
4549
4612
  const parentSequenceDuration = parentSequence ? Math.min(parentSequence.durationInFrames - effectiveRelativeFrom, durationInFrames) : durationInFrames;
4550
4613
  const actualDurationInFrames = Math.max(0, Math.min(videoConfig.durationInFrames - from, parentSequenceDuration));
4551
- const { registerSequence, unregisterSequence } = useContext17(SequenceManager);
4614
+ const { registerSequence, unregisterSequence } = useContext18(SequenceManager);
4552
4615
  const wrapperRefForOutline = useRef6(null);
4553
4616
  const refForOutline = other.layout === "none" ? passedRefForOutline ?? null : passedRefForOutline ?? wrapperRefForOutline;
4554
- const premounting = useMemo14(() => {
4617
+ const premounting = useMemo15(() => {
4555
4618
  return parentSequence?.premounting || Boolean(other._remotionInternalIsPremounting);
4556
4619
  }, [other._remotionInternalIsPremounting, parentSequence?.premounting]);
4557
- const postmounting = useMemo14(() => {
4620
+ const postmounting = useMemo15(() => {
4558
4621
  return parentSequence?.postmounting || Boolean(other._remotionInternalIsPostmounting);
4559
4622
  }, [other._remotionInternalIsPostmounting, parentSequence?.postmounting]);
4560
4623
  const currentSequenceStart = cumulatedFrom + effectiveRelativeFrom;
@@ -4562,7 +4625,7 @@ var RegularSequenceRefForwardingFunction = ({
4562
4625
  const parentFirstFrame = parentSequence ? parentSequenceStart - parentSequence.cumulatedNegativeFrom : 0;
4563
4626
  const firstFrame = Math.max(0, parentFirstFrame, currentSequenceStart);
4564
4627
  const cumulatedNegativeFrom = currentSequenceStart - firstFrame;
4565
- const contextValue = useMemo14(() => {
4628
+ const contextValue = useMemo15(() => {
4566
4629
  return {
4567
4630
  absoluteFrom,
4568
4631
  cumulatedFrom,
@@ -4593,12 +4656,12 @@ var RegularSequenceRefForwardingFunction = ({
4593
4656
  postmountDisplay,
4594
4657
  cumulatedNegativeFrom
4595
4658
  ]);
4596
- const timelineClipName = useMemo14(() => {
4659
+ const timelineClipName = useMemo15(() => {
4597
4660
  return name ?? "";
4598
4661
  }, [name]);
4599
4662
  const resolvedDocumentationLink = documentationLink ?? "https://www.remotion.dev/docs/sequence";
4600
4663
  const env = useRemotionEnvironment();
4601
- const isInsideSeries = useContext17(IsInsideSeriesContext);
4664
+ const isInsideSeries = useContext18(IsInsideSeriesContext);
4602
4665
  const inheritedStack = other?.stack ?? null;
4603
4666
  const stackRef = useRef6(null);
4604
4667
  stackRef.current = stack ?? inheritedStack;
@@ -4746,7 +4809,7 @@ var RegularSequenceRefForwardingFunction = ({
4746
4809
  ref.current = node;
4747
4810
  }
4748
4811
  }, [ref]);
4749
- const defaultStyle = useMemo14(() => {
4812
+ const defaultStyle = useMemo15(() => {
4750
4813
  return {
4751
4814
  flexDirection: undefined,
4752
4815
  ...width ? { width } : {},
@@ -4772,8 +4835,6 @@ var RegularSequenceRefForwardingFunction = ({
4772
4835
  };
4773
4836
  var RegularSequence = forwardRef3(RegularSequenceRefForwardingFunction);
4774
4837
  var PremountedPostmountedSequenceRefForwardingFunction = (props, ref) => {
4775
- const parentPremountContext = useContext17(PremountContext);
4776
- const frame = useCurrentFrame() - parentPremountContext.premountFramesRemaining;
4777
4838
  if (props.layout === "none") {
4778
4839
  throw new Error('`<Sequence>` with `premountFor` and `postmountFor` props does not support layout="none"');
4779
4840
  }
@@ -4787,34 +4848,30 @@ var PremountedPostmountedSequenceRefForwardingFunction = (props, ref) => {
4787
4848
  styleWhilePostmounted,
4788
4849
  ...otherProps
4789
4850
  } = props;
4790
- const endThreshold = Math.ceil(from + durationInFrames - 1);
4791
- const premountingActive = frame < from && frame >= from - premountFor;
4792
- const postmountingActive = frame > endThreshold && frame <= endThreshold + postmountFor;
4793
- const freezeFrame = premountingActive ? from : postmountingActive ? from + durationInFrames - 1 : 0;
4794
- const isFreezingActive = premountingActive || postmountingActive;
4795
- const style = useMemo14(() => {
4796
- return {
4797
- ...passedStyle,
4798
- opacity: premountingActive || postmountingActive ? 0 : passedStyle?.opacity,
4799
- pointerEvents: premountingActive || postmountingActive ? "none" : passedStyle?.pointerEvents ?? undefined,
4800
- ...premountingActive ? styleWhilePremounted : {},
4801
- ...postmountingActive ? styleWhilePostmounted : {}
4802
- };
4803
- }, [
4804
- passedStyle,
4805
- premountingActive,
4851
+ const {
4852
+ freezeFrame,
4853
+ isPremountingOrPostmounting,
4806
4854
  postmountingActive,
4807
- styleWhilePremounted,
4808
- styleWhilePostmounted
4809
- ]);
4855
+ premountingActive,
4856
+ premountingStyle
4857
+ } = usePremounting({
4858
+ from,
4859
+ durationInFrames,
4860
+ premountFor,
4861
+ postmountFor,
4862
+ style: passedStyle ?? null,
4863
+ styleWhilePremounted: styleWhilePremounted ?? null,
4864
+ styleWhilePostmounted: styleWhilePostmounted ?? null,
4865
+ hideWhilePremounted: "opacity"
4866
+ });
4810
4867
  return /* @__PURE__ */ jsx12(Freeze, {
4811
4868
  frame: freezeFrame,
4812
- active: isFreezingActive,
4869
+ active: isPremountingOrPostmounting,
4813
4870
  children: /* @__PURE__ */ jsx12(SequenceInner, {
4814
4871
  ref,
4815
4872
  from,
4816
4873
  durationInFrames,
4817
- style,
4874
+ style: premountingStyle ?? undefined,
4818
4875
  _remotionInternalPremountDisplay: premountFor,
4819
4876
  _remotionInternalPostmountDisplay: postmountFor,
4820
4877
  _remotionInternalIsPremounting: premountingActive,
@@ -4869,7 +4926,7 @@ import {
4869
4926
  } from "react";
4870
4927
 
4871
4928
  // src/animated-image/canvas.tsx
4872
- import React16, { useCallback as useCallback7, useImperativeHandle, useMemo as useMemo16, useRef as useRef8 } from "react";
4929
+ import React16, { useCallback as useCallback7, useImperativeHandle, useMemo as useMemo17, useRef as useRef8 } from "react";
4873
4930
 
4874
4931
  // src/calculate-image-fit.ts
4875
4932
  var calculateImageFit = (fit, imageSize, canvasSize) => {
@@ -5165,7 +5222,7 @@ var runEffectChain = async ({
5165
5222
  };
5166
5223
 
5167
5224
  // src/effects/use-effect-chain-state.ts
5168
- import { useEffect as useEffect4, useMemo as useMemo15, useRef as useRef7 } from "react";
5225
+ import { useEffect as useEffect4, useMemo as useMemo16, useRef as useRef7 } from "react";
5169
5226
  var useEffectChainState = () => {
5170
5227
  const chainStateRef = useRef7(null);
5171
5228
  const sizeRef = useRef7(null);
@@ -5176,7 +5233,7 @@ var useEffectChainState = () => {
5176
5233
  }
5177
5234
  };
5178
5235
  }, []);
5179
- return useMemo15(() => ({
5236
+ return useMemo16(() => ({
5180
5237
  get: (width, height) => {
5181
5238
  if (!sizeRef.current || sizeRef.current.width !== width || sizeRef.current.height !== height) {
5182
5239
  if (chainStateRef.current) {
@@ -5195,7 +5252,7 @@ import { jsx as jsx13 } from "react/jsx-runtime";
5195
5252
  var CanvasRefForwardingFunction = ({ width, height, fit, className, style, effects, ...props }, ref) => {
5196
5253
  const canvasRef = useRef8(null);
5197
5254
  const chainState = useEffectChainState();
5198
- const sourceCanvas = useMemo16(() => {
5255
+ const sourceCanvas = useMemo17(() => {
5199
5256
  if (typeof document === "undefined") {
5200
5257
  return null;
5201
5258
  }
@@ -5693,7 +5750,7 @@ var createEffect = (definition) => {
5693
5750
  return factory;
5694
5751
  };
5695
5752
  // src/Artifact.tsx
5696
- import { useContext as useContext18, useLayoutEffect as useLayoutEffect4, useState as useState8 } from "react";
5753
+ import { useContext as useContext19, useLayoutEffect as useLayoutEffect4, useState as useState8 } from "react";
5697
5754
 
5698
5755
  // src/RenderAssetManager.tsx
5699
5756
  import {
@@ -5701,7 +5758,7 @@ import {
5701
5758
  useCallback as useCallback8,
5702
5759
  useImperativeHandle as useImperativeHandle3,
5703
5760
  useLayoutEffect as useLayoutEffect3,
5704
- useMemo as useMemo17,
5761
+ useMemo as useMemo18,
5705
5762
  useRef as useRef10,
5706
5763
  useState as useState7
5707
5764
  } from "react";
@@ -5782,7 +5839,7 @@ var RenderAssetManagerProvider = ({ children, collectAssets }) => {
5782
5839
  };
5783
5840
  }
5784
5841
  }, []);
5785
- const contextValue = useMemo17(() => {
5842
+ const contextValue = useMemo18(() => {
5786
5843
  return {
5787
5844
  registerRenderAsset,
5788
5845
  unregisterRenderAsset,
@@ -5798,7 +5855,7 @@ var RenderAssetManagerProvider = ({ children, collectAssets }) => {
5798
5855
  // src/Artifact.tsx
5799
5856
  var ArtifactThumbnail = Symbol("Thumbnail");
5800
5857
  var Artifact = ({ filename, content, downloadBehavior }) => {
5801
- const { registerRenderAsset, unregisterRenderAsset } = useContext18(RenderAssetManager);
5858
+ const { registerRenderAsset, unregisterRenderAsset } = useContext19(RenderAssetManager);
5802
5859
  const env = useRemotionEnvironment();
5803
5860
  const frame = useCurrentFrame();
5804
5861
  const [id] = useState8(() => {
@@ -5855,7 +5912,7 @@ var Artifact = ({ filename, content, downloadBehavior }) => {
5855
5912
  };
5856
5913
  Artifact.Thumbnail = ArtifactThumbnail;
5857
5914
  // src/audio/html5-audio.tsx
5858
- import { forwardRef as forwardRef7, useCallback as useCallback14, useContext as useContext30 } from "react";
5915
+ import { forwardRef as forwardRef7, useCallback as useCallback14, useContext as useContext31 } from "react";
5859
5916
 
5860
5917
  // src/absolute-src.ts
5861
5918
  var getAbsoluteSrc = (relativeSrc) => {
@@ -5887,7 +5944,7 @@ var calculateMediaDuration = ({
5887
5944
  };
5888
5945
 
5889
5946
  // src/loop/index.tsx
5890
- import React17, { createContext as createContext18, useMemo as useMemo18 } from "react";
5947
+ import React17, { createContext as createContext18, useMemo as useMemo19 } from "react";
5891
5948
  import { jsx as jsx16 } from "react/jsx-runtime";
5892
5949
  var LoopContext = createContext18(null);
5893
5950
  var useLoop = () => {
@@ -5923,14 +5980,14 @@ var Loop = ({
5923
5980
  const iteration = Math.floor(currentFrame / durationInFrames);
5924
5981
  const start = iteration * durationInFrames;
5925
5982
  const from = Math.min(start, maxFrame);
5926
- const loopDisplay = useMemo18(() => {
5983
+ const loopDisplay = useMemo19(() => {
5927
5984
  return {
5928
5985
  numberOfTimes: Math.min(compDuration / durationInFrames, times),
5929
5986
  startOffset: -from,
5930
5987
  durationInFrames
5931
5988
  };
5932
5989
  }, [compDuration, durationInFrames, from, times]);
5933
- const loopContext = useMemo18(() => {
5990
+ const loopContext = useMemo19(() => {
5934
5991
  return {
5935
5992
  iteration: Math.floor(currentFrame / durationInFrames),
5936
5993
  durationInFrames
@@ -5954,7 +6011,7 @@ var Loop = ({
5954
6011
  Loop.useLoop = useLoop;
5955
6012
 
5956
6013
  // src/prefetch.ts
5957
- import { useContext as useContext19 } from "react";
6014
+ import { useContext as useContext20 } from "react";
5958
6015
 
5959
6016
  // src/playback-logging.ts
5960
6017
  var playbackLogging = ({
@@ -6010,7 +6067,7 @@ var getSrcWithoutHash = (src) => {
6010
6067
  return src.slice(0, hashIndex);
6011
6068
  };
6012
6069
  var usePreload = (src) => {
6013
- const preloads2 = useContext19(PreloadContext);
6070
+ const preloads2 = useContext20(PreloadContext);
6014
6071
  const hashFragmentIndex = removeAndGetHashFragment(src);
6015
6072
  const withoutHashFragment = getSrcWithoutHash(src);
6016
6073
  if (!preloads2[withoutHashFragment]) {
@@ -6295,7 +6352,7 @@ var resolveTrimProps = ({
6295
6352
  };
6296
6353
 
6297
6354
  // src/video/duration-state.tsx
6298
- import { createContext as createContext20, useMemo as useMemo19, useReducer } from "react";
6355
+ import { createContext as createContext20, useMemo as useMemo20, useReducer } from "react";
6299
6356
  import { jsx as jsx18 } from "react/jsx-runtime";
6300
6357
  var durationReducer = (state, action) => {
6301
6358
  switch (action.type) {
@@ -6321,7 +6378,7 @@ var DurationsContext = createContext20({
6321
6378
  });
6322
6379
  var DurationsContextProvider = ({ children }) => {
6323
6380
  const [durations, setDurations] = useReducer(durationReducer, {});
6324
- const value = useMemo19(() => {
6381
+ const value = useMemo20(() => {
6325
6382
  return {
6326
6383
  durations,
6327
6384
  setDurations
@@ -6337,10 +6394,10 @@ var DurationsContextProvider = ({ children }) => {
6337
6394
  import { useCallback as useCallback13 } from "react";
6338
6395
  import React23, {
6339
6396
  forwardRef as forwardRef5,
6340
- useContext as useContext28,
6397
+ useContext as useContext29,
6341
6398
  useEffect as useEffect14,
6342
6399
  useImperativeHandle as useImperativeHandle4,
6343
- useMemo as useMemo27,
6400
+ useMemo as useMemo28,
6344
6401
  useRef as useRef19,
6345
6402
  useState as useState14
6346
6403
  } from "react";
@@ -6364,16 +6421,16 @@ var getCrossOriginValue = ({
6364
6421
  };
6365
6422
 
6366
6423
  // src/use-amplification.ts
6367
- import { useContext as useContext21, useLayoutEffect as useLayoutEffect5, useRef as useRef14 } from "react";
6424
+ import { useContext as useContext22, useLayoutEffect as useLayoutEffect5, useRef as useRef14 } from "react";
6368
6425
 
6369
6426
  // src/audio/shared-audio-tags.tsx
6370
6427
  import React20, {
6371
6428
  createContext as createContext21,
6372
6429
  createRef as createRef2,
6373
6430
  useCallback as useCallback9,
6374
- useContext as useContext20,
6431
+ useContext as useContext21,
6375
6432
  useEffect as useEffect7,
6376
- useMemo as useMemo21,
6433
+ useMemo as useMemo22,
6377
6434
  useRef as useRef12,
6378
6435
  useState as useState10
6379
6436
  } from "react";
@@ -6474,7 +6531,7 @@ var makeSharedElementSourceNode = ({
6474
6531
  };
6475
6532
 
6476
6533
  // src/audio/use-audio-context.ts
6477
- import { useMemo as useMemo20, useRef as useRef11 } from "react";
6534
+ import { useMemo as useMemo21, useRef as useRef11 } from "react";
6478
6535
  var warned = false;
6479
6536
  var warnOnce = (logLevel) => {
6480
6537
  if (warned) {
@@ -6496,7 +6553,7 @@ var useSingletonAudioContext = ({
6496
6553
  if (sampleRate !== initialSampleRate.current) {
6497
6554
  throw new Error(`Changing the AudioContext sample rate dynamically is not supported. The sample rate was initialized with ${initialSampleRate.current} Hz, but ${sampleRate} Hz was passed later.`);
6498
6555
  }
6499
- const context = useMemo20(() => {
6556
+ const context = useMemo21(() => {
6500
6557
  if (env.isRendering) {
6501
6558
  return null;
6502
6559
  }
@@ -6635,9 +6692,9 @@ var SharedAudioContextProvider = ({ children, audioLatencyHint, audioEnabled, pr
6635
6692
  });
6636
6693
  const audioContextIsPlayingEventually = useRef12(false);
6637
6694
  const isResuming = useRef12(null);
6638
- const audioSyncAnchor = useMemo21(() => ({ value: 0 }), []);
6695
+ const audioSyncAnchor = useMemo22(() => ({ value: 0 }), []);
6639
6696
  const audioSyncAnchorListeners = useRef12([]);
6640
- const audioSyncAnchorEmitter = useMemo21(() => {
6697
+ const audioSyncAnchorEmitter = useMemo22(() => {
6641
6698
  return {
6642
6699
  dispatch: (event) => {
6643
6700
  audioSyncAnchorListeners.current.forEach((l) => l(event));
@@ -6657,7 +6714,7 @@ var SharedAudioContextProvider = ({ children, audioLatencyHint, audioEnabled, pr
6657
6714
  const unscheduleAudioNode = useCallback9((node) => {
6658
6715
  nodesToResume.current.delete(node);
6659
6716
  }, []);
6660
- const scheduleAudioNode = useMemo21(() => {
6717
+ const scheduleAudioNode = useMemo22(() => {
6661
6718
  return ({
6662
6719
  node,
6663
6720
  mediaTimestamp,
@@ -6749,7 +6806,7 @@ var SharedAudioContextProvider = ({ children, audioLatencyHint, audioEnabled, pr
6749
6806
  audioContextIsPlayingEventually.current = false;
6750
6807
  return ctxAndGain.suspend();
6751
6808
  }, [ctxAndGain]);
6752
- const audioContextValue = useMemo21(() => {
6809
+ const audioContextValue = useMemo22(() => {
6753
6810
  return {
6754
6811
  audioContext: ctxAndGain?.audioContext ?? null,
6755
6812
  getAudioContextState: () => ctxAndGain?.getState() ?? null,
@@ -6786,10 +6843,10 @@ var SharedAudioTagsContextProvider = ({ children, numberOfAudioTags }) => {
6786
6843
  const logLevel = useLogLevel();
6787
6844
  const mountTime = useMountTime();
6788
6845
  const env = useRemotionEnvironment();
6789
- const audioCtx = useContext20(SharedAudioContext);
6846
+ const audioCtx = useContext21(SharedAudioContext);
6790
6847
  const audioContext = audioCtx?.audioContext ?? null;
6791
6848
  const resume = audioCtx?.resume;
6792
- const refs = useMemo21(() => {
6849
+ const refs = useMemo22(() => {
6793
6850
  return new Array(numberOfAudioTags).fill(true).map(() => {
6794
6851
  const ref = createRef2();
6795
6852
  return {
@@ -6928,7 +6985,7 @@ var SharedAudioTagsContextProvider = ({ children, numberOfAudioTags }) => {
6928
6985
  });
6929
6986
  resume?.();
6930
6987
  }, [logLevel, mountTime, refs, env.isPlayer, resume]);
6931
- const audioTagsValue = useMemo21(() => {
6988
+ const audioTagsValue = useMemo22(() => {
6932
6989
  return {
6933
6990
  registerAudio,
6934
6991
  unregisterAudio,
@@ -6943,7 +7000,7 @@ var SharedAudioTagsContextProvider = ({ children, numberOfAudioTags }) => {
6943
7000
  unregisterAudio,
6944
7001
  updateAudio
6945
7002
  ]);
6946
- const sharedAudioTagElements = useMemo21(() => {
7003
+ const sharedAudioTagElements = useMemo22(() => {
6947
7004
  return refs.map(({ id, ref }) => {
6948
7005
  return /* @__PURE__ */ jsx19("audio", {
6949
7006
  ref,
@@ -6966,8 +7023,8 @@ var useSharedAudio = ({
6966
7023
  premounting,
6967
7024
  postmounting
6968
7025
  }) => {
6969
- const audioCtx = useContext20(SharedAudioContext);
6970
- const tagsCtx = useContext20(SharedAudioTagsContext);
7026
+ const audioCtx = useContext21(SharedAudioContext);
7027
+ const tagsCtx = useContext21(SharedAudioTagsContext);
6971
7028
  const [elem] = useState10(() => {
6972
7029
  if (tagsCtx && tagsCtx.numberOfAudioTags > 0) {
6973
7030
  return tagsCtx.registerAudio({ aud, audioId, premounting, postmounting });
@@ -7153,7 +7210,7 @@ var useVolume = ({
7153
7210
  const audioStuffRef = useRef14(null);
7154
7211
  const currentVolumeRef = useRef14(volume);
7155
7212
  currentVolumeRef.current = volume;
7156
- const sharedAudioContext = useContext21(SharedAudioContext);
7213
+ const sharedAudioContext = useContext22(SharedAudioContext);
7157
7214
  if (!sharedAudioContext) {
7158
7215
  throw new Error("useAmplification must be used within a SharedAudioContext");
7159
7216
  }
@@ -7219,12 +7276,12 @@ var useVolume = ({
7219
7276
  };
7220
7277
 
7221
7278
  // src/use-media-in-timeline.ts
7222
- import { useContext as useContext23, useEffect as useEffect8, useMemo as useMemo22, useState as useState11 } from "react";
7279
+ import { useContext as useContext24, useEffect as useEffect8, useMemo as useMemo23, useState as useState11 } from "react";
7223
7280
 
7224
7281
  // src/audio/use-audio-frame.ts
7225
- import { useContext as useContext22 } from "react";
7282
+ import { useContext as useContext23 } from "react";
7226
7283
  var useMediaStartsAt = () => {
7227
- const parentSequence = useContext22(SequenceContext);
7284
+ const parentSequence = useContext23(SequenceContext);
7228
7285
  return parentSequence?.cumulatedNegativeFrom ?? 0;
7229
7286
  };
7230
7287
  var useFrameForVolumeProp = (behavior) => {
@@ -7321,7 +7378,7 @@ var useBasicMediaInTimeline = ({
7321
7378
  if (!src) {
7322
7379
  throw new Error("No src passed");
7323
7380
  }
7324
- const parentSequence = useContext23(SequenceContext);
7381
+ const parentSequence = useContext24(SequenceContext);
7325
7382
  const [initialVolume] = useState11(() => volume);
7326
7383
  const duration = getTimelineDuration({
7327
7384
  compositionDurationInFrames: sequenceDurationInFrames,
@@ -7331,7 +7388,7 @@ var useBasicMediaInTimeline = ({
7331
7388
  parentSequenceDurationInFrames: parentSequence?.durationInFrames ?? null,
7332
7389
  loop
7333
7390
  });
7334
- const volumes = useMemo22(() => {
7391
+ const volumes = useMemo23(() => {
7335
7392
  if (typeof volume === "number") {
7336
7393
  return volume;
7337
7394
  }
@@ -7352,7 +7409,7 @@ var useBasicMediaInTimeline = ({
7352
7409
  const nonce = useNonce();
7353
7410
  const { rootId } = useTimelineContext();
7354
7411
  const startMediaFrom = 0 - mediaStartsAt + (trimBefore ?? 0);
7355
- const memoizedResult = useMemo22(() => {
7412
+ const memoizedResult = useMemo23(() => {
7356
7413
  return {
7357
7414
  volumes,
7358
7415
  duration,
@@ -7393,9 +7450,9 @@ var useMediaInTimeline = ({
7393
7450
  documentationLink,
7394
7451
  refForOutline
7395
7452
  }) => {
7396
- const parentSequence = useContext23(SequenceContext);
7453
+ const parentSequence = useContext24(SequenceContext);
7397
7454
  const startsAt = useMediaStartsAt();
7398
- const { registerSequence, unregisterSequence } = useContext23(SequenceManager);
7455
+ const { registerSequence, unregisterSequence } = useContext24(SequenceManager);
7399
7456
  const { durationInFrames } = useVideoConfig();
7400
7457
  const mediaStartsAt = useMediaStartsAt();
7401
7458
  const { volumes, duration, doesVolumeChange, nonce, rootId, finalDisplayName } = useBasicMediaInTimeline({
@@ -7483,25 +7540,25 @@ var useMediaInTimeline = ({
7483
7540
  // src/use-media-playback.ts
7484
7541
  import {
7485
7542
  useCallback as useCallback12,
7486
- useContext as useContext26,
7543
+ useContext as useContext27,
7487
7544
  useEffect as useEffect12,
7488
7545
  useLayoutEffect as useLayoutEffect7,
7489
7546
  useRef as useRef18
7490
7547
  } from "react";
7491
7548
 
7492
7549
  // src/buffer-until-first-frame.ts
7493
- import { useCallback as useCallback11, useMemo as useMemo25, useRef as useRef16 } from "react";
7550
+ import { useCallback as useCallback11, useMemo as useMemo26, useRef as useRef16 } from "react";
7494
7551
 
7495
7552
  // src/use-buffer-state.ts
7496
- import { useContext as useContext25, useMemo as useMemo24 } from "react";
7553
+ import { useContext as useContext26, useMemo as useMemo25 } from "react";
7497
7554
 
7498
7555
  // src/buffering.tsx
7499
7556
  import React21, {
7500
7557
  useCallback as useCallback10,
7501
- useContext as useContext24,
7558
+ useContext as useContext25,
7502
7559
  useEffect as useEffect9,
7503
7560
  useLayoutEffect as useLayoutEffect6,
7504
- useMemo as useMemo23,
7561
+ useMemo as useMemo24,
7505
7562
  useRef as useRef15,
7506
7563
  useState as useState12
7507
7564
  } from "react";
@@ -7587,13 +7644,13 @@ var useBufferManager = (logLevel, mountTime) => {
7587
7644
  }
7588
7645
  }, [blocks]);
7589
7646
  }
7590
- return useMemo23(() => {
7647
+ return useMemo24(() => {
7591
7648
  return { addBlock, listenForBuffering, listenForResume, buffering };
7592
7649
  }, [addBlock, buffering, listenForBuffering, listenForResume]);
7593
7650
  };
7594
7651
  var BufferingContextReact = React21.createContext(null);
7595
7652
  var BufferingProvider = ({ children }) => {
7596
- const { logLevel, mountTime } = useContext24(LogLevelContext);
7653
+ const { logLevel, mountTime } = useContext25(LogLevelContext);
7597
7654
  const bufferManager = useBufferManager(logLevel ?? "info", mountTime);
7598
7655
  return /* @__PURE__ */ jsx20(BufferingContextReact.Provider, {
7599
7656
  value: bufferManager,
@@ -7621,10 +7678,10 @@ var useIsPlayerBuffering = (bufferManager) => {
7621
7678
 
7622
7679
  // src/use-buffer-state.ts
7623
7680
  var useBufferState = () => {
7624
- const buffer = useContext25(BufferingContextReact);
7681
+ const buffer = useContext26(BufferingContextReact);
7625
7682
  const logLevel = useLogLevel();
7626
7683
  const addBlock = buffer ? buffer.addBlock : null;
7627
- return useMemo24(() => ({
7684
+ return useMemo25(() => ({
7628
7685
  delayPlayback: () => {
7629
7686
  if (!addBlock) {
7630
7687
  throw new Error("Tried to enable the buffering state, but a Remotion context was not found. This API can only be called in a component that was passed to the Remotion Player or a <Composition>. Or you might have experienced a version mismatch - run `npx remotion versions` and ensure all packages have the same version. This error is thrown by the buffer state https://remotion.dev/docs/player/buffer-state");
@@ -7734,7 +7791,7 @@ var useBufferUntilFirstFrame = ({
7734
7791
  onVariableFpsVideoDetected,
7735
7792
  pauseWhenBuffering
7736
7793
  ]);
7737
- return useMemo25(() => {
7794
+ return useMemo26(() => {
7738
7795
  return {
7739
7796
  isBuffering: () => bufferingRef.current,
7740
7797
  bufferUntilFirstFrame
@@ -8127,7 +8184,7 @@ var useMediaPlayback = ({
8127
8184
  const frame = useCurrentFrame();
8128
8185
  const absoluteFrame = useTimelinePosition();
8129
8186
  const [playing] = usePlayingState();
8130
- const buffering = useContext26(BufferingContextReact);
8187
+ const buffering = useContext27(BufferingContextReact);
8131
8188
  const { fps } = useVideoConfig();
8132
8189
  const mediaStartsAt = useMediaStartsAt();
8133
8190
  const lastSeekDueToShift = useRef18(null);
@@ -8414,7 +8471,7 @@ var useMediaTag = ({
8414
8471
  };
8415
8472
 
8416
8473
  // src/volume-position-state.ts
8417
- import { createContext as createContext22, useContext as useContext27, useMemo as useMemo26 } from "react";
8474
+ import { createContext as createContext22, useContext as useContext28, useMemo as useMemo27 } from "react";
8418
8475
  var MediaVolumeContext = createContext22({
8419
8476
  playerMuted: false,
8420
8477
  mediaVolume: 1
@@ -8428,16 +8485,16 @@ var SetMediaVolumeContext = createContext22({
8428
8485
  }
8429
8486
  });
8430
8487
  var useMediaVolumeState = () => {
8431
- const { mediaVolume } = useContext27(MediaVolumeContext);
8432
- const { setMediaVolume } = useContext27(SetMediaVolumeContext);
8433
- return useMemo26(() => {
8488
+ const { mediaVolume } = useContext28(MediaVolumeContext);
8489
+ const { setMediaVolume } = useContext28(SetMediaVolumeContext);
8490
+ return useMemo27(() => {
8434
8491
  return [mediaVolume, setMediaVolume];
8435
8492
  }, [mediaVolume, setMediaVolume]);
8436
8493
  };
8437
8494
  var usePlayerMutedState = () => {
8438
- const { playerMuted } = useContext27(MediaVolumeContext);
8439
- const { setPlayerMuted } = useContext27(SetMediaVolumeContext);
8440
- return useMemo26(() => {
8495
+ const { playerMuted } = useContext28(MediaVolumeContext);
8496
+ const { setPlayerMuted } = useContext28(SetMediaVolumeContext);
8497
+ return useMemo27(() => {
8441
8498
  return [playerMuted, setPlayerMuted];
8442
8499
  }, [playerMuted, setPlayerMuted]);
8443
8500
  };
@@ -8496,7 +8553,7 @@ var AudioForDevelopmentForwardRefFunction = (props, ref) => {
8496
8553
  throw new TypeError("No 'src' was passed to <Html5Audio>.");
8497
8554
  }
8498
8555
  const preloadedSrc = usePreload(src);
8499
- const sequenceContext = useContext28(SequenceContext);
8556
+ const sequenceContext = useContext29(SequenceContext);
8500
8557
  const [timelineId] = useState14(() => String(Math.random()));
8501
8558
  const userPreferredVolume = evaluateVolume({
8502
8559
  frame: volumePropFrame,
@@ -8509,7 +8566,7 @@ var AudioForDevelopmentForwardRefFunction = (props, ref) => {
8509
8566
  requestsVideoFrame: false,
8510
8567
  isClientSideRendering: false
8511
8568
  });
8512
- const propsToPass = useMemo27(() => {
8569
+ const propsToPass = useMemo28(() => {
8513
8570
  return {
8514
8571
  muted: muted || playerMuted || userPreferredVolume <= 0,
8515
8572
  src: preloadedSrc,
@@ -8526,7 +8583,7 @@ var AudioForDevelopmentForwardRefFunction = (props, ref) => {
8526
8583
  userPreferredVolume,
8527
8584
  crossOriginValue
8528
8585
  ]);
8529
- const id = useMemo27(() => `audio-${random(src ?? "")}-${sequenceContext?.relativeFrom}-${sequenceContext?.cumulatedFrom}-${sequenceContext?.durationInFrames}-muted:${props.muted}-loop:${props.loop}`, [
8586
+ const id = useMemo28(() => `audio-${random(src ?? "")}-${sequenceContext?.relativeFrom}-${sequenceContext?.cumulatedFrom}-${sequenceContext?.durationInFrames}-muted:${props.muted}-loop:${props.loop}`, [
8530
8587
  src,
8531
8588
  sequenceContext?.relativeFrom,
8532
8589
  sequenceContext?.cumulatedFrom,
@@ -8636,11 +8693,11 @@ var AudioForPreview = forwardRef5(AudioForDevelopmentForwardRefFunction);
8636
8693
  // src/audio/AudioForRendering.tsx
8637
8694
  import {
8638
8695
  forwardRef as forwardRef6,
8639
- useContext as useContext29,
8696
+ useContext as useContext30,
8640
8697
  useEffect as useEffect15,
8641
8698
  useImperativeHandle as useImperativeHandle5,
8642
8699
  useLayoutEffect as useLayoutEffect8,
8643
- useMemo as useMemo28,
8700
+ useMemo as useMemo29,
8644
8701
  useRef as useRef20
8645
8702
  } from "react";
8646
8703
  import { jsx as jsx22 } from "react/jsx-runtime";
@@ -8668,10 +8725,10 @@ var AudioForRenderingRefForwardingFunction = (props, ref) => {
8668
8725
  const absoluteFrame = useTimelinePosition();
8669
8726
  const volumePropFrame = useFrameForVolumeProp(loopVolumeCurveBehavior ?? "repeat");
8670
8727
  const frame = useCurrentFrame();
8671
- const sequenceContext = useContext29(SequenceContext);
8672
- const { registerRenderAsset, unregisterRenderAsset } = useContext29(RenderAssetManager);
8728
+ const sequenceContext = useContext30(SequenceContext);
8729
+ const { registerRenderAsset, unregisterRenderAsset } = useContext30(RenderAssetManager);
8673
8730
  const { delayRender: delayRender2, continueRender: continueRender2 } = useDelayRender();
8674
- const id = useMemo28(() => `audio-${random(props.src ?? "")}-${sequenceContext?.relativeFrom}-${sequenceContext?.cumulatedFrom}-${sequenceContext?.durationInFrames}`, [
8731
+ const id = useMemo29(() => `audio-${random(props.src ?? "")}-${sequenceContext?.relativeFrom}-${sequenceContext?.cumulatedFrom}-${sequenceContext?.durationInFrames}`, [
8675
8732
  props.src,
8676
8733
  sequenceContext?.relativeFrom,
8677
8734
  sequenceContext?.cumulatedFrom,
@@ -8781,7 +8838,7 @@ var AudioForRendering = forwardRef6(AudioForRenderingRefForwardingFunction);
8781
8838
  // src/audio/html5-audio.tsx
8782
8839
  import { jsx as jsx23 } from "react/jsx-runtime";
8783
8840
  var AudioRefForwardingFunction = (props, ref) => {
8784
- const audioTagsContext = useContext30(SharedAudioTagsContext);
8841
+ const audioTagsContext = useContext31(SharedAudioTagsContext);
8785
8842
  const propsWithFreeze = props;
8786
8843
  const {
8787
8844
  startFrom,
@@ -8805,7 +8862,7 @@ var AudioRefForwardingFunction = (props, ref) => {
8805
8862
  if (typeof freeze !== "undefined") {
8806
8863
  throw new TypeError('The "freeze" prop is not supported on <Html5Audio />. Use <Sequence freeze={...}> to freeze media playback.');
8807
8864
  }
8808
- const { durations, setDurations } = useContext30(DurationsContext);
8865
+ const { durations, setDurations } = useContext31(DurationsContext);
8809
8866
  if (typeof props.src !== "string") {
8810
8867
  throw new TypeError(`The \`<Html5Audio>\` tag requires a string for \`src\`, but got ${JSON.stringify(props.src)} instead.`);
8811
8868
  }
@@ -8910,7 +8967,7 @@ import {
8910
8967
  useCallback as useCallback15,
8911
8968
  useEffect as useEffect16,
8912
8969
  useImperativeHandle as useImperativeHandle6,
8913
- useMemo as useMemo29,
8970
+ useMemo as useMemo30,
8914
8971
  useRef as useRef21,
8915
8972
  useState as useState15
8916
8973
  } from "react";
@@ -8978,7 +9035,7 @@ var SolidInner = ({
8978
9035
  effects,
8979
9036
  overrideId: overrideId ?? null
8980
9037
  });
8981
- const sourceCanvas = useMemo29(() => {
9038
+ const sourceCanvas = useMemo30(() => {
8982
9039
  if (typeof document === "undefined") {
8983
9040
  return null;
8984
9041
  }
@@ -9046,7 +9103,7 @@ var SolidInner = ({
9046
9103
  cancelRender2,
9047
9104
  memoizedEffects
9048
9105
  ]);
9049
- const canvasStyle = useMemo29(() => {
9106
+ const canvasStyle = useMemo30(() => {
9050
9107
  return {
9051
9108
  width,
9052
9109
  height,
@@ -9125,9 +9182,9 @@ import {
9125
9182
  createContext as createContext23,
9126
9183
  forwardRef as forwardRef9,
9127
9184
  useCallback as useCallback16,
9128
- useContext as useContext31,
9185
+ useContext as useContext32,
9129
9186
  useLayoutEffect as useLayoutEffect9,
9130
- useMemo as useMemo30,
9187
+ useMemo as useMemo31,
9131
9188
  useRef as useRef22
9132
9189
  } from "react";
9133
9190
  import { jsx as jsx25 } from "react/jsx-runtime";
@@ -9206,7 +9263,7 @@ var HtmlInCanvasContent = forwardRef9(({
9206
9263
  controls,
9207
9264
  style
9208
9265
  }, ref) => {
9209
- const ancestor = useContext31(HtmlInCanvasAncestorContext);
9266
+ const ancestor = useContext32(HtmlInCanvasAncestorContext);
9210
9267
  assertHtmlInCanvasDimensions(width, height);
9211
9268
  const resolvedPixelDensity = resolveHtmlInCanvasPixelDensity(pixelDensity);
9212
9269
  const canvasWidth = Math.ceil(width * resolvedPixelDensity);
@@ -9425,20 +9482,20 @@ var HtmlInCanvasContent = forwardRef9(({
9425
9482
  continueRender2(handle);
9426
9483
  };
9427
9484
  }, [width, height, continueRender2, canvasSizeKey]);
9428
- const innerStyle = useMemo30(() => {
9485
+ const innerStyle = useMemo31(() => {
9429
9486
  return {
9430
9487
  width,
9431
9488
  height
9432
9489
  };
9433
9490
  }, [width, height]);
9434
- const canvasStyle = useMemo30(() => {
9491
+ const canvasStyle = useMemo31(() => {
9435
9492
  return {
9436
9493
  width,
9437
9494
  height,
9438
9495
  ...style ?? {}
9439
9496
  };
9440
9497
  }, [height, style, width]);
9441
- const ancestorValue = useMemo30(() => {
9498
+ const ancestorValue = useMemo31(() => {
9442
9499
  return {
9443
9500
  requestParentPaint: () => {
9444
9501
  canvas2dRef.current?.requestPaint?.();
@@ -9538,10 +9595,10 @@ addSequenceStackTraces(HtmlInCanvas);
9538
9595
  import {
9539
9596
  forwardRef as forwardRef10,
9540
9597
  useCallback as useCallback17,
9541
- useContext as useContext32,
9598
+ useContext as useContext33,
9542
9599
  useImperativeHandle as useImperativeHandle7,
9543
9600
  useLayoutEffect as useLayoutEffect10,
9544
- useMemo as useMemo31,
9601
+ useMemo as useMemo32,
9545
9602
  useRef as useRef23,
9546
9603
  useState as useState16
9547
9604
  } from "react";
@@ -9668,7 +9725,7 @@ var CanvasImageContent = forwardRef10(({
9668
9725
  effects,
9669
9726
  overrideId: controls?.overrideId ?? null
9670
9727
  });
9671
- const sequenceContext = useContext32(SequenceContext);
9728
+ const sequenceContext = useContext33(SequenceContext);
9672
9729
  const pendingLoadDelayRef = useRef23(null);
9673
9730
  const [isLoadPending, setIsLoadPending] = useState16(false);
9674
9731
  const isPremounting = Boolean(sequenceContext?.premounting);
@@ -9685,7 +9742,7 @@ var CanvasImageContent = forwardRef10(({
9685
9742
  continueRender2(pending.handle);
9686
9743
  pendingLoadDelayRef.current = null;
9687
9744
  }, [continueRender2]);
9688
- const sourceCanvas = useMemo31(() => {
9745
+ const sourceCanvas = useMemo32(() => {
9689
9746
  if (typeof document === "undefined") {
9690
9747
  return null;
9691
9748
  }
@@ -10024,7 +10081,7 @@ var IFrame = forwardRef11(IFrameRefForwarding);
10024
10081
  // src/Img.tsx
10025
10082
  import {
10026
10083
  useCallback as useCallback19,
10027
- useContext as useContext33,
10084
+ useContext as useContext34,
10028
10085
  useLayoutEffect as useLayoutEffect11,
10029
10086
  useRef as useRef24,
10030
10087
  useState as useState18
@@ -10050,7 +10107,7 @@ var ImgContent = ({
10050
10107
  const imageRef = useRef24(null);
10051
10108
  const errors = useRef24({});
10052
10109
  const { delayPlayback } = useBufferState();
10053
- const sequenceContext = useContext33(SequenceContext);
10110
+ const sequenceContext = useContext34(SequenceContext);
10054
10111
  const [isLoading, setIsLoading] = useState18(false);
10055
10112
  const _propsValid = true;
10056
10113
  if (!_propsValid) {
@@ -10402,7 +10459,10 @@ var makeRemotionComponentIdentity = ({
10402
10459
  };
10403
10460
  var interactiveElementSchema = {
10404
10461
  ...baseSchema,
10405
- ...transformSchema,
10462
+ ...transformSchema
10463
+ };
10464
+ var interactiveTextElementSchema = {
10465
+ ...interactiveElementSchema,
10406
10466
  ...textSchema,
10407
10467
  ...textContentSchema
10408
10468
  };
@@ -10418,7 +10478,7 @@ var withSchema = (options) => {
10418
10478
  addSequenceStackTraces(Wrapped);
10419
10479
  return Wrapped;
10420
10480
  };
10421
- var makeInteractiveElement = (tag, displayName) => {
10481
+ var makeInteractiveElement = (tag, displayName, schema) => {
10422
10482
  const Inner = forwardRef12((propsWithControls, ref) => {
10423
10483
  const {
10424
10484
  durationInFrames,
@@ -10464,12 +10524,18 @@ var makeInteractiveElement = (tag, displayName) => {
10464
10524
  packageName: "remotion",
10465
10525
  componentName: displayName.slice(1, -1)
10466
10526
  }),
10467
- schema: interactiveElementSchema,
10527
+ schema,
10468
10528
  supportsEffects: false
10469
10529
  });
10470
10530
  Wrapped.displayName = displayName;
10471
10531
  return Wrapped;
10472
10532
  };
10533
+ var makeInteractiveTextElement = (tag, displayName) => {
10534
+ return makeInteractiveElement(tag, displayName, interactiveTextElementSchema);
10535
+ };
10536
+ var makeInteractiveNonTextElement = (tag, displayName) => {
10537
+ return makeInteractiveElement(tag, displayName, interactiveElementSchema);
10538
+ };
10473
10539
  var Interactive = {
10474
10540
  baseSchema,
10475
10541
  transformSchema,
@@ -10478,41 +10544,41 @@ var Interactive = {
10478
10544
  sequenceSchema,
10479
10545
  withSchema,
10480
10546
  _internalMakeRemotionComponentIdentity: makeRemotionComponentIdentity,
10481
- A: makeInteractiveElement("a", "<Interactive.A>"),
10482
- Article: makeInteractiveElement("article", "<Interactive.Article>"),
10483
- Aside: makeInteractiveElement("aside", "<Interactive.Aside>"),
10484
- Button: makeInteractiveElement("button", "<Interactive.Button>"),
10485
- Circle: makeInteractiveElement("circle", "<Interactive.Circle>"),
10486
- Code: makeInteractiveElement("code", "<Interactive.Code>"),
10487
- Div: makeInteractiveElement("div", "<Interactive.Div>"),
10488
- Ellipse: makeInteractiveElement("ellipse", "<Interactive.Ellipse>"),
10489
- Em: makeInteractiveElement("em", "<Interactive.Em>"),
10490
- Footer: makeInteractiveElement("footer", "<Interactive.Footer>"),
10491
- G: makeInteractiveElement("g", "<Interactive.G>"),
10492
- H1: makeInteractiveElement("h1", "<Interactive.H1>"),
10493
- H2: makeInteractiveElement("h2", "<Interactive.H2>"),
10494
- H3: makeInteractiveElement("h3", "<Interactive.H3>"),
10495
- H4: makeInteractiveElement("h4", "<Interactive.H4>"),
10496
- H5: makeInteractiveElement("h5", "<Interactive.H5>"),
10497
- H6: makeInteractiveElement("h6", "<Interactive.H6>"),
10498
- Header: makeInteractiveElement("header", "<Interactive.Header>"),
10499
- Label: makeInteractiveElement("label", "<Interactive.Label>"),
10500
- Li: makeInteractiveElement("li", "<Interactive.Li>"),
10501
- Line: makeInteractiveElement("line", "<Interactive.Line>"),
10502
- Main: makeInteractiveElement("main", "<Interactive.Main>"),
10503
- Nav: makeInteractiveElement("nav", "<Interactive.Nav>"),
10504
- Ol: makeInteractiveElement("ol", "<Interactive.Ol>"),
10505
- P: makeInteractiveElement("p", "<Interactive.P>"),
10506
- Path: makeInteractiveElement("path", "<Interactive.Path>"),
10507
- Pre: makeInteractiveElement("pre", "<Interactive.Pre>"),
10508
- Rect: makeInteractiveElement("rect", "<Interactive.Rect>"),
10509
- Section: makeInteractiveElement("section", "<Interactive.Section>"),
10510
- Small: makeInteractiveElement("small", "<Interactive.Small>"),
10511
- Span: makeInteractiveElement("span", "<Interactive.Span>"),
10512
- Strong: makeInteractiveElement("strong", "<Interactive.Strong>"),
10513
- Svg: makeInteractiveElement("svg", "<Interactive.Svg>"),
10514
- Text: makeInteractiveElement("text", "<Interactive.Text>"),
10515
- Ul: makeInteractiveElement("ul", "<Interactive.Ul>")
10547
+ A: makeInteractiveTextElement("a", "<Interactive.A>"),
10548
+ Article: makeInteractiveTextElement("article", "<Interactive.Article>"),
10549
+ Aside: makeInteractiveTextElement("aside", "<Interactive.Aside>"),
10550
+ Button: makeInteractiveTextElement("button", "<Interactive.Button>"),
10551
+ Circle: makeInteractiveNonTextElement("circle", "<Interactive.Circle>"),
10552
+ Code: makeInteractiveTextElement("code", "<Interactive.Code>"),
10553
+ Div: makeInteractiveTextElement("div", "<Interactive.Div>"),
10554
+ Ellipse: makeInteractiveNonTextElement("ellipse", "<Interactive.Ellipse>"),
10555
+ Em: makeInteractiveTextElement("em", "<Interactive.Em>"),
10556
+ Footer: makeInteractiveTextElement("footer", "<Interactive.Footer>"),
10557
+ G: makeInteractiveNonTextElement("g", "<Interactive.G>"),
10558
+ H1: makeInteractiveTextElement("h1", "<Interactive.H1>"),
10559
+ H2: makeInteractiveTextElement("h2", "<Interactive.H2>"),
10560
+ H3: makeInteractiveTextElement("h3", "<Interactive.H3>"),
10561
+ H4: makeInteractiveTextElement("h4", "<Interactive.H4>"),
10562
+ H5: makeInteractiveTextElement("h5", "<Interactive.H5>"),
10563
+ H6: makeInteractiveTextElement("h6", "<Interactive.H6>"),
10564
+ Header: makeInteractiveTextElement("header", "<Interactive.Header>"),
10565
+ Label: makeInteractiveTextElement("label", "<Interactive.Label>"),
10566
+ Li: makeInteractiveTextElement("li", "<Interactive.Li>"),
10567
+ Line: makeInteractiveNonTextElement("line", "<Interactive.Line>"),
10568
+ Main: makeInteractiveTextElement("main", "<Interactive.Main>"),
10569
+ Nav: makeInteractiveTextElement("nav", "<Interactive.Nav>"),
10570
+ Ol: makeInteractiveTextElement("ol", "<Interactive.Ol>"),
10571
+ P: makeInteractiveTextElement("p", "<Interactive.P>"),
10572
+ Path: makeInteractiveNonTextElement("path", "<Interactive.Path>"),
10573
+ Pre: makeInteractiveTextElement("pre", "<Interactive.Pre>"),
10574
+ Rect: makeInteractiveNonTextElement("rect", "<Interactive.Rect>"),
10575
+ Section: makeInteractiveTextElement("section", "<Interactive.Section>"),
10576
+ Small: makeInteractiveTextElement("small", "<Interactive.Small>"),
10577
+ Span: makeInteractiveTextElement("span", "<Interactive.Span>"),
10578
+ Strong: makeInteractiveTextElement("strong", "<Interactive.Strong>"),
10579
+ Svg: makeInteractiveNonTextElement("svg", "<Interactive.Svg>"),
10580
+ Text: makeInteractiveTextElement("text", "<Interactive.Text>"),
10581
+ Ul: makeInteractiveTextElement("ul", "<Interactive.Ul>")
10516
10582
  };
10517
10583
  // src/internals.ts
10518
10584
  import { createRef as createRef3 } from "react";
@@ -10525,7 +10591,7 @@ var compositionsRef = React31.createRef();
10525
10591
  import {
10526
10592
  useCallback as useCallback21,
10527
10593
  useImperativeHandle as useImperativeHandle8,
10528
- useMemo as useMemo32,
10594
+ useMemo as useMemo33,
10529
10595
  useRef as useRef26,
10530
10596
  useState as useState19
10531
10597
  } from "react";
@@ -10584,7 +10650,7 @@ var CompositionManagerProvider = ({
10584
10650
  getCompositions: () => currentcompositionsRef.current
10585
10651
  };
10586
10652
  }, []);
10587
- const compositionManagerSetters = useMemo32(() => {
10653
+ const compositionManagerSetters = useMemo33(() => {
10588
10654
  return {
10589
10655
  registerComposition,
10590
10656
  unregisterComposition,
@@ -10600,7 +10666,7 @@ var CompositionManagerProvider = ({
10600
10666
  unregisterFolder,
10601
10667
  onlyRenderComposition
10602
10668
  ]);
10603
- const compositionManagerContextValue = useMemo32(() => {
10669
+ const compositionManagerContextValue = useMemo33(() => {
10604
10670
  return {
10605
10671
  compositions,
10606
10672
  folders,
@@ -10719,14 +10785,14 @@ var waitForRoot = (fn) => {
10719
10785
  };
10720
10786
 
10721
10787
  // src/RemotionRoot.tsx
10722
- import { useMemo as useMemo34 } from "react";
10788
+ import { useMemo as useMemo35 } from "react";
10723
10789
 
10724
10790
  // src/use-media-enabled.tsx
10725
- import { createContext as createContext24, useContext as useContext34, useMemo as useMemo33 } from "react";
10791
+ import { createContext as createContext24, useContext as useContext35, useMemo as useMemo34 } from "react";
10726
10792
  import { jsx as jsx31 } from "react/jsx-runtime";
10727
10793
  var MediaEnabledContext = createContext24(null);
10728
10794
  var useVideoEnabled = () => {
10729
- const context = useContext34(MediaEnabledContext);
10795
+ const context = useContext35(MediaEnabledContext);
10730
10796
  if (!context) {
10731
10797
  return window.remotion_videoEnabled;
10732
10798
  }
@@ -10736,7 +10802,7 @@ var useVideoEnabled = () => {
10736
10802
  return context.videoEnabled;
10737
10803
  };
10738
10804
  var useAudioEnabled = () => {
10739
- const context = useContext34(MediaEnabledContext);
10805
+ const context = useContext35(MediaEnabledContext);
10740
10806
  if (!context) {
10741
10807
  return window.remotion_audioEnabled;
10742
10808
  }
@@ -10750,7 +10816,7 @@ var MediaEnabledProvider = ({
10750
10816
  videoEnabled,
10751
10817
  audioEnabled
10752
10818
  }) => {
10753
- const value = useMemo33(() => ({ videoEnabled, audioEnabled }), [videoEnabled, audioEnabled]);
10819
+ const value = useMemo34(() => ({ videoEnabled, audioEnabled }), [videoEnabled, audioEnabled]);
10754
10820
  return /* @__PURE__ */ jsx31(MediaEnabledContext.Provider, {
10755
10821
  value,
10756
10822
  children
@@ -10769,13 +10835,13 @@ var RemotionRootContexts = ({
10769
10835
  audioEnabled,
10770
10836
  frameState
10771
10837
  }) => {
10772
- const nonceContext = useMemo34(() => {
10838
+ const nonceContext = useMemo35(() => {
10773
10839
  let counter = 0;
10774
10840
  return {
10775
10841
  getNonce: () => counter++
10776
10842
  };
10777
10843
  }, []);
10778
- const logging = useMemo34(() => {
10844
+ const logging = useMemo35(() => {
10779
10845
  return { logLevel, mountTime: Date.now() };
10780
10846
  }, [logLevel]);
10781
10847
  return /* @__PURE__ */ jsx32(LogLevelContext.Provider, {
@@ -11081,7 +11147,7 @@ var useCurrentScale = (options) => {
11081
11147
  return hasContext.scale;
11082
11148
  }
11083
11149
  return calculateScale({
11084
- canvasSize: hasContext.canvasSize,
11150
+ canvasSize: hasContext.canvasSizeForAuto,
11085
11151
  compositionHeight: config.height,
11086
11152
  compositionWidth: config.width,
11087
11153
  previewSize: zoomContext.size.size
@@ -11089,7 +11155,7 @@ var useCurrentScale = (options) => {
11089
11155
  };
11090
11156
 
11091
11157
  // src/use-pixel-density.ts
11092
- import React36, { useContext as useContext35 } from "react";
11158
+ import React36, { useContext as useContext36 } from "react";
11093
11159
  var PixelDensityContext = React36.createContext(null);
11094
11160
  var getBrowserPixelDensity = () => {
11095
11161
  if (typeof window === "undefined") {
@@ -11098,8 +11164,8 @@ var getBrowserPixelDensity = () => {
11098
11164
  return window.devicePixelRatio || 1;
11099
11165
  };
11100
11166
  var usePixelDensity = (options) => {
11101
- const pixelDensity = useContext35(PixelDensityContext);
11102
- const canUseRemotionHooks = useContext35(CanUseRemotionHooks);
11167
+ const pixelDensity = useContext36(PixelDensityContext);
11168
+ const canUseRemotionHooks = useContext36(CanUseRemotionHooks);
11103
11169
  if (pixelDensity !== null) {
11104
11170
  return pixelDensity;
11105
11171
  }
@@ -11121,10 +11187,10 @@ import { useCallback as useCallback24 } from "react";
11121
11187
  // src/video/OffthreadVideoForRendering.tsx
11122
11188
  import {
11123
11189
  useCallback as useCallback22,
11124
- useContext as useContext36,
11190
+ useContext as useContext37,
11125
11191
  useEffect as useEffect17,
11126
11192
  useLayoutEffect as useLayoutEffect12,
11127
- useMemo as useMemo35,
11193
+ useMemo as useMemo36,
11128
11194
  useState as useState20
11129
11195
  } from "react";
11130
11196
 
@@ -11164,13 +11230,13 @@ var OffthreadVideoForRendering = ({
11164
11230
  const frame = useCurrentFrame();
11165
11231
  const volumePropsFrame = useFrameForVolumeProp(loopVolumeCurveBehavior);
11166
11232
  const videoConfig = useUnsafeVideoConfig();
11167
- const sequenceContext = useContext36(SequenceContext);
11233
+ const sequenceContext = useContext37(SequenceContext);
11168
11234
  const mediaStartsAt = useMediaStartsAt();
11169
- const { registerRenderAsset, unregisterRenderAsset } = useContext36(RenderAssetManager);
11235
+ const { registerRenderAsset, unregisterRenderAsset } = useContext37(RenderAssetManager);
11170
11236
  if (!src) {
11171
11237
  throw new TypeError("No `src` was passed to <OffthreadVideo>.");
11172
11238
  }
11173
- const id = useMemo35(() => `offthreadvideo-${random(src)}-${sequenceContext?.cumulatedFrom}-${sequenceContext?.relativeFrom}-${sequenceContext?.durationInFrames}`, [
11239
+ const id = useMemo36(() => `offthreadvideo-${random(src)}-${sequenceContext?.cumulatedFrom}-${sequenceContext?.relativeFrom}-${sequenceContext?.durationInFrames}`, [
11174
11240
  src,
11175
11241
  sequenceContext?.cumulatedFrom,
11176
11242
  sequenceContext?.relativeFrom,
@@ -11225,14 +11291,14 @@ var OffthreadVideoForRendering = ({
11225
11291
  sequenceContext?.cumulatedNegativeFrom,
11226
11292
  audioStreamIndex
11227
11293
  ]);
11228
- const currentTime = useMemo35(() => {
11294
+ const currentTime = useMemo36(() => {
11229
11295
  return getExpectedMediaFrameUncorrected({
11230
11296
  frame,
11231
11297
  playbackRate: playbackRate || 1,
11232
11298
  startFrom: -mediaStartsAt
11233
11299
  }) / videoConfig.fps;
11234
11300
  }, [frame, mediaStartsAt, playbackRate, videoConfig.fps]);
11235
- const actualSrc = useMemo35(() => {
11301
+ const actualSrc = useMemo36(() => {
11236
11302
  return getOffthreadVideoSource({
11237
11303
  src,
11238
11304
  currentTime,
@@ -11320,7 +11386,7 @@ var OffthreadVideoForRendering = ({
11320
11386
  cancelRender("Failed to load image with src " + imageSrc);
11321
11387
  }
11322
11388
  }, [imageSrc, onError]);
11323
- const className = useMemo35(() => {
11389
+ const className = useMemo36(() => {
11324
11390
  return [OBJECTFIT_CONTAIN_CLASS_NAME, props2.className].filter(truthy).join(" ");
11325
11391
  }, [props2.className]);
11326
11392
  const onImageFrame = useCallback22((img) => {
@@ -11347,10 +11413,10 @@ var OffthreadVideoForRendering = ({
11347
11413
  import React38, {
11348
11414
  forwardRef as forwardRef13,
11349
11415
  useCallback as useCallback23,
11350
- useContext as useContext37,
11416
+ useContext as useContext38,
11351
11417
  useEffect as useEffect19,
11352
11418
  useImperativeHandle as useImperativeHandle9,
11353
- useMemo as useMemo36,
11419
+ useMemo as useMemo37,
11354
11420
  useRef as useRef27,
11355
11421
  useState as useState21
11356
11422
  } from "react";
@@ -11403,12 +11469,12 @@ class MediaPlaybackError extends Error {
11403
11469
  // src/video/VideoForPreview.tsx
11404
11470
  import { jsx as jsx34 } from "react/jsx-runtime";
11405
11471
  var VideoForDevelopmentRefForwardingFunction = (props2, ref) => {
11406
- const context = useContext37(SharedAudioContext);
11472
+ const context = useContext38(SharedAudioContext);
11407
11473
  if (!context) {
11408
11474
  throw new Error("SharedAudioContext not found");
11409
11475
  }
11410
11476
  const videoRef = useRef27(null);
11411
- const sharedSource = useMemo36(() => {
11477
+ const sharedSource = useMemo37(() => {
11412
11478
  if (!context.audioContext) {
11413
11479
  return null;
11414
11480
  }
@@ -11460,7 +11526,7 @@ var VideoForDevelopmentRefForwardingFunction = (props2, ref) => {
11460
11526
  }
11461
11527
  const volumePropFrame = useFrameForVolumeProp(loopVolumeCurveBehavior ?? "repeat");
11462
11528
  const { fps, durationInFrames } = useVideoConfig();
11463
- const parentSequence = useContext37(SequenceContext);
11529
+ const parentSequence = useContext38(SequenceContext);
11464
11530
  const logLevel = useLogLevel();
11465
11531
  const mountTime = useMountTime();
11466
11532
  const [timelineId] = useState21(() => String(Math.random()));
@@ -11611,7 +11677,7 @@ var VideoForDevelopmentRefForwardingFunction = (props2, ref) => {
11611
11677
  current.preload = "auto";
11612
11678
  }
11613
11679
  }, []);
11614
- const actualStyle = useMemo36(() => {
11680
+ const actualStyle = useMemo37(() => {
11615
11681
  return {
11616
11682
  ...style
11617
11683
  };
@@ -11833,7 +11899,7 @@ var watchStaticFile = (fileName, callback) => {
11833
11899
  };
11834
11900
 
11835
11901
  // src/wrap-remotion-context.tsx
11836
- import React40, { useMemo as useMemo37 } from "react";
11902
+ import React40, { useMemo as useMemo38 } from "react";
11837
11903
  import { jsx as jsx36 } from "react/jsx-runtime";
11838
11904
  function useRemotionContexts() {
11839
11905
  const compositionManagerCtx = React40.useContext(CompositionManager);
@@ -11850,7 +11916,7 @@ function useRemotionContexts() {
11850
11916
  const visualModePropStatusesRefContext = React40.useContext(VisualModePropStatusesRefContext);
11851
11917
  const bufferManagerContext = React40.useContext(BufferingContextReact);
11852
11918
  const logLevelContext = React40.useContext(LogLevelContext);
11853
- return useMemo37(() => ({
11919
+ return useMemo38(() => ({
11854
11920
  compositionManagerCtx,
11855
11921
  timelineContext,
11856
11922
  setTimelineContext,
@@ -11963,6 +12029,7 @@ var Internals = {
11963
12029
  textSchema,
11964
12030
  transformSchema,
11965
12031
  premountSchema,
12032
+ premountStyleSchema,
11966
12033
  flattenActiveSchema,
11967
12034
  getFlatSchemaWithAllKeys,
11968
12035
  RemotionRootContexts,
@@ -11976,6 +12043,7 @@ var Internals = {
11976
12043
  truthy,
11977
12044
  SequenceContext,
11978
12045
  PremountContext,
12046
+ usePremounting,
11979
12047
  useRemotionContexts,
11980
12048
  RemotionContextProvider,
11981
12049
  CSSUtils: exports_default_css,
@@ -12087,7 +12155,7 @@ var Internals = {
12087
12155
  // src/series/index.tsx
12088
12156
  import React42, {
12089
12157
  forwardRef as forwardRef14,
12090
- useMemo as useMemo38
12158
+ useMemo as useMemo39
12091
12159
  } from "react";
12092
12160
 
12093
12161
  // src/series/flatten-children.tsx
@@ -12162,7 +12230,7 @@ var validateSeriesSequenceProps = ({
12162
12230
  return offset;
12163
12231
  };
12164
12232
  var SeriesInner = (props2) => {
12165
- const childrenValue = useMemo38(() => {
12233
+ const childrenValue = useMemo39(() => {
12166
12234
  const flattenedChildren = flattenChildren(props2.children);
12167
12235
  const renderChildren = (i, startFrame) => {
12168
12236
  if (i === flattenedChildren.length) {
@@ -12351,16 +12419,16 @@ var Still = (props2) => {
12351
12419
  };
12352
12420
  addSequenceStackTraces(Still);
12353
12421
  // src/video/html5-video.tsx
12354
- import { forwardRef as forwardRef16, useCallback as useCallback25, useContext as useContext39 } from "react";
12422
+ import { forwardRef as forwardRef16, useCallback as useCallback25, useContext as useContext40 } from "react";
12355
12423
 
12356
12424
  // src/video/VideoForRendering.tsx
12357
12425
  import {
12358
12426
  forwardRef as forwardRef15,
12359
- useContext as useContext38,
12427
+ useContext as useContext39,
12360
12428
  useEffect as useEffect20,
12361
12429
  useImperativeHandle as useImperativeHandle10,
12362
12430
  useLayoutEffect as useLayoutEffect13,
12363
- useMemo as useMemo39,
12431
+ useMemo as useMemo40,
12364
12432
  useRef as useRef28
12365
12433
  } from "react";
12366
12434
 
@@ -12512,14 +12580,14 @@ var VideoForRenderingForwardFunction = ({
12512
12580
  const volumePropsFrame = useFrameForVolumeProp(loopVolumeCurveBehavior ?? "repeat");
12513
12581
  const videoConfig = useUnsafeVideoConfig();
12514
12582
  const videoRef = useRef28(null);
12515
- const sequenceContext = useContext38(SequenceContext);
12583
+ const sequenceContext = useContext39(SequenceContext);
12516
12584
  const mediaStartsAt = useMediaStartsAt();
12517
12585
  const environment = useRemotionEnvironment();
12518
12586
  const logLevel = useLogLevel();
12519
12587
  const mountTime = useMountTime();
12520
12588
  const { delayRender: delayRender2, continueRender: continueRender2 } = useDelayRender();
12521
- const { registerRenderAsset, unregisterRenderAsset } = useContext38(RenderAssetManager);
12522
- const id = useMemo39(() => `video-${random(props2.src ?? "")}-${sequenceContext?.cumulatedFrom}-${sequenceContext?.relativeFrom}-${sequenceContext?.durationInFrames}`, [
12589
+ const { registerRenderAsset, unregisterRenderAsset } = useContext39(RenderAssetManager);
12590
+ const id = useMemo40(() => `video-${random(props2.src ?? "")}-${sequenceContext?.cumulatedFrom}-${sequenceContext?.relativeFrom}-${sequenceContext?.durationInFrames}`, [
12523
12591
  props2.src,
12524
12592
  sequenceContext?.cumulatedFrom,
12525
12593
  sequenceContext?.relativeFrom,
@@ -12733,7 +12801,7 @@ var VideoForwardingFunction = (props2, ref) => {
12733
12801
  if (environment.isClientSideRendering) {
12734
12802
  throw new Error("<Html5Video> is not supported in @remotion/web-renderer. Use <Video> from @remotion/media instead. See https://remotion.dev/docs/client-side-rendering/limitations");
12735
12803
  }
12736
- const { durations, setDurations } = useContext39(DurationsContext);
12804
+ const { durations, setDurations } = useContext40(DurationsContext);
12737
12805
  if (typeof ref === "string") {
12738
12806
  throw new Error("string refs are not supported");
12739
12807
  }