@remotion/promo-pages 4.0.393 → 4.0.395

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/design.js CHANGED
@@ -755,7 +755,7 @@ var __defProp2, __export2 = (target, all) => {
755
755
  });
756
756
  }, useIsPlayer = () => {
757
757
  return useContext(IsPlayerContext);
758
- }, VERSION = "4.0.393", checkMultipleRemotionVersions = () => {
758
+ }, VERSION = "4.0.395", checkMultipleRemotionVersions = () => {
759
759
  if (typeof globalThis === "undefined") {
760
760
  return;
761
761
  }
@@ -2929,11 +2929,15 @@ Check that all your Remotion packages are on the same version. If your dependenc
2929
2929
  });
2930
2930
  }, getCrossOriginValue = ({
2931
2931
  crossOrigin,
2932
- requestsVideoFrame
2932
+ requestsVideoFrame,
2933
+ isClientSideRendering
2933
2934
  }) => {
2934
2935
  if (crossOrigin !== undefined && crossOrigin !== null) {
2935
2936
  return crossOrigin;
2936
2937
  }
2938
+ if (isClientSideRendering) {
2939
+ return "anonymous";
2940
+ }
2937
2941
  if (requestsVideoFrame) {
2938
2942
  return "anonymous";
2939
2943
  }
@@ -3638,8 +3642,17 @@ Check that all your Remotion packages are on the same version. If your dependenc
3638
3642
  const [blocks, setBlocks] = useState13([]);
3639
3643
  const [onBufferingCallbacks, setOnBufferingCallbacks] = useState13([]);
3640
3644
  const [onResumeCallbacks, setOnResumeCallbacks] = useState13([]);
3645
+ const env = useRemotionEnvironment();
3646
+ const rendering = env.isRendering;
3641
3647
  const buffering = useRef9(false);
3642
3648
  const addBlock = useCallback8((block) => {
3649
+ if (rendering) {
3650
+ return {
3651
+ unblock: () => {
3652
+ return;
3653
+ }
3654
+ };
3655
+ }
3643
3656
  setBlocks((b) => [...b, block]);
3644
3657
  return {
3645
3658
  unblock: () => {
@@ -3652,7 +3665,7 @@ Check that all your Remotion packages are on the same version. If your dependenc
3652
3665
  });
3653
3666
  }
3654
3667
  };
3655
- }, []);
3668
+ }, [rendering]);
3656
3669
  const listenForBuffering = useCallback8((callback) => {
3657
3670
  setOnBufferingCallbacks((c) => [...c, callback]);
3658
3671
  return {
@@ -3670,6 +3683,9 @@ Check that all your Remotion packages are on the same version. If your dependenc
3670
3683
  };
3671
3684
  }, []);
