@remotion/promo-pages 4.0.485 → 4.0.487

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/experts.js CHANGED
@@ -1091,8 +1091,8 @@ import {
1091
1091
  forwardRef as forwardRef10,
1092
1092
  useCallback as useCallback17,
1093
1093
  useContext as useContext32,
1094
- useEffect as useEffect17,
1095
1094
  useImperativeHandle as useImperativeHandle7,
1095
+ useLayoutEffect as useLayoutEffect10,
1096
1096
  useMemo as useMemo31,
1097
1097
  useRef as useRef23,
1098
1098
  useState as useState16
@@ -1100,7 +1100,7 @@ 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 useLayoutEffect10, useRef as useRef24 } from "react";
1103
+ import { useCallback as useCallback19, useContext as useContext33, useLayoutEffect as useLayoutEffect11, useRef as useRef24 } from "react";
1104
1104
  import { jsx as jsx28 } from "react/jsx-runtime";
1105
1105
  import React29, { forwardRef as forwardRef12, useCallback as useCallback20, useRef as useRef25 } from "react";
1106
1106
  import { jsx as jsx29 } from "react/jsx-runtime";
@@ -1126,8 +1126,8 @@ import { useCallback as useCallback24 } from "react";
1126
1126
  import {
1127
1127
  useCallback as useCallback22,
1128
1128
  useContext as useContext36,
1129
- useEffect as useEffect18,
1130
- useLayoutEffect as useLayoutEffect11,
1129
+ useEffect as useEffect17,
1130
+ useLayoutEffect as useLayoutEffect12,
1131
1131
  useMemo as useMemo35,
1132
1132
  useState as useState19
1133
1133
  } from "react";
@@ -1136,13 +1136,13 @@ import React37, {
1136
1136
  forwardRef as forwardRef13,
1137
1137
  useCallback as useCallback23,
1138
1138
  useContext as useContext37,
1139
- useEffect as useEffect20,
1139
+ useEffect as useEffect19,
1140
1140
  useImperativeHandle as useImperativeHandle9,
1141
1141
  useMemo as useMemo36,
1142
1142
  useRef as useRef27,
1143
1143
  useState as useState20
1144
1144
  } from "react";
1145
- import { useEffect as useEffect19 } from "react";
1145
+ import { useEffect as useEffect18 } from "react";
1146
1146
  import { jsx as jsx34 } from "react/jsx-runtime";
1147
1147
  import { jsx as jsx35 } from "react/jsx-runtime";
1148
1148
  import React39, { useMemo as useMemo37 } from "react";
