@remotion/promo-pages 4.0.486 → 4.0.488

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.
Files changed (42) hide show
  1. package/dist/Homepage.css +1 -1
  2. package/dist/Homepage.js +1147 -2270
  3. package/dist/components/Homepage.js +21 -5
  4. package/dist/components/homepage/CanvasSectionTitle.d.ts +4 -0
  5. package/dist/components/homepage/CanvasSectionTitle.js +14 -0
  6. package/dist/components/homepage/CommunityStatsItems.js +2 -2
  7. package/dist/components/homepage/Demo/DemoRender.d.ts +1 -1
  8. package/dist/components/homepage/Demo/DisplayedEmoji.js +3 -5
  9. package/dist/components/homepage/Demo/math.d.ts +1 -1
  10. package/dist/components/homepage/EditorStarterSection.d.ts +3 -0
  11. package/dist/components/homepage/EditorStarterSection.js +8 -0
  12. package/dist/components/homepage/GitHubButton.js +1 -1
  13. package/dist/components/homepage/MakeVideosAgentically.d.ts +10 -0
  14. package/dist/components/homepage/MakeVideosAgentically.js +37 -0
  15. package/dist/components/homepage/MakeVideosInteractively.d.ts +9 -0
  16. package/dist/components/homepage/MakeVideosInteractively.js +16 -0
  17. package/dist/components/homepage/MakeVideosLinks.d.ts +9 -0
  18. package/dist/components/homepage/MakeVideosLinks.js +17 -0
  19. package/dist/components/homepage/MakeVideosProgrammatically.d.ts +9 -0
  20. package/dist/components/homepage/MakeVideosProgrammatically.js +8 -0
  21. package/dist/components/homepage/Pricing.d.ts +1 -3
  22. package/dist/components/homepage/Pricing.js +2 -6
  23. package/dist/components/homepage/WriteInReact.js +1 -2
  24. package/dist/components/team/TrustSection.js +1 -1
  25. package/dist/design.js +241 -130
  26. package/dist/experts.js +230 -119
  27. package/dist/homepage/Pricing.js +255 -128
  28. package/dist/prompts/PromptsGallery.js +241 -130
  29. package/dist/prompts/PromptsShow.js +247 -136
  30. package/dist/prompts/PromptsSubmit.js +232 -121
  31. package/dist/tailwind.css +21 -3
  32. package/dist/team.js +232 -121
  33. package/dist/template-modal-content.css +1 -1
  34. package/dist/template-modal-content.js +238 -127
  35. package/dist/templates.js +232 -121
  36. package/package.json +17 -17
  37. package/public/img/editing-safari.mp4 +0 -0
  38. package/public/img/editing-vp9-chrome.webm +0 -0
  39. package/public/img/homepage-assets-master.mp4 +0 -0
  40. package/public/img/homepage-assets-master.webm +0 -0
  41. package/public/img/what-is-remotion.mp4 +0 -0
  42. package/public/img/what-is-remotion.webm +0 -0
package/dist/experts.js CHANGED
@@ -1100,7 +1100,13 @@ import {
1100
1100
  import { jsx as jsx26 } from "react/jsx-runtime";
1101
1101
  import { forwardRef as forwardRef11, useCallback as useCallback18, useState as useState17 } from "react";
1102
1102
  import { jsx as jsx27 } from "react/jsx-runtime";
1103
- import { useCallback as useCallback19, useContext as useContext33, useLayoutEffect as useLayoutEffect11, useRef as useRef24 } from "react";
1103
+ import {
1104
+ useCallback as useCallback19,
1105
+ useContext as useContext33,
1106
+ useLayoutEffect as useLayoutEffect11,
1107
+ useRef as useRef24,
1108
+ useState as useState18
1109
+ } from "react";
1104
1110
  import { jsx as jsx28 } from "react/jsx-runtime";
1105
1111
  import React29, { forwardRef as forwardRef12, useCallback as useCallback20, useRef as useRef25 } from "react";
1106
1112
  import { jsx as jsx29 } from "react/jsx-runtime";
@@ -1111,7 +1117,7 @@ import {
1111
1117
  useImperativeHandle as useImperativeHandle8,
1112
1118
  useMemo as useMemo32,
1113
1119
  useRef as useRef26,
1114
- useState as useState18
1120
+ useState as useState19
1115
1121
  } from "react";
1116
1122
  import { jsx as jsx30 } from "react/jsx-runtime";
1117
1123
  import React31 from "react";
@@ -1129,7 +1135,7 @@ import {
1129
1135
  useEffect as useEffect17,
1130
1136
  useLayoutEffect as useLayoutEffect12,
1131
1137
  useMemo as useMemo35,
1132
- useState as useState19
1138
+ useState as useState20
1133
1139
  } from "react";
1134
1140
  import { jsx as jsx33 } from "react/jsx-runtime";
1135
1141
  import React37, {
@@ -1140,7 +1146,7 @@ import React37, {
1140
1146
  useImperativeHandle as useImperativeHandle9,
1141
1147
  useMemo as useMemo36,
1142
1148
  useRef as useRef27,
1143
- useState as useState20
1149
+ useState as useState21
1144
1150
  } from "react";
1145
1151
  import { useEffect as useEffect18 } from "react";
1146
1152
  import { jsx as jsx34 } from "react/jsx-runtime";
@@ -2335,7 +2341,7 @@ var getComponentsToAddStacksTo = () => componentsToAddStacksTo;
2335
2341
  var addSequenceStackTraces = (component) => {
2336
2342
  componentsToAddStacksTo.push(component);
2337
2343
  };
2338
- var VERSION = "4.0.486";
2344
+ var VERSION = "4.0.488";
2339
2345
  var checkMultipleRemotionVersions = () => {
2340
2346
  if (typeof globalThis === "undefined") {
2341
2347
  return;
@@ -6019,7 +6025,7 @@ var useEffectChainState = () => {
6019
6025
  }
6020
6026
  }), []);
6021
6027
  };
