@remotion/promo-pages 4.0.355 → 4.0.356

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.
@@ -1,8 +1,8 @@
1
1
 
2
2
  
3
- > @remotion/promo-pages@4.0.355 make /Users/jonathanburger/remotion/packages/promo-pages
3
+ > @remotion/promo-pages@4.0.356 make /Users/jonathanburger/remotion/packages/promo-pages
4
4
  > bun --env-file=../.env.bundle bundle.ts
5
5
 
6
6
  ≈ tailwindcss v4.1.1
7
7
 
8
- Done in 288ms
8
+ Done in 63ms
package/dist/Homepage.js CHANGED
@@ -193,36 +193,36 @@ import {
193
193
  } from "react";
194
194
  import { jsx as jsx26 } from "react/jsx-runtime";
195
195
  import React26, { createContext as createContext18 } from "react";
196
+ import { useCallback as useCallback16 } from "react";
196
197
  import {
197
- forwardRef as forwardRef9,
198
+ useCallback as useCallback15,
198
199
  useContext as useContext29,
199
- useEffect as useEffect19,
200
- useImperativeHandle as useImperativeHandle9,
200
+ useEffect as useEffect18,
201
+ useLayoutEffect as useLayoutEffect9,
201
202
  useMemo as useMemo26,
202
- useRef as useRef16,
203
203
  useState as useState18
204
204
  } from "react";
205
- import { useEffect as useEffect18 } from "react";
206
205
  import { jsx as jsx27 } from "react/jsx-runtime";
207
- import React28, { useMemo as useMemo27 } from "react";
208
- import { jsx as jsx28 } from "react/jsx-runtime";
209
- import { Children, forwardRef as forwardRef10, useMemo as useMemo28 } from "react";
210
- import React29 from "react";
211
- import React30, { createContext as createContext19 } from "react";
212
- import { jsx as jsx29 } from "react/jsx-runtime";
213
- import { jsx as jsx30 } from "react/jsx-runtime";
214
- import React322 from "react";
215
- import { useCallback as useCallback16 } from "react";
216
206
  import {
217
- useCallback as useCallback15,
207
+ forwardRef as forwardRef9,
218
208
  useContext as useContext30,
219
209
  useEffect as useEffect20,
220
- useLayoutEffect as useLayoutEffect9,
221
- useMemo as useMemo29,
210
+ useImperativeHandle as useImperativeHandle9,
211
+ useMemo as useMemo27,
212
+ useRef as useRef16,
222
213
  useState as useState19
223
214
  } from "react";
215
+ import { useEffect as useEffect19 } from "react";
216
+ import { jsx as jsx28 } from "react/jsx-runtime";
217
+ import { jsx as jsx29 } from "react/jsx-runtime";
218
+ import React30, { useMemo as useMemo28 } from "react";
219
+ import { jsx as jsx30 } from "react/jsx-runtime";
220
+ import { Children, forwardRef as forwardRef10, useMemo as useMemo29 } from "react";
221
+ import React31 from "react";
222
+ import React322, { createContext as createContext19 } from "react";
224
223
  import { jsx as jsx31 } from "react/jsx-runtime";
225
224
  import { jsx as jsx322 } from "react/jsx-runtime";
225
+ import React34 from "react";
226
226
  import { forwardRef as forwardRef12, useCallback as useCallback17, useContext as useContext32 } from "react";
