remotion 4.0.369 → 4.0.371

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.
@@ -13,7 +13,7 @@ export type TComposition<Schema extends AnyZodObject, Props extends Record<strin
13
13
  id: string;
14
14
  folderName: string | null;
15
15
  parentFolderName: string | null;
16
- component: LazyExoticComponent<ComponentType<Props>>;
16
+ component: LazyExoticComponent<ComponentType<Props>> | ComponentType<Props>;
17
17
  nonce: number;
18
18
  schema: Schema | null;
19
19
  calculateMetadata: CalculateMetadataFunction<InferProps<Schema, Props>> | null;
@@ -24,7 +24,7 @@ const IFrameRefForwarding = ({ onLoad, onError, delayRenderRetries, delayRenderT
24
24
  console.error('Error loading iframe:', e, 'Handle the event using the onError() prop to make this message disappear.');
25
25
  }
26
26
  }, [handle, onError, continueRender]);
27
- return (0, jsx_runtime_1.jsx)("iframe", { ...props, ref: ref, onError: didGetError, onLoad: didLoad });
27
+ return ((0, jsx_runtime_1.jsx)("iframe", { referrerPolicy: "strict-origin-when-cross-origin", ...props, ref: ref, onError: didGetError, onLoad: didLoad }));
28
28
  };
