remotion 4.0.121 → 4.0.123

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.
@@ -14,6 +14,7 @@ export declare const Audio: React.ForwardRefExoticComponent<Omit<Omit<React.Deta
14
14
  _remotionInternalNativeLoopPassed?: boolean | undefined;
15
15
  toneFrequency?: number | undefined;
16
16
  pauseWhenBuffering?: boolean | undefined;
17
+ showInTimeline?: boolean | undefined;
17
18
  } & RemotionMainAudioProps & {
18
19
  /**
19
20
  * @deprecated For internal use only
@@ -22,7 +22,7 @@ const shared_audio_tags_js_1 = require("./shared-audio-tags.js");
22
22
  const AudioRefForwardingFunction = (props, ref) => {
23
23
  var _a, _b, _c;
24
24
  const audioContext = (0, react_1.useContext)(shared_audio_tags_js_1.SharedAudioContext);
25
- const { startFrom, endAt, name, stack, pauseWhenBuffering, ...otherProps } = props;
25
+ const { startFrom, endAt, name, stack, pauseWhenBuffering, showInTimeline, ...otherProps } = props;
26
26
  const { loop, ...propsOtherThanLoop } = props;
27
27
  const { fps } = (0, use_video_config_js_1.useVideoConfig)();
28
28
  const environment = (0, get_remotion_environment_js_1.getRemotionEnvironment)();
@@ -70,7 +70,7 @@ const AudioRefForwardingFunction = (props, ref) => {
70
70
  }
71
71
  return ((0, jsx_runtime_1.jsx)(AudioForPreview_js_1.AudioForPreview, { _remotionInternalNativeLoopPassed: (_c = props._remotionInternalNativeLoopPassed) !== null && _c !== void 0 ? _c : false, _remotionInternalStack: stack !== null && stack !== void 0 ? stack : null, shouldPreMountAudioTags: audioContext !== null && audioContext.numberOfAudioTags > 0, ...props, ref: ref, onError: onError, onDuration: onDuration,
72
72
  // Proposal: Make this default to true in v5
73
- pauseWhenBuffering: pauseWhenBuffering !== null && pauseWhenBuffering !== void 0 ? pauseWhenBuffering : false, _remotionInternalNeedsDurationCalculation: Boolean(loop) }));
73
+ pauseWhenBuffering: pauseWhenBuffering !== null && pauseWhenBuffering !== void 0 ? pauseWhenBuffering : false, _remotionInternalNeedsDurationCalculation: Boolean(loop), showInTimeline: showInTimeline !== null && showInTimeline !== void 0 ? showInTimeline : true }));
74
74
  };
75
75
  /**
76
76
  * @description With this component, you can add audio to your video. All audio formats which are supported by Chromium are supported by the component.
@@ -1,6 +1,6 @@
1
1
  import type { ForwardRefExoticComponent, RefAttributes } from 'react';
2
2
  import React from 'react';
3
- export declare const AudioForDevelopment: ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.AudioHTMLAttributes<HTMLAudioElement>, HTMLAudioElement>, "autoPlay" | "controls" | "onEnded" | "nonce" | "onResize" | "onResizeCapture"> & {
3
+ export declare const AudioForDevelopment: ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.AudioHTMLAttributes<HTMLAudioElement>, HTMLAudioElement>, "nonce" | "onEnded" | "onResize" | "onResizeCapture" | "autoPlay" | "controls"> & {
4
4
  name?: string | undefined;
5
5
  volume?: import("../volume-prop.js").VolumeProp | undefined;
6
6
  playbackRate?: number | undefined;
@@ -6,6 +6,7 @@ type AudioForPreviewProps = RemotionAudioProps & {
6
6
  pauseWhenBuffering: boolean;
7
7
  _remotionInternalNativeLoopPassed: boolean;
8
8
  _remotionInternalStack: string | null;
9
+ showInTimeline: boolean;
9
10
  };
10
11
  export declare const AudioForPreview: React.ForwardRefExoticComponent<Omit<AudioForPreviewProps, "ref"> & React.RefAttributes<HTMLAudioElement>>;
11
12
  export {};
@@ -24,7 +24,7 @@ const AudioForDevelopmentForwardRefFunction = (props, ref) => {
24
24
  const [mediaVolume] = (0, volume_position_state_js_1.useMediaVolumeState)();
25
25
  const [mediaMuted] = (0, volume_position_state_js_1.useMediaMutedState)();
26
26
  const volumePropFrame = (0, use_audio_frame_js_1.useFrameForVolumeProp)();
27
- const { volume, muted, playbackRate, shouldPreMountAudioTags, src, onDuration, acceptableTimeShiftInSeconds, _remotionInternalNeedsDurationCalculation, _remotionInternalNativeLoopPassed, _remotionInternalStack, allowAmplificationDuringRender, name, pauseWhenBuffering, ...nativeProps } = props;
27
+ const { volume, muted, playbackRate, shouldPreMountAudioTags, src, onDuration, acceptableTimeShiftInSeconds, _remotionInternalNeedsDurationCalculation, _remotionInternalNativeLoopPassed, _remotionInternalStack, allowAmplificationDuringRender, name, pauseWhenBuffering, showInTimeline, ...nativeProps } = props;
28
28
  const { hidden } = (0, react_1.useContext)(SequenceManager_js_1.SequenceVisibilityToggleContext);
29
29
  if (!src) {
30
30
  throw new TypeError("No 'src' was passed to <Audio>.");
@@ -76,7 +76,8 @@ const AudioForDevelopmentForwardRefFunction = (props, ref) => {
76
76
  playbackRate: playbackRate !== null && playbackRate !== void 0 ? playbackRate : 1,
77
77
  displayName: name !== null && name !== void 0 ? name : null,
78
78
  id: timelineId,
79
- stack: props._remotionInternalStack,
79
+ stack: _remotionInternalStack,
80
+ showInTimeline,
80
81
  });
81
82
  (0, use_media_playback_js_1.useMediaPlayback)({
82
83
  mediaRef: audioRef,
@@ -10,6 +10,7 @@ export declare const AudioForRendering: ForwardRefExoticComponent<Omit<React.Det
10
10
  _remotionInternalNativeLoopPassed?: boolean | undefined;
11
11
  toneFrequency?: number | undefined;
12
12
  pauseWhenBuffering?: boolean | undefined;
13
+ showInTimeline?: boolean | undefined;
13
14
  } & {
14
15
  onDuration: (src: string, durationInSeconds: number) => void;
15
16
  } & RefAttributes<HTMLAudioElement>>;
@@ -14,4 +14,5 @@ export type RemotionAudioProps = Omit<React.DetailedHTMLProps<React.AudioHTMLAtt
14
14
  _remotionInternalNativeLoopPassed?: boolean;
15
15
  toneFrequency?: number;
16
16
  pauseWhenBuffering?: boolean;
17
+ showInTimeline?: boolean;
17
18
  };
@@ -1,4 +1,4 @@
1
- export declare const validCodecs: readonly ["h264", "h265", "vp8", "vp9", "mp3", "aac", "wav", "prores", "h264-mkv", "gif"];
1
+ export declare const validCodecs: readonly ["h264", "h265", "vp8", "vp9", "mp3", "aac", "wav", "prores", "h264-mkv", "h264-ts", "gif"];
2
2
  export type Codec = (typeof validCodecs)[number];
3
3
  export type CodecOrUndefined = Codec | undefined;
4
4
  export declare const DEFAULT_CODEC: Codec;
package/dist/cjs/codec.js CHANGED
@@ -11,6 +11,7 @@ exports.validCodecs = [
11
11
  'wav',
12
12
  'prores',
13
13
  'h264-mkv',
14
+ 'h264-ts',
14
15
  'gif',
15
16
  ];
16
17
  exports.DEFAULT_CODEC = 'h264';
@@ -0,0 +1 @@
1
+ export declare const getTimelineClipName: (children: React.ReactNode) => string;
@@ -0,0 +1,25 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.getTimelineClipName = void 0;
4
+ const react_1 = require("react");
5
+ const HIDDEN_NAMES = ['__WEBPACK_DEFAULT_EXPORT__'];
6
+ const getTimelineClipName = (children) => {
7
+ var _a;
8
+ const tree = (_a = react_1.Children.map(children, (ch) => {
9
+ if (!(0, react_1.isValidElement)(ch)) {
10
+ return null;
11
+ }
12
+ // Must be name, not ID
13
+ const name = typeof ch.type !== 'string' && ch.type.name;
14
+ if (name && !HIDDEN_NAMES.includes(name)) {
15
+ return name;
16
+ }
17
+ if (ch.props.children) {
18
+ const chName = (0, exports.getTimelineClipName)(ch.props.children);
19
+ return chName;
20
+ }
21
+ return null;
22
+ })) === null || _a === void 0 ? void 0 : _a.filter(Boolean);
23
+ return (tree === null || tree === void 0 ? void 0 : tree.length) ? tree[0] : '';
24
+ };
25
+ exports.getTimelineClipName = getTimelineClipName;
@@ -2,6 +2,12 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.setupEnvVariables = void 0;
4
4
  const get_remotion_environment_js_1 = require("./get-remotion-environment.js");
5
+ // https://github.com/remotion-dev/remotion/issues/3412#issuecomment-1910120552
6
+ // eslint-disable-next-line no-useless-concat
7
+ function getEnvVar() {
8
+ const parts = ['proc', 'ess', '.', 'en', 'v', '.', 'NOD', 'E_EN', 'V'];
9
+ return parts.join('');
10
+ }
5
11
  const getEnvVariables = () => {
6
12
  if ((0, get_remotion_environment_js_1.getRemotionEnvironment)().isRendering) {
7
13
  const param = window.remotion_envVariables;
@@ -13,9 +19,7 @@ const getEnvVariables = () => {
13
19
  // For the Studio, we already set the environment variables in index-html.ts.
14
20
  // We just add NODE_ENV here.
15
21
  if (!process.env.NODE_ENV) {
16
- // https://github.com/remotion-dev/remotion/issues/3412#issuecomment-1910120552
17
- // eslint-disable-next-line no-useless-concat
18
- throw new Error('process.en' + '' + 'v.NODE_ENV is not set');
22
+ throw new Error(`${getEnvVar()} is not set`);
19
23
  }
20
24
  return {
21
25
  NODE_ENV: process.env.NODE_ENV,
@@ -1,6 +1,6 @@
1
1
  import type { RefObject } from 'react';
2
2
  import type { VolumeProp } from './volume-prop.js';
3
- export declare const useMediaInTimeline: ({ volume, mediaVolume, mediaRef, src, mediaType, playbackRate, displayName, id, stack, }: {
3
+ export declare const useMediaInTimeline: ({ volume, mediaVolume, mediaRef, src, mediaType, playbackRate, displayName, id, stack, showInTimeline, }: {
4
4
  volume: VolumeProp | undefined;
5
5
  mediaVolume: number;
6
6
  mediaRef: RefObject<HTMLAudioElement | HTMLVideoElement>;
@@ -10,4 +10,5 @@ export declare const useMediaInTimeline: ({ volume, mediaVolume, mediaRef, src,
10
10
  displayName: string | null;
11
11
  id: string;
12
12
  stack: string | null;
13
+ showInTimeline: boolean;
13
14
  }) => void;
@@ -21,7 +21,7 @@ const warnOnce = (message) => {
21
21
  console.warn(message);
22
22
  didWarn[message] = true;
23
23
  };
24
- const useMediaInTimeline = ({ volume, mediaVolume, mediaRef, src, mediaType, playbackRate, displayName, id, stack, }) => {
24
+ const useMediaInTimeline = ({ volume, mediaVolume, mediaRef, src, mediaType, playbackRate, displayName, id, stack, showInTimeline, }) => {
25
25
  const videoConfig = (0, use_video_config_js_1.useVideoConfig)();
26
26
  const { rootId, audioAndVideoTags } = (0, react_1.useContext)(timeline_position_state_js_1.TimelineContext);
27
27
  const parentSequence = (0, react_1.useContext)(SequenceContext_js_1.SequenceContext);
@@ -69,6 +69,9 @@ const useMediaInTimeline = ({ volume, mediaVolume, mediaRef, src, mediaType, pla
69
69
  if (!(0, get_remotion_environment_js_1.getRemotionEnvironment)().isStudio && process.env.NODE_ENV !== 'test') {
70
70
  return;
71
71
  }
72
+ if (!showInTimeline) {
73
+ return;
74
+ }
72
75
  registerSequence({
73
76
  type: mediaType,
74
77
  src,
@@ -109,6 +112,7 @@ const useMediaInTimeline = ({ volume, mediaVolume, mediaRef, src, mediaType, pla
109
112
  playbackRate,
110
113
  displayName,
111
114
  stack,
115
+ showInTimeline,
112
116
  ]);
113
117
  (0, react_1.useEffect)(() => {
114
118
  const tag = {
@@ -1 +1 @@
1
- export declare const VERSION = "4.0.121";
1
+ export declare const VERSION = "4.0.123";
@@ -2,4 +2,4 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.VERSION = void 0;
4
4
  // Automatically generated on publish
5
- exports.VERSION = '4.0.121';
5
+ exports.VERSION = '4.0.123';
@@ -16,7 +16,7 @@ const VideoForPreview_js_1 = require("./VideoForPreview.js");
16
16
  const OffthreadVideo = (props) => {
17
17
  // Should only destruct `startFrom` and `endAt` from props,
18
18
  // rest gets drilled down
19
- const { startFrom, endAt, name, pauseWhenBuffering, stack, ...otherProps } = props;
19
+ const { startFrom, endAt, name, pauseWhenBuffering, stack, showInTimeline, ...otherProps } = props;
20
20
  const environment = (0, get_remotion_environment_js_1.getRemotionEnvironment)();
21
21
  const onDuration = (0, react_1.useCallback)(() => undefined, []);
22
22
  if (typeof props.src !== 'string') {
@@ -36,6 +36,6 @@ const OffthreadVideo = (props) => {
36
36
  return (0, jsx_runtime_1.jsx)(OffthreadVideoForRendering_js_1.OffthreadVideoForRendering, { ...otherProps });
37
37
  }
38
38
  const { transparent, toneMapped, ...withoutTransparent } = otherProps;
39
- return ((0, jsx_runtime_1.jsx)(VideoForPreview_js_1.VideoForPreview, { _remotionInternalStack: stack !== null && stack !== void 0 ? stack : null, _remotionInternalNativeLoopPassed: false, onDuration: onDuration, onlyWarnForMediaSeekingError: true, pauseWhenBuffering: pauseWhenBuffering !== null && pauseWhenBuffering !== void 0 ? pauseWhenBuffering : false, ...withoutTransparent }));
39
+ return ((0, jsx_runtime_1.jsx)(VideoForPreview_js_1.VideoForPreview, { _remotionInternalStack: stack !== null && stack !== void 0 ? stack : null, _remotionInternalNativeLoopPassed: false, onDuration: onDuration, onlyWarnForMediaSeekingError: true, pauseWhenBuffering: pauseWhenBuffering !== null && pauseWhenBuffering !== void 0 ? pauseWhenBuffering : false, showInTimeline: showInTimeline !== null && showInTimeline !== void 0 ? showInTimeline : true, ...withoutTransparent }));
40
40
  };
41
41
  exports.OffthreadVideo = OffthreadVideo;
@@ -12,6 +12,7 @@ export declare const Video: React.ForwardRefExoticComponent<Omit<Omit<React.Deta
12
12
  allowAmplificationDuringRender?: boolean | undefined;
13
13
  toneFrequency?: number | undefined;
14
14
  pauseWhenBuffering?: boolean | undefined;
15
+ showInTimeline?: boolean | undefined;
15
16
  } & RemotionMainVideoProps & {
16
17
  /**
17
18
  * @deprecated For internal use only
@@ -19,7 +19,7 @@ const VideoForPreview_js_1 = require("./VideoForPreview.js");
19
19
  const VideoForRendering_js_1 = require("./VideoForRendering.js");
20
20
  const VideoForwardingFunction = (props, ref) => {
21
21
  var _a, _b;
22
- const { startFrom, endAt, name, pauseWhenBuffering, stack, _remotionInternalNativeLoopPassed, ...otherProps } = props;
22
+ const { startFrom, endAt, name, pauseWhenBuffering, stack, _remotionInternalNativeLoopPassed, showInTimeline, ...otherProps } = props;
23
23
  const { loop, ...propsOtherThanLoop } = props;
24
24
  const { fps } = (0, use_video_config_js_1.useVideoConfig)();
25
25
  const environment = (0, get_remotion_environment_js_1.getRemotionEnvironment)();
@@ -56,7 +56,7 @@ const VideoForwardingFunction = (props, ref) => {
56
56
  }
57
57
  return ((0, jsx_runtime_1.jsx)(VideoForPreview_js_1.VideoForPreview, { onlyWarnForMediaSeekingError: false, ...otherProps, ref: ref,
58
58
  // Proposal: Make this default to true in v5
59
- pauseWhenBuffering: pauseWhenBuffering !== null && pauseWhenBuffering !== void 0 ? pauseWhenBuffering : false, onDuration: onDuration, _remotionInternalStack: stack !== null && stack !== void 0 ? stack : null, _remotionInternalNativeLoopPassed: _remotionInternalNativeLoopPassed !== null && _remotionInternalNativeLoopPassed !== void 0 ? _remotionInternalNativeLoopPassed : false }));
59
+ pauseWhenBuffering: pauseWhenBuffering !== null && pauseWhenBuffering !== void 0 ? pauseWhenBuffering : false, onDuration: onDuration, _remotionInternalStack: stack !== null && stack !== void 0 ? stack : null, _remotionInternalNativeLoopPassed: _remotionInternalNativeLoopPassed !== null && _remotionInternalNativeLoopPassed !== void 0 ? _remotionInternalNativeLoopPassed : false, showInTimeline: showInTimeline !== null && showInTimeline !== void 0 ? showInTimeline : true }));
60
60
  };
61
61
  /**
62
62
  * @description allows you to include a video file in your Remotion project. It wraps the native HTMLVideoElement.
@@ -1,6 +1,6 @@
1
1
  import type { ForwardRefExoticComponent, RefAttributes } from 'react';
2
2
  import React from 'react';
3
- export declare const VideoForDevelopment: ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.VideoHTMLAttributes<HTMLVideoElement>, HTMLVideoElement>, "autoPlay" | "controls" | "onEnded" | "nonce"> & {
3
+ export declare const VideoForDevelopment: ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.VideoHTMLAttributes<HTMLVideoElement>, HTMLVideoElement>, "nonce" | "onEnded" | "autoPlay" | "controls"> & {
4
4
  name?: string | undefined;
5
5
  volume?: import("../volume-prop.js").VolumeProp | undefined;
6
6
  playbackRate?: number | undefined;
@@ -6,6 +6,7 @@ type VideoForPreviewProps = RemotionVideoProps & {
6
6
  pauseWhenBuffering: boolean;
7
7
  _remotionInternalNativeLoopPassed: boolean;
8
8
  _remotionInternalStack: string | null;
9
+ showInTimeline: boolean;
9
10
  };
10
11
  export declare const VideoForPreview: React.ForwardRefExoticComponent<Omit<VideoForPreviewProps, "ref"> & React.RefAttributes<HTMLVideoElement>>;
11
12
  export {};
@@ -26,7 +26,7 @@ const VideoForDevelopmentRefForwardingFunction = (props, ref) => {
26
26
  const isSequenceHidden = (_a = hidden[timelineId]) !== null && _a !== void 0 ? _a : false;
27
27
  const { volume, muted, playbackRate, onlyWarnForMediaSeekingError, src, onDuration,
28
28
  // @ts-expect-error
29
- acceptableTimeShift, acceptableTimeShiftInSeconds, toneFrequency, name, _remotionInternalNativeLoopPassed, _remotionInternalStack, style, pauseWhenBuffering, ...nativeProps } = props;
29
+ acceptableTimeShift, acceptableTimeShiftInSeconds, toneFrequency, name, _remotionInternalNativeLoopPassed, _remotionInternalStack, style, pauseWhenBuffering, showInTimeline, ...nativeProps } = props;
30
30
  if (typeof acceptableTimeShift !== 'undefined') {
31
31
  throw new Error('acceptableTimeShift has been removed. Use acceptableTimeShiftInSeconds instead.');
32
32
  }
@@ -42,7 +42,8 @@ const VideoForDevelopmentRefForwardingFunction = (props, ref) => {
42
42
  playbackRate: (_b = props.playbackRate) !== null && _b !== void 0 ? _b : 1,
43
43
  displayName: name !== null && name !== void 0 ? name : null,
44
44
  id: timelineId,
45
- stack: props._remotionInternalStack,
45
+ stack: _remotionInternalStack,
46
+ showInTimeline,
46
47
  });
47
48
  (0, use_sync_volume_with_media_tag_js_1.useSyncVolumeWithMediaTag)({
48
49
  volumePropFrame,
@@ -8,6 +8,7 @@ export declare const VideoForRendering: ForwardRefExoticComponent<Omit<React.Det
8
8
  allowAmplificationDuringRender?: boolean | undefined;
9
9
  toneFrequency?: number | undefined;
10
10
  pauseWhenBuffering?: boolean | undefined;
11
+ showInTimeline?: boolean | undefined;
11
12
  } & {
12
13
  onDuration: (src: string, durationInSeconds: number) => void;
13
14
  } & RefAttributes<HTMLVideoElement>>;
@@ -16,6 +16,7 @@ export type RemotionVideoProps = Omit<React.DetailedHTMLProps<React.VideoHTMLAtt
16
16
  allowAmplificationDuringRender?: boolean;
17
17
  toneFrequency?: number;
18
18
  pauseWhenBuffering?: boolean;
19
+ showInTimeline?: boolean;
19
20
  };
20
21
  type DeprecatedOffthreadVideoProps = {
21
22
  /**
@@ -43,5 +44,6 @@ export type OffthreadVideoProps = {
43
44
  * @deprecated For internal use only
44
45
  */
45
46
  stack?: string;
47
+ showInTimeline?: boolean;
46
48
  } & RemotionMainVideoProps & DeprecatedOffthreadVideoProps;
