remotion 4.0.397 → 4.0.399

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/cjs/Img.d.ts CHANGED
@@ -5,7 +5,7 @@ export type ImgProps = NativeImgProps & {
5
5
  readonly pauseWhenLoading?: boolean;
6
6
  readonly delayRenderRetries?: number;
7
7
  readonly delayRenderTimeoutInMilliseconds?: number;
8
- readonly onImageFrame?: (imgelement: HTMLImageElement) => void;
8
+ readonly onImageFrame?: (imageElement: HTMLImageElement) => void;
9
9
  readonly src: string;
10
10
  };
11
11
  export declare const Img: React.ForwardRefExoticComponent<Omit<ImgProps, "ref"> & React.RefAttributes<HTMLImageElement>>;
@@ -26,6 +26,9 @@ const AudioRefForwardingFunction = (props, ref) => {
26
26
  const { loop, ...propsOtherThanLoop } = props;
27
27
  const { fps } = (0, use_video_config_js_1.useVideoConfig)();
28
28
  const environment = (0, use_remotion_environment_js_1.useRemotionEnvironment)();
29
+ if (environment.isClientSideRendering) {
30
+ throw new Error('<Html5Audio> is not supported in @remotion/web-renderer. Use <Audio> from @remotion/media instead. See https://remotion.dev/docs/client-side-rendering/limitations');
31
+ }
29
32
  const { durations, setDurations } = (0, react_1.useContext)(duration_state_js_1.DurationsContext);
30
33
  if (typeof props.src !== 'string') {
31
34
  throw new TypeError(`The \`<Html5Audio>\` tag requires a string for \`src\`, but got ${JSON.stringify(props.src)} instead.`);
@@ -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.397";
6
+ export declare const VERSION = "4.0.399";
@@ -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.397';
10
+ exports.VERSION = '4.0.399';
@@ -15,6 +15,9 @@ const InnerOffthreadVideo = (props) => {
15
15
  // rest gets drilled down
16
16
  const { startFrom, endAt, trimBefore, trimAfter, name, pauseWhenBuffering, stack, showInTimeline, ...otherProps } = props;
17
17
  const environment = (0, use_remotion_environment_js_1.useRemotionEnvironment)();
18
+ if (environment.isClientSideRendering) {
19
+ throw new Error('<OffthreadVideo> is not supported in @remotion/web-renderer. Use <Video> from @remotion/media instead. See https://remotion.dev/docs/client-side-rendering/limitations');
20
+ }
18
21
  const onDuration = (0, react_1.useCallback)(() => undefined, []);
19
22
  if (typeof props.src !== 'string') {
20
23
  throw new TypeError(`The \`<OffthreadVideo>\` tag requires a string for \`src\`, but got ${JSON.stringify(props.src)} instead.`);
@@ -23,6 +23,9 @@ const VideoForwardingFunction = (props, ref) => {
23
23
  const { loop, ...propsOtherThanLoop } = props;
24
24
  const { fps } = (0, use_video_config_js_1.useVideoConfig)();
25
25
  const environment = (0, use_remotion_environment_js_1.useRemotionEnvironment)();
26
+ if (environment.isClientSideRendering) {
27
+ throw new Error('<Html5Video> is not supported in @remotion/web-renderer. Use <Video> from @remotion/media instead. See https://remotion.dev/docs/client-side-rendering/limitations');
28
+ }
26
29
  const { durations, setDurations } = (0, react_1.useContext)(duration_state_js_1.DurationsContext);
27
30
  if (typeof ref === 'string') {
28
31
  throw new Error('string refs are not supported');
@@ -110,7 +110,7 @@ function truthy(value) {
110
110
  }
111
111
 
112
112
  // src/version.ts
113
- var VERSION = "4.0.397";
113
+ var VERSION = "4.0.399";
114
114
 
115
115
  // src/multiple-versions-warning.ts
116
116
  var checkMultipleRemotionVersions = () => {
@@ -5093,6 +5093,9 @@ var AudioRefForwardingFunction = (props, ref) => {
5093
5093
  const { loop, ...propsOtherThanLoop } = props;
5094
5094
  const { fps } = useVideoConfig();
5095
5095
  const environment = useRemotionEnvironment();
5096
+ if (environment.isClientSideRendering) {
5097
+ throw new Error("<Html5Audio> is not supported in @remotion/web-renderer. Use <Audio> from @remotion/media instead. See https://remotion.dev/docs/client-side-rendering/limitations");
5098
+ }
5096
5099
  const { durations, setDurations } = useContext27(DurationsContext);
5097
5100
  if (typeof props.src !== "string") {
5098
5101
  throw new TypeError(`The \`<Html5Audio>\` tag requires a string for \`src\`, but got ${JSON.stringify(props.src)} instead.`);
@@ -6825,6 +6828,9 @@ var InnerOffthreadVideo = (props2) => {
6825
6828
  ...otherProps
6826
6829
  } = props2;
6827
6830
  const environment = useRemotionEnvironment();
6831
+ if (environment.isClientSideRendering) {
6832
+ throw new Error("<OffthreadVideo> is not supported in @remotion/web-renderer. Use <Video> from @remotion/media instead. See https://remotion.dev/docs/client-side-rendering/limitations");
6833
+ }
6828
6834
  const onDuration = useCallback16(() => {
6829
6835
  return;
6830
6836
  }, []);
@@ -8378,6 +8384,9 @@ var VideoForwardingFunction = (props2, ref) => {
8378
8384
  const { loop, ...propsOtherThanLoop } = props2;
8379
8385
  const { fps } = useVideoConfig();
8380
8386
  const environment = useRemotionEnvironment();
8387
+ if (environment.isClientSideRendering) {
8388
+ throw new Error("<Html5Video> is not supported in @remotion/web-renderer. Use <Video> from @remotion/media instead. See https://remotion.dev/docs/client-side-rendering/limitations");
8389
+ }
8381
8390
  const { durations, setDurations } = useContext35(DurationsContext);
8382
8391
  if (typeof ref === "string") {
8383
8392
  throw new Error("string refs are not supported");
@@ -1,5 +1,5 @@
1
1
  // src/version.ts
2
- var VERSION = "4.0.397";
2
+ var VERSION = "4.0.399";
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.397",
6
+ "version": "4.0.399",
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.2.3",
35
35
  "webpack": "5.96.1",
36
36
  "zod": "3.22.3",
37
- "@remotion/eslint-config-internal": "4.0.397",
37
+ "@remotion/eslint-config-internal": "4.0.399",
38
38
  "eslint": "9.19.0"
39
39
  },
40
40
  "keywords": [
@@ -1,6 +0,0 @@
1
- export declare const calculateLoopDuration: ({ endAt, mediaDuration, playbackRate, startFrom, }: {
2
- mediaDuration: number;
3
- playbackRate: number;
4
- startFrom: number | undefined;
5
- endAt: number | undefined;
6
- }) => number;
@@ -1,17 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.calculateLoopDuration = void 0;
4
- const calculateLoopDuration = ({ endAt, mediaDuration, playbackRate, startFrom, }) => {
5
- let duration = mediaDuration;
6
- // Account for endAt
7
- if (typeof endAt !== 'undefined') {
8
- duration = endAt;
9
- }
10
- // Account for startFrom
11
- if (typeof startFrom !== 'undefined') {
12
- duration -= startFrom;
13
- }
14
- const actualDuration = duration / playbackRate;
15
- return Math.floor(actualDuration);
16
- };
17
- exports.calculateLoopDuration = calculateLoopDuration;
@@ -1,4 +0,0 @@
1
- export declare const useAudioChannelIndex: ({ ref, audioChannelIndex, }: {
2
- ref: React.RefObject<HTMLVideoElement | HTMLAudioElement | null>;
3
- audioChannelIndex: number;
4
- }) => void;
@@ -1,13 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.useAudioChannelIndex = void 0;
4
- const react_1 = require("react");
5
- const useAudioChannelIndex = ({ ref, audioChannelIndex, }) => {
6
- (0, react_1.useEffect)(() => {
7
- var _a;
8
- // @ts-expect-error
9
- const audioChannels = (_a = ref === null || ref === void 0 ? void 0 : ref.current) === null || _a === void 0 ? void 0 : _a.audioTracks;
10
- console.log({ audioChannels, audioChannelIndex });
11
- }, [ref, audioChannelIndex]);
12
- };
13
- exports.useAudioChannelIndex = useAudioChannelIndex;