6022
- var CanvasRefForwardingFunction = ({ width, height, fit, className, style, effects }, ref) => {
6028
+ var CanvasRefForwardingFunction = ({ width, height, fit, className, style, effects, ...props }, ref) => {
6023
6029
  const canvasRef = useRef8(null);
6024
6030
  const chainState = useEffectChainState();
6025
6031
  const sourceCanvas = useMemo16(() => {
@@ -6083,7 +6089,8 @@ var CanvasRefForwardingFunction = ({ width, height, fit, className, style, effec
6083
6089
  return /* @__PURE__ */ jsx13("canvas", {
6084
6090
  ref: canvasRef,
6085
6091
  className,
6086
- style
6092
+ style,
6093
+ ...props
6087
6094
  });
6088
6095
  };
6089
6096
  var Canvas = React15.forwardRef(CanvasRefForwardingFunction);
@@ -6260,6 +6267,16 @@ var animatedImageSchema = {
6260
6267
  },
6261
6268
  ...transformSchema
6262
6269
  };
6270
+ var getCanvasPropsFromSequenceProps = (props) => {
6271
+ const canvasProps = {};
6272
+ const mutableCanvasProps = canvasProps;
6273
+ for (const key in props) {
6274
+ if (Object.prototype.hasOwnProperty.call(props, key) && (key.startsWith("data-") || key.startsWith("aria-"))) {
6275
+ mutableCanvasProps[key] = props[key];
6276
+ }
6277
+ }
6278
+ return canvasProps;
6279
+ };
6263
6280
  var AnimatedImageContent = forwardRef4(({
6264
6281
  src,
6265
6282
  width,
@@ -6414,6 +6431,7 @@ var AnimatedImageInner = ({
6414
6431
  useImperativeHandle2(ref, () => {
6415
6432
  return actualRef.current;
6416
6433
  }, []);
6434
+ const canvasProps = getCanvasPropsFromSequenceProps(sequenceProps);
6417
6435
  const animatedImageProps = {
6418
6436
  src,
6419
6437
  width,
@@ -6425,7 +6443,8 @@ var AnimatedImageInner = ({
6425
6443
  id,
6426
6444
  className,
6427
6445
  style,
6428
- requestInit
6446
+ requestInit,
6447
+ ...canvasProps
6429
6448
  };
6430
6449
  return /* @__PURE__ */ jsx14(Sequence, {
6431
6450
  layout: "none",
@@ -7362,6 +7381,7 @@ var SharedAudioContextProvider = ({ children, audioLatencyHint, audioEnabled, pr
7362
7381
  return ({
7363
7382
  node,
7364
7383
  mediaTimestamp,
7384
+ sourceOffset,
7365
7385
  scheduledTime,
7366
7386
  duration,
7367
7387
  offset,
@@ -7390,7 +7410,7 @@ var SharedAudioContextProvider = ({ children, audioLatencyHint, audioEnabled, pr
7390
7410
  }
7391
7411
  }
7392
7412
  const scheduledEndTime = scheduledTime + duration / node.playbackRate.value;
7393
- const mediaTime = mediaTimestamp + offset;
7413
+ const mediaTime = mediaTimestamp + offset - sourceOffset;
7394
7414
  const mediaEndTime = mediaTime + duration;
7395
7415
  const latency = ctxAndGain.audioContext.baseLatency + ctxAndGain.audioContext.outputLatency;
7396
7416
  const timeDiff = scheduledTime - ctxAndGain.audioContext.currentTime;
@@ -8205,7 +8225,8 @@ var useBufferManager = (logLevel, mountTime) => {
8205
8225
  if (rendering) {
8206
8226
  return;
8207
8227
  }
8208
- if (blocks.length > 0) {
8228
+ if (blocks.length > 0 && !buffering.current) {
8229
+ buffering.current = true;
8209
8230
  onBufferingCallbacks.forEach((c2) => c2());
8210
8231
  playbackLogging({
8211
8232
  logLevel,
@@ -8220,7 +8241,8 @@ var useBufferManager = (logLevel, mountTime) => {
8220
8241
  if (rendering) {
8221
8242
  return;
8222
8243
  }
8223
- if (blocks.length === 0) {
8244
+ if (blocks.length === 0 && buffering.current) {
8245
+ buffering.current = false;
8224
8246
  onResumeCallbacks.forEach((c2) => c2());
8225
8247
  playbackLogging({
8226
8248
  logLevel,
@@ -8253,15 +8275,11 @@ var useIsPlayerBuffering = (bufferManager) => {
8253
8275
  const onResume = () => {
8254
8276
  setIsBuffering(false);
8255
8277
  };
8256
- bufferManager.listenForBuffering(onBuffer);
8257
- bufferManager.listenForResume(onResume);
8278
+ const buffer = bufferManager.listenForBuffering(onBuffer);
8279
+ const resume = bufferManager.listenForResume(onResume);
8258
8280
  return () => {
8259
- bufferManager.listenForBuffering(() => {
8260
- return;
8261
- });
8262
- bufferManager.listenForResume(() => {
8263
- return;
8264
- });
8281
+ buffer.remove();
8282
+ resume.remove();
8265
8283
  };
8266
8284
  }, [bufferManager]);
8267
8285
  return isBuffering;
@@ -8385,6 +8403,72 @@ var useBufferUntilFirstFrame = ({
8385
8403
  };
8386
8404
  }, [bufferUntilFirstFrame]);
8387
8405
  };
8406
+ var getMediaSyncAction = (input) => {
8407
+ const {
8408
+ duration,
8409
+ currentTime,
8410
+ paused,
8411
+ ended,
8412
+ desiredUnclampedTime,
8413
+ mediaTagTime,
8414
+ mediaTagLastUpdate,
8415
+ rvcTime,
8416
+ rvcLastUpdate,
8417
+ isVariableFpsVideo,
8418
+ acceptableTimeShift,
8419
+ lastSeekDueToShift,
8420
+ playing,
8421
+ playbackRate,
8422
+ mediaTagBufferingOrStalled,
8423
+ playerBuffering,
8424
+ absoluteFrame,
8425
+ onlyWarnForMediaSeekingError,
8426
+ isPremounting,
8427
+ isPostmounting,
8428
+ pauseWhenBuffering
8429
+ } = input;
8430
+ const shouldBeTime = !Number.isNaN(duration) && Number.isFinite(duration) ? Math.min(duration, desiredUnclampedTime) : desiredUnclampedTime;
8431
+ const timeShiftMediaTag = Math.abs(shouldBeTime - mediaTagTime);
8432
+ const timeShiftRvcTag = rvcTime ? Math.abs(shouldBeTime - rvcTime) : null;
8433
+ const mostRecentTimeshift = rvcLastUpdate && rvcTime > mediaTagLastUpdate ? timeShiftRvcTag : timeShiftMediaTag;
8434
+ const timeShift = timeShiftRvcTag && !isVariableFpsVideo ? mostRecentTimeshift : timeShiftMediaTag;
8435
+ if (timeShift > acceptableTimeShift && lastSeekDueToShift !== shouldBeTime) {
8436
+ return {
8437
+ type: "seek-due-to-shift",
8438
+ shouldBeTime,
8439
+ why: `because time shift is too big. shouldBeTime = ${shouldBeTime}, isTime = ${mediaTagTime}, requestVideoCallbackTime = ${rvcTime}, timeShift = ${timeShift}${isVariableFpsVideo ? ", isVariableFpsVideo = true" : ""}, isPremounting = ${isPremounting}, isPostmounting = ${isPostmounting}, pauseWhenBuffering = ${pauseWhenBuffering}`,
8440
+ bufferUntilFirstFrame: playing && playbackRate > 0,
8441
+ playReason: playing && paused ? "player is playing but media tag is paused, and just seeked" : null,
8442
+ warnAboutNonSeekable: !onlyWarnForMediaSeekingError
8443
+ };
8444
+ }
8445
+ const seekThreshold = playing ? 0.15 : 0.01;
8446
+ const makesSenseToSeek = Math.abs(currentTime - shouldBeTime) > seekThreshold;
8447
+ const isSomethingElseBuffering = playerBuffering && !mediaTagBufferingOrStalled;
8448
+ if (!playing || isSomethingElseBuffering) {
8449
+ return {
8450
+ type: "seek-if-not-playing",
8451
+ shouldBeTime,
8452
+ why: makesSenseToSeek ? `not playing or something else is buffering. time offset is over seek threshold (${seekThreshold})` : null
8453
+ };
8454
+ }
8455
+ if (!playing || playerBuffering) {
8456
+ return { type: "none" };
8457
+ }
8458
+ const pausedCondition = paused && !ended;
8459
+ const firstFrameCondition = absoluteFrame === 0;
8460
+ if (pausedCondition || firstFrameCondition) {
8461
+ const reason = pausedCondition ? "media tag is paused" : "absolute frame is 0";
8462
+ return {
8463
+ type: "play-and-seek",
8464
+ shouldBeTime,
8465
+ why: makesSenseToSeek ? `is over timeshift threshold (threshold = ${seekThreshold}) and ${reason}` : null,
8466
+ playReason: `player is playing and ${reason}`,
8467
+ bufferUntilFirstFrame: !isVariableFpsVideo && playbackRate > 0
8468
+ };
8469
+ }
8470
+ return { type: "none" };
8471
+ };
8388
8472
  var useCurrentTimeOfMediaTagWithUpdateTimeStamp = (mediaRef) => {
8389
8473
  const lastUpdate = React21.useRef({
8390
8474
  time: mediaRef.current?.currentTime ?? 0,
@@ -8804,89 +8888,93 @@ var useMediaPlayback = ({
8804
8888
  if (!src) {
8805
8889
  throw new Error(`No 'src' attribute was passed to the ${tagName} element.`);
8806
8890
  }
8807
- const { duration } = mediaRef.current;
8808
- const shouldBeTime = !Number.isNaN(duration) && Number.isFinite(duration) ? Math.min(duration, desiredUnclampedTime) : desiredUnclampedTime;
8809
- const mediaTagTime = mediaTagCurrentTime.current.time;
8810
- const rvcTime = rvcCurrentTime.current?.time ?? null;
8811
- const isVariableFpsVideo = isVariableFpsVideoMap.current[src];
8812
- const timeShiftMediaTag = Math.abs(shouldBeTime - mediaTagTime);
8813
- const timeShiftRvcTag = rvcTime ? Math.abs(shouldBeTime - rvcTime) : null;
8814
- const mostRecentTimeshift = rvcCurrentTime.current?.lastUpdate && rvcCurrentTime.current.time > mediaTagCurrentTime.current.lastUpdate ? timeShiftRvcTag : timeShiftMediaTag;
8815
- const timeShift = timeShiftRvcTag && !isVariableFpsVideo ? mostRecentTimeshift : timeShiftMediaTag;
8816
- if (timeShift > acceptableTimeShiftButLessThanDuration && lastSeekDueToShift.current !== shouldBeTime) {
8891
+ const { current } = mediaRef;
8892
+ const action = getMediaSyncAction({
8893
+ duration: current.duration,
8894
+ currentTime: current.currentTime,
8895
+ paused: current.paused,
8896
+ ended: current.ended,
8897
+ desiredUnclampedTime,
8898
+ mediaTagTime: mediaTagCurrentTime.current.time,
8899
+ mediaTagLastUpdate: mediaTagCurrentTime.current.lastUpdate,
8900
+ rvcTime: rvcCurrentTime.current?.time ?? null,
8901
+ rvcLastUpdate: rvcCurrentTime.current?.lastUpdate ?? null,
8902
+ isVariableFpsVideo: Boolean(isVariableFpsVideoMap.current[src]),
8903
+ acceptableTimeShift: acceptableTimeShiftButLessThanDuration,
8904
+ lastSeekDueToShift: lastSeekDueToShift.current,
8905
+ playing,
8906
+ playbackRate,
8907
+ mediaTagBufferingOrStalled: isMediaTagBuffering || isBuffering(),
8908
+ playerBuffering: buffering.buffering.current,
8909
+ absoluteFrame,
8910
+ onlyWarnForMediaSeekingError,
8911
+ isPremounting,
8912
+ isPostmounting,
8913
+ pauseWhenBuffering
8914
+ });
8915
+ if (action.type === "none") {
8916
+ return;
8917
+ }
8918
+ if (action.type === "seek-due-to-shift") {
8817
8919
  lastSeek.current = seek({
8818
- mediaRef: mediaRef.current,
8819
- time: shouldBeTime,
8920
+ mediaRef: current,
8921
+ time: action.shouldBeTime,
8820
8922
  logLevel,
8821
- why: `because time shift is too big. shouldBeTime = ${shouldBeTime}, isTime = ${mediaTagTime}, requestVideoCallbackTime = ${rvcTime}, timeShift = ${timeShift}${isVariableFpsVideo ? ", isVariableFpsVideo = true" : ""}, isPremounting = ${isPremounting}, isPostmounting = ${isPostmounting}, pauseWhenBuffering = ${pauseWhenBuffering}`,
8923
+ why: action.why,
8822
8924
  mountTime
8823
8925
  });
8824
8926
  lastSeekDueToShift.current = lastSeek.current;
8825
- if (playing) {
8826
- if (playbackRate > 0) {
8827
- bufferUntilFirstFrame(shouldBeTime);
8828
- }
8829
- if (mediaRef.current.paused) {
8830
- playAndHandleNotAllowedError({
8831
- mediaRef,
8832
- mediaType,
8833
- onAutoPlayError,
8834
- logLevel,
8835
- mountTime,
8836
- reason: "player is playing but media tag is paused, and just seeked",
8837
- isPlayer: env.isPlayer
8838
- });
8839
- }
8927
+ if (action.bufferUntilFirstFrame) {
8928
+ bufferUntilFirstFrame(action.shouldBeTime);
8840
8929
  }
8841
- if (!onlyWarnForMediaSeekingError) {
8842
- warnAboutNonSeekableMedia(mediaRef.current, onlyWarnForMediaSeekingError ? "console-warning" : "console-error");
8843
- }
8844
- return;
8845
- }
8846
- const seekThreshold = playing ? 0.15 : 0.01;
8847
- const makesSenseToSeek = Math.abs(mediaRef.current.currentTime - shouldBeTime) > seekThreshold;
8848
- const isMediaTagBufferingOrStalled = isMediaTagBuffering || isBuffering();
8849
- const isSomethingElseBuffering = buffering.buffering.current && !isMediaTagBufferingOrStalled;
8850
- if (!playing || isSomethingElseBuffering) {
8851
- if (makesSenseToSeek) {
8852
- lastSeek.current = seek({
8853
- mediaRef: mediaRef.current,
8854
- time: shouldBeTime,
8930
+ if (action.playReason !== null) {
8931
+ playAndHandleNotAllowedError({
8932
+ mediaRef,
8933
+ mediaType,
8934
+ onAutoPlayError,
8855
8935
  logLevel,
8856
- why: `not playing or something else is buffering. time offset is over seek threshold (${seekThreshold})`,
8857
- mountTime
8936
+ mountTime,
8937
+ reason: action.playReason,
8938
+ isPlayer: env.isPlayer
8858
8939
  });
8859
8940
  }
8941
+ if (action.warnAboutNonSeekable) {
8942
+ warnAboutNonSeekableMedia(current, "console-error");
8943
+ }
8860
8944
  return;
8861
8945
  }
8862
- if (!playing || buffering.buffering.current) {
8863
- return;
8864
- }
8865
- const pausedCondition = mediaRef.current.paused && !mediaRef.current.ended;
8866
- const firstFrameCondition = absoluteFrame === 0;
8867
- if (pausedCondition || firstFrameCondition) {
8868
- const reason = pausedCondition ? "media tag is paused" : "absolute frame is 0";
8869
- if (makesSenseToSeek) {
8946
+ if (action.type === "seek-if-not-playing") {
8947
+ if (action.why !== null) {
8870
8948
  lastSeek.current = seek({
8871
- mediaRef: mediaRef.current,
8872
- time: shouldBeTime,
8949
+ mediaRef: current,
8950
+ time: action.shouldBeTime,
8873
8951
  logLevel,
8874
- why: `is over timeshift threshold (threshold = ${seekThreshold}) and ${reason}`,
8952
+ why: action.why,
8875
8953
  mountTime
8876
8954
  });
8877
8955
  }
8878
- playAndHandleNotAllowedError({
8879
- mediaRef,
8880
- mediaType,
8881
- onAutoPlayError,
8956
+ return;
8957
+ }
8958
+ if (action.why !== null) {
8959
+ lastSeek.current = seek({
8960
+ mediaRef: current,
8961
+ time: action.shouldBeTime,
8882
8962
  logLevel,
8883
- mountTime,
8884
- reason: `player is playing and ${reason}`,
8885
- isPlayer: env.isPlayer
8963
+ why: action.why,
8964
+ mountTime
8886
8965
  });
8887
- if (!isVariableFpsVideo && playbackRate > 0) {
8888
- bufferUntilFirstFrame(shouldBeTime);
8889
- }
8966
+ }
8967
+ playAndHandleNotAllowedError({
8968
+ mediaRef,
8969
+ mediaType,
8970
+ onAutoPlayError,
8971
+ logLevel,
8972
+ mountTime,
8973
+ reason: action.playReason,
8974
+ isPlayer: env.isPlayer
8975
+ });
8976
+ if (action.bufferUntilFirstFrame) {
8977
+ bufferUntilFirstFrame(action.shouldBeTime);
8890
8978
  }
8891
8979
  }, [
8892
8980
  absoluteFrame,
@@ -10119,13 +10207,18 @@ var CanvasImageContent = forwardRef10(({
10119
10207
  });
10120
10208
  const sequenceContext = useContext32(SequenceContext);
10121
10209
  const pendingLoadDelayRef = useRef23(null);
10122
- const continuePendingLoadDelay = useCallback17(() => {
10210
+ const [isLoadPending, setIsLoadPending] = useState16(false);
10211
+ const isPremounting = Boolean(sequenceContext?.premounting);
10212
+ const isPostmounting = Boolean(sequenceContext?.postmounting);
10213
+ const continuePendingLoadDelay = useCallback17(({ markAsReady }) => {
10123
10214
  const pending = pendingLoadDelayRef.current;
10124
10215
  if (!pending || pending.continued) {
10125
10216
  return;
10126
10217
  }
10127
10218
  pending.continued = true;
10128
- pending.unblock();
10219
+ if (markAsReady) {
10220
+ setIsLoadPending(false);
10221
+ }
10129
10222
  continueRender2(pending.handle);
10130
10223
  pendingLoadDelayRef.current = null;
10131
10224
  }, [continueRender2]);
@@ -10147,23 +10240,30 @@ var CanvasImageContent = forwardRef10(({
10147
10240
  }
10148
10241
  }, [ref, refForOutline]);
10149
10242
  useLayoutEffect10(() => {
10150
- const isPremounting = Boolean(sequenceContext?.premounting);
10151
- const isPostmounting = Boolean(sequenceContext?.postmounting);
10243
+ if (!pauseWhenLoading || !isLoadPending || isPremounting || isPostmounting) {
10244
+ return;
10245
+ }
10246
+ return delayPlayback().unblock;
10247
+ }, [
10248
+ delayPlayback,
10249
+ isLoadPending,
10250
+ isPostmounting,
10251
+ isPremounting,
10252
+ pauseWhenLoading
10253
+ ]);
10254
+ useLayoutEffect10(() => {
10152
10255
  const handle = delayRender2(`Rendering <CanvasImage> with src="${truncateSrcForLabel(actualSrc)}"`, {
10153
10256
  retries: delayRenderRetries ?? undefined,
10154
10257
  timeoutInMilliseconds: delayRenderTimeoutInMilliseconds ?? undefined
10155
10258
  });
10156
- const unblock = pauseWhenLoading && !isPremounting && !isPostmounting ? delayPlayback().unblock : () => {
10157
- return;
10158
- };
10159
10259
  const controller = new AbortController;
10160
10260
  let cancelled = false;
10161
10261
  let errorCount = 0;
10162
10262
  let timeoutId = null;
10163
10263
  setLoadedImage(null);
10264
+ setIsLoadPending(true);
10164
10265
  pendingLoadDelayRef.current = {
10165
10266
  handle,
10166
- unblock,
10167
10267
  continued: false
10168
10268
  };
10169
10269
  const attemptLoad = () => {
@@ -10174,7 +10274,7 @@ var CanvasImageContent = forwardRef10(({
10174
10274
  setLoadedImage(image);
10175
10275
  }).catch((err) => {
10176
10276
  if (err.name === "AbortError") {
10177
- continuePendingLoadDelay();
10277
+ continuePendingLoadDelay({ markAsReady: false });
10178
10278
  return;
10179
10279
  }
10180
10280
  errorCount++;
@@ -10188,7 +10288,7 @@ var CanvasImageContent = forwardRef10(({
10188
10288
  }, backoff);
10189
10289
  } else if (onError) {
10190
10290
  onError(err);
10191
- continuePendingLoadDelay();
10291
+ continuePendingLoadDelay({ markAsReady: true });
10192
10292
  } else {
10193
10293
  cancelRender2(err);
10194
10294
  }
@@ -10201,21 +10301,17 @@ var CanvasImageContent = forwardRef10(({
10201
10301
  clearTimeout(timeoutId);
10202
10302
  }
10203
10303
  controller.abort();
10204
- continuePendingLoadDelay();
10304
+ continuePendingLoadDelay({ markAsReady: false });
10205
10305
  };
10206
10306
  }, [
10207
10307
  actualSrc,
10208
10308
  cancelRender2,
10209
10309
  continuePendingLoadDelay,
10210
- delayPlayback,
10211
10310
  delayRender2,
10212
10311
  delayRenderRetries,
10213
10312
  delayRenderTimeoutInMilliseconds,
10214
10313
  maxRetries,
10215
- onError,
10216
- pauseWhenLoading,
10217
- sequenceContext?.postmounting,
10218
- sequenceContext?.premounting
10314
+ onError
10219
10315
  ]);
10220
10316
  useLayoutEffect10(() => {
10221
10317
  if (!loadedImage || !outputCanvas || !sourceCanvas) {
@@ -10267,7 +10363,7 @@ var CanvasImageContent = forwardRef10(({
10267
10363
  return;
10268
10364
  }
10269
10365
  continueRenderOnce();
10270
- continuePendingLoadDelay();
10366
+ continuePendingLoadDelay({ markAsReady: true });
10271
10367
  }
10272
10368
  });
10273
10369
  }
@@ -10278,7 +10374,7 @@ var CanvasImageContent = forwardRef10(({
10278
10374
  if (onError) {
10279
10375
  onError(err);
10280
10376
  continueRenderOnce();
10281
- continuePendingLoadDelay();
10377
+ continuePendingLoadDelay({ markAsReady: true });
10282
10378
  } else {
10283
10379
  cancelRender2(err);
10284
10380
  }
@@ -10449,6 +10545,7 @@ var ImgContent = ({
10449
10545
  const errors = useRef24({});
10450
10546
  const { delayPlayback } = useBufferState();
10451
10547
  const sequenceContext = useContext33(SequenceContext);
10548
+ const [isLoading, setIsLoading] = useState18(false);
10452
10549
  const _propsValid = true;
10453
10550
  if (!_propsValid) {
10454
10551
  throw new Error("typecheck error");
@@ -10481,6 +10578,8 @@ var ImgContent = ({
10481
10578
  }, timeout);
10482
10579
  }, []);
10483
10580
  const { delayRender: delayRender2, continueRender: continueRender2, cancelRender: cancelRender2 } = useDelayRender();
10581
+ const isPremounting = Boolean(sequenceContext?.premounting);
10582
+ const isPostmounting = Boolean(sequenceContext?.postmounting);
10484
10583
  const didGetError = useCallback19((e) => {
10485
10584
  if (!errors.current) {
10486
10585
  return;
@@ -10501,8 +10600,18 @@ var ImgContent = ({
10501
10600
  } catch {}
10502
10601
  }, [cancelRender2, maxRetries, onError, retryIn]);
10503
10602
  if (typeof window !== "undefined") {
10504
- const isPremounting = Boolean(sequenceContext?.premounting);
10505
- const isPostmounting = Boolean(sequenceContext?.postmounting);
10603
+ useLayoutEffect11(() => {
10604
+ if (!pauseWhenLoading || !isLoading || isPremounting || isPostmounting) {
10605
+ return;
10606
+ }
10607
+ return delayPlayback().unblock;
10608
+ }, [
10609
+ delayPlayback,
10610
+ isLoading,
10611
+ isPostmounting,
10612
+ isPremounting,
10613
+ pauseWhenLoading
10614
+ ]);
10506
10615
  useLayoutEffect11(() => {
10507
10616
  if (window.process?.env?.NODE_ENV === "test") {
10508
10617
  if (imageRef.current) {
@@ -10514,13 +10623,11 @@ var ImgContent = ({
10514
10623
  if (!current) {
10515
10624
  return;
10516
10625
  }
10626
+ setIsLoading(true);
10517
10627
  const newHandle = delayRender2("Loading <Img> with src=" + truncateSrcForLabel(actualSrc), {
10518
10628
  retries: delayRenderRetries ?? undefined,
10519
10629
  timeoutInMilliseconds: delayRenderTimeoutInMilliseconds ?? undefined
10520
10630
  });
10521
- const unblock = pauseWhenLoading && !isPremounting && !isPostmounting ? delayPlayback().unblock : () => {
10522
- return;
10523
- };
10524
10631
  let unmounted = false;
10525
10632
  const onComplete = () => {
10526
10633
  if (unmounted) {
@@ -10534,7 +10641,7 @@ var ImgContent = ({
10534
10641
  if (current) {
10535
10642
  onImageFrame?.(current);
10536
10643
  }
10537
- unblock();
10644
+ setIsLoading(false);
10538
10645
  continueRender2(newHandle);
10539
10646
  };
10540
10647
  if (!imageRef.current) {
@@ -10553,17 +10660,12 @@ var ImgContent = ({
10553
10660
  return () => {
10554
10661
  unmounted = true;
10555
10662
  current.removeEventListener("load", onComplete);
10556
- unblock();
10557
10663
  continueRender2(newHandle);
10558
10664
  };
10559
10665
  }, [
10560
10666
  actualSrc,
10561
- delayPlayback,
10562
10667
  delayRenderRetries,
10563
10668
  delayRenderTimeoutInMilliseconds,
10564
- pauseWhenLoading,
10565
- isPremounting,
10566
- isPostmounting,
10567
10669
  onImageFrame,
10568
10670
  continueRender2,
10569
10671
  delayRender2
@@ -10881,9 +10983,9 @@ var CompositionManagerProvider = ({
10881
10983
  initialCompositions,
10882
10984
  initialCanvasContent
10883
10985
  }) => {
10884
- const [folders, setFolders] = useState18([]);
10885
- const [canvasContent, setCanvasContent] = useState18(initialCanvasContent);
10886
- const [compositions, setCompositions] = useState18(initialCompositions);
10986
+ const [folders, setFolders] = useState19([]);
10987
+ const [canvasContent, setCanvasContent] = useState19(initialCanvasContent);
10988
+ const [compositions, setCompositions] = useState19(initialCompositions);
10887
10989
  const currentcompositionsRef = useRef26(compositions);
10888
10990
  const updateCompositions = useCallback21((updateComps) => {
10889
10991
  setCompositions((comps) => {
@@ -11454,7 +11556,7 @@ var OffthreadVideoForRendering = ({
11454
11556
  toneMapped
11455
11557
  });
11456
11558
  }, [toneMapped, currentTime, src, transparent]);
11457
- const [imageSrc, setImageSrc] = useState19(null);
11559
+ const [imageSrc, setImageSrc] = useState20(null);
11458
11560
  const { delayRender: delayRender2, continueRender: continueRender2 } = useDelayRender();
11459
11561
  useLayoutEffect12(() => {
11460
11562
  if (!window.remotion_videoEnabled) {
@@ -11658,7 +11760,7 @@ var VideoForDevelopmentRefForwardingFunction = (props2, ref) => {
11658
11760
  const parentSequence = useContext37(SequenceContext);
11659
11761
  const logLevel = useLogLevel();
11660
11762
  const mountTime = useMountTime();
11661
- const [timelineId] = useState20(() => String(Math.random()));
11763
+ const [timelineId] = useState21(() => String(Math.random()));
11662
11764
  if (typeof acceptableTimeShift !== "undefined") {
11663
11765
  throw new Error("acceptableTimeShift has been removed. Use acceptableTimeShiftInSeconds instead.");
11664
11766
  }
@@ -11729,7 +11831,7 @@ var VideoForDevelopmentRefForwardingFunction = (props2, ref) => {
11729
11831
  useImperativeHandle9(ref, () => {
11730
11832
  return videoRef.current;
11731
11833
  }, []);
11732
- useState20(() => playbackLogging({
11834
+ useState21(() => playbackLogging({
11733
11835
  logLevel,
11734
11836
  message: `Mounting video with source = ${actualSrc}, v=${VERSION}, user agent=${typeof navigator === "undefined" ? "server" : navigator.userAgent}`,
11735
11837
  tag: "video",
@@ -12410,6 +12512,15 @@ var staticFile = (path) => {
12410
12512
  }
12411
12513
  return preparsed;
12412
12514
  };
12515
+ var Still = (props2) => {
12516
+ const newProps = {
12517
+ ...props2,
12518
+ durationInFrames: 1,
12519
+ fps: 1
12520
+ };
12521
+ return React42.createElement(Composition, newProps);
12522
+ };
12523
+ addSequenceStackTraces(Still);
12413
12524
  var roundTo6Commas = (num) => {
12414
12525
  return Math.round(num * 1e5) / 1e5;
12415
12526
  };