@remotion/promo-pages 4.0.324 → 4.0.327

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.324 make /Users/jonathanburger/remotion/packages/promo-pages
3
+ > @remotion/promo-pages@4.0.327 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 109ms
8
+ Done in 25ms
package/dist/Homepage.js CHANGED
@@ -735,7 +735,7 @@ var __defProp2, __export2 = (target, all) => {
735
735
  });
736
736
  }, useIsPlayer = () => {
737
737
  return useContext(IsPlayerContext);
738
- }, VERSION = "4.0.324", checkMultipleRemotionVersions = () => {
738
+ }, VERSION = "4.0.327", checkMultipleRemotionVersions = () => {
739
739
  if (typeof globalThis === "undefined") {
740
740
  return;
741
741
  }
@@ -4089,6 +4089,8 @@ Check that all your Remotion packages are on the same version. If your dependenc
4089
4089
  delayRenderTimeoutInMilliseconds,
4090
4090
  toneFrequency,
4091
4091
  useWebAudioApi,
4092
+ onError,
4093
+ onNativeError,
4092
4094
  ...nativeProps
4093
4095
  } = props;
4094
4096
  const _propsValid = true;
@@ -4226,7 +4228,7 @@ Check that all your Remotion packages are on the same version. If your dependenc
4226
4228
  _remotionInternalNativeLoopPassed,
4227
4229
  acceptableTimeShiftInSeconds,
4228
4230
  name,
4229
- onError,
4231
+ onNativeError,
4230
4232
  delayRenderRetries,
4231
4233
  delayRenderTimeoutInMilliseconds,
4232
4234
  loopVolumeCurveBehavior,
@@ -4334,7 +4336,8 @@ Check that all your Remotion packages are on the same version. If your dependenc
4334
4336
  }
4335
4337
  return /* @__PURE__ */ jsx18("audio", {
4336
4338
  ref: audioRef,
4337
- ...nativeProps
4339
+ ...nativeProps,
4340
+ onError: onNativeError
4338
4341
  });
4339
4342
  }, AudioForRendering, AudioRefForwardingFunction = (props, ref) => {
4340
4343
  const audioContext = useContext24(SharedAudioContext);
@@ -4347,6 +4350,7 @@ Check that all your Remotion packages are on the same version. If your dependenc
4347
4350
  stack,
4348
4351
  pauseWhenBuffering,
4349
4352
  showInTimeline,
4353
+ onError: onRemotionError,
4350
4354
  ...otherProps
4351
4355
  } = props;
4352
4356
  const { loop, ...propsOtherThanLoop } = props;
@@ -4361,11 +4365,16 @@ Check that all your Remotion packages are on the same version. If your dependenc
4361
4365
  console.log(e.currentTarget.error);
4362
4366
  const errMessage = `Could not play audio with src ${preloadedSrc}: ${e.currentTarget.error}. See https://remotion.dev/docs/media-playback-error for help.`;
4363
4367
  if (loop) {
4368
+ if (onRemotionError) {
4369
+ onRemotionError(new Error(errMessage));
4370
+ return;
4371
+ }
4364
4372
  cancelRender(new Error(errMessage));
4365
4373
  } else {
4374
+ onRemotionError?.(new Error(errMessage));
4366
4375
  console.warn(errMessage);
4367
4376
  }
4368
- }, [loop, preloadedSrc]);
4377
+ }, [loop, onRemotionError, preloadedSrc]);
4369
4378
  const onDuration = useCallback10((src, durationInSeconds) => {
4370
4379
  setDurations({ type: "got-duration", durationInSeconds, src });
4371
4380
  }, [setDurations]);
@@ -4422,7 +4431,7 @@ Check that all your Remotion packages are on the same version. If your dependenc
4422
4431
  onDuration,
4423
4432
  ...props,
4424
4433
  ref,
4425
- onError,
4434
+ onNativeError: onError,
4426
4435
  _remotionInternalNeedsDurationCalculation: Boolean(loop)
