@remotion/promo-pages 4.0.356 → 4.0.357

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.356 make /Users/jonathanburger/remotion/packages/promo-pages
3
+ > @remotion/promo-pages@4.0.357 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 63ms
8
+ Done in 25ms
package/dist/Homepage.js CHANGED
@@ -87,7 +87,7 @@ import {
87
87
  useState as useState7
88
88
  } from "react";
89
89
  import { jsx as jsx11 } from "react/jsx-runtime";
90
- import { forwardRef as forwardRef6, useCallback as useCallback11, useContext as useContext25 } from "react";
90
+ import { forwardRef as forwardRef6, useCallback as useCallback11, useContext as useContext26 } from "react";
91
91
  import React10, { createContext as createContext11, useMemo as useMemo11 } from "react";
92
92
  import { jsx as jsx12 } from "react/jsx-runtime";
93
93
  import { useContext as useContext13 } from "react";
@@ -97,8 +97,8 @@ import { createContext as createContext13, useMemo as useMemo12, useReducer } fr
97
97
  import { jsx as jsx14 } from "react/jsx-runtime";
98
98
  import {
99
99
  forwardRef as forwardRef4,
100
- useContext as useContext23,
101
- useEffect as useEffect13,
100
+ useContext as useContext24,
101
+ useEffect as useEffect14,
102
102
  useImperativeHandle as useImperativeHandle5,
103
103
  useMemo as useMemo20,
104
104
  useRef as useRef11,
@@ -144,12 +144,13 @@ import { jsx as jsx16 } from "react/jsx-runtime";
144
144
  import React16 from "react";
145
145
  import { useEffect as useEffect10, useState as useState13 } from "react";
146
146
  import { useEffect as useEffect11, useRef as useRef9 } from "react";
147
- import { createContext as createContext16, useContext as useContext22, useMemo as useMemo19 } from "react";
147
+ import { useContext as useContext22, useEffect as useEffect13 } from "react";
148
+ import { createContext as createContext16, useContext as useContext23, useMemo as useMemo19 } from "react";
148
149
  import { jsx as jsx17 } from "react/jsx-runtime";
149
150
  import {
150
151
  forwardRef as forwardRef5,
151
- useContext as useContext24,
152
- useEffect as useEffect14,
152
+ useContext as useContext25,
153
+ useEffect as useEffect15,
153
154
  useImperativeHandle as useImperativeHandle6,
154
155
  useLayoutEffect as useLayoutEffect6,
155
156
  useMemo as useMemo21,
@@ -157,9 +158,9 @@ import {
157
158
  } from "react";
158
159
  import { jsx as jsx18 } from "react/jsx-runtime";
159
160
  import { jsx as jsx19 } from "react/jsx-runtime";
160
- import { Suspense, useContext as useContext27, useEffect as useEffect16 } from "react";
161
+ import { Suspense, useContext as useContext28, useEffect as useEffect17 } from "react";
161
162
  import { createPortal } from "react-dom";
162
- import { createContext as createContext17, useContext as useContext26, useEffect as useEffect15, useMemo as useMemo222 } from "react";
163
+ import { createContext as createContext17, useContext as useContext27, useEffect as useEffect16, useMemo as useMemo222 } from "react";
163
164
  import { jsx as jsx20 } from "react/jsx-runtime";
164
165
  import { jsx as jsx21, jsxs as jsxs22 } from "react/jsx-runtime";
165
166
  import React20, { useMemo as useMemo23 } from "react";
@@ -169,7 +170,7 @@ import { jsx as jsx23 } from "react/jsx-runtime";
169
170
  import {
170
171
  forwardRef as forwardRef8,
171
172
  useCallback as useCallback13,
172
- useContext as useContext28,
173
+ useContext as useContext29,
173
174
  useImperativeHandle as useImperativeHandle7,
174
175
  useLayoutEffect as useLayoutEffect7,
175
176
  useRef as useRef13
@@ -185,7 +186,7 @@ import React24, {
185
186
  } from "react";
186
187
  import { jsx as jsx25 } from "react/jsx-runtime";
187
188
  import {
188
- useEffect as useEffect17,
189
+ useEffect as useEffect18,
189
190
  useLayoutEffect as useLayoutEffect8,
190
191
  useMemo as useMemo25,
191
192
  useRef as useRef15,
@@ -196,8 +197,8 @@ import React26, { createContext as createContext18 } from "react";
196
197
  import { useCallback as useCallback16 } from "react";
197
198
  import {
198
199
  useCallback as useCallback15,
199
- useContext as useContext29,
200
- useEffect as useEffect18,
200
+ useContext as useContext30,
201
+ useEffect as useEffect19,
201
202
  useLayoutEffect as useLayoutEffect9,
202
203
  useMemo as useMemo26,
203
204
  useState as useState18
@@ -205,14 +206,14 @@ import {
205
206
  import { jsx as jsx27 } from "react/jsx-runtime";
206
207
  import {
207
208
  forwardRef as forwardRef9,
208
- useContext as useContext30,
209
- useEffect as useEffect20,
209
+ useContext as useContext31,
210
+ useEffect as useEffect21,
210
211
  useImperativeHandle as useImperativeHandle9,
211
212
  useMemo as useMemo27,
212
213
  useRef as useRef16,
213
214
  useState as useState19
214
215
  } from "react";
215
- import { useEffect as useEffect19 } from "react";
216
+ import { useEffect as useEffect20 } from "react";
216
217
  import { jsx as jsx28 } from "react/jsx-runtime";
217
218
  import { jsx as jsx29 } from "react/jsx-runtime";
218
219
  import React30, { useMemo as useMemo28 } from "react";
@@ -223,11 +224,11 @@ import React322, { createContext as createContext19 } from "react";
223
224
  import { jsx as jsx31 } from "react/jsx-runtime";
224
225
  import { jsx as jsx322 } from "react/jsx-runtime";
225
226
  import React34 from "react";
226
- import { forwardRef as forwardRef12, useCallback as useCallback17, useContext as useContext32 } from "react";
227
+ import { forwardRef as forwardRef12, useCallback as useCallback17, useContext as useContext33 } from "react";
227
228
  import {
228
229
  forwardRef as forwardRef11,
229
- useContext as useContext31,
230
- useEffect as useEffect21,
230
+ useContext as useContext32,
231
+ useEffect as useEffect222,
231
232
  useImperativeHandle as useImperativeHandle10,
232
233
  useLayoutEffect as useLayoutEffect10,
233
234
  useMemo as useMemo30,
@@ -739,7 +740,7 @@ var __defProp2, __export2 = (target, all) => {
739
740
  });
740
741
  }, useIsPlayer = () => {
741
742
  return useContext(IsPlayerContext);
742
- }, VERSION = "4.0.356", checkMultipleRemotionVersions = () => {
743
+ }, VERSION = "4.0.357", checkMultipleRemotionVersions = () => {
743
744
  if (typeof globalThis === "undefined") {
744
745
  return;
745
746
  }
@@ -2360,17 +2361,17 @@ Check that all your Remotion packages are on the same version. If your dependenc
2360
2361
  }
2361
2362
  return new URL(relativeSrc, window.origin).href;
2362
2363
  }, calculateLoopDuration = ({
2363
- endAt,
2364
- mediaDuration,
2364
+ trimAfter,
2365
+ mediaDurationInFrames,
2365
2366
  playbackRate,
2366
- startFrom
2367
+ trimBefore
2367
2368
  }) => {
2368
- let duration = mediaDuration;
2369
- if (typeof endAt !== "undefined") {
2370
- duration = endAt;
2369
+ let duration = mediaDurationInFrames;
2370
+ if (typeof trimAfter !== "undefined") {
2371
+ duration = trimAfter;
2371
2372
  }
2372
- if (typeof startFrom !== "undefined") {
2373
- duration -= startFrom;
2373
+ if (typeof trimBefore !== "undefined") {
2374
+ duration -= trimBefore;
2374
2375
  }
2375
2376
  const actualDuration = duration / playbackRate;
2376
2377
  return Math.floor(actualDuration);
@@ -3333,7 +3334,6 @@ Check that all your Remotion packages are on the same version. If your dependenc
3333
3334
  }, useMediaInTimeline = ({
3334
3335
  volume,
3335
3336
  mediaVolume,
3336
- mediaRef,
3337
3337
  src,
3338
3338
  mediaType,
3339
3339
  playbackRate,
@@ -3342,22 +3342,16 @@ Check that all your Remotion packages are on the same version. If your dependenc
3342
3342
  stack,
3343
3343
  showInTimeline,
3344
3344
  premountDisplay,
3345
- postmountDisplay,
3346
- onAutoPlayError,
3347
- isPremounting,
3348
- isPostmounting
3345
+ postmountDisplay
3349
3346
  }) => {
3350
3347
  const videoConfig = useVideoConfig();
3351
- const { rootId, audioAndVideoTags } = useContext18(TimelineContext);
3352
3348
  const parentSequence = useContext18(SequenceContext);
3353
3349
  const actualFrom = parentSequence ? parentSequence.relativeFrom + parentSequence.cumulatedFrom : 0;
3354
- const { imperativePlaying } = useContext18(TimelineContext);
3355
3350
  const startsAt = useMediaStartsAt();
3356
3351
  const { registerSequence, unregisterSequence } = useContext18(SequenceManager);
3357
3352
  const [initialVolume] = useState11(() => volume);
3358
- const logLevel = useLogLevel();
3359
- const mountTime = useMountTime();
3360
3353
  const nonce = useNonce();
3354
+ const { rootId } = useContext18(TimelineContext);
3361
3355
  const duration = parentSequence ? Math.min(parentSequence.durationInFrames, videoConfig.durationInFrames) : videoConfig.durationInFrames;
3362
3356
  const doesVolumeChange = typeof volume === "function";
3363
3357
  const volumes = useMemo15(() => {
@@ -3379,9 +3373,6 @@ Check that all your Remotion packages are on the same version. If your dependenc
3379
3373
  }, [initialVolume, mediaType, src, volume]);
3380
3374
  const env = useRemotionEnvironment();
3381
3375
  useEffect8(() => {
3382
- if (!mediaRef.current) {
3383
- return;
3384
- }
3385
3376
  if (!src) {
3386
3377
  throw new Error("No src passed");
3387
3378
  }
@@ -3427,7 +3418,6 @@ Check that all your Remotion packages are on the same version. If your dependenc
3427
3418
  volumes,
3428
3419
  doesVolumeChange,
3429
3420
  nonce,
3430
- mediaRef,
3431
3421
  mediaType,
3432
3422
  startsAt,
3433
3423
  playbackRate,
@@ -3438,44 +3428,6 @@ Check that all your Remotion packages are on the same version. If your dependenc
3438
3428
  postmountDisplay,
3439
3429
  env.isStudio
3440
3430
  ]);
3441
- useEffect8(() => {
3442
- const tag = {
3443
- id,
3444
- play: (reason) => {
3445
- if (!imperativePlaying.current) {
3446
- return;
3447
- }
3448
- if (isPremounting || isPostmounting) {
3449
- return;
3450
- }
3451
- return playAndHandleNotAllowedError({
3452
- mediaRef,
3453
- mediaType,
3454
- onAutoPlayError,
3455
- logLevel,
3456
- mountTime,
3457
- reason,
3458
- isPlayer: env.isPlayer
3459
- });
3460
- }
3461
- };
3462
- audioAndVideoTags.current.push(tag);
3463
- return () => {
3464
- audioAndVideoTags.current = audioAndVideoTags.current.filter((a) => a.id !== id);
3465
- };
3466
- }, [
3467
- audioAndVideoTags,
3468
- id,
3469
- mediaRef,
3470
- mediaType,
3471
- onAutoPlayError,
3472
- imperativePlaying,
3473
- isPremounting,
3474
- isPostmounting,
3475
- logLevel,
3476
- mountTime,
3477
- env.isPlayer
3478
- ]);
3479
3431
  }, useBufferManager = (logLevel, mountTime) => {
3480
3432
  const [blocks, setBlocks] = useState12([]);
3481
3433
  const [onBufferingCallbacks, setOnBufferingCallbacks] = useState12([]);
@@ -4185,15 +4137,65 @@ Check that all your Remotion packages are on the same version. If your dependenc
4185
4137
  mediaTagCurrentTime,
4186
4138
  env.isPlayer
4187
4139
  ]);
4140
+ }, useMediaTag = ({
4141
+ mediaRef,
4142
+ id,
4143
+ mediaType,
4144
+ onAutoPlayError,
4145
+ isPremounting,
4146
+ isPostmounting
4147
+ }) => {
4148
+ const { audioAndVideoTags, imperativePlaying } = useContext22(TimelineContext);
4149
+ const logLevel = useLogLevel();
4150
+ const mountTime = useMountTime();
4151
+ const env = useRemotionEnvironment();
4152
+ useEffect13(() => {
4153
+ const tag = {
4154
+ id,
4155
+ play: (reason) => {
4156
+ if (!imperativePlaying.current) {
4157
+ return;
4158
+ }
4159
+ if (isPremounting || isPostmounting) {
4160
+ return;
4161
+ }
4162
+ return playAndHandleNotAllowedError({
4163
+ mediaRef,
4164
+ mediaType,
4165
+ onAutoPlayError,
4166
+ logLevel,
4167
+ mountTime,
4168
+ reason,
4169
+ isPlayer: env.isPlayer
4170
+ });
4171
+ }
4172
+ };
4173
+ audioAndVideoTags.current.push(tag);
4174
+ return () => {
4175
+ audioAndVideoTags.current = audioAndVideoTags.current.filter((a) => a.id !== id);
4176
+ };
4177
+ }, [
4178
+ audioAndVideoTags,
4179
+ id,
4180
+ mediaRef,
4181
+ mediaType,
4182
+ onAutoPlayError,
4183
+ imperativePlaying,
4184
+ isPremounting,
4185
+ isPostmounting,
4186
+ logLevel,
4187
+ mountTime,
4188
+ env.isPlayer
4189
+ ]);
4188
4190
  }, MediaVolumeContext, SetMediaVolumeContext, useMediaVolumeState = () => {
4189
- const { mediaVolume } = useContext22(MediaVolumeContext);
4190
- const { setMediaVolume } = useContext22(SetMediaVolumeContext);
4191
+ const { mediaVolume } = useContext23(MediaVolumeContext);
4192
+ const { setMediaVolume } = useContext23(SetMediaVolumeContext);
4191
4193
  return useMemo19(() => {
4192
4194
  return [mediaVolume, setMediaVolume];
4193
4195
  }, [mediaVolume, setMediaVolume]);
4194
4196
  }, useMediaMutedState = () => {
4195
- const { mediaMuted } = useContext22(MediaVolumeContext);
4196
- const { setMediaMuted } = useContext22(SetMediaVolumeContext);
4197
+ const { mediaMuted } = useContext23(MediaVolumeContext);
4198
+ const { setMediaMuted } = useContext23(SetMediaVolumeContext);
4197
4199
  return useMemo19(() => {
4198
4200
  return [mediaMuted, setMediaMuted];
4199
4201
  }, [mediaMuted, setMediaMuted]);
@@ -4241,12 +4243,12 @@ Check that all your Remotion packages are on the same version. If your dependenc
4241
4243
  const [mediaVolume] = useMediaVolumeState();
4242
4244
  const [mediaMuted] = useMediaMutedState();
4243
4245
  const volumePropFrame = useFrameForVolumeProp(loopVolumeCurveBehavior ?? "repeat");
4244
- const { hidden } = useContext23(SequenceVisibilityToggleContext);
4246
+ const { hidden } = useContext24(SequenceVisibilityToggleContext);
4245
4247
  if (!src) {
4246
4248
  throw new TypeError("No 'src' was passed to <Audio>.");
4247
4249
  }
4248
4250
  const preloadedSrc = usePreload(src);
4249
- const sequenceContext = useContext23(SequenceContext);
4251
+ const sequenceContext = useContext24(SequenceContext);
4250
4252
  const [timelineId] = useState14(() => String(Math.random()));
4251
4253
  const isSequenceHidden = hidden[timelineId] ?? false;
4252
4254
  const userPreferredVolume = evaluateVolume({
@@ -4285,7 +4287,7 @@ Check that all your Remotion packages are on the same version. If your dependenc
4285
4287
  props.muted,
4286
4288
  props.loop
4287
4289
  ]);
4288
- const context = useContext23(SharedAudioContext);
4290
+ const context = useContext24(SharedAudioContext);
4289
4291
  if (!context) {
4290
4292
  throw new Error("SharedAudioContext not found");
4291
4293
  }
@@ -4297,7 +4299,6 @@ Check that all your Remotion packages are on the same version. If your dependenc
4297
4299
  useMediaInTimeline({
4298
4300
  volume,
4299
4301
  mediaVolume,
4300
- mediaRef: audioRef,
4301
4302
  src,
4302
4303
  mediaType: "audio",
4303
4304
  playbackRate: playbackRate ?? 1,
@@ -4306,10 +4307,7 @@ Check that all your Remotion packages are on the same version. If your dependenc
4306
4307
  stack: _remotionInternalStack,
4307
4308
  showInTimeline,
4308
4309
  premountDisplay: sequenceContext?.premountDisplay ?? null,
4309
- postmountDisplay: sequenceContext?.postmountDisplay ?? null,
4310
- onAutoPlayError: null,
4311
- isPremounting: Boolean(sequenceContext?.premounting),
4312
- isPostmounting: Boolean(sequenceContext?.postmounting)
4310
+ postmountDisplay: sequenceContext?.postmountDisplay ?? null
4313
4311
  });
4314
4312
  useMediaPlayback({
4315
4313
  mediaRef: audioRef,
@@ -4323,6 +4321,14 @@ Check that all your Remotion packages are on the same version. If your dependenc
4323
4321
  pauseWhenBuffering,
4324
4322
  onAutoPlayError: null
4325
4323
  });
4324
+ useMediaTag({
4325
+ id: timelineId,
4326
+ isPostmounting: Boolean(sequenceContext?.postmounting),
4327
+ isPremounting: Boolean(sequenceContext?.premounting),
4328
+ mediaRef: audioRef,
4329
+ mediaType: "audio",
4330
+ onAutoPlayError: null
4331
+ });
4326
4332
  useVolume({
4327
4333
  logLevel,
4328
4334
  mediaRef: audioRef,
@@ -4335,7 +4341,7 @@ Check that all your Remotion packages are on the same version. If your dependenc
4335
4341
  }, [audioRef]);
4336
4342
  const currentOnDurationCallback = useRef11(onDuration);
4337
4343
  currentOnDurationCallback.current = onDuration;
4338
- useEffect13(() => {
4344
+ useEffect14(() => {
4339
4345
  const { current } = audioRef;
4340
4346
  if (!current) {
4341
4347
  return;
@@ -4384,8 +4390,8 @@ Check that all your Remotion packages are on the same version. If your dependenc
4384
4390
  const absoluteFrame = useTimelinePosition();
4385
4391
  const volumePropFrame = useFrameForVolumeProp(loopVolumeCurveBehavior ?? "repeat");
4386
4392
  const frame = useCurrentFrame();
4387
- const sequenceContext = useContext24(SequenceContext);
4388
- const { registerRenderAsset, unregisterRenderAsset } = useContext24(RenderAssetManager);
4393
+ const sequenceContext = useContext25(SequenceContext);
4394
+ const { registerRenderAsset, unregisterRenderAsset } = useContext25(RenderAssetManager);
4389
4395
  const { delayRender: delayRender2, continueRender: continueRender2 } = useDelayRender();
4390
4396
  const id = useMemo21(() => `audio-${random(props.src ?? "")}-${sequenceContext?.relativeFrom}-${sequenceContext?.cumulatedFrom}-${sequenceContext?.durationInFrames}`, [
4391
4397
  props.src,
@@ -4402,7 +4408,7 @@ Check that all your Remotion packages are on the same version. If your dependenc
4402
4408
  useImperativeHandle6(ref, () => {
4403
4409
  return audioRef.current;
4404
4410
  }, []);
4405
- useEffect14(() => {
4411
+ useEffect15(() => {
4406
4412
  if (!props.src) {
4407
4413
  throw new Error("No src passed");
4408
4414
  }
@@ -4492,7 +4498,7 @@ Check that all your Remotion packages are on the same version. If your dependenc
4492
4498
  onError: onNativeError
4493
4499
  });
4494
4500
  }, AudioForRendering, AudioRefForwardingFunction = (props, ref) => {
4495
- const audioContext = useContext25(SharedAudioContext);
4501
+ const audioContext = useContext26(SharedAudioContext);
4496
4502
  const {
4497
4503
  startFrom,
4498
4504
  endAt,
@@ -4508,7 +4514,7 @@ Check that all your Remotion packages are on the same version. If your dependenc
4508
4514
  const { loop, ...propsOtherThanLoop } = props;
4509
4515
  const { fps } = useVideoConfig();
4510
4516
  const environment = useRemotionEnvironment();
4511
- const { durations, setDurations } = useContext25(DurationsContext);
4517
+ const { durations, setDurations } = useContext26(DurationsContext);
4512
4518
  if (typeof props.src !== "string") {
4513
4519
  throw new TypeError(`The \`<Audio>\` tag requires a string for \`src\`, but got ${JSON.stringify(props.src)} instead.`);
4514
4520
  }
@@ -4550,10 +4556,10 @@ Check that all your Remotion packages are on the same version. If your dependenc
4550
4556
  return /* @__PURE__ */ jsx19(Loop, {
4551
4557
  layout: "none",
4552
4558
  durationInFrames: calculateLoopDuration({
4553
- endAt: trimAfterValue,
4554
- mediaDuration: duration,
4559
+ trimAfter: trimAfterValue,
4560
+ mediaDurationInFrames: duration,
4555
4561
  playbackRate: props.playbackRate ?? 1,
4556
- startFrom: trimBeforeValue
4562
+ trimBefore: trimBeforeValue
4557
4563
  }),
4558
4564
  children: /* @__PURE__ */ jsx19(Audio, {
4559
4565
  ...propsOtherThanLoop,
@@ -4706,7 +4712,7 @@ Check that all your Remotion packages are on the same version. If your dependenc
4706
4712
  }
4707
4713
  }, Fallback = () => {
4708
4714
  const { continueRender: continueRender2, delayRender: delayRender2 } = useDelayRender();
4709
- useEffect16(() => {
4715
+ useEffect17(() => {
4710
4716
  const fallback = delayRender2("Waiting for Root component to unsuspend");
4711
4717
  return () => continueRender2(fallback);
4712
4718
  }, [continueRender2, delayRender2]);
@@ -4721,7 +4727,7 @@ Check that all your Remotion packages are on the same version. If your dependenc
4721
4727
  schema,
4722
4728
  ...compProps
4723
4729
  }) => {
4724
- const compManager = useContext27(CompositionSetters);
4730
+ const compManager = useContext28(CompositionSetters);
4725
4731
  const { registerComposition, unregisterComposition } = compManager;
4726
4732
  const video = useVideo();
4727
4733
  const lazy = useLazyComponent({
@@ -4732,15 +4738,18 @@ Check that all your Remotion packages are on the same version. If your dependenc
4732
4738
  const nonce = useNonce();
4733
4739
  const isPlayer = useIsPlayer();
4734
4740
  const environment = useRemotionEnvironment();
4735
- const canUseComposition = useContext27(CanUseRemotionHooks);
4741
+ const canUseComposition = useContext28(CanUseRemotionHooks);
4742
+ if (typeof window !== "undefined") {
4743
+ window.remotion_seenCompositionIds = Array.from(new Set([...window.remotion_seenCompositionIds ?? [], id]));
4744
+ }
4736
4745
  if (canUseComposition) {
4737
4746
  if (isPlayer) {
4738
4747
  throw new Error("<Composition> was mounted inside the `component` that was passed to the <Player>. See https://remotion.dev/docs/wrong-composition-mount for help.");
4739
4748
  }
4740
4749
  throw new Error("<Composition> mounted inside another composition. See https://remotion.dev/docs/wrong-composition-mount for help.");
4741
4750
  }
4742
- const { folderName, parentName } = useContext27(FolderContext);
4743
- useEffect16(() => {
4751
+ const { folderName, parentName } = useContext28(FolderContext);
4752
+ useEffect17(() => {
4744
4753
  if (!id) {
4745
4754
  throw new Error("No id for composition passed.");
4746
4755
  }
@@ -4779,7 +4788,7 @@ Check that all your Remotion packages are on the same version. If your dependenc
4779
4788
  registerComposition,
4780
4789
  unregisterComposition
4781
4790
  ]);
4782
- useEffect16(() => {
4791
+ useEffect17(() => {
4783
4792
  window.dispatchEvent(new CustomEvent(PROPS_UPDATED_EXTERNALLY, {
4784
4793
  detail: {
4785
4794
  resetUnsaved: id
@@ -4817,7 +4826,7 @@ Check that all your Remotion packages are on the same version. If your dependenc
4817
4826
  }
4818
4827
  return null;
4819
4828
  }, Composition = (props2) => {
4820
- const { onlyRenderComposition } = useContext27(CompositionSetters);
4829
+ const { onlyRenderComposition } = useContext28(CompositionSetters);
4821
4830
  if (onlyRenderComposition && onlyRenderComposition !== props2.id) {
4822
4831
  return null;
4823
4832
  }
@@ -4868,7 +4877,7 @@ Check that all your Remotion packages are on the same version. If your dependenc
4868
4877
  const imageRef = useRef13(null);
4869
4878
  const errors = useRef13({});
4870
4879
  const { delayPlayback } = useBufferState();
4871
- const sequenceContext = useContext28(SequenceContext);
4880
+ const sequenceContext = useContext29(SequenceContext);
4872
4881
  if (!src) {
4873
4882
  throw new Error('No "src" prop was passed to <Img>.');
4874
4883
  }
@@ -5239,7 +5248,7 @@ Check that all your Remotion packages are on the same version. If your dependenc
5239
5248
  }
5240
5249
  };
5241
5250
  }, []);
5242
- useEffect17(() => {
5251
+ useEffect18(() => {
5243
5252
  if (typeof __webpack_module__ !== "undefined") {
5244
5253
  if (__webpack_module__.hot) {
5245
5254
  __webpack_module__.hot.addStatusHandler((status) => {
@@ -5352,9 +5361,9 @@ Check that all your Remotion packages are on the same version. If your dependenc
5352
5361
  const frame = useCurrentFrame();
5353
5362
  const volumePropsFrame = useFrameForVolumeProp(loopVolumeCurveBehavior);
5354
5363
  const videoConfig = useUnsafeVideoConfig();
5355
- const sequenceContext = useContext29(SequenceContext);
5364
+ const sequenceContext = useContext30(SequenceContext);
5356
5365
  const mediaStartsAt = useMediaStartsAt();
5357
- const { registerRenderAsset, unregisterRenderAsset } = useContext29(RenderAssetManager);
5366
+ const { registerRenderAsset, unregisterRenderAsset } = useContext30(RenderAssetManager);
5358
5367
  if (!src) {
5359
5368
  throw new TypeError("No `src` was passed to <OffthreadVideo>.");
5360
5369
  }
@@ -5373,7 +5382,7 @@ Check that all your Remotion packages are on the same version. If your dependenc
5373
5382
  mediaVolume: 1
5374
5383
  });
5375
5384
  warnAboutTooHighVolume(volume);
5376
- useEffect18(() => {
5385
+ useEffect19(() => {
5377
5386
  if (!src) {
5378
5387
  throw new Error("No src passed");
5379
5388
  }
@@ -5533,7 +5542,7 @@ Check that all your Remotion packages are on the same version. If your dependenc
5533
5542
  ref,
5534
5543
  onVideoFrame
5535
5544
  }) => {
5536
- useEffect19(() => {
5545
+ useEffect20(() => {
5537
5546
  const { current } = ref;
5538
5547
  if (!current) {
5539
5548
  return;
@@ -5555,7 +5564,7 @@ Check that all your Remotion packages are on the same version. If your dependenc
5555
5564
  };
5556
5565
  }, [onVideoFrame, ref]);
5557
5566
  }, VideoForDevelopmentRefForwardingFunction = (props2, ref) => {
5558
- const context = useContext30(SharedAudioContext);
5567
+ const context = useContext31(SharedAudioContext);
5559
5568
  if (!context) {
5560
5569
  throw new Error("SharedAudioContext not found");
5561
5570
  }
@@ -5603,8 +5612,8 @@ Check that all your Remotion packages are on the same version. If your dependenc
5603
5612
  }
5604
5613
  const volumePropFrame = useFrameForVolumeProp(loopVolumeCurveBehavior ?? "repeat");
5605
5614
  const { fps, durationInFrames } = useVideoConfig();
5606
- const parentSequence = useContext30(SequenceContext);
5607
- const { hidden } = useContext30(SequenceVisibilityToggleContext);
5615
+ const parentSequence = useContext31(SequenceContext);
5616
+ const { hidden } = useContext31(SequenceVisibilityToggleContext);
5608
5617
  const logLevel = useLogLevel();
5609
5618
  const mountTime = useMountTime();
5610
5619
  const [timelineId] = useState19(() => String(Math.random()));
@@ -5621,7 +5630,6 @@ Check that all your Remotion packages are on the same version. If your dependenc
5621
5630
  });
5622
5631
  warnAboutTooHighVolume(userPreferredVolume);
5623
5632
  useMediaInTimeline({
5624
- mediaRef: videoRef,
5625
5633
  volume,
5626
5634
  mediaVolume,
5627
5635
  mediaType: "video",
@@ -5632,10 +5640,7 @@ Check that all your Remotion packages are on the same version. If your dependenc
5632
5640
  stack: _remotionInternalStack,
5633
5641
  showInTimeline,
5634
5642
  premountDisplay: parentSequence?.premountDisplay ?? null,
5635
- postmountDisplay: parentSequence?.postmountDisplay ?? null,
5636
- onAutoPlayError: onAutoPlayError ?? null,
5637
- isPremounting: Boolean(parentSequence?.premounting),
5638
- isPostmounting: Boolean(parentSequence?.postmounting)
5643
+ postmountDisplay: parentSequence?.postmountDisplay ?? null
5639
5644
  });
5640
5645
  useMediaPlayback({
5641
5646
  mediaRef: videoRef,
@@ -5649,6 +5654,14 @@ Check that all your Remotion packages are on the same version. If your dependenc
5649
5654
  pauseWhenBuffering,
5650
5655
  onAutoPlayError: onAutoPlayError ?? null
5651
5656
  });
5657
+ useMediaTag({
5658
+ id: timelineId,
5659
+ isPostmounting: Boolean(parentSequence?.postmounting),
5660
+ isPremounting: Boolean(parentSequence?.premounting),
5661
+ mediaRef: videoRef,
5662
+ mediaType: "video",
5663
+ onAutoPlayError: onAutoPlayError ?? null
5664
+ });
5652
5665
  useVolume({
5653
5666
  logLevel,
5654
5667
  mediaRef: videoRef,
@@ -5674,7 +5687,7 @@ Check that all your Remotion packages are on the same version. If your dependenc
5674
5687
  tag: "video",
5675
5688
  mountTime
5676
5689
  }));
5677
- useEffect20(() => {
5690
+ useEffect21(() => {
5678
5691
  const { current } = videoRef;
5679
5692
  if (!current) {
5680
5693
  return;
@@ -5705,7 +5718,7 @@ Check that all your Remotion packages are on the same version. If your dependenc
5705
5718
  const currentOnDurationCallback = useRef16(onDuration);
5706
5719
  currentOnDurationCallback.current = onDuration;
5707
5720
  useEmitVideoFrame({ ref: videoRef, onVideoFrame });
5708
- useEffect20(() => {
5721
+ useEffect21(() => {
5709
5722
  const { current } = videoRef;
5710
5723
  if (!current) {
5711
5724
  return;
@@ -5722,7 +5735,7 @@ Check that all your Remotion packages are on the same version. If your dependenc
5722
5735
  current.removeEventListener("loadedmetadata", onLoadedMetadata);
5723
5736
  };
5724
5737
  }, [src]);
5725
- useEffect20(() => {
5738
+ useEffect21(() => {
5726
5739
  const { current } = videoRef;
5727
5740
  if (!current) {
5728
5741
  return;
@@ -6278,13 +6291,13 @@ Check that all your Remotion packages are on the same version. If your dependenc
6278
6291
  const volumePropsFrame = useFrameForVolumeProp(loopVolumeCurveBehavior ?? "repeat");
6279
6292
  const videoConfig = useUnsafeVideoConfig();
6280
6293
  const videoRef = useRef17(null);
6281
- const sequenceContext = useContext31(SequenceContext);
6294
+ const sequenceContext = useContext32(SequenceContext);
6282
6295
  const mediaStartsAt = useMediaStartsAt();
6283
6296
  const environment = useRemotionEnvironment();
6284
6297
  const logLevel = useLogLevel();
6285
6298
  const mountTime = useMountTime();
6286
6299
  const { delayRender: delayRender2, continueRender: continueRender2 } = useDelayRender();
6287
- const { registerRenderAsset, unregisterRenderAsset } = useContext31(RenderAssetManager);
6300
+ const { registerRenderAsset, unregisterRenderAsset } = useContext32(RenderAssetManager);
6288
6301
  const id = useMemo30(() => `video-${random(props2.src ?? "")}-${sequenceContext?.cumulatedFrom}-${sequenceContext?.relativeFrom}-${sequenceContext?.durationInFrames}`, [
6289
6302
  props2.src,
6290
6303
  sequenceContext?.cumulatedFrom,
@@ -6300,7 +6313,7 @@ Check that all your Remotion packages are on the same version. If your dependenc
6300
6313
  mediaVolume: 1
6301
6314
  });
6302
6315
  warnAboutTooHighVolume(volume);
6303
- useEffect21(() => {
6316
+ useEffect222(() => {
6304
6317
  if (!props2.src) {
6305
6318
  throw new Error("No src passed");
6306
6319
  }
@@ -6343,7 +6356,7 @@ Check that all your Remotion packages are on the same version. If your dependenc
6343
6356
  useImperativeHandle10(ref, () => {
6344
6357
  return videoRef.current;
6345
6358
  }, []);
6346
- useEffect21(() => {
6359
+ useEffect222(() => {
6347
6360
  if (!window.remotion_videoEnabled) {
6348
6361
  return;
6349
6362
  }
@@ -6483,7 +6496,7 @@ Check that all your Remotion packages are on the same version. If your dependenc
6483
6496
  const { loop, ...propsOtherThanLoop } = props2;
6484
6497
  const { fps } = useVideoConfig();
6485
6498
  const environment = useRemotionEnvironment();
6486
- const { durations, setDurations } = useContext32(DurationsContext);
6499
+ const { durations, setDurations } = useContext33(DurationsContext);
6487
6500
  if (typeof ref === "string") {
6488
6501
  throw new Error("string refs are not supported");
6489
6502
  }
@@ -6514,10 +6527,10 @@ Check that all your Remotion packages are on the same version. If your dependenc
6514
6527
  const mediaDuration = durationFetched * fps;
6515
6528
  return /* @__PURE__ */ jsx34(Loop, {
6516
6529
  durationInFrames: calculateLoopDuration({
6517
- endAt: trimAfterValue,
6518
- mediaDuration,
6530
+ trimAfter: trimAfterValue,
6531
+ mediaDurationInFrames: mediaDuration,
6519
6532
  playbackRate: props2.playbackRate ?? 1,
6520
- startFrom: trimBeforeValue
6533
+ trimBefore: trimBeforeValue
6521
6534
  }),
6522
6535
  layout: "none",
6523
6536
  name,
@@ -6928,6 +6941,7 @@ var init_esm = __esm(() => {
6928
6941
  getRoot,
6929
6942
  useMediaVolumeState,
6930
6943
  useMediaMutedState,
6944
+ useMediaInTimeline,
6931
6945
  useLazyComponent,
6932
6946
  truthy,
6933
6947
  SequenceContext,
@@ -6941,6 +6955,7 @@ var init_esm = __esm(() => {
6941
6955
  SharedAudioContext,
6942
6956
  SharedAudioContextProvider,
6943
6957
  invalidCompositionErrorMessage,
6958
+ calculateLoopDuration,
6944
6959
  isCompositionIdValid,
6945
6960
  getPreviewDomElement,
6946
6961
  compositionsRef,
@@ -8742,7 +8757,7 @@ var PricingBulletPoint = ({ text, checked, children }) => {
8742
8757
  style: greyCircle
8743
8758
  }),
8744
8759
  /* @__PURE__ */ jsxs3("div", {
8745
- className: "fontbrand text-lg ",
8760
+ className: "fontbrand text-lg\t",
8746
8761
  children: [
8747
8762
  text,
8748
8763
  children
@@ -12186,13 +12201,13 @@ import { jsx as jsx35, jsxs as jsxs10 } from "react/jsx-runtime";
12186
12201
  import { jsx as jsx210, jsxs as jsxs23, Fragment } from "react/jsx-runtime";
12187
12202
  import React6 from "react";
12188
12203
  import { useContext as useContext210, useEffect as useEffect23, useState as useState20 } from "react";
12189
- import { useContext as useContext33, useEffect as useEffect24 } from "react";
12204
+ import { useContext as useContext34, useEffect as useEffect24 } from "react";
12190
12205
  import { jsx as jsx36 } from "react/jsx-runtime";
12191
12206
  import { useCallback as useCallback18, useRef as useRef18 } from "react";
12192
12207
  import { useEffect as useEffect32, useState as useState23 } from "react";
12193
12208
  import { useContext as useContext42, useEffect as useEffect62, useRef as useRef42 } from "react";
12194
12209
  import { useEffect as useEffect42 } from "react";
12195
- import { useCallback as useCallback23, useContext as useContext34, useMemo as useMemo31, useRef as useRef22, useState as useState32 } from "react";
12210
+ import { useCallback as useCallback23, useContext as useContext35, useMemo as useMemo31, useRef as useRef22, useState as useState32 } from "react";
12196
12211
  import { useEffect as useEffect52, useRef as useRef32 } from "react";
12197
12212
  import { useCallback as useCallback32, useEffect as useEffect72, useMemo as useMemo210, useState as useState42 } from "react";
12198
12213
  import {
@@ -13319,7 +13334,7 @@ class ThumbnailEmitter {
13319
13334
  };
13320
13335
  }
13321
13336
  var useBufferStateEmitter = (emitter) => {
13322
- const bufferManager = useContext33(Internals.BufferingContextReact);
13337
+ const bufferManager = useContext34(Internals.BufferingContextReact);
13323
13338
  if (!bufferManager) {
13324
13339
  throw new Error("BufferingContextReact not found");
13325
13340
  }
@@ -13402,20 +13417,20 @@ var usePlayer = () => {
13402
13417
  const playStart = useRef22(frame);
13403
13418
  const setFrame = Internals.Timeline.useTimelineSetFrame();
13404
13419
  const setTimelinePosition = Internals.Timeline.useTimelineSetFrame();
13405
- const audioContext = useContext34(Internals.SharedAudioContext);
13406
- const { audioAndVideoTags } = useContext34(Internals.Timeline.TimelineContext);
13420
+ const audioContext = useContext35(Internals.SharedAudioContext);
13421
+ const { audioAndVideoTags } = useContext35(Internals.Timeline.TimelineContext);
13407
13422
  const frameRef = useRef22(frame);
13408
13423
  frameRef.current = frame;
13409
13424
  const video = Internals.useVideo();
13410
13425
  const config = Internals.useUnsafeVideoConfig();
13411
- const emitter = useContext34(PlayerEventEmitterContext);
13426
+ const emitter = useContext35(PlayerEventEmitterContext);
13412
13427
  const lastFrame = (config?.durationInFrames ?? 1) - 1;
13413
13428
  const isLastFrame = frame === lastFrame;
13414
13429
  const isFirstFrame = frame === 0;
13415
13430
  if (!emitter) {
13416
13431
  throw new TypeError("Expected Player event emitter context");
13417
13432
  }
13418
- const bufferingContext = useContext34(Internals.BufferingContextReact);
13433
+ const bufferingContext = useContext35(Internals.BufferingContextReact);
13419
13434
  if (!bufferingContext) {
13420
13435
  throw new Error("Missing the buffering context. Most likely you have a Remotion version mismatch.");
13421
13436
  }
@@ -16991,7 +17006,7 @@ var UNDERLAY_RED = curriedTransparentize$1(0.9, RED);
16991
17006
  var BLUE_TEXT = curriedDarken$1(0.3, "#42e9f5");
16992
17007
 
16993
17008
  // src/components/homepage/layout/use-color-mode.tsx
16994
- import React11, { useContext as useContext35, useMemo as useMemo33 } from "react";
17009
+ import React11, { useContext as useContext36, useMemo as useMemo33 } from "react";
16995
17010
  import { jsx as jsx37 } from "react/jsx-runtime";
16996
17011
  var Context = React11.createContext(undefined);
16997
17012
  var ColorModeProvider = ({
@@ -17008,7 +17023,7 @@ var ColorModeProvider = ({
17008
17023
  });
17009
17024
  };
17010
17025
  function useColorMode() {
17011
- const context = useContext35(Context);
17026
+ const context = useContext36(Context);
17012
17027
  if (context === null || context === undefined) {
17013
17028
  throw new Error("ColorModeProvider");
17014
17029
  }
@@ -1532,7 +1532,7 @@ var PricingBulletPoint = ({ text, checked, children }) => {
1532
1532
  style: greyCircle
1533
1533
  }),
1534
1534
  /* @__PURE__ */ jsxs3("div", {
1535
- className: "fontbrand text-lg ",
1535
+ className: "fontbrand text-lg\t",
1536
1536
  children: [
1537
1537
  text,
1538
1538
  children
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@remotion/promo-pages",
3
- "version": "4.0.356",
3
+ "version": "4.0.357",
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.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"
13
+ "@remotion/lottie": "4.0.357",
14
+ "@remotion/paths": "4.0.357",
15
+ "@remotion/lambda": "4.0.357",
16
+ "@remotion/player": "4.0.357",
17
+ "@remotion/shapes": "4.0.357",
18
+ "remotion": "4.0.357",
19
+ "create-video": "4.0.357",
20
+ "@remotion/animated-emoji": "4.0.357"
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.356"
37
+ "@remotion/eslint-config-internal": "4.0.357"
38
38
  },
39
39
  "repository": {
40
40
  "url": "https://github.com/remotion-dev/remotion/tree/main/packages/promo-pages"