47
49
  export {};
@@ -105,7 +105,7 @@ function truthy(value) {
105
105
  }
106
106
 
107
107
  // Automatically generated on publish
108
- const VERSION = '4.0.121';
108
+ const VERSION = '4.0.123';
109
109
 
110
110
  const checkMultipleRemotionVersions = () => {
111
111
  if (typeof globalThis === 'undefined') {
@@ -429,6 +429,7 @@ const validCodecs = [
429
429
  'wav',
430
430
  'prores',
431
431
  'h264-mkv',
432
+ 'h264-ts',
432
433
  'gif',
433
434
  ];
434
435
 
@@ -1691,7 +1692,7 @@ const warnOnce = (message) => {
1691
1692
  console.warn(message);
1692
1693
  didWarn[message] = true;
1693
1694
  };
1694
- const useMediaInTimeline = ({ volume, mediaVolume, mediaRef, src, mediaType, playbackRate, displayName, id, stack, }) => {
1695
+ const useMediaInTimeline = ({ volume, mediaVolume, mediaRef, src, mediaType, playbackRate, displayName, id, stack, showInTimeline, }) => {
1695
1696
  const videoConfig = useVideoConfig();
1696
1697
  const { rootId, audioAndVideoTags } = useContext(TimelineContext);
1697
1698
  const parentSequence = useContext(SequenceContext);
@@ -1739,6 +1740,9 @@ const useMediaInTimeline = ({ volume, mediaVolume, mediaRef, src, mediaType, pla
1739
1740
  if (!getRemotionEnvironment().isStudio && process.env.NODE_ENV !== 'test') {
1740
1741
  return;
1741
1742
  }
1743
+ if (!showInTimeline) {
1744
+ return;
1745
+ }
1742
1746
  registerSequence({
1743
1747
  type: mediaType,
1744
1748
  src,
@@ -1779,6 +1783,7 @@ const useMediaInTimeline = ({ volume, mediaVolume, mediaRef, src, mediaType, pla
1779
1783
  playbackRate,
1780
1784
  displayName,
1781
1785
  stack,
1786
+ showInTimeline,
1782
1787
  ]);
1783
1788
  useEffect(() => {
1784
1789
  const tag = {
@@ -2425,7 +2430,7 @@ const AudioForDevelopmentForwardRefFunction = (props, ref) => {
2425
2430
  const [mediaVolume] = useMediaVolumeState();
2426
2431
  const [mediaMuted] = useMediaMutedState();
2427
2432
  const volumePropFrame = useFrameForVolumeProp();
2428
- const { volume, muted, playbackRate, shouldPreMountAudioTags, src, onDuration, acceptableTimeShiftInSeconds, _remotionInternalNeedsDurationCalculation, _remotionInternalNativeLoopPassed, _remotionInternalStack, allowAmplificationDuringRender, name, pauseWhenBuffering, ...nativeProps } = props;
2433
+ const { volume, muted, playbackRate, shouldPreMountAudioTags, src, onDuration, acceptableTimeShiftInSeconds, _remotionInternalNeedsDurationCalculation, _remotionInternalNativeLoopPassed, _remotionInternalStack, allowAmplificationDuringRender, name, pauseWhenBuffering, showInTimeline, ...nativeProps } = props;
2429
2434
  const { hidden } = useContext(SequenceVisibilityToggleContext);
2430
2435
  if (!src) {
2431
2436
  throw new TypeError("No 'src' was passed to <Audio>.");
@@ -2477,7 +2482,8 @@ const AudioForDevelopmentForwardRefFunction = (props, ref) => {
2477
2482
  playbackRate: playbackRate !== null && playbackRate !== void 0 ? playbackRate : 1,
2478
2483
  displayName: name !== null && name !== void 0 ? name : null,
2479
2484
  id: timelineId,
2480
- stack: props._remotionInternalStack,
2485
+ stack: _remotionInternalStack,
2486
+ showInTimeline,
2481
2487
  });
2482
2488
  useMediaPlayback({
2483
2489
  mediaRef: audioRef,
@@ -2746,7 +2752,7 @@ const AudioForRendering = forwardRef(AudioForRenderingRefForwardingFunction);
2746
2752
  const AudioRefForwardingFunction = (props, ref) => {
2747
2753
  var _a, _b, _c;
2748
2754
  const audioContext = useContext(SharedAudioContext);
2749
- const { startFrom, endAt, name, stack, pauseWhenBuffering, ...otherProps } = props;
2755
+ const { startFrom, endAt, name, stack, pauseWhenBuffering, showInTimeline, ...otherProps } = props;
2750
2756
  const { loop, ...propsOtherThanLoop } = props;
2751
2757
  const { fps } = useVideoConfig();
2752
2758
  const environment = getRemotionEnvironment();
@@ -2794,7 +2800,7 @@ const AudioRefForwardingFunction = (props, ref) => {
2794
2800
  }
2795
2801
  return (jsx(AudioForPreview, { _remotionInternalNativeLoopPassed: (_c = props._remotionInternalNativeLoopPassed) !== null && _c !== void 0 ? _c : false, _remotionInternalStack: stack !== null && stack !== void 0 ? stack : null, shouldPreMountAudioTags: audioContext !== null && audioContext.numberOfAudioTags > 0, ...props, ref: ref, onError: onError, onDuration: onDuration,
2796
2802
  // Proposal: Make this default to true in v5
2797
- pauseWhenBuffering: pauseWhenBuffering !== null && pauseWhenBuffering !== void 0 ? pauseWhenBuffering : false, _remotionInternalNeedsDurationCalculation: Boolean(loop) }));
2803
+ pauseWhenBuffering: pauseWhenBuffering !== null && pauseWhenBuffering !== void 0 ? pauseWhenBuffering : false, _remotionInternalNeedsDurationCalculation: Boolean(loop), showInTimeline: showInTimeline !== null && showInTimeline !== void 0 ? showInTimeline : true }));
2798
2804
  };
2799
2805
  /**
2800
2806
  * @description With this component, you can add audio to your video. All audio formats which are supported by Chromium are supported by the component.
@@ -4054,6 +4060,12 @@ const RemotionRoot = ({ children, numberOfAudioTags }) => {
4054
4060
  return (jsx(NonceContext.Provider, { value: nonceContext, children: jsx(TimelineContext.Provider, { value: timelineContextValue, children: jsx(SetTimelineContext.Provider, { value: setTimelineContextValue, children: jsx(EditorPropsProvider, { children: jsx(PrefetchProvider, { children: jsx(NativeLayersProvider, { children: jsx(CompositionManagerProvider, { numberOfAudioTags: numberOfAudioTags, children: jsx(DurationsContextProvider, { children: jsx(BufferingProvider, { children: children }) }) }) }) }) }) }) }) }));
4055
4061
  };
4056
4062
 
4063
+ // https://github.com/remotion-dev/remotion/issues/3412#issuecomment-1910120552
4064
+ // eslint-disable-next-line no-useless-concat
4065
+ function getEnvVar() {
4066
+ const parts = ['proc', 'ess', '.', 'en', 'v', '.', 'NOD', 'E_EN', 'V'];
4067
+ return parts.join('');
4068
+ }
4057
4069
  const getEnvVariables = () => {
4058
4070
  if (getRemotionEnvironment().isRendering) {
4059
4071
  const param = window.remotion_envVariables;
@@ -4065,9 +4077,7 @@ const getEnvVariables = () => {
4065
4077
  // For the Studio, we already set the environment variables in index-html.ts.
4066
4078
  // We just add NODE_ENV here.
4067
4079
  if (!process.env.NODE_ENV) {
4068
- // https://github.com/remotion-dev/remotion/issues/3412#issuecomment-1910120552
4069
- // eslint-disable-next-line no-useless-concat
4070
- throw new Error('process.en' + '' + 'v.NODE_ENV is not set');
4080
+ throw new Error(`${getEnvVar()} is not set`);
4071
4081
  }
4072
4082
  return {
4073
4083
  NODE_ENV: process.env.NODE_ENV,
@@ -4773,7 +4783,7 @@ const VideoForDevelopmentRefForwardingFunction = (props, ref) => {
4773
4783
  const isSequenceHidden = (_a = hidden[timelineId]) !== null && _a !== void 0 ? _a : false;
4774
4784
  const { volume, muted, playbackRate, onlyWarnForMediaSeekingError, src, onDuration,
4775
4785
  // @ts-expect-error
4776
- acceptableTimeShift, acceptableTimeShiftInSeconds, toneFrequency, name, _remotionInternalNativeLoopPassed, _remotionInternalStack, style, pauseWhenBuffering, ...nativeProps } = props;
4786
+ acceptableTimeShift, acceptableTimeShiftInSeconds, toneFrequency, name, _remotionInternalNativeLoopPassed, _remotionInternalStack, style, pauseWhenBuffering, showInTimeline, ...nativeProps } = props;
4777
4787
  if (typeof acceptableTimeShift !== 'undefined') {
4778
4788
  throw new Error('acceptableTimeShift has been removed. Use acceptableTimeShiftInSeconds instead.');
4779
4789
  }
@@ -4789,7 +4799,8 @@ const VideoForDevelopmentRefForwardingFunction = (props, ref) => {
4789
4799
  playbackRate: (_b = props.playbackRate) !== null && _b !== void 0 ? _b : 1,
4790
4800
  displayName: name !== null && name !== void 0 ? name : null,
4791
4801
  id: timelineId,
4792
- stack: props._remotionInternalStack,
4802
+ stack: _remotionInternalStack,
4803
+ showInTimeline,
4793
4804
  });
4794
4805
  useSyncVolumeWithMediaTag({
4795
4806
  volumePropFrame,
@@ -4903,7 +4914,7 @@ const VideoForPreview = forwardRef(VideoForDevelopmentRefForwardingFunction);
4903
4914
  const OffthreadVideo = (props) => {
4904
4915
  // Should only destruct `startFrom` and `endAt` from props,
4905
4916
  // rest gets drilled down
4906
- const { startFrom, endAt, name, pauseWhenBuffering, stack, ...otherProps } = props;
4917
+ const { startFrom, endAt, name, pauseWhenBuffering, stack, showInTimeline, ...otherProps } = props;
4907
4918
  const environment = getRemotionEnvironment();
4908
4919
  const onDuration = useCallback(() => undefined, []);
4909
4920
  if (typeof props.src !== 'string') {
@@ -4923,7 +4934,7 @@ const OffthreadVideo = (props) => {
4923
4934
  return jsx(OffthreadVideoForRendering, { ...otherProps });
4924
4935
  }
4925
4936
  const { transparent, toneMapped, ...withoutTransparent } = otherProps;
4926
- return (jsx(VideoForPreview, { _remotionInternalStack: stack !== null && stack !== void 0 ? stack : null, _remotionInternalNativeLoopPassed: false, onDuration: onDuration, onlyWarnForMediaSeekingError: true, pauseWhenBuffering: pauseWhenBuffering !== null && pauseWhenBuffering !== void 0 ? pauseWhenBuffering : false, ...withoutTransparent }));
4937
+ return (jsx(VideoForPreview, { _remotionInternalStack: stack !== null && stack !== void 0 ? stack : null, _remotionInternalNativeLoopPassed: false, onDuration: onDuration, onlyWarnForMediaSeekingError: true, pauseWhenBuffering: pauseWhenBuffering !== null && pauseWhenBuffering !== void 0 ? pauseWhenBuffering : false, showInTimeline: showInTimeline !== null && showInTimeline !== void 0 ? showInTimeline : true, ...withoutTransparent }));
4927
4938
  };
4928
4939
 
4929
4940
  const roundTo6Commas = (num) => {
@@ -5194,7 +5205,7 @@ const VideoForRendering = forwardRef(VideoForRenderingForwardFunction);
5194
5205
 
5195
5206
  const VideoForwardingFunction = (props, ref) => {
5196
5207
  var _a, _b;
5197
- const { startFrom, endAt, name, pauseWhenBuffering, stack, _remotionInternalNativeLoopPassed, ...otherProps } = props;
5208
+ const { startFrom, endAt, name, pauseWhenBuffering, stack, _remotionInternalNativeLoopPassed, showInTimeline, ...otherProps } = props;
5198
5209
  const { loop, ...propsOtherThanLoop } = props;
5199
5210
  const { fps } = useVideoConfig();
5200
5211
  const environment = getRemotionEnvironment();
@@ -5231,7 +5242,7 @@ const VideoForwardingFunction = (props, ref) => {
5231
5242
  }
5232
5243
  return (jsx(VideoForPreview, { onlyWarnForMediaSeekingError: false, ...otherProps, ref: ref,
5233
5244
  // Proposal: Make this default to true in v5
5234
- pauseWhenBuffering: pauseWhenBuffering !== null && pauseWhenBuffering !== void 0 ? pauseWhenBuffering : false, onDuration: onDuration, _remotionInternalStack: stack !== null && stack !== void 0 ? stack : null, _remotionInternalNativeLoopPassed: _remotionInternalNativeLoopPassed !== null && _remotionInternalNativeLoopPassed !== void 0 ? _remotionInternalNativeLoopPassed : false }));
5245
+ pauseWhenBuffering: pauseWhenBuffering !== null && pauseWhenBuffering !== void 0 ? pauseWhenBuffering : false, onDuration: onDuration, _remotionInternalStack: stack !== null && stack !== void 0 ? stack : null, _remotionInternalNativeLoopPassed: _remotionInternalNativeLoopPassed !== null && _remotionInternalNativeLoopPassed !== void 0 ? _remotionInternalNativeLoopPassed : false, showInTimeline: showInTimeline !== null && showInTimeline !== void 0 ? showInTimeline : true }));
5235
5246
  };
5236
5247
  /**
5237
5248
  * @description allows you to include a video file in your Remotion project. It wraps the native HTMLVideoElement.
@@ -1,4 +1,4 @@
1
1
  // Automatically generated on publish
2
- const VERSION = '4.0.121';
2
+ const VERSION = '4.0.123';
3
3
 
4
4
  export { VERSION };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "remotion",
3
- "version": "4.0.121",
3
+ "version": "4.0.123",
4
4
  "description": "Render videos in React",
5
5
  "main": "dist/cjs/index.js",
6
6
  "types": "dist/cjs/index.d.ts",
@@ -1,5 +0,0 @@
1
- export declare const useBufferState: () => {
2
- delayPlayback: () => {
3
- unblock: () => void;
4
- };
5
- };
@@ -1,28 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.useBufferState = void 0;
4
- const react_1 = require("react");
5
- const buffering_1 = require("./buffering");
6
- const CanUseRemotionHooks_1 = require("./CanUseRemotionHooks");
7
- const useBufferState = () => {
8
- const canUseRemotionHooks = (0, react_1.useContext)(CanUseRemotionHooks_1.CanUseRemotionHooks);
9
- if (!canUseRemotionHooks) {
10
- if (typeof window !== 'undefined' && window.remotion_isPlayer) {
11
- throw new Error(`useCurrentFrame can only be called inside a component that was passed to <Player>. See: https://www.remotion.dev/docs/player/examples`);
12
- }
13
- throw new Error(`useCurrentFrame() can only be called inside a component that was registered as a composition. See https://www.remotion.dev/docs/the-fundamentals#defining-compositions`);
14
- }
15
- const buffer = (0, react_1.useContext)(buffering_1.BufferingContextReact);
16
- if (!buffer) {
17
- throw new Error('BufferingContextReact was unexpectedly not found. Most likely your Remotion versions are mismatching.');
18
- }
19
- return (0, react_1.useMemo)(() => ({
20
- delayPlayback: () => {
21
- const { unblock } = buffer.addBlock({
22
- id: String(Math.random()),
23
- });
24
- return { unblock };
25
- },
26
- }), [buffer]);
27
- };
28
- exports.useBufferState = useBufferState;