@@ -1159,9 +1159,9 @@ import { forwardRef as forwardRef16, useCallback as useCallback25, useContext as
1159
1159
  import {
1160
1160
  forwardRef as forwardRef15,
1161
1161
  useContext as useContext38,
1162
- useEffect as useEffect21,
1162
+ useEffect as useEffect20,
1163
1163
  useImperativeHandle as useImperativeHandle10,
1164
- useLayoutEffect as useLayoutEffect12,
1164
+ useLayoutEffect as useLayoutEffect13,
1165
1165
  useMemo as useMemo39,
1166
1166
  useRef as useRef28
1167
1167
  } from "react";
@@ -2335,7 +2335,7 @@ var getComponentsToAddStacksTo = () => componentsToAddStacksTo;
2335
2335
  var addSequenceStackTraces = (component) => {
2336
2336
  componentsToAddStacksTo.push(component);
2337
2337
  };
2338
- var VERSION = "4.0.485";
2338
+ var VERSION = "4.0.487";
2339
2339
  var checkMultipleRemotionVersions = () => {
2340
2340
  if (typeof globalThis === "undefined") {
2341
2341
  return;
@@ -2741,6 +2741,12 @@ var textSchema = {
2741
2741
  default: undefined,
2742
2742
  description: "Color"
2743
2743
  },
2744
+ "style.fontFamily": {
2745
+ type: "font-family",
2746
+ default: undefined,
2747
+ description: "Font family",
2748
+ keyframable: false
2749
+ },
2744
2750
  "style.fontSize": {
2745
2751
  type: "number",
2746
2752
  default: undefined,
@@ -8199,7 +8205,8 @@ var useBufferManager = (logLevel, mountTime) => {
8199
8205
  if (rendering) {
8200
8206
  return;
8201
8207
  }
8202
- if (blocks.length > 0) {
8208
+ if (blocks.length > 0 && !buffering.current) {
8209
+ buffering.current = true;
8203
8210
  onBufferingCallbacks.forEach((c2) => c2());
8204
8211
  playbackLogging({
8205
8212
  logLevel,
@@ -8214,7 +8221,8 @@ var useBufferManager = (logLevel, mountTime) => {
8214
8221
  if (rendering) {
8215
8222
  return;
8216
8223
  }
8217
- if (blocks.length === 0) {
8224
+ if (blocks.length === 0 && buffering.current) {
8225
+ buffering.current = false;
8218
8226
  onResumeCallbacks.forEach((c2) => c2());
8219
8227
  playbackLogging({
8220
8228
  logLevel,
@@ -8247,15 +8255,11 @@ var useIsPlayerBuffering = (bufferManager) => {
8247
8255
  const onResume = () => {
8248
8256
  setIsBuffering(false);
8249
8257
  };
8250
- bufferManager.listenForBuffering(onBuffer);
8251
- bufferManager.listenForResume(onResume);
8258
+ const buffer = bufferManager.listenForBuffering(onBuffer);
8259
+ const resume = bufferManager.listenForResume(onResume);
8252
8260
  return () => {
8253
- bufferManager.listenForBuffering(() => {
8254
- return;
8255
- });
8256
- bufferManager.listenForResume(() => {
8257
- return;
8258
- });
8261
+ buffer.remove();
8262
+ resume.remove();
8259
8263
  };
8260
8264
  }, [bufferManager]);
8261
8265
  return isBuffering;
@@ -8379,6 +8383,72 @@ var useBufferUntilFirstFrame = ({
8379
8383
  };
8380
8384
  }, [bufferUntilFirstFrame]);
8381
8385
  };
8386
+ var getMediaSyncAction = (input) => {
8387
+ const {
8388
+ duration,
8389
+ currentTime,
8390
+ paused,
8391
+ ended,
8392
+ desiredUnclampedTime,
8393
+ mediaTagTime,
8394
+ mediaTagLastUpdate,
8395
+ rvcTime,
8396
+ rvcLastUpdate,
8397
+ isVariableFpsVideo,
8398
+ acceptableTimeShift,
8399
+ lastSeekDueToShift,
8400
+ playing,
8401
+ playbackRate,
8402
+ mediaTagBufferingOrStalled,
8403
+ playerBuffering,
8404
+ absoluteFrame,
8405
+ onlyWarnForMediaSeekingError,
8406
+ isPremounting,
8407
+ isPostmounting,
8408
+ pauseWhenBuffering
8409
+ } = input;
8410
+ const shouldBeTime = !Number.isNaN(duration) && Number.isFinite(duration) ? Math.min(duration, desiredUnclampedTime) : desiredUnclampedTime;
8411
+ const timeShiftMediaTag = Math.abs(shouldBeTime - mediaTagTime);
8412
+ const timeShiftRvcTag = rvcTime ? Math.abs(shouldBeTime - rvcTime) : null;
8413
+ const mostRecentTimeshift = rvcLastUpdate && rvcTime > mediaTagLastUpdate ? timeShiftRvcTag : timeShiftMediaTag;
8414
+ const timeShift = timeShiftRvcTag && !isVariableFpsVideo ? mostRecentTimeshift : timeShiftMediaTag;
8415
+ if (timeShift > acceptableTimeShift && lastSeekDueToShift !== shouldBeTime) {
8416
+ return {
8417
+ type: "seek-due-to-shift",
8418
+ shouldBeTime,
8419
+ why: `because time shift is too big. shouldBeTime = ${shouldBeTime}, isTime = ${mediaTagTime}, requestVideoCallbackTime = ${rvcTime}, timeShift = ${timeShift}${isVariableFpsVideo ? ", isVariableFpsVideo = true" : ""}, isPremounting = ${isPremounting}, isPostmounting = ${isPostmounting}, pauseWhenBuffering = ${pauseWhenBuffering}`,
8420
+ bufferUntilFirstFrame: playing && playbackRate > 0,
8421
+ playReason: playing && paused ? "player is playing but media tag is paused, and just seeked" : null,
8422
+ warnAboutNonSeekable: !onlyWarnForMediaSeekingError
8423
+ };
8424
+ }
8425
+ const seekThreshold = playing ? 0.15 : 0.01;
8426
+ const makesSenseToSeek = Math.abs(currentTime - shouldBeTime) > seekThreshold;
8427
+ const isSomethingElseBuffering = playerBuffering && !mediaTagBufferingOrStalled;
8428
+ if (!playing || isSomethingElseBuffering) {
8429
+ return {
8430
+ type: "seek-if-not-playing",
8431
+ shouldBeTime,
8432
+ why: makesSenseToSeek ? `not playing or something else is buffering. time offset is over seek threshold (${seekThreshold})` : null
8433
+ };
8434
+ }
8435
+ if (!playing || playerBuffering) {
8436
+ return { type: "none" };
8437
+ }
8438
+ const pausedCondition = paused && !ended;
8439
+ const firstFrameCondition = absoluteFrame === 0;
8440
+ if (pausedCondition || firstFrameCondition) {
8441
+ const reason = pausedCondition ? "media tag is paused" : "absolute frame is 0";
8442
+ return {
8443
+ type: "play-and-seek",
8444
+ shouldBeTime,
8445
+ why: makesSenseToSeek ? `is over timeshift threshold (threshold = ${seekThreshold}) and ${reason}` : null,
8446
+ playReason: `player is playing and ${reason}`,
8447
+ bufferUntilFirstFrame: !isVariableFpsVideo && playbackRate > 0
8448
+ };
8449
+ }
8450
+ return { type: "none" };
8451
+ };
8382
8452
  var useCurrentTimeOfMediaTagWithUpdateTimeStamp = (mediaRef) => {
8383
8453
  const lastUpdate = React21.useRef({
8384
8454
  time: mediaRef.current?.currentTime ?? 0,
@@ -8798,89 +8868,93 @@ var useMediaPlayback = ({
8798
8868
  if (!src) {
8799
8869
  throw new Error(`No 'src' attribute was passed to the ${tagName} element.`);
8800
8870
  }
8801
- const { duration } = mediaRef.current;
8802
- const shouldBeTime = !Number.isNaN(duration) && Number.isFinite(duration) ? Math.min(duration, desiredUnclampedTime) : desiredUnclampedTime;
8803
- const mediaTagTime = mediaTagCurrentTime.current.time;
8804
- const rvcTime = rvcCurrentTime.current?.time ?? null;
8805
- const isVariableFpsVideo = isVariableFpsVideoMap.current[src];
8806
- const timeShiftMediaTag = Math.abs(shouldBeTime - mediaTagTime);
8807
- const timeShiftRvcTag = rvcTime ? Math.abs(shouldBeTime - rvcTime) : null;
8808
- const mostRecentTimeshift = rvcCurrentTime.current?.lastUpdate && rvcCurrentTime.current.time > mediaTagCurrentTime.current.lastUpdate ? timeShiftRvcTag : timeShiftMediaTag;
8809
- const timeShift = timeShiftRvcTag && !isVariableFpsVideo ? mostRecentTimeshift : timeShiftMediaTag;
8810
- if (timeShift > acceptableTimeShiftButLessThanDuration && lastSeekDueToShift.current !== shouldBeTime) {
8871
+ const { current } = mediaRef;
8872
+ const action = getMediaSyncAction({
8873
+ duration: current.duration,
8874
+ currentTime: current.currentTime,
8875
+ paused: current.paused,
8876
+ ended: current.ended,
8877
+ desiredUnclampedTime,
8878
+ mediaTagTime: mediaTagCurrentTime.current.time,
8879
+ mediaTagLastUpdate: mediaTagCurrentTime.current.lastUpdate,
8880
+ rvcTime: rvcCurrentTime.current?.time ?? null,
8881
+ rvcLastUpdate: rvcCurrentTime.current?.lastUpdate ?? null,
8882
+ isVariableFpsVideo: Boolean(isVariableFpsVideoMap.current[src]),
8883
+ acceptableTimeShift: acceptableTimeShiftButLessThanDuration,
8884
+ lastSeekDueToShift: lastSeekDueToShift.current,
8885
+ playing,
8886
+ playbackRate,
8887
+ mediaTagBufferingOrStalled: isMediaTagBuffering || isBuffering(),
8888
+ playerBuffering: buffering.buffering.current,
8889
+ absoluteFrame,
8890
+ onlyWarnForMediaSeekingError,
8891
+ isPremounting,
8892
+ isPostmounting,
8893
+ pauseWhenBuffering
8894
+ });
8895
+ if (action.type === "none") {
8896
+ return;
8897
+ }
8898
+ if (action.type === "seek-due-to-shift") {
8811
8899
  lastSeek.current = seek({
8812
- mediaRef: mediaRef.current,
8813
- time: shouldBeTime,
8900
+ mediaRef: current,
8901
+ time: action.shouldBeTime,
8814
8902
  logLevel,
8815
- why: `because time shift is too big. shouldBeTime = ${shouldBeTime}, isTime = ${mediaTagTime}, requestVideoCallbackTime = ${rvcTime}, timeShift = ${timeShift}${isVariableFpsVideo ? ", isVariableFpsVideo = true" : ""}, isPremounting = ${isPremounting}, isPostmounting = ${isPostmounting}, pauseWhenBuffering = ${pauseWhenBuffering}`,
8903
+ why: action.why,
8816
8904
  mountTime
8817
8905
  });
8818
8906
  lastSeekDueToShift.current = lastSeek.current;
8819
- if (playing) {
8820
- if (playbackRate > 0) {
8821
- bufferUntilFirstFrame(shouldBeTime);
8822
- }
8823
- if (mediaRef.current.paused) {
8824
- playAndHandleNotAllowedError({
8825
- mediaRef,
8826
- mediaType,
8827
- onAutoPlayError,
8828
- logLevel,
8829
- mountTime,
8830
- reason: "player is playing but media tag is paused, and just seeked",
8831
- isPlayer: env.isPlayer
8832
- });
8833
- }
8907
+ if (action.bufferUntilFirstFrame) {
8908
+ bufferUntilFirstFrame(action.shouldBeTime);
8834
8909
  }
8835
- if (!onlyWarnForMediaSeekingError) {
8836
- warnAboutNonSeekableMedia(mediaRef.current, onlyWarnForMediaSeekingError ? "console-warning" : "console-error");
8837
- }
8838
- return;
8839
- }
8840
- const seekThreshold = playing ? 0.15 : 0.01;
8841
- const makesSenseToSeek = Math.abs(mediaRef.current.currentTime - shouldBeTime) > seekThreshold;
8842
- const isMediaTagBufferingOrStalled = isMediaTagBuffering || isBuffering();
8843
- const isSomethingElseBuffering = buffering.buffering.current && !isMediaTagBufferingOrStalled;
8844
- if (!playing || isSomethingElseBuffering) {
8845
- if (makesSenseToSeek) {
8846
- lastSeek.current = seek({
8847
- mediaRef: mediaRef.current,
8848
- time: shouldBeTime,
8910
+ if (action.playReason !== null) {
8911
+ playAndHandleNotAllowedError({
8912
+ mediaRef,
8913
+ mediaType,
8914
+ onAutoPlayError,
8849
8915
  logLevel,
8850
- why: `not playing or something else is buffering. time offset is over seek threshold (${seekThreshold})`,
8851
- mountTime
8916
+ mountTime,
8917
+ reason: action.playReason,
8918
+ isPlayer: env.isPlayer
8852
8919
  });
8853
8920
  }
8921
+ if (action.warnAboutNonSeekable) {
8922
+ warnAboutNonSeekableMedia(current, "console-error");
8923
+ }
8854
8924
  return;
8855
8925
  }
8856
- if (!playing || buffering.buffering.current) {
8857
- return;
8858
- }
8859
- const pausedCondition = mediaRef.current.paused && !mediaRef.current.ended;
8860
- const firstFrameCondition = absoluteFrame === 0;
8861
- if (pausedCondition || firstFrameCondition) {
8862
- const reason = pausedCondition ? "media tag is paused" : "absolute frame is 0";
8863
- if (makesSenseToSeek) {
8926
+ if (action.type === "seek-if-not-playing") {
8927
+ if (action.why !== null) {
8864
8928
  lastSeek.current = seek({
8865
- mediaRef: mediaRef.current,
8866
- time: shouldBeTime,
8929
+ mediaRef: current,
8930
+ time: action.shouldBeTime,
8867
8931
  logLevel,
8868
- why: `is over timeshift threshold (threshold = ${seekThreshold}) and ${reason}`,
8932
+ why: action.why,
8869
8933
  mountTime
8870
8934
  });
8871
8935
  }
8872
- playAndHandleNotAllowedError({
8873
- mediaRef,
8874
- mediaType,
8875
- onAutoPlayError,
8936
+ return;
8937
+ }
8938
+ if (action.why !== null) {
8939
+ lastSeek.current = seek({
8940
+ mediaRef: current,
8941
+ time: action.shouldBeTime,
8876
8942
  logLevel,
8877
- mountTime,
8878
- reason: `player is playing and ${reason}`,
8879
- isPlayer: env.isPlayer
8943
+ why: action.why,
8944
+ mountTime
8880
8945
  });
8881
- if (!isVariableFpsVideo && playbackRate > 0) {
8882
- bufferUntilFirstFrame(shouldBeTime);
8883
- }
8946
+ }
8947
+ playAndHandleNotAllowedError({
8948
+ mediaRef,
8949
+ mediaType,
8950
+ onAutoPlayError,
8951
+ logLevel,
8952
+ mountTime,
8953
+ reason: action.playReason,
8954
+ isPlayer: env.isPlayer
8955
+ });
8956
+ if (action.bufferUntilFirstFrame) {
8957
+ bufferUntilFirstFrame(action.shouldBeTime);
8884
8958
  }
8885
8959
  }, [
8886
8960
  absoluteFrame,
@@ -10071,6 +10145,18 @@ var loadImage = ({
10071
10145
  function exponentialBackoff(errorCount) {
10072
10146
  return 1000 * 2 ** (errorCount - 1);
10073
10147
  }
10148
+ var waitForNextFrame = ({
10149
+ onFrame
10150
+ }) => {
10151
+ if (typeof requestAnimationFrame === "undefined") {
10152
+ onFrame();
10153
+ return () => {
10154
+ return;
10155
+ };
10156
+ }
10157
+ const frame = requestAnimationFrame(onFrame);
10158
+ return () => cancelAnimationFrame(frame);
10159
+ };
10074
10160
  var CanvasImageContent = forwardRef10(({
10075
10161
  src,
10076
10162
  width,
@@ -10100,6 +10186,17 @@ var CanvasImageContent = forwardRef10(({
10100
10186
  overrideId: controls?.overrideId ?? null
10101
10187
  });
10102
10188
  const sequenceContext = useContext32(SequenceContext);
10189
+ const pendingLoadDelayRef = useRef23(null);
10190
+ const continuePendingLoadDelay = useCallback17(() => {
10191
+ const pending = pendingLoadDelayRef.current;
10192
+ if (!pending || pending.continued) {
10193
+ return;
10194
+ }
10195
+ pending.continued = true;
10196
+ pending.unblock();
10197
+ continueRender2(pending.handle);
10198
+ pendingLoadDelayRef.current = null;
10199
+ }, [continueRender2]);
10103
10200
  const sourceCanvas = useMemo31(() => {
10104
10201
  if (typeof document === "undefined") {
10105
10202
  return null;
@@ -10117,7 +10214,7 @@ var CanvasImageContent = forwardRef10(({
10117
10214
  ref.current = canvas;
10118
10215
  }
10119
10216
  }, [ref, refForOutline]);
10120
- useEffect17(() => {
10217
+ useLayoutEffect10(() => {
10121
10218
  const isPremounting = Boolean(sequenceContext?.premounting);
10122
10219
  const isPostmounting = Boolean(sequenceContext?.postmounting);
10123
10220
  const handle = delayRender2(`Rendering <CanvasImage> with src="${truncateSrcForLabel(actualSrc)}"`, {
@@ -10129,17 +10226,13 @@ var CanvasImageContent = forwardRef10(({
10129
10226
  };
10130
10227
  const controller = new AbortController;
10131
10228
  let cancelled = false;
10132
- let continued = false;
10133
10229
  let errorCount = 0;
10134
10230
  let timeoutId = null;
10135
10231
  setLoadedImage(null);
10136
- const continueRenderOnce = () => {
10137
- if (continued) {
10138
- return;
10139
- }
10140
- continued = true;
10141
- unblock();
10142
- continueRender2(handle);
10232
+ pendingLoadDelayRef.current = {
10233
+ handle,
10234
+ unblock,
10235
+ continued: false
10143
10236
  };
10144
10237
  const attemptLoad = () => {
10145
10238
  loadImage({ src: actualSrc, signal: controller.signal }).then((image) => {
@@ -10147,13 +10240,9 @@ var CanvasImageContent = forwardRef10(({
10147
10240
  return;
10148
10241
  }
10149
10242
  setLoadedImage(image);
10150
- }).then(() => {
10151
- if (!cancelled) {
10152
- continueRenderOnce();
10153
- }
10154
10243
  }).catch((err) => {
10155
10244
  if (err.name === "AbortError") {
10156
- continueRenderOnce();
10245
+ continuePendingLoadDelay();
10157
10246
  return;
10158
10247
  }
10159
10248
  errorCount++;
@@ -10167,7 +10256,7 @@ var CanvasImageContent = forwardRef10(({
10167
10256
  }, backoff);
10168
10257
  } else if (onError) {
10169
10258
  onError(err);
10170
- continueRenderOnce();
10259
+ continuePendingLoadDelay();
10171
10260
  } else {
10172
10261
  cancelRender2(err);
10173
10262
  }
@@ -10180,12 +10269,12 @@ var CanvasImageContent = forwardRef10(({
10180
10269
  clearTimeout(timeoutId);
10181
10270
  }
10182
10271
  controller.abort();
10183
- continueRenderOnce();
10272
+ continuePendingLoadDelay();
10184
10273
  };
10185
10274
  }, [
10186
10275
  actualSrc,
10187
10276
  cancelRender2,
10188
- continueRender2,
10277
+ continuePendingLoadDelay,
10189
10278
  delayPlayback,
10190
10279
  delayRender2,
10191
10280
  delayRenderRetries,
@@ -10196,13 +10285,16 @@ var CanvasImageContent = forwardRef10(({
10196
10285
  sequenceContext?.postmounting,
10197
10286
  sequenceContext?.premounting
10198
10287
  ]);
10199
- useEffect17(() => {
10288
+ useLayoutEffect10(() => {
10200
10289
  if (!loadedImage || !outputCanvas || !sourceCanvas) {
10201
10290
  return;
10202
10291
  }
10203
10292
  const handle = delayRender2(`Applying effects to <CanvasImage> with src="${truncateSrcForLabel(actualSrc)}"`);
10204
10293
  let cancelled = false;
10205
10294
  let continued = false;
10295
+ let cancelWaitForNextFrame = () => {
10296
+ return;
10297
+ };
10206
10298
  const continueRenderOnce = () => {
10207
10299
  if (continued) {
10208
10300
  return;
@@ -10237,7 +10329,15 @@ var CanvasImageContent = forwardRef10(({
10237
10329
  height: canvasHeight
10238
10330
  }).then((completed) => {
10239
10331
  if (completed && !cancelled) {
10240
- continueRenderOnce();
10332
+ cancelWaitForNextFrame = waitForNextFrame({
10333
+ onFrame: () => {
10334
+ if (cancelled) {
10335
+ return;
10336
+ }
10337
+ continueRenderOnce();
10338
+ continuePendingLoadDelay();
10339
+ }
10340
+ });
10241
10341
  }
10242
10342
  }).catch((err) => {
10243
10343
  if (cancelled) {
@@ -10246,12 +10346,14 @@ var CanvasImageContent = forwardRef10(({
10246
10346
  if (onError) {
10247
10347
  onError(err);
10248
10348
  continueRenderOnce();
10349
+ continuePendingLoadDelay();
10249
10350
  } else {
10250
10351
  cancelRender2(err);
10251
10352
  }
10252
10353
  });
10253
10354
  return () => {
10254
10355
  cancelled = true;
10356
+ cancelWaitForNextFrame();
10255
10357
  continueRenderOnce();
10256
10358
  };
10257
10359
  }, [
@@ -10259,6 +10361,7 @@ var CanvasImageContent = forwardRef10(({
10259
10361
  cancelRender2,
10260
10362
  chainState,
10261
10363
  continueRender2,
10364
+ continuePendingLoadDelay,
10262
10365
  delayRender2,
10263
10366
  fit,
10264
10367
  height,
@@ -10468,7 +10571,7 @@ var ImgContent = ({
10468
10571
  if (typeof window !== "undefined") {
10469
10572
  const isPremounting = Boolean(sequenceContext?.premounting);
10470
10573
  const isPostmounting = Boolean(sequenceContext?.postmounting);
10471
- useLayoutEffect10(() => {
10574
+ useLayoutEffect11(() => {
10472
10575
  if (window.process?.env?.NODE_ENV === "test") {
10473
10576
  if (imageRef.current) {
10474
10577
  imageRef.current.src = actualSrc;
@@ -11364,7 +11467,7 @@ var OffthreadVideoForRendering = ({
11364
11467
  mediaVolume: 1
11365
11468
  });
11366
11469
  warnAboutTooHighVolume(volume);
11367
- useEffect18(() => {
11470
+ useEffect17(() => {
11368
11471
  if (!src) {
11369
11472
  throw new Error("No src passed");
11370
11473
  }
@@ -11421,7 +11524,7 @@ var OffthreadVideoForRendering = ({
11421
11524
  }, [toneMapped, currentTime, src, transparent]);
11422
11525
  const [imageSrc, setImageSrc] = useState19(null);
11423
11526
  const { delayRender: delayRender2, continueRender: continueRender2 } = useDelayRender();
11424
- useLayoutEffect11(() => {
11527
+ useLayoutEffect12(() => {
11425
11528
  if (!window.remotion_videoEnabled) {
11426
11529
  return;
11427
11530
  }
@@ -11525,7 +11628,7 @@ var useEmitVideoFrame = ({
11525
11628
  ref,
11526
11629
  onVideoFrame
11527
11630
  }) => {
11528
- useEffect19(() => {
11631
+ useEffect18(() => {
11529
11632
  const { current } = ref;
11530
11633
  if (!current) {
11531
11634
  return;
@@ -11700,7 +11803,7 @@ var VideoForDevelopmentRefForwardingFunction = (props2, ref) => {
11700
11803
  tag: "video",
11701
11804
  mountTime
11702
11805
  }));
11703
- useEffect20(() => {
11806
+ useEffect19(() => {
11704
11807
  const { current } = videoRef;
11705
11808
  if (!current) {
11706
11809
  return;
@@ -11743,7 +11846,7 @@ var VideoForDevelopmentRefForwardingFunction = (props2, ref) => {
11743
11846
  const currentOnDurationCallback = useRef27(onDuration);
11744
11847
  currentOnDurationCallback.current = onDuration;
11745
11848
  useEmitVideoFrame({ ref: videoRef, onVideoFrame });
11746
- useEffect20(() => {
11849
+ useEffect19(() => {
11747
11850
  const { current } = videoRef;
11748
11851
  if (!current) {
11749
11852
  return;
@@ -11760,7 +11863,7 @@ var VideoForDevelopmentRefForwardingFunction = (props2, ref) => {
11760
11863
  current.removeEventListener("loadedmetadata", onLoadedMetadata);
11761
11864
  };
11762
11865
  }, [src]);
11763
- useEffect20(() => {
11866
+ useEffect19(() => {
11764
11867
  const { current } = videoRef;
11765
11868
  if (!current) {
11766
11869
  return;
@@ -12375,6 +12478,15 @@ var staticFile = (path) => {
12375
12478
  }
12376
12479
  return preparsed;
12377
12480
  };
12481
+ var Still = (props2) => {
12482
+ const newProps = {
12483
+ ...props2,
12484
+ durationInFrames: 1,
12485
+ fps: 1
12486
+ };
12487
+ return React42.createElement(Composition, newProps);
12488
+ };
12489
+ addSequenceStackTraces(Still);
12378
12490
  var roundTo6Commas = (num) => {
12379
12491
  return Math.round(num * 1e5) / 1e5;
12380
12492
  };
@@ -12541,7 +12653,7 @@ var VideoForRenderingForwardFunction = ({
12541
12653
  mediaVolume: 1
12542
12654
  });
12543
12655
  warnAboutTooHighVolume(volume);
12544
- useEffect21(() => {
12656
+ useEffect20(() => {
12545
12657
  if (!props2.src) {
12546
12658
  throw new Error("No src passed");
12547
12659
  }
@@ -12585,7 +12697,7 @@ var VideoForRenderingForwardFunction = ({
12585
12697
  return videoRef.current;
12586
12698
  }, []);
12587
12699
  useEmitVideoFrame({ ref: videoRef, onVideoFrame });
12588
- useEffect21(() => {
12700
+ useEffect20(() => {
12589
12701
  if (!window.remotion_videoEnabled) {
12590
12702
  return;
12591
12703
  }
@@ -12675,7 +12787,7 @@ var VideoForRenderingForwardFunction = ({
12675
12787
  ]);
12676
12788
  const { src } = props2;
12677
12789
  if (environment.isRendering) {
12678
- useLayoutEffect12(() => {
12790
+ useLayoutEffect13(() => {
12679
12791
  if (window.process?.env?.NODE_ENV === "test") {
12680
12792
  return;
12681
12793
  }