29
29
  /*
30
30
  * @description The <IFrame /> can be used like a regular <iframe> HTML tag.
@@ -41,7 +41,7 @@ export declare const SharedAudioContext: React.Context<SharedContext | null>;
41
41
  export declare const SharedAudioContextProvider: React.FC<{
42
42
  readonly numberOfAudioTags: number;
43
43
  readonly children: React.ReactNode;
44
- readonly component: LazyExoticComponent<ComponentType<Record<string, unknown>>> | null;
44
+ readonly component: LazyExoticComponent<ComponentType<Record<string, unknown>>> | ComponentType<Record<string, unknown>> | null;
45
45
  readonly audioLatencyHint: AudioContextLatencyCategory;
46
46
  }>;
47
47
  export declare const useSharedAudio: ({ aud, audioId, premounting, }: {
@@ -82,7 +82,7 @@ export declare const Internals: {
82
82
  readonly audioEnabled: boolean | null;
83
83
  }>;
84
84
  readonly useVideo: () => (import("./video-config.js").VideoConfig & {
85
- component: import("react").LazyExoticComponent<import("react").ComponentType<Record<string, unknown>>>;
85
+ component: import("react").LazyExoticComponent<import("react").ComponentType<Record<string, unknown>>> | import("react").ComponentType<Record<string, unknown>>;
86
86
  }) | null;
87
87
  readonly getRoot: () => import("react").FC<{}> | null;
88
88
  readonly useMediaVolumeState: () => readonly [number, (u: number) => void];
@@ -105,9 +105,9 @@ export declare const Internals: {
105
105
  compProps: CompProps<Props>;
106
106
  componentName: string;
107
107
  noSuspense: boolean;
108
- }) => import("react").ExoticComponent<Props | (import("react").PropsWithoutRef<Props> & import("react").RefAttributes<import("react").Component<Props, any, any>>)> & {
108
+ }) => (import("react").ExoticComponent<Props | (import("react").PropsWithoutRef<Props> & import("react").RefAttributes<import("react").Component<Props, any, any>>)> & {
109
109
  readonly _result: import("react").ComponentType<Props>;
110
- };
110
+ }) | import("react").ComponentType<Props>;
111
111
  readonly truthy: typeof truthy;
112
112
  readonly SequenceContext: import("react").Context<import("./SequenceContext.js").SequenceContextType | null>;
113
113
  readonly useRemotionContexts: typeof useRemotionContexts;
@@ -144,7 +144,7 @@ export declare const Internals: {
144
144
  readonly SharedAudioContextProvider: import("react").FC<{
145
145
  readonly numberOfAudioTags: number;
146
146
  readonly children: React.ReactNode;
147
- readonly component: import("react").LazyExoticComponent<import("react").ComponentType<Record<string, unknown>>> | null;
147
+ readonly component: import("react").LazyExoticComponent<import("react").ComponentType<Record<string, unknown>>> | import("react").ComponentType<Record<string, unknown>> | null;
148
148
  readonly audioLatencyHint: AudioContextLatencyCategory;
149
149
  }>;
150
150
  readonly invalidCompositionErrorMessage: string;
@@ -1,5 +1,5 @@
1
1
  import type { RefObject } from 'react';
2
- import type { LogLevel } from './log';
2
+ import { type LogLevel } from './log';
3
3
  export declare const playAndHandleNotAllowedError: ({ mediaRef, mediaType, onAutoPlayError, logLevel, mountTime, reason, isPlayer, }: {
4
4
  mediaRef: RefObject<HTMLVideoElement | HTMLAudioElement | null>;
5
5
  mediaType: "audio" | "video";
@@ -1,6 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.playAndHandleNotAllowedError = void 0;
4
+ const log_1 = require("./log");
4
5
  const playback_logging_1 = require("./playback-logging");
5
6
  const playAndHandleNotAllowedError = ({ mediaRef, mediaType, onAutoPlayError, logLevel, mountTime, reason, isPlayer, }) => {
6
7
  const { current } = mediaRef;
@@ -53,14 +54,12 @@ const playAndHandleNotAllowedError = ({ mediaRef, mediaType, onAutoPlayError, lo
53
54
  onAutoPlayError();
54
55
  return;
55
56
  }
56
- // eslint-disable-next-line no-console
57
- console.log(`The video will be muted and we'll retry playing it.`);
58
57
  if (mediaType === 'video' && isPlayer) {
59
- // eslint-disable-next-line no-console
60
- console.log('Use onAutoPlayError() to handle this error yourself.');
58
+ log_1.Log.info({ logLevel, tag: '<' + mediaType + '>' }, `The video will be muted and we'll retry playing it.`);
59
+ log_1.Log.info({ logLevel, tag: '<' + mediaType + '>' }, 'Use onAutoPlayError() to handle this error yourself.');
60
+ current.muted = true;
61
+ current.play();
61
62
  }
62
- current.muted = true;
63
- current.play();
64
63
  }
65
64
  });
66
65
  };
@@ -7,5 +7,5 @@ export declare const useLazyComponent: <Props>({ compProps, componentName, noSus
7
7
  compProps: CompProps<Props>;
8
8
  componentName: string;
9
9
  noSuspense: boolean;
10
- }) => LazyExoticComponent<ComponentType<Props>>;
10
+ }) => LazyExoticComponent<ComponentType<Props>> | ComponentType<Props>;
11
11
  export {};
@@ -46,7 +46,7 @@ const useLazyComponent = ({ compProps, componentName, noSuspense, }) => {
46
46
  if (typeof compProps.component === 'undefined') {
47
47
  throw new Error(`A value of \`undefined\` was passed to the \`component\` prop. Check the value you are passing to the <${componentName}/> component.`);
48
48
  }
49
- return react_1.default.lazy(() => Promise.resolve({ default: compProps.component }));
49
+ return compProps.component;
50
50
  }
51
51
  if ('lazyComponent' in compProps &&
52
52
  typeof compProps.lazyComponent !== 'undefined') {
@@ -1,7 +1,7 @@
1
1
  import type { ComponentType, LazyExoticComponent } from 'react';
2
2
  import type { VideoConfig } from './video-config.js';
3
3
  type ReturnType = (VideoConfig & {
4
- component: LazyExoticComponent<ComponentType<Record<string, unknown>>>;
4
+ component: LazyExoticComponent<ComponentType<Record<string, unknown>>> | ComponentType<Record<string, unknown>>;
5
5
  }) | null;
6
6
  export declare const useVideo: () => ReturnType;
7
7
  export {};
@@ -3,4 +3,4 @@
3
3
  * @see [Documentation](https://remotion.dev/docs/version)
4
4
  * @returns {string} The current version of the remotion package
5
5
  */