4427
4436
  });
4428
4437
  }
@@ -4432,7 +4441,7 @@ Check that all your Remotion packages are on the same version. If your dependenc
4432
4441
  shouldPreMountAudioTags: audioContext !== null && audioContext.numberOfAudioTags > 0,
4433
4442
  ...props,
4434
4443
  ref,
4435
- onError,
4444
+ onNativeError: onError,
4436
4445
  onDuration,
4437
4446
  pauseWhenBuffering: pauseWhenBuffering ?? false,
4438
4447
  _remotionInternalNeedsDurationCalculation: Boolean(loop),
@@ -5146,7 +5155,13 @@ Check that all your Remotion packages are on the same version. If your dependenc
5146
5155
  const heightRatio = canvasSize.height / compositionHeight;
5147
5156
  const widthRatio = canvasSize.width / compositionWidth;
5148
5157
  const ratio = Math.min(heightRatio, widthRatio);
5149
- return previewSize === "auto" ? ratio : Number(previewSize);
5158
+ if (previewSize === "auto") {
5159
+ if (ratio === 0) {
5160
+ return 1;
5161
+ }
5162
+ return ratio;
5163
+ }
5164
+ return Number(previewSize);
5150
5165
  }, WATCH_REMOTION_STATIC_FILES = "remotion_staticFilesChanged", RemotionContextProvider = (props2) => {
5151
5166
  const { children, contexts } = props2;
5152
5167
  return /* @__PURE__ */ jsx27(LogLevelContext.Provider, {
@@ -13279,8 +13294,8 @@ var useElementSize = (ref, options) => {
13279
13294
  return;
13280
13295
  }
13281
13296
  const probableCssParentScale = contentRect.width === 0 ? 1 : newSize[0].width / contentRect.width;
13282
- const width = options.shouldApplyCssTransforms && probableCssParentScale > 0 ? newSize[0].width : newSize[0].width * (1 / probableCssParentScale);
13283
- const height = options.shouldApplyCssTransforms ? newSize[0].height : newSize[0].height * (1 / probableCssParentScale);
13297
+ const width = options.shouldApplyCssTransforms || probableCssParentScale === 0 ? newSize[0].width : newSize[0].width * (1 / probableCssParentScale);
13298
+ const height = options.shouldApplyCssTransforms || probableCssParentScale === 0 ? newSize[0].height : newSize[0].height * (1 / probableCssParentScale);
13284
13299
  setSize((prevState) => {
13285
13300
  const isSame = prevState && prevState.width === width && prevState.height === height && prevState.left === newSize[0].x && prevState.top === newSize[0].y && prevState.windowSize.height === window.innerHeight && prevState.windowSize.width === window.innerWidth;
13286
13301
  if (isSame) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@remotion/promo-pages",
3
- "version": "4.0.324",
3
+ "version": "4.0.327",
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.324",
14
- "@remotion/lottie": "4.0.324",
15
- "@remotion/shapes": "4.0.324",
16
- "@remotion/player": "4.0.324",
17
- "create-video": "4.0.324",
18
- "remotion": "4.0.324",
19
- "@remotion/lambda": "4.0.324",
20
- "@remotion/paths": "4.0.324"
13
+ "@remotion/lambda": "4.0.327",
14
+ "@remotion/paths": "4.0.327",
15
+ "@remotion/animated-emoji": "4.0.327",
16
+ "@remotion/player": "4.0.327",
17
+ "@remotion/shapes": "4.0.327",
18
+ "@remotion/lottie": "4.0.327",
19
+ "create-video": "4.0.327",
20
+ "remotion": "4.0.327"
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.324"
37
+ "@remotion/eslint-config-internal": "4.0.327"
38
38
  },
39
39
  "repository": {
40
40
  "url": "https://github.com/remotion-dev/remotion/tree/main/packages/promo-pages"