3672
3685
  useEffect7(() => {
3686
+ if (rendering) {
3687
+ return;
3688
+ }
3673
3689
  if (blocks.length > 0) {
3674
3690
  onBufferingCallbacks.forEach((c) => c());
3675
3691
  playbackLogging({
@@ -3682,6 +3698,9 @@ Check that all your Remotion packages are on the same version. If your dependenc
3682
3698
  }, [blocks]);
3683
3699
  if (typeof window !== "undefined") {
3684
3700
  useLayoutEffect6(() => {
3701
+ if (rendering) {
3702
+ return;
3703
+ }
3685
3704
  if (blocks.length === 0) {
3686
3705
  onResumeCallbacks.forEach((c) => c());
3687
3706
  playbackLogging({
@@ -4465,7 +4484,8 @@ Check that all your Remotion packages are on the same version. If your dependenc
4465
4484
  warnAboutTooHighVolume(userPreferredVolume);
4466
4485
  const crossOriginValue = getCrossOriginValue({
4467
4486
  crossOrigin,
4468
- requestsVideoFrame: false
4487
+ requestsVideoFrame: false,
4488
+ isClientSideRendering: false
4469
4489
  });
4470
4490
  const propsToPass = useMemo21(() => {
4471
4491
  return {
@@ -5202,9 +5222,11 @@ Check that all your Remotion packages are on the same version. If your dependenc
5202
5222
  delayRender2
5203
5223
  ]);
5204
5224
  }
5225
+ const { isClientSideRendering } = useRemotionEnvironment();
5205
5226
  const crossOriginValue = getCrossOriginValue({
5206
5227
  crossOrigin,
5207
- requestsVideoFrame: false
5228
+ requestsVideoFrame: false,
5229
+ isClientSideRendering
5208
5230
  });
5209
5231
  return /* @__PURE__ */ jsx25("img", {
5210
5232
  ...props2,
@@ -5929,7 +5951,8 @@ Check that all your Remotion packages are on the same version. If your dependenc
5929
5951
  }, [isSequenceHidden, style]);
5930
5952
  const crossOriginValue = getCrossOriginValue({
5931
5953
  crossOrigin,
5932
- requestsVideoFrame: Boolean(onVideoFrame)
5954
+ requestsVideoFrame: Boolean(onVideoFrame),
5955
+ isClientSideRendering: false
5933
5956
  });
5934
5957
  return /* @__PURE__ */ jsx30("video", {
5935
5958
  ref: videoRef,
@@ -755,7 +755,7 @@ var __defProp2, __export2 = (target, all) => {
755
755
  });
756
756
  }, useIsPlayer = () => {
757
757
  return useContext(IsPlayerContext);
758
- }, VERSION = "4.0.393", checkMultipleRemotionVersions = () => {
758
+ }, VERSION = "4.0.395", checkMultipleRemotionVersions = () => {
759
759
  if (typeof globalThis === "undefined") {
760
760
  return;
761
761
  }
@@ -2929,11 +2929,15 @@ Check that all your Remotion packages are on the same version. If your dependenc
2929
2929
  });
2930
2930
  }, getCrossOriginValue = ({
2931
2931
  crossOrigin,
2932
- requestsVideoFrame
2932
+ requestsVideoFrame,
2933
+ isClientSideRendering
2933
2934
  }) => {
2934
2935
  if (crossOrigin !== undefined && crossOrigin !== null) {
2935
2936
  return crossOrigin;
2936
2937
  }
2938
+ if (isClientSideRendering) {
2939
+ return "anonymous";
2940
+ }
2937
2941
  if (requestsVideoFrame) {
2938
2942
  return "anonymous";
2939
2943
  }
@@ -3638,8 +3642,17 @@ Check that all your Remotion packages are on the same version. If your dependenc
3638
3642
  const [blocks, setBlocks] = useState13([]);
3639
3643
  const [onBufferingCallbacks, setOnBufferingCallbacks] = useState13([]);
3640
3644
  const [onResumeCallbacks, setOnResumeCallbacks] = useState13([]);
3645
+ const env = useRemotionEnvironment();
3646
+ const rendering = env.isRendering;
3641
3647
  const buffering = useRef9(false);
3642
3648
  const addBlock = useCallback8((block) => {
3649
+ if (rendering) {
3650
+ return {
3651
+ unblock: () => {
3652
+ return;
3653
+ }
3654
+ };
3655
+ }
3643
3656
  setBlocks((b) => [...b, block]);
3644
3657
  return {
3645
3658
  unblock: () => {
@@ -3652,7 +3665,7 @@ Check that all your Remotion packages are on the same version. If your dependenc
3652
3665
  });
3653
3666
  }
3654
3667
  };
3655
- }, []);
3668
+ }, [rendering]);
3656
3669
  const listenForBuffering = useCallback8((callback) => {
3657
3670
  setOnBufferingCallbacks((c) => [...c, callback]);
3658
3671
  return {
@@ -3670,6 +3683,9 @@ Check that all your Remotion packages are on the same version. If your dependenc
3670
3683
  };
3671
3684
  }, []);
3672
3685
  useEffect7(() => {
3686
+ if (rendering) {
3687
+ return;
3688
+ }
3673
3689
  if (blocks.length > 0) {
3674
3690
  onBufferingCallbacks.forEach((c) => c());
3675
3691
  playbackLogging({
@@ -3682,6 +3698,9 @@ Check that all your Remotion packages are on the same version. If your dependenc
3682
3698
  }, [blocks]);
3683
3699
  if (typeof window !== "undefined") {
3684
3700
  useLayoutEffect6(() => {
3701
+ if (rendering) {
3702
+ return;
3703
+ }
3685
3704
  if (blocks.length === 0) {
3686
3705
  onResumeCallbacks.forEach((c) => c());
3687
3706
  playbackLogging({
@@ -4465,7 +4484,8 @@ Check that all your Remotion packages are on the same version. If your dependenc
4465
4484
  warnAboutTooHighVolume(userPreferredVolume);
4466
4485
  const crossOriginValue = getCrossOriginValue({
4467
4486
  crossOrigin,
4468
- requestsVideoFrame: false
4487
+ requestsVideoFrame: false,
4488
+ isClientSideRendering: false
4469
4489
  });
4470
4490
  const propsToPass = useMemo21(() => {
4471
4491
  return {
@@ -5202,9 +5222,11 @@ Check that all your Remotion packages are on the same version. If your dependenc
5202
5222
  delayRender2
5203
5223
  ]);
5204
5224
  }
5225
+ const { isClientSideRendering } = useRemotionEnvironment();
5205
5226
  const crossOriginValue = getCrossOriginValue({
5206
5227
  crossOrigin,
5207
- requestsVideoFrame: false
5228
+ requestsVideoFrame: false,
5229
+ isClientSideRendering
5208
5230
  });
5209
5231
  return /* @__PURE__ */ jsx25("img", {
5210
5232
  ...props2,
@@ -5929,7 +5951,8 @@ Check that all your Remotion packages are on the same version. If your dependenc
5929
5951
  }, [isSequenceHidden, style]);
5930
5952
  const crossOriginValue = getCrossOriginValue({
5931
5953
  crossOrigin,
5932
- requestsVideoFrame: Boolean(onVideoFrame)
5954
+ requestsVideoFrame: Boolean(onVideoFrame),
5955
+ isClientSideRendering: false
5933
5956
  });
5934
5957
  return /* @__PURE__ */ jsx30("video", {
5935
5958
  ref: videoRef,
@@ -755,7 +755,7 @@ var __defProp2, __export2 = (target, all) => {
755
755
  });
756
756
  }, useIsPlayer = () => {
757
757
  return useContext(IsPlayerContext);
758
- }, VERSION = "4.0.393", checkMultipleRemotionVersions = () => {
758
+ }, VERSION = "4.0.395", checkMultipleRemotionVersions = () => {
759
759
  if (typeof globalThis === "undefined") {
760
760
  return;
761
761
  }
@@ -2929,11 +2929,15 @@ Check that all your Remotion packages are on the same version. If your dependenc
2929
2929
  });
2930
2930
  }, getCrossOriginValue = ({
2931
2931
  crossOrigin,
2932
- requestsVideoFrame
2932
+ requestsVideoFrame,
2933
+ isClientSideRendering
2933
2934
  }) => {
2934
2935
  if (crossOrigin !== undefined && crossOrigin !== null) {
2935
2936
  return crossOrigin;
2936
2937
  }
2938
+ if (isClientSideRendering) {
2939
+ return "anonymous";
2940
+ }
2937
2941
  if (requestsVideoFrame) {
2938
2942
  return "anonymous";
2939
2943
  }
@@ -3638,8 +3642,17 @@ Check that all your Remotion packages are on the same version. If your dependenc
3638
3642
  const [blocks, setBlocks] = useState13([]);
3639
3643
  const [onBufferingCallbacks, setOnBufferingCallbacks] = useState13([]);
3640
3644
  const [onResumeCallbacks, setOnResumeCallbacks] = useState13([]);
3645
+ const env = useRemotionEnvironment();
3646
+ const rendering = env.isRendering;
3641
3647
  const buffering = useRef9(false);
3642
3648
  const addBlock = useCallback8((block) => {
3649
+ if (rendering) {
3650
+ return {
3651
+ unblock: () => {
3652
+ return;
3653
+ }
3654
+ };
3655
+ }
3643
3656
  setBlocks((b) => [...b, block]);
3644
3657
  return {
3645
3658
  unblock: () => {
@@ -3652,7 +3665,7 @@ Check that all your Remotion packages are on the same version. If your dependenc
3652
3665
  });
3653
3666
  }
3654
3667
  };
3655
- }, []);
3668
+ }, [rendering]);
3656
3669
  const listenForBuffering = useCallback8((callback) => {
3657
3670
  setOnBufferingCallbacks((c) => [...c, callback]);
3658
3671
  return {
@@ -3670,6 +3683,9 @@ Check that all your Remotion packages are on the same version. If your dependenc
3670
3683
  };
3671
3684
  }, []);
3672
3685
  useEffect7(() => {
3686
+ if (rendering) {
3687
+ return;
3688
+ }
3673
3689
  if (blocks.length > 0) {
3674
3690
  onBufferingCallbacks.forEach((c) => c());
3675
3691
  playbackLogging({
@@ -3682,6 +3698,9 @@ Check that all your Remotion packages are on the same version. If your dependenc
3682
3698
  }, [blocks]);
3683
3699
  if (typeof window !== "undefined") {
3684
3700
  useLayoutEffect6(() => {
3701
+ if (rendering) {
3702
+ return;
3703
+ }
3685
3704
  if (blocks.length === 0) {
3686
3705
  onResumeCallbacks.forEach((c) => c());
3687
3706
  playbackLogging({
@@ -4465,7 +4484,8 @@ Check that all your Remotion packages are on the same version. If your dependenc
4465
4484
  warnAboutTooHighVolume(userPreferredVolume);
4466
4485
  const crossOriginValue = getCrossOriginValue({
4467
4486
  crossOrigin,
4468
- requestsVideoFrame: false
4487
+ requestsVideoFrame: false,
4488
+ isClientSideRendering: false
4469
4489
  });
4470
4490
  const propsToPass = useMemo21(() => {
4471
4491
  return {
@@ -5202,9 +5222,11 @@ Check that all your Remotion packages are on the same version. If your dependenc
5202
5222
  delayRender2
5203
5223
  ]);
5204
5224
  }
5225
+ const { isClientSideRendering } = useRemotionEnvironment();
5205
5226
  const crossOriginValue = getCrossOriginValue({
5206
5227
  crossOrigin,
5207
- requestsVideoFrame: false
5228
+ requestsVideoFrame: false,
5229
+ isClientSideRendering
5208
5230
  });
5209
5231
  return /* @__PURE__ */ jsx25("img", {
5210
5232
  ...props2,
@@ -5929,7 +5951,8 @@ Check that all your Remotion packages are on the same version. If your dependenc
5929
5951
  }, [isSequenceHidden, style]);
5930
5952
  const crossOriginValue = getCrossOriginValue({
5931
5953
  crossOrigin,
5932
- requestsVideoFrame: Boolean(onVideoFrame)
5954
+ requestsVideoFrame: Boolean(onVideoFrame),
5955
+ isClientSideRendering: false
5933
5956
  });
5934
5957
  return /* @__PURE__ */ jsx30("video", {
5935
5958
  ref: videoRef,