6
- export declare const VERSION = "4.0.369";
6
+ export declare const VERSION = "4.0.371";
@@ -7,4 +7,4 @@ exports.VERSION = void 0;
7
7
  * @see [Documentation](https://remotion.dev/docs/version)
8
8
  * @returns {string} The current version of the remotion package
9
9
  */
10
- exports.VERSION = '4.0.369';
10
+ exports.VERSION = '4.0.371';
@@ -110,7 +110,7 @@ function truthy(value) {
110
110
  }
111
111
 
112
112
  // src/version.ts
113
- var VERSION = "4.0.369";
113
+ var VERSION = "4.0.371";
114
114
 
115
115
  // src/multiple-versions-warning.ts
116
116
  var checkMultipleRemotionVersions = () => {
@@ -2931,12 +2931,12 @@ var playAndHandleNotAllowedError = ({
2931
2931
  onAutoPlayError();
2932
2932
  return;
2933
2933
  }
2934
- console.log(`The video will be muted and we'll retry playing it.`);
2935
2934
  if (mediaType === "video" && isPlayer) {
2936
- console.log("Use onAutoPlayError() to handle this error yourself.");
2935
+ Log.info({ logLevel, tag: "<" + mediaType + ">" }, `The video will be muted and we'll retry playing it.`);
2936
+ Log.info({ logLevel, tag: "<" + mediaType + ">" }, "Use onAutoPlayError() to handle this error yourself.");
2937
+ current.muted = true;
2938
+ current.play();
2937
2939
  }
2938
- current.muted = true;
2939
- current.play();
2940
2940
  }
2941
2941
  });
2942
2942
  };
@@ -5178,7 +5178,7 @@ var useLazyComponent = ({
5178
5178
  if (typeof compProps.component === "undefined") {
5179
5179
  throw new Error(`A value of \`undefined\` was passed to the \`component\` prop. Check the value you are passing to the <${componentName}/> component.`);
5180
5180
  }
5181
- return React20.lazy(() => Promise.resolve({ default: compProps.component }));
5181
+ return compProps.component;
5182
5182
  }
5183
5183
  if ("lazyComponent" in compProps && typeof compProps.lazyComponent !== "undefined") {
5184
5184
  if (typeof compProps.lazyComponent === "undefined") {
@@ -5583,6 +5583,7 @@ var IFrameRefForwarding = ({
5583
5583
  }
5584
5584
  }, [handle, onError, continueRender2]);
5585
5585
  return /* @__PURE__ */ jsx23("iframe", {
5586
+ referrerPolicy: "strict-origin-when-cross-origin",
5586
5587
  ...props2,
5587
5588
  ref,
5588
5589
  onError: didGetError,
@@ -1,5 +1,5 @@
1
1
  // src/version.ts
2
- var VERSION = "4.0.369";
2
+ var VERSION = "4.0.371";
3
3
  export {
4
4
  VERSION
5
5
  };
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "url": "https://github.com/remotion-dev/remotion/tree/main/packages/core"
4
4
  },
5
5
  "name": "remotion",
6
- "version": "4.0.369",
6
+ "version": "4.0.371",
7
7
  "description": "Make videos programmatically",
8
8
  "main": "dist/cjs/index.js",
9
9
  "types": "dist/cjs/index.d.ts",
@@ -34,7 +34,7 @@
34
34
  "react-dom": "19.0.0",
35
35
  "webpack": "5.96.1",
36
36
  "zod": "3.22.3",
37
- "@remotion/eslint-config-internal": "4.0.369",
37
+ "@remotion/eslint-config-internal": "4.0.371",
38
38
  "eslint": "9.19.0"
39
39
  },
40
40
  "keywords": [
@@ -1,2 +0,0 @@
1
- export declare const useVideoEnabled: () => boolean;
2
- export declare const useAudioEnabled: () => boolean;
@@ -1,11 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.useAudioEnabled = exports.useVideoEnabled = void 0;
4
- const useVideoEnabled = () => {
5
- return window.remotion_videoEnabled;
6
- };
7
- exports.useVideoEnabled = useVideoEnabled;
8
- const useAudioEnabled = () => {
9
- return window.remotion_audioEnabled;
10
- };
11
- exports.useAudioEnabled = useAudioEnabled;