227
227
  import {
228
228
  forwardRef as forwardRef11,
@@ -439,19 +439,19 @@ function exponentialBackoff(errorCount) {
439
439
  return 1000 * 2 ** (errorCount - 1);
440
440
  }
441
441
  function useRemotionContexts() {
442
- const compositionManagerCtx = React28.useContext(CompositionManager);
443
- const timelineContext = React28.useContext(TimelineContext);
444
- const setTimelineContext = React28.useContext(SetTimelineContext);
445
- const sequenceContext = React28.useContext(SequenceContext);
446
- const nonceContext = React28.useContext(NonceContext);
447
- const canUseRemotionHooksContext = React28.useContext(CanUseRemotionHooks);
448
- const preloadContext = React28.useContext(PreloadContext);
449
- const resolveCompositionContext = React28.useContext(ResolveCompositionContext);
450
- const renderAssetManagerContext = React28.useContext(RenderAssetManager);
451
- const sequenceManagerContext = React28.useContext(SequenceManager);
452
- const bufferManagerContext = React28.useContext(BufferingContextReact);
453
- const logLevelContext = React28.useContext(LogLevelContext);
454
- return useMemo27(() => ({
442
+ const compositionManagerCtx = React30.useContext(CompositionManager);
443
+ const timelineContext = React30.useContext(TimelineContext);
444
+ const setTimelineContext = React30.useContext(SetTimelineContext);
445
+ const sequenceContext = React30.useContext(SequenceContext);
446
+ const nonceContext = React30.useContext(NonceContext);
447
+ const canUseRemotionHooksContext = React30.useContext(CanUseRemotionHooks);
448
+ const preloadContext = React30.useContext(PreloadContext);
449
+ const resolveCompositionContext = React30.useContext(ResolveCompositionContext);
450
+ const renderAssetManagerContext = React30.useContext(RenderAssetManager);
451
+ const sequenceManagerContext = React30.useContext(SequenceManager);
452
+ const bufferManagerContext = React30.useContext(BufferingContextReact);
453
+ const logLevelContext = React30.useContext(LogLevelContext);
454
+ return useMemo28(() => ({
455
455
  compositionManagerCtx,
456
456
  timelineContext,
457
457
  setTimelineContext,
@@ -739,7 +739,7 @@ var __defProp2, __export2 = (target, all) => {
739
739
  });
740
740
  }, useIsPlayer = () => {
741
741
  return useContext(IsPlayerContext);
742
- }, VERSION = "4.0.355", checkMultipleRemotionVersions = () => {
742
+ }, VERSION = "4.0.356", checkMultipleRemotionVersions = () => {
743
743
  if (typeof globalThis === "undefined") {
744
744
  return;
745
745
  }
@@ -1720,7 +1720,9 @@ Check that all your Remotion packages are on the same version. If your dependenc
1720
1720
  height: height ?? parentSequence?.height ?? null,
1721
1721
  width: width ?? parentSequence?.width ?? null,
1722
1722
  premounting,
1723
- postmounting
1723
+ postmounting,
1724
+ premountDisplay: premountDisplay ?? null,
1725
+ postmountDisplay: postmountDisplay ?? null
1724
1726
  };
1725
1727
  }, [
1726
1728
  cumulatedFrom,
@@ -1731,7 +1733,9 @@ Check that all your Remotion packages are on the same version. If your dependenc
1731
1733
  height,
1732
1734
  width,
1733
1735
  premounting,
1734
- postmounting
1736
+ postmounting,
1737
+ premountDisplay,
1738
+ postmountDisplay
1735
1739
  ]);
1736
1740
  const timelineClipName = useMemo9(() => {
1737
1741
  return name ?? "";
@@ -4301,8 +4305,8 @@ Check that all your Remotion packages are on the same version. If your dependenc
4301
4305
  id: timelineId,
4302
4306
  stack: _remotionInternalStack,
4303
4307
  showInTimeline,
4304
- premountDisplay: null,
4305
- postmountDisplay: null,
4308
+ premountDisplay: sequenceContext?.premountDisplay ?? null,
4309
+ postmountDisplay: sequenceContext?.postmountDisplay ?? null,
4306
4310
  onAutoPlayError: null,
4307
4311
  isPremounting: Boolean(sequenceContext?.premounting),
4308
4312
  isPostmounting: Boolean(sequenceContext?.postmounting)
@@ -4419,7 +4423,7 @@ Check that all your Remotion packages are on the same version. If your dependenc
4419
4423
  volume,
4420
4424
  mediaFrame: frame,
4421
4425
  playbackRate: props.playbackRate ?? 1,
4422
- toneFrequency: toneFrequency ?? null,
4426
+ toneFrequency: toneFrequency ?? 1,
4423
4427
  audioStartFrame: Math.max(0, -(sequenceContext?.relativeFrom ?? 0)),
4424
4428
  audioStreamIndex: audioStreamIndex ?? 0
4425
4429
  });
@@ -4546,10 +4550,10 @@ Check that all your Remotion packages are on the same version. If your dependenc
4546
4550
  return /* @__PURE__ */ jsx19(Loop, {
4547
4551
  layout: "none",
4548
4552
  durationInFrames: calculateLoopDuration({
4549
- endAt: trimAfterValue ?? endAt,
4553
+ endAt: trimAfterValue,
4550
4554
  mediaDuration: duration,
4551
4555
  playbackRate: props.playbackRate ?? 1,
4552
- startFrom: trimBeforeValue ?? startFrom
4556
+ startFrom: trimBeforeValue
4553
4557
  }),
4554
4558
  children: /* @__PURE__ */ jsx19(Audio, {
4555
4559
  ...propsOtherThanLoop,
@@ -4573,7 +4577,7 @@ Check that all your Remotion packages are on the same version. If your dependenc
4573
4577
  })
4574
4578
  });
4575
4579
  }
4576
- validateMediaProps(props, "Audio");
4580
+ validateMediaProps({ playbackRate: props.playbackRate, volume: props.volume }, "Audio");
4577
4581
  if (environment.isRendering) {
4578
4582
  return /* @__PURE__ */ jsx19(AudioForRendering, {
4579
4583
  onDuration,
@@ -5318,11 +5322,218 @@ Check that all your Remotion packages are on the same version. If your dependenc
5318
5322
  return ratio;
5319
5323
  }
5320
5324
  return Number(previewSize);
5325
+ }, getOffthreadVideoSource = ({
5326
+ src,
5327
+ transparent,
5328
+ currentTime,
5329
+ toneMapped
5330
+ }) => {
5331
+ return `http://localhost:${window.remotion_proxyPort}/proxy?src=${encodeURIComponent(getAbsoluteSrc(src))}&time=${encodeURIComponent(Math.max(0, currentTime))}&transparent=${String(transparent)}&toneMapped=${String(toneMapped)}`;
5332
+ }, OffthreadVideoForRendering = ({
5333
+ onError,
5334
+ volume: volumeProp,
5335
+ playbackRate,
5336
+ src,
5337
+ muted,
5338
+ allowAmplificationDuringRender,
5339
+ transparent,
5340
+ toneMapped,
5341
+ toneFrequency,
5342
+ name,
5343
+ loopVolumeCurveBehavior,
5344
+ delayRenderRetries,
5345
+ delayRenderTimeoutInMilliseconds,
5346
+ onVideoFrame,
5347
+ crossOrigin,
5348
+ audioStreamIndex,
5349
+ ...props2
5350
+ }) => {
5351
+ const absoluteFrame = useTimelinePosition();
5352
+ const frame = useCurrentFrame();
5353
+ const volumePropsFrame = useFrameForVolumeProp(loopVolumeCurveBehavior);
5354
+ const videoConfig = useUnsafeVideoConfig();
5355
+ const sequenceContext = useContext29(SequenceContext);
5356
+ const mediaStartsAt = useMediaStartsAt();
5357
+ const { registerRenderAsset, unregisterRenderAsset } = useContext29(RenderAssetManager);
5358
+ if (!src) {
5359
+ throw new TypeError("No `src` was passed to <OffthreadVideo>.");
5360
+ }
5361
+ const id = useMemo26(() => `offthreadvideo-${random(src)}-${sequenceContext?.cumulatedFrom}-${sequenceContext?.relativeFrom}-${sequenceContext?.durationInFrames}`, [
5362
+ src,
5363
+ sequenceContext?.cumulatedFrom,
5364
+ sequenceContext?.relativeFrom,
5365
+ sequenceContext?.durationInFrames
5366
+ ]);
5367
+ if (!videoConfig) {
5368
+ throw new Error("No video config found");
5369
+ }
5370
+ const volume = evaluateVolume({
5371
+ volume: volumeProp,
5372
+ frame: volumePropsFrame,
5373
+ mediaVolume: 1
5374
+ });
5375
+ warnAboutTooHighVolume(volume);
5376
+ useEffect18(() => {
5377
+ if (!src) {
5378
+ throw new Error("No src passed");
5379
+ }
5380
+ if (!window.remotion_audioEnabled) {
5381
+ return;
5382
+ }
5383
+ if (muted) {
5384
+ return;
5385
+ }
5386
+ if (volume <= 0) {
5387
+ return;
5388
+ }
5389
+ registerRenderAsset({
5390
+ type: "video",
5391
+ src: getAbsoluteSrc(src),
5392
+ id,
5393
+ frame: absoluteFrame,
5394
+ volume,
5395
+ mediaFrame: frame,
5396
+ playbackRate,
5397
+ toneFrequency,
5398
+ audioStartFrame: Math.max(0, -(sequenceContext?.relativeFrom ?? 0)),
5399
+ audioStreamIndex
5400
+ });
5401
+ return () => unregisterRenderAsset(id);
5402
+ }, [
5403
+ muted,
5404
+ src,
5405
+ registerRenderAsset,
5406
+ id,
5407
+ unregisterRenderAsset,
5408
+ volume,
5409
+ frame,
5410
+ absoluteFrame,
5411
+ playbackRate,
5412
+ toneFrequency,
5413
+ sequenceContext?.relativeFrom,
5414
+ audioStreamIndex
5415
+ ]);
5416
+ const currentTime = useMemo26(() => {
5417
+ return getExpectedMediaFrameUncorrected({
5418
+ frame,
5419
+ playbackRate: playbackRate || 1,
5420
+ startFrom: -mediaStartsAt
5421
+ }) / videoConfig.fps;
5422
+ }, [frame, mediaStartsAt, playbackRate, videoConfig.fps]);
5423
+ const actualSrc = useMemo26(() => {
5424
+ return getOffthreadVideoSource({
5425
+ src,
5426
+ currentTime,
5427
+ transparent,
5428
+ toneMapped
5429
+ });
5430
+ }, [toneMapped, currentTime, src, transparent]);
5431
+ const [imageSrc, setImageSrc] = useState18(null);
5432
+ const { delayRender: delayRender2, continueRender: continueRender2 } = useDelayRender();
5433
+ useLayoutEffect9(() => {
5434
+ if (!window.remotion_videoEnabled) {
5435
+ return;
5436
+ }
5437
+ const cleanup = [];
5438
+ setImageSrc(null);
5439
+ const controller = new AbortController;
5440
+ const newHandle = delayRender2(`Fetching ${actualSrc} from server`, {
5441
+ retries: delayRenderRetries ?? undefined,
5442
+ timeoutInMilliseconds: delayRenderTimeoutInMilliseconds ?? undefined
5443
+ });
5444
+ const execute = async () => {
5445
+ try {
5446
+ const res = await fetch(actualSrc, {
5447
+ signal: controller.signal,
5448
+ cache: "no-store"
5449
+ });
5450
+ if (res.status !== 200) {
5451
+ if (res.status === 500) {
5452
+ const json = await res.json();
5453
+ if (json.error) {
5454
+ const cleanedUpErrorMessage = json.error.replace(/^Error: /, "");
5455
+ throw new Error(cleanedUpErrorMessage);
5456
+ }
5457
+ }
5458
+ throw new Error(`Server returned status ${res.status} while fetching ${actualSrc}`);
5459
+ }
5460
+ const blob = await res.blob();
5461
+ const url = URL.createObjectURL(blob);
5462
+ cleanup.push(() => URL.revokeObjectURL(url));
5463
+ setImageSrc({
5464
+ src: url,
5465
+ handle: newHandle
5466
+ });
5467
+ } catch (err) {
5468
+ if (err.message.includes("aborted")) {
5469
+ continueRender2(newHandle);
5470
+ return;
5471
+ }
5472
+ if (controller.signal.aborted) {
5473
+ continueRender2(newHandle);
5474
+ return;
5475
+ }
5476
+ if (err.message.includes("Failed to fetch")) {
5477
+ err = new Error(`Failed to fetch ${actualSrc}. This could be caused by Chrome rejecting the request because the disk space is low. Consider increasing the disk size of your environment.`, { cause: err });
5478
+ }
5479
+ if (onError) {
5480
+ onError(err);
5481
+ } else {
5482
+ cancelRender(err);
5483
+ }
5484
+ }
5485
+ };
5486
+ execute();
5487
+ cleanup.push(() => {
5488
+ if (controller.signal.aborted) {
5489
+ return;
5490
+ }
5491
+ controller.abort();
5492
+ });
5493
+ return () => {
5494
+ cleanup.forEach((c2) => c2());
5495
+ };
5496
+ }, [
5497
+ actualSrc,
5498
+ delayRenderRetries,
5499
+ delayRenderTimeoutInMilliseconds,
5500
+ onError,
5501
+ continueRender2,
5502
+ delayRender2
5503
+ ]);
5504
+ const onErr = useCallback15(() => {
5505
+ if (onError) {
5506
+ onError?.(new Error("Failed to load image with src " + imageSrc));
5507
+ } else {
5508
+ cancelRender("Failed to load image with src " + imageSrc);
5509
+ }
5510
+ }, [imageSrc, onError]);
5511
+ const className = useMemo26(() => {
5512
+ return [OBJECTFIT_CONTAIN_CLASS_NAME, props2.className].filter(truthy).join(" ");
5513
+ }, [props2.className]);
5514
+ const onImageFrame = useCallback15((img) => {
5515
+ if (onVideoFrame) {
5516
+ onVideoFrame(img);
5517
+ }
5518
+ }, [onVideoFrame]);
5519
+ if (!imageSrc || !window.remotion_videoEnabled) {
5520
+ return null;
5521
+ }
5522
+ continueRender2(imageSrc.handle);
5523
+ return /* @__PURE__ */ jsx27(Img, {
5524
+ src: imageSrc.src,
5525
+ delayRenderRetries,
5526
+ delayRenderTimeoutInMilliseconds,
5527
+ onImageFrame,
5528
+ ...props2,
5529
+ onError: onErr,
5530
+ className
5531
+ });
5321
5532
  }, useEmitVideoFrame = ({
5322
5533
  ref,
5323
5534
  onVideoFrame
5324
5535
  }) => {
5325
- useEffect18(() => {
5536
+ useEffect19(() => {
5326
5537
  const { current } = ref;
5327
5538
  if (!current) {
5328
5539
  return;
@@ -5344,12 +5555,12 @@ Check that all your Remotion packages are on the same version. If your dependenc
5344
5555
  };
5345
5556
  }, [onVideoFrame, ref]);
5346
5557
  }, VideoForDevelopmentRefForwardingFunction = (props2, ref) => {
5347
- const context = useContext29(SharedAudioContext);
5558
+ const context = useContext30(SharedAudioContext);
5348
5559
  if (!context) {
5349
5560
  throw new Error("SharedAudioContext not found");
5350
5561
  }
5351
5562
  const videoRef = useRef16(null);
5352
- const sharedSource = useMemo26(() => {
5563
+ const sharedSource = useMemo27(() => {
5353
5564
  if (!context.audioContext) {
5354
5565
  return null;
5355
5566
  }
@@ -5392,11 +5603,11 @@ Check that all your Remotion packages are on the same version. If your dependenc
5392
5603
  }
5393
5604
  const volumePropFrame = useFrameForVolumeProp(loopVolumeCurveBehavior ?? "repeat");
5394
5605
  const { fps, durationInFrames } = useVideoConfig();
5395
- const parentSequence = useContext29(SequenceContext);
5396
- const { hidden } = useContext29(SequenceVisibilityToggleContext);
5606
+ const parentSequence = useContext30(SequenceContext);
5607
+ const { hidden } = useContext30(SequenceVisibilityToggleContext);
5397
5608
  const logLevel = useLogLevel();
5398
5609
  const mountTime = useMountTime();
5399
- const [timelineId] = useState18(() => String(Math.random()));
5610
+ const [timelineId] = useState19(() => String(Math.random()));
5400
5611
  const isSequenceHidden = hidden[timelineId] ?? false;
5401
5612
  if (typeof acceptableTimeShift !== "undefined") {
5402
5613
  throw new Error("acceptableTimeShift has been removed. Use acceptableTimeShiftInSeconds instead.");
@@ -5420,8 +5631,8 @@ Check that all your Remotion packages are on the same version. If your dependenc
5420
5631
  id: timelineId,
5421
5632
  stack: _remotionInternalStack,
5422
5633
  showInTimeline,
5423
- premountDisplay: null,
5424
- postmountDisplay: null,
5634
+ premountDisplay: parentSequence?.premountDisplay ?? null,
5635
+ postmountDisplay: parentSequence?.postmountDisplay ?? null,
5425
5636
  onAutoPlayError: onAutoPlayError ?? null,
5426
5637
  isPremounting: Boolean(parentSequence?.premounting),
5427
5638
  isPostmounting: Boolean(parentSequence?.postmounting)
@@ -5457,13 +5668,13 @@ Check that all your Remotion packages are on the same version. If your dependenc
5457
5668
  useImperativeHandle9(ref, () => {
5458
5669
  return videoRef.current;
5459
5670
  }, []);
5460
- useState18(() => playbackLogging({
5671
+ useState19(() => playbackLogging({
5461
5672
  logLevel,
5462
5673
  message: `Mounting video with source = ${actualSrc}, v=${VERSION}, user agent=${typeof navigator === "undefined" ? "server" : navigator.userAgent}`,
5463
5674
  tag: "video",
5464
5675
  mountTime
5465
5676
  }));
5466
- useEffect19(() => {
5677
+ useEffect20(() => {
5467
5678
  const { current } = videoRef;
5468
5679
  if (!current) {
5469
5680
  return;
@@ -5494,7 +5705,7 @@ Check that all your Remotion packages are on the same version. If your dependenc
5494
5705
  const currentOnDurationCallback = useRef16(onDuration);
5495
5706
  currentOnDurationCallback.current = onDuration;
5496
5707
  useEmitVideoFrame({ ref: videoRef, onVideoFrame });
5497
- useEffect19(() => {
5708
+ useEffect20(() => {
5498
5709
  const { current } = videoRef;
5499
5710
  if (!current) {
5500
5711
  return;
@@ -5511,7 +5722,7 @@ Check that all your Remotion packages are on the same version. If your dependenc
5511
5722
  current.removeEventListener("loadedmetadata", onLoadedMetadata);
5512
5723
  };
5513
5724
  }, [src]);
5514
- useEffect19(() => {
5725
+ useEffect20(() => {
5515
5726
  const { current } = videoRef;
5516
5727
  if (!current) {
5517
5728
  return;
@@ -5522,7 +5733,7 @@ Check that all your Remotion packages are on the same version. If your dependenc
5522
5733
  current.preload = "auto";
5523
5734
  }
5524
5735
  }, []);
5525
- const actualStyle = useMemo26(() => {
5736
+ const actualStyle = useMemo27(() => {
5526
5737
  return {
5527
5738
  ...style,
5528
5739
  opacity: isSequenceHidden ? 0 : style?.opacity ?? 1
@@ -5532,7 +5743,7 @@ Check that all your Remotion packages are on the same version. If your dependenc
5532
5743
  crossOrigin,
5533
5744
  requestsVideoFrame: Boolean(onVideoFrame)
5534
5745
  });
5535
- return /* @__PURE__ */ jsx27("video", {
5746
+ return /* @__PURE__ */ jsx28("video", {
5536
5747
  ref: videoRef,
5537
5748
  muted: muted || mediaMuted || isSequenceHidden || userPreferredVolume <= 0,
5538
5749
  playsInline: true,
@@ -5543,31 +5754,181 @@ Check that all your Remotion packages are on the same version. If your dependenc
5543
5754
  crossOrigin: crossOriginValue,
5544
5755
  ...nativeProps
5545
5756
  });
5546
- }, VideoForPreview, WATCH_REMOTION_STATIC_FILES = "remotion_staticFilesChanged", RemotionContextProvider = (props2) => {
5757
+ }, VideoForPreview, InnerOffthreadVideo = (props2) => {
5758
+ const {
5759
+ startFrom,
5760
+ endAt,
5761
+ trimBefore,
5762
+ trimAfter,
5763
+ name,
5764
+ pauseWhenBuffering,
5765
+ stack,
5766
+ showInTimeline,
5767
+ ...otherProps
5768
+ } = props2;
5769
+ const environment = useRemotionEnvironment();
5770
+ const onDuration = useCallback16(() => {
5771
+ return;
5772
+ }, []);
5773
+ if (typeof props2.src !== "string") {
5774
+ throw new TypeError(`The \`<OffthreadVideo>\` tag requires a string for \`src\`, but got ${JSON.stringify(props2.src)} instead.`);
5775
+ }
5776
+ validateMediaTrimProps({ startFrom, endAt, trimBefore, trimAfter });
5777
+ const { trimBeforeValue, trimAfterValue } = resolveTrimProps({
5778
+ startFrom,
5779
+ endAt,
5780
+ trimBefore,
5781
+ trimAfter
5782
+ });
5783
+ if (typeof trimBeforeValue !== "undefined" || typeof trimAfterValue !== "undefined") {
5784
+ return /* @__PURE__ */ jsx29(Sequence, {
5785
+ layout: "none",
5786
+ from: 0 - (trimBeforeValue ?? 0),
5787
+ showInTimeline: false,
5788
+ durationInFrames: trimAfterValue,
5789
+ name,
5790
+ children: /* @__PURE__ */ jsx29(InnerOffthreadVideo, {
5791
+ pauseWhenBuffering: pauseWhenBuffering ?? false,
5792
+ ...otherProps,
5793
+ trimAfter: undefined,
5794
+ name: undefined,
5795
+ showInTimeline,
5796
+ trimBefore: undefined,
5797
+ stack: undefined,
5798
+ startFrom: undefined,
5799
+ endAt: undefined
5800
+ })
5801
+ });
5802
+ }
5803
+ validateMediaProps(props2, "Video");
5804
+ if (environment.isRendering) {
5805
+ return /* @__PURE__ */ jsx29(OffthreadVideoForRendering, {
5806
+ pauseWhenBuffering: pauseWhenBuffering ?? false,
5807
+ ...otherProps,
5808
+ trimAfter: undefined,
5809
+ name: undefined,
5810
+ showInTimeline,
5811
+ trimBefore: undefined,
5812
+ stack: undefined,
5813
+ startFrom: undefined,
5814
+ endAt: undefined
5815
+ });
5816
+ }
5817
+ const {
5818
+ transparent,
5819
+ toneMapped,
5820
+ onAutoPlayError,
5821
+ onVideoFrame,
5822
+ crossOrigin,
5823
+ delayRenderRetries,
5824
+ delayRenderTimeoutInMilliseconds,
5825
+ ...propsForPreview
5826
+ } = otherProps;
5827
+ return /* @__PURE__ */ jsx29(VideoForPreview, {
5828
+ _remotionInternalStack: stack ?? null,
5829
+ onDuration,
5830
+ onlyWarnForMediaSeekingError: true,
5831
+ pauseWhenBuffering: pauseWhenBuffering ?? false,
5832
+ showInTimeline: showInTimeline ?? true,
5833
+ onAutoPlayError: onAutoPlayError ?? undefined,
5834
+ onVideoFrame: onVideoFrame ?? null,
5835
+ crossOrigin,
5836
+ ...propsForPreview,
5837
+ _remotionInternalNativeLoopPassed: false
5838
+ });
5839
+ }, OffthreadVideo = ({
5840
+ src,
5841
+ acceptableTimeShiftInSeconds,
5842
+ allowAmplificationDuringRender,
5843
+ audioStreamIndex,
5844
+ className,
5845
+ crossOrigin,
5846
+ delayRenderRetries,
5847
+ delayRenderTimeoutInMilliseconds,
5848
+ id,
5849
+ loopVolumeCurveBehavior,
5850
+ muted,
5851
+ name,
5852
+ onAutoPlayError,
5853
+ onError,
5854
+ onVideoFrame,
5855
+ pauseWhenBuffering,
5856
+ playbackRate,
5857
+ showInTimeline,
5858
+ style,
5859
+ toneFrequency,
5860
+ toneMapped,
5861
+ transparent,
5862
+ trimAfter,
5863
+ trimBefore,
5864
+ useWebAudioApi,
5865
+ volume,
5866
+ _remotionInternalNativeLoopPassed,
5867
+ endAt,
5868
+ stack,
5869
+ startFrom,
5870
+ imageFormat
5871
+ }) => {
5872
+ if (imageFormat) {
5873
+ throw new TypeError(`The \`<OffthreadVideo>\` tag does no longer accept \`imageFormat\`. Use the \`transparent\` prop if you want to render a transparent video.`);
5874
+ }
5875
+ return /* @__PURE__ */ jsx29(InnerOffthreadVideo, {
5876
+ acceptableTimeShiftInSeconds,
5877
+ allowAmplificationDuringRender: allowAmplificationDuringRender ?? true,
5878
+ audioStreamIndex: audioStreamIndex ?? 0,
5879
+ className,
5880
+ crossOrigin,
5881
+ delayRenderRetries,
5882
+ delayRenderTimeoutInMilliseconds,
5883
+ id,
5884
+ loopVolumeCurveBehavior: loopVolumeCurveBehavior ?? "repeat",
5885
+ muted: muted ?? false,
5886
+ name,
5887
+ onAutoPlayError: onAutoPlayError ?? null,
5888
+ onError,
5889
+ onVideoFrame,
5890
+ pauseWhenBuffering: pauseWhenBuffering ?? true,
5891
+ playbackRate: playbackRate ?? 1,
5892
+ toneFrequency: toneFrequency ?? 1,
5893
+ showInTimeline: showInTimeline ?? true,
5894
+ src,
5895
+ stack,
5896
+ startFrom,
5897
+ _remotionInternalNativeLoopPassed: _remotionInternalNativeLoopPassed ?? false,
5898
+ endAt,
5899
+ style,
5900
+ toneMapped: toneMapped ?? true,
5901
+ transparent: transparent ?? false,
5902
+ trimAfter,
5903
+ trimBefore,
5904
+ useWebAudioApi: useWebAudioApi ?? false,
5905
+ volume
5906
+ });
5907
+ }, WATCH_REMOTION_STATIC_FILES = "remotion_staticFilesChanged", RemotionContextProvider = (props2) => {
5547
5908
  const { children, contexts } = props2;
5548
- return /* @__PURE__ */ jsx28(LogLevelContext.Provider, {
5909
+ return /* @__PURE__ */ jsx30(LogLevelContext.Provider, {
5549
5910
  value: contexts.logLevelContext,
5550
- children: /* @__PURE__ */ jsx28(CanUseRemotionHooks.Provider, {
5911
+ children: /* @__PURE__ */ jsx30(CanUseRemotionHooks.Provider, {
5551
5912
  value: contexts.canUseRemotionHooksContext,
5552
- children: /* @__PURE__ */ jsx28(NonceContext.Provider, {
5913
+ children: /* @__PURE__ */ jsx30(NonceContext.Provider, {
5553
5914
  value: contexts.nonceContext,
5554
- children: /* @__PURE__ */ jsx28(PreloadContext.Provider, {
5915
+ children: /* @__PURE__ */ jsx30(PreloadContext.Provider, {
5555
5916
  value: contexts.preloadContext,
5556
- children: /* @__PURE__ */ jsx28(CompositionManager.Provider, {
5917
+ children: /* @__PURE__ */ jsx30(CompositionManager.Provider, {
5557
5918
  value: contexts.compositionManagerCtx,
5558
- children: /* @__PURE__ */ jsx28(SequenceManager.Provider, {
5919
+ children: /* @__PURE__ */ jsx30(SequenceManager.Provider, {
5559
5920
  value: contexts.sequenceManagerContext,
5560
- children: /* @__PURE__ */ jsx28(RenderAssetManager.Provider, {
5921
+ children: /* @__PURE__ */ jsx30(RenderAssetManager.Provider, {
5561
5922
  value: contexts.renderAssetManagerContext,
5562
- children: /* @__PURE__ */ jsx28(ResolveCompositionContext.Provider, {
5923
+ children: /* @__PURE__ */ jsx30(ResolveCompositionContext.Provider, {
5563
5924
  value: contexts.resolveCompositionContext,
5564
- children: /* @__PURE__ */ jsx28(TimelineContext.Provider, {
5925
+ children: /* @__PURE__ */ jsx30(TimelineContext.Provider, {
5565
5926
  value: contexts.timelineContext,
5566
- children: /* @__PURE__ */ jsx28(SetTimelineContext.Provider, {
5927
+ children: /* @__PURE__ */ jsx30(SetTimelineContext.Provider, {
5567
5928
  value: contexts.setTimelineContext,
5568
- children: /* @__PURE__ */ jsx28(SequenceContext.Provider, {
5929
+ children: /* @__PURE__ */ jsx30(SequenceContext.Provider, {
5569
5930
  value: contexts.sequenceContext,
5570
- children: /* @__PURE__ */ jsx28(BufferingContextReact.Provider, {
5931
+ children: /* @__PURE__ */ jsx30(BufferingContextReact.Provider, {
5571
5932
  value: contexts.bufferManagerContext,
5572
5933
  children
5573
5934
  })
@@ -5606,36 +5967,36 @@ Check that all your Remotion packages are on the same version. If your dependenc
5606
5967
  throw new RangeError(`Cannot use frame ${frame}: Duration of composition is ${durationInFrames}, therefore the highest frame that can be rendered is ${durationInFrames - 1}`);
5607
5968
  }
5608
5969
  }, flattenChildren = (children) => {
5609
- const childrenArray = React29.Children.toArray(children);
5970
+ const childrenArray = React31.Children.toArray(children);
5610
5971
  return childrenArray.reduce((flatChildren, child) => {
5611
- if (child.type === React29.Fragment) {
5972
+ if (child.type === React31.Fragment) {
5612
5973
  return flatChildren.concat(flattenChildren(child.props.children));
5613
5974
  }
5614
5975
  flatChildren.push(child);
5615
5976
  return flatChildren;
5616
5977
  }, []);
5617
5978
  }, IsInsideSeriesContext, IsInsideSeriesContainer = ({ children }) => {
5618
- return /* @__PURE__ */ jsx29(IsInsideSeriesContext.Provider, {
5979
+ return /* @__PURE__ */ jsx31(IsInsideSeriesContext.Provider, {
5619
5980
  value: true,
5620
5981
  children
5621
5982
  });
5622
5983
  }, IsNotInsideSeriesProvider = ({ children }) => {
5623
- return /* @__PURE__ */ jsx29(IsInsideSeriesContext.Provider, {
5984
+ return /* @__PURE__ */ jsx31(IsInsideSeriesContext.Provider, {
5624
5985
  value: false,
5625
5986
  children
5626
5987
  });
5627
5988
  }, useRequireToBeInsideSeries = () => {
5628
- const isInsideSeries = React30.useContext(IsInsideSeriesContext);
5989
+ const isInsideSeries = React322.useContext(IsInsideSeriesContext);
5629
5990
  if (!isInsideSeries) {
5630
5991
  throw new Error("This component must be inside a <Series /> component.");
5631
5992
  }
5632
5993
  }, SeriesSequenceRefForwardingFunction = ({ children }, _ref) => {
5633
5994
  useRequireToBeInsideSeries();
5634
- return /* @__PURE__ */ jsx30(IsNotInsideSeriesProvider, {
5995
+ return /* @__PURE__ */ jsx322(IsNotInsideSeriesProvider, {
5635
5996
  children
5636
5997
  });
5637
5998
  }, SeriesSequence, Series = (props2) => {
5638
- const childrenValue = useMemo28(() => {
5999
+ const childrenValue = useMemo29(() => {
5639
6000
  let startFrame = 0;
5640
6001
  const flattenedChildren = flattenChildren(props2.children);
5641
6002
  return Children.map(flattenedChildren, (child, i) => {
@@ -5679,7 +6040,7 @@ Check that all your Remotion packages are on the same version. If your dependenc
5679
6040
  }
5680
6041
  const currentStartFrame = startFrame + offset;
5681
6042
  startFrame += durationInFramesProp + offset;
5682
- return /* @__PURE__ */ jsx30(Sequence, {
6043
+ return /* @__PURE__ */ jsx322(Sequence, {
5683
6044
  name: name || "<Series.Sequence>",
5684
6045
  from: currentStartFrame,
5685
6046
  durationInFrames: durationInFramesProp,
@@ -5690,14 +6051,14 @@ Check that all your Remotion packages are on the same version. If your dependenc
5690
6051
  });
5691
6052
  }, [props2.children]);
5692
6053
  if (ENABLE_V5_BREAKING_CHANGES) {
5693
- return /* @__PURE__ */ jsx30(IsInsideSeriesContainer, {
5694
- children: /* @__PURE__ */ jsx30(Sequence, {
6054
+ return /* @__PURE__ */ jsx322(IsInsideSeriesContainer, {
6055
+ children: /* @__PURE__ */ jsx322(Sequence, {
5695
6056
  ...props2,
5696
6057
  children: childrenValue
5697
6058
  })
5698
6059
  });
5699
6060
  }
5700
- return /* @__PURE__ */ jsx30(IsInsideSeriesContainer, {
6061
+ return /* @__PURE__ */ jsx322(IsInsideSeriesContainer, {
5701
6062
  children: childrenValue
5702
6063
  });
5703
6064
  }, validateSpringDuration = (dur) => {
@@ -5960,7 +6321,7 @@ Check that all your Remotion packages are on the same version. If your dependenc
5960
6321
  volume,
5961
6322
  mediaFrame: frame,
5962
6323
  playbackRate: playbackRate ?? 1,
5963
- toneFrequency: toneFrequency ?? null,
6324
+ toneFrequency: toneFrequency ?? 1,
5964
6325
  audioStartFrame: Math.max(0, -(sequenceContext?.relativeFrom ?? 0)),
5965
6326
  audioStreamIndex: audioStreamIndex ?? 0
5966
6327
  });
@@ -6153,10 +6514,10 @@ Check that all your Remotion packages are on the same version. If your dependenc
6153
6514
  const mediaDuration = durationFetched * fps;
6154
6515
  return /* @__PURE__ */ jsx34(Loop, {
6155
6516
  durationInFrames: calculateLoopDuration({
6156
- endAt: trimAfterValue ?? undefined,
6517
+ endAt: trimAfterValue,
6157
6518
  mediaDuration,
6158
6519
  playbackRate: props2.playbackRate ?? 1,
6159
- startFrom: trimBeforeValue ?? undefined
6520
+ startFrom: trimBeforeValue
6160
6521
  }),
6161
6522
  layout: "none",
6162
6523
  name,
@@ -6181,7 +6542,7 @@ Check that all your Remotion packages are on the same version. If your dependenc
6181
6542
  })
6182
6543
  });
6183
6544
  }
6184
- validateMediaProps(props2, "Video");
6545
+ validateMediaProps({ playbackRate: props2.playbackRate, volume: props2.volume }, "Video");
6185
6546
  if (environment.isRendering) {
6186
6547
  return /* @__PURE__ */ jsx34(VideoForRendering, {
6187
6548
  onDuration,
@@ -6545,6 +6906,7 @@ var init_esm = __esm(() => {
6545
6906
  size: { size: "auto", translation: { x: 0, y: 0 } }
6546
6907
  });
6547
6908
  VideoForPreview = forwardRef9(VideoForDevelopmentRefForwardingFunction);
6909
+ addSequenceStackTraces(OffthreadVideo);
6548
6910
  compositionSelectorRef = createRef3();
6549
6911
  Internals = {
6550
6912
  useUnsafeVideoConfig,
@@ -6625,7 +6987,8 @@ var init_esm = __esm(() => {
6625
6987
  RemotionEnvironmentContext,
6626
6988
  warnAboutTooHighVolume,
6627
6989
  AudioForPreview,
6628
- OBJECTFIT_CONTAIN_CLASS_NAME
6990
+ OBJECTFIT_CONTAIN_CLASS_NAME,
6991
+ InnerOffthreadVideo
6629
6992
  };
6630
6993
  PERCENTAGE = NUMBER + "%";
6631
6994
  IsInsideSeriesContext = createContext19(false);
@@ -12465,7 +12828,7 @@ var getAbsoluteSrc2 = (relativeSrc) => {
12465
12828
  }
12466
12829
  return new URL(relativeSrc, window.origin).href;
12467
12830
  };
12468
- var getOffthreadVideoSource = ({
12831
+ var getOffthreadVideoSource2 = ({
12469
12832
  src,
12470
12833
  transparent,
12471
12834
  currentTime,
@@ -12489,7 +12852,7 @@ var NoReactInternals = {
12489
12852
  DELAY_RENDER_RETRY_TOKEN: DELAY_RENDER_RETRY_TOKEN2,
12490
12853
  DELAY_RENDER_CLEAR_TOKEN: DELAY_RENDER_CLEAR_TOKEN2,
12491
12854
  DELAY_RENDER_ATTEMPT_TOKEN: DELAY_RENDER_RETRIES_LEFT2,
12492
- getOffthreadVideoSource,
12855
+ getOffthreadVideoSource: getOffthreadVideoSource2,
12493
12856
  getExpectedMediaFrameUncorrected: getExpectedMediaFrameUncorrected2,
12494
12857
  ENABLE_V5_BREAKING_CHANGES: ENABLE_V5_BREAKING_CHANGES2,
12495
12858
  MIN_NODE_VERSION: ENABLE_V5_BREAKING_CHANGES2 ? 18 : 16,
@@ -17847,7 +18210,7 @@ var DoneCheckmark = () => {
17847
18210
  };
17848
18211
 
17849
18212
  // ../shapes/dist/esm/index.mjs
17850
- import React34, { useMemo as useMemo37 } from "react";
18213
+ import React29, { useMemo as useMemo37 } from "react";
17851
18214
  import { version } from "react-dom";
17852
18215
  import { jsx as jsx60, jsxs as jsxs21 } from "react/jsx-runtime";
17853
18216
  import { jsx as jsx212 } from "react/jsx-runtime";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@remotion/promo-pages",
3
- "version": "4.0.355",
3
+ "version": "4.0.356",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
@@ -10,14 +10,14 @@
10
10
  "polished": "4.3.1",
11
11
  "zod": "3.22.3",
12
12
  "bun-plugin-tailwind": "0.0.15",
13
- "@remotion/animated-emoji": "4.0.355",
14
- "@remotion/lambda": "4.0.355",
15
- "@remotion/lottie": "4.0.355",
16
- "@remotion/player": "4.0.355",
17
- "@remotion/paths": "4.0.355",
18
- "remotion": "4.0.355",
19
- "create-video": "4.0.355",
20
- "@remotion/shapes": "4.0.355"
13
+ "@remotion/animated-emoji": "4.0.356",
14
+ "@remotion/lambda": "4.0.356",
15
+ "@remotion/shapes": "4.0.356",
16
+ "create-video": "4.0.356",
17
+ "@remotion/player": "4.0.356",
18
+ "@remotion/paths": "4.0.356",
19
+ "@remotion/lottie": "4.0.356",
20
+ "remotion": "4.0.356"
21
21
  },
22
22
  "devDependencies": {
23
23
  "@eslint/eslintrc": "3.1.0",
@@ -34,7 +34,7 @@
34
34
  "tailwind-merge": "2.5.2",
35
35
  "bun-plugin-tailwind": "0.0.13",
36
36
  "clsx": "2.1.1",
37
- "@remotion/eslint-config-internal": "4.0.355"
37
+ "@remotion/eslint-config-internal": "4.0.356"
38
38
  },
39
39
  "repository": {
40
40
  "url": "https://github.com/remotion-dev/remotion/tree/main/packages/promo-pages"