@remotion/promo-pages 4.0.323 → 4.0.324

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.323 make /Users/jonathanburger/remotion/packages/promo-pages
3
+ > @remotion/promo-pages@4.0.324 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 307ms
8
+ Done in 109ms
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.323", checkMultipleRemotionVersions = () => {
738
+ }, VERSION = "4.0.324", checkMultipleRemotionVersions = () => {
739
739
  if (typeof globalThis === "undefined") {
740
740
  return;
741
741
  }
@@ -3127,39 +3127,41 @@ Check that all your Remotion packages are on the same version. If your dependenc
3127
3127
  throw new Error("useAmplification must be used within a SharedAudioContext");
3128
3128
  }
3129
3129
  const { audioContext } = sharedAudioContext;
3130
- useLayoutEffect3(() => {
3131
- if (!audioContext) {
3132
- return;
3133
- }
3134
- if (!mediaRef.current) {
3135
- return;
3136
- }
3137
- if (!shouldUseWebAudioApi) {
3138
- return;
3139
- }
3140
- if (mediaRef.current.playbackRate !== 1 && isSafari()) {
3141
- warnSafariOnce(logLevel);
3142
- return;
3143
- }
3144
- if (!source) {
3145
- return;
3146
- }
3147
- const gainNode = new GainNode(audioContext, {
3148
- gain: currentVolumeRef.current
3149
- });
3150
- source.attemptToConnect();
3151
- source.get().connect(gainNode);
3152
- gainNode.connect(audioContext.destination);
3153
- audioStuffRef.current = {
3154
- gainNode
3155
- };
3156
- Log.trace(logLevel, `Starting to amplify ${mediaRef.current?.src}. Gain = ${currentVolumeRef.current}, playbackRate = ${mediaRef.current?.playbackRate}`);
3157
- return () => {
3158
- audioStuffRef.current = null;
3159
- gainNode.disconnect();
3160
- source.get().disconnect();
3161
- };
3162
- }, [logLevel, mediaRef, audioContext, source, shouldUseWebAudioApi]);
3130
+ if (typeof window !== "undefined") {
3131
+ useLayoutEffect3(() => {
3132
+ if (!audioContext) {
3133
+ return;
3134
+ }
3135
+ if (!mediaRef.current) {
3136
+ return;
3137
+ }
3138
+ if (!shouldUseWebAudioApi) {
3139
+ return;
3140
+ }
3141
+ if (mediaRef.current.playbackRate !== 1 && isSafari()) {
3142
+ warnSafariOnce(logLevel);
3143
+ return;
3144
+ }
3145
+ if (!source) {
3146
+ return;
3147
+ }
3148
+ const gainNode = new GainNode(audioContext, {
3149
+ gain: currentVolumeRef.current
3150
+ });
3151
+ source.attemptToConnect();
3152
+ source.get().connect(gainNode);
3153
+ gainNode.connect(audioContext.destination);
3154
+ audioStuffRef.current = {
3155
+ gainNode
3156
+ };
3157
+ Log.trace(logLevel, `Starting to amplify ${mediaRef.current?.src}. Gain = ${currentVolumeRef.current}, playbackRate = ${mediaRef.current?.playbackRate}`);
3158
+ return () => {
3159
+ audioStuffRef.current = null;
3160
+ gainNode.disconnect();
3161
+ source.get().disconnect();
3162
+ };
3163
+ }, [logLevel, mediaRef, audioContext, source, shouldUseWebAudioApi]);
3164
+ }
3163
3165
  if (audioStuffRef.current) {
3164
3166
  const valueToSet = volume;
3165
3167
  if (!isApproximatelyTheSame(audioStuffRef.current.gainNode.gain.value, valueToSet)) {
@@ -3402,17 +3404,19 @@ Check that all your Remotion packages are on the same version. If your dependenc
3402
3404
  });
3403
3405
  }
3404
3406
  }, [blocks]);
3405
- useLayoutEffect4(() => {
3406
- if (blocks.length === 0) {
3407
- onResumeCallbacks.forEach((c) => c());
3408
- playbackLogging({
3409
- logLevel,
3410
- message: "Player is exiting buffer state",
3411
- mountTime,
3412
- tag: "player"
3413
- });
3414
- }
3415
- }, [blocks]);
3407
+ if (typeof window !== "undefined") {
3408
+ useLayoutEffect4(() => {
3409
+ if (blocks.length === 0) {
3410
+ onResumeCallbacks.forEach((c) => c());
3411
+ playbackLogging({
3412
+ logLevel,
3413
+ message: "Player is exiting buffer state",
3414
+ mountTime,
3415
+ tag: "player"
3416
+ });
3417
+ }
3418
+ }, [blocks]);
3419
+ }
3416
3420
  return useMemo16(() => {
3417
3421
  return { addBlock, listenForBuffering, listenForResume, buffering };
3418
3422
  }, [addBlock, buffering, listenForBuffering, listenForResume]);
@@ -13274,8 +13278,8 @@ var useElementSize = (ref, options) => {
13274
13278
  setSize(null);
13275
13279
  return;
13276
13280
  }
13277
- const probableCssParentScale = contentRect.width === 0 || contentRect.width === 0 ? 1 : newSize[0].width / contentRect.width;
13278
- const width = options.shouldApplyCssTransforms ? newSize[0].width : newSize[0].width * (1 / probableCssParentScale);
13281
+ 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);
13279
13283
  const height = options.shouldApplyCssTransforms ? newSize[0].height : newSize[0].height * (1 / probableCssParentScale);
13280
13284
  setSize((prevState) => {
13281
13285
  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;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@remotion/promo-pages",
3
- "version": "4.0.323",
3
+ "version": "4.0.324",
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.323",
14
- "@remotion/lambda": "4.0.323",
15
- "@remotion/paths": "4.0.323",
16
- "@remotion/player": "4.0.323",
17
- "@remotion/lottie": "4.0.323",
18
- "@remotion/shapes": "4.0.323",
19
- "create-video": "4.0.323",
20
- "remotion": "4.0.323"
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"
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.323"
37
+ "@remotion/eslint-config-internal": "4.0.324"
38
38
  },
39
39
  "repository": {
40
40
  "url": "https://github.com/remotion-dev/remotion/tree/main/packages/promo-pages"