remotion 4.0.71 → 4.0.73

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.
@@ -11,5 +11,6 @@ export declare const Audio: React.ForwardRefExoticComponent<Pick<Omit<React.Deta
11
11
  acceptableTimeShiftInSeconds?: number | undefined;
12
12
  allowAmplificationDuringRender?: boolean | undefined;
13
13
  _remotionInternalNeedsDurationCalculation?: boolean | undefined;
14
+ _remotionInternalNativeLoopPassed?: boolean | undefined;
14
15
  toneFrequency?: number | undefined;
15
- } & RemotionMainAudioProps, "id" | "key" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "className" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "hidden" | "lang" | "placeholder" | "slot" | "spellCheck" | "style" | "tabIndex" | "title" | "translate" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "color" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "children" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "volume" | "allowAmplificationDuringRender" | "controlsList" | "crossOrigin" | "loop" | "mediaGroup" | "muted" | "playsInline" | "preload" | "src" | "name" | "playbackRate" | "acceptableTimeShiftInSeconds" | "_remotionInternalNeedsDurationCalculation" | "toneFrequency" | keyof RemotionMainAudioProps> & React.RefAttributes<HTMLAudioElement>>;
16
+ } & RemotionMainAudioProps, "id" | "key" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "className" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "hidden" | "lang" | "placeholder" | "slot" | "spellCheck" | "style" | "tabIndex" | "title" | "translate" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "color" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "children" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "volume" | "allowAmplificationDuringRender" | "controlsList" | "crossOrigin" | "loop" | "mediaGroup" | "muted" | "playsInline" | "preload" | "src" | "name" | "playbackRate" | "acceptableTimeShiftInSeconds" | "_remotionInternalNeedsDurationCalculation" | "_remotionInternalNativeLoopPassed" | "toneFrequency" | keyof RemotionMainAudioProps> & React.RefAttributes<HTMLAudioElement>>;
@@ -19,7 +19,7 @@ const AudioForDevelopment_js_1 = require("./AudioForDevelopment.js");
19
19
  const AudioForRendering_js_1 = require("./AudioForRendering.js");
20
20
  const shared_audio_tags_js_1 = require("./shared-audio-tags.js");
21
21
  const AudioRefForwardingFunction = (props, ref) => {
22
- var _a;
22
+ var _a, _b;
23
23
  const audioContext = (0, react_1.useContext)(shared_audio_tags_js_1.SharedAudioContext);
24
24
  const { startFrom, endAt, name, ...otherProps } = props;
25
25
  const { loop, ...propsOtherThanLoop } = props;
@@ -52,7 +52,7 @@ const AudioRefForwardingFunction = (props, ref) => {
52
52
  mediaDuration: duration,
53
53
  playbackRate: (_a = props.playbackRate) !== null && _a !== void 0 ? _a : 1,
54
54
  startFrom,
55
- }), children: (0, jsx_runtime_1.jsx)(exports.Audio, { ...propsOtherThanLoop, ref: ref }) }));
55
+ }), children: (0, jsx_runtime_1.jsx)(exports.Audio, { ...propsOtherThanLoop, ref: ref, _remotionInternalNativeLoopPassed: true }) }));
56
56
  }
57
57
  if (typeof startFrom !== 'undefined' || typeof endAt !== 'undefined') {
58
58
  (0, validate_start_from_props_js_1.validateStartFromProps)(startFrom, endAt);
@@ -64,7 +64,7 @@ const AudioRefForwardingFunction = (props, ref) => {
64
64
  if (environment.isRendering) {
65
65
  return ((0, jsx_runtime_1.jsx)(AudioForRendering_js_1.AudioForRendering, { onDuration: onDuration, ...props, ref: ref, onError: onError, _remotionInternalNeedsDurationCalculation: Boolean(loop) }));
66
66
  }
67
- return ((0, jsx_runtime_1.jsx)(AudioForDevelopment_js_1.AudioForDevelopment, { shouldPreMountAudioTags: audioContext !== null && audioContext.numberOfAudioTags > 0, ...props, ref: ref, onError: onError, onDuration: onDuration, _remotionInternalNeedsDurationCalculation: Boolean(loop) }));
67
+ return ((0, jsx_runtime_1.jsx)(AudioForDevelopment_js_1.AudioForDevelopment, { _remotionInternalNativeLoopPassed: (_b = props._remotionInternalNativeLoopPassed) !== null && _b !== void 0 ? _b : false, shouldPreMountAudioTags: audioContext !== null && audioContext.numberOfAudioTags > 0, ...props, ref: ref, onError: onError, onDuration: onDuration, _remotionInternalNeedsDurationCalculation: Boolean(loop) }));
68
68
  };
69
69
  /**
70
70
  * @description With this component, you can add audio to your video. All audio formats which are supported by Chromium are supported by the component.
@@ -7,8 +7,10 @@ export declare const AudioForDevelopment: ForwardRefExoticComponent<Omit<React.D
7
7
  acceptableTimeShiftInSeconds?: number | undefined;
8
8
  allowAmplificationDuringRender?: boolean | undefined;
9
9
  _remotionInternalNeedsDurationCalculation?: boolean | undefined;
10
+ _remotionInternalNativeLoopPassed?: boolean | undefined;
10
11
  toneFrequency?: number | undefined;
11
12
  } & {
12
13
  shouldPreMountAudioTags: boolean;
13
14
  onDuration: (src: string, durationInSeconds: number) => void;
15
+ _remotionInternalNativeLoopPassed: boolean;
14
16
  } & RefAttributes<HTMLAudioElement>>;
@@ -21,7 +21,7 @@ const AudioForDevelopmentForwardRefFunction = (props, ref) => {
21
21
  const [mediaVolume] = (0, volume_position_state_js_1.useMediaVolumeState)();
22
22
  const [mediaMuted] = (0, volume_position_state_js_1.useMediaMutedState)();
23
23
  const volumePropFrame = (0, use_audio_frame_js_1.useFrameForVolumeProp)();
24
- const { volume, muted, playbackRate, shouldPreMountAudioTags, src, onDuration, acceptableTimeShiftInSeconds, _remotionInternalNeedsDurationCalculation, allowAmplificationDuringRender, name, ...nativeProps } = props;
24
+ const { volume, muted, playbackRate, shouldPreMountAudioTags, src, onDuration, acceptableTimeShiftInSeconds, _remotionInternalNeedsDurationCalculation, _remotionInternalNativeLoopPassed, allowAmplificationDuringRender, name, ...nativeProps } = props;
25
25
  if (!src) {
26
26
  throw new TypeError("No 'src' was passed to <Audio>.");
27
27
  }
@@ -30,9 +30,16 @@ const AudioForDevelopmentForwardRefFunction = (props, ref) => {
30
30
  return {
31
31
  muted: muted || mediaMuted,
32
32
  src: preloadedSrc,
33
+ loop: _remotionInternalNativeLoopPassed,
33
34
  ...nativeProps,
34
35
  };
35
- }, [mediaMuted, muted, nativeProps, preloadedSrc]);
36
+ }, [
37
+ _remotionInternalNativeLoopPassed,
38
+ mediaMuted,
39
+ muted,
40
+ nativeProps,
41
+ preloadedSrc,
42
+ ]);
36
43
  const sequenceContext = (0, react_1.useContext)(SequenceContext_js_1.SequenceContext);
37
44
  // Generate a string that's as unique as possible for this asset
38
45
  // but at the same time deterministic. We use it to combat strict mode issues.
@@ -7,6 +7,7 @@ export declare const AudioForRendering: ForwardRefExoticComponent<Omit<React.Det
7
7
  acceptableTimeShiftInSeconds?: number | undefined;
8
8
  allowAmplificationDuringRender?: boolean | undefined;
9
9
  _remotionInternalNeedsDurationCalculation?: boolean | undefined;
10
+ _remotionInternalNativeLoopPassed?: boolean | undefined;
10
11
  toneFrequency?: number | undefined;
11
12
  } & {
12
13
  onDuration: (src: string, durationInSeconds: number) => void;
@@ -30,7 +30,7 @@ const AudioForRenderingRefForwardingFunction = (props, ref) => {
30
30
  sequenceContext === null || sequenceContext === void 0 ? void 0 : sequenceContext.cumulatedFrom,
31
31
  sequenceContext === null || sequenceContext === void 0 ? void 0 : sequenceContext.durationInFrames,
32
32
  ]);
33
- const { volume: volumeProp, playbackRate, allowAmplificationDuringRender, onDuration, toneFrequency, _remotionInternalNeedsDurationCalculation, acceptableTimeShiftInSeconds, name, ...nativeProps } = props;
33
+ const { volume: volumeProp, playbackRate, allowAmplificationDuringRender, onDuration, toneFrequency, _remotionInternalNeedsDurationCalculation, _remotionInternalNativeLoopPassed, acceptableTimeShiftInSeconds, name, ...nativeProps } = props;
34
34
  const volume = (0, volume_prop_js_1.evaluateVolume)({
35
35
  volume: volumeProp,
36
36
  frame: volumePropFrame,
@@ -11,5 +11,6 @@ export type RemotionAudioProps = Omit<React.DetailedHTMLProps<React.AudioHTMLAtt
11
11
  acceptableTimeShiftInSeconds?: number;
12
12
  allowAmplificationDuringRender?: boolean;
13
13
  _remotionInternalNeedsDurationCalculation?: boolean;
14
+ _remotionInternalNativeLoopPassed?: boolean;
14
15
  toneFrequency?: number;
15
16
  };
@@ -81,11 +81,10 @@ export * from './IFrame.js';
81
81
  export { Img, ImgProps } from './Img.js';
82
82
  export * from './internals.js';
83
83
  export { interpolateColors } from './interpolate-colors.js';
84
- export { EasingFunction, ExtrapolateType, interpolate, InterpolateOptions, } from './interpolate.js';
85
84
  export { Loop } from './loop/index.js';
86
85
  export { ClipRegion } from './NativeLayers.js';
86
+ export { EasingFunction, ExtrapolateType, interpolate, InterpolateOptions, random, RandomSeed, } from './no-react';
87
87
  export { prefetch } from './prefetch.js';
88
- export { random, RandomSeed } from './random.js';
89
88
  export { registerRoot } from './register-root.js';
90
89
  export { LayoutAndStyle, Sequence, SequenceProps, SequencePropsWithoutDuration, } from './Sequence.js';
91
90
  export { Series } from './series/index.js';
package/dist/cjs/index.js CHANGED
@@ -14,7 +14,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
14
  for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
15
  };
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
- exports.Config = exports.Experimental = exports.watchStaticFile = exports.useCurrentFrame = exports.staticFile = exports.Series = exports.Sequence = exports.registerRoot = exports.random = exports.prefetch = exports.Loop = exports.interpolate = exports.interpolateColors = exports.Img = exports.getStaticFiles = exports.getRemotionEnvironment = exports.delayRender = exports.continueRender = exports.getInputProps = exports.Composition = exports.cancelRender = void 0;
17
+ exports.Config = exports.Experimental = exports.watchStaticFile = exports.useCurrentFrame = exports.staticFile = exports.Series = exports.Sequence = exports.registerRoot = exports.prefetch = exports.random = exports.interpolate = exports.Loop = exports.interpolateColors = exports.Img = exports.getStaticFiles = exports.getRemotionEnvironment = exports.delayRender = exports.continueRender = exports.getInputProps = exports.Composition = exports.cancelRender = void 0;
18
18
  require("./asset-types.js");
19
19
  const Clipper_js_1 = require("./Clipper.js");
20
20
  const is_player_js_1 = require("./is-player.js");
@@ -45,14 +45,13 @@ Object.defineProperty(exports, "Img", { enumerable: true, get: function () { ret
45
45
  __exportStar(require("./internals.js"), exports);
46
46
  var interpolate_colors_js_1 = require("./interpolate-colors.js");
47
47
  Object.defineProperty(exports, "interpolateColors", { enumerable: true, get: function () { return interpolate_colors_js_1.interpolateColors; } });
48
- var interpolate_js_1 = require("./interpolate.js");
49
- Object.defineProperty(exports, "interpolate", { enumerable: true, get: function () { return interpolate_js_1.interpolate; } });
50
48
  var index_js_1 = require("./loop/index.js");
51
49
  Object.defineProperty(exports, "Loop", { enumerable: true, get: function () { return index_js_1.Loop; } });
50
+ var no_react_1 = require("./no-react");
51
+ Object.defineProperty(exports, "interpolate", { enumerable: true, get: function () { return no_react_1.interpolate; } });
52
+ Object.defineProperty(exports, "random", { enumerable: true, get: function () { return no_react_1.random; } });
52
53
  var prefetch_js_1 = require("./prefetch.js");
53
54
  Object.defineProperty(exports, "prefetch", { enumerable: true, get: function () { return prefetch_js_1.prefetch; } });
54
- var random_js_1 = require("./random.js");
55
- Object.defineProperty(exports, "random", { enumerable: true, get: function () { return random_js_1.random; } });
56
55
  var register_root_js_1 = require("./register-root.js");
57
56
  Object.defineProperty(exports, "registerRoot", { enumerable: true, get: function () { return register_root_js_1.registerRoot; } });
58
57
  var Sequence_js_1 = require("./Sequence.js");
@@ -5,13 +5,9 @@ import type { CompositionManagerContext } from './CompositionManagerContext.js';
5
5
  import * as CSSUtils from './default-css.js';
6
6
  import type { RemotionEnvironment } from './get-remotion-environment.js';
7
7
  import type { SerializedJSONWithCustomFields } from './input-props-serialization.js';
8
- import { processColor } from './interpolate-colors.js';
9
8
  import type { SetTimelineContextValue, TimelineContextValue } from './timeline-position-state.js';
10
9
  import * as TimelinePosition from './timeline-position-state.js';
11
10
  import { truthy } from './truthy.js';
12
- import { validateDimension } from './validation/validate-dimensions.js';
13
- import { validateDurationInFrames } from './validation/validate-duration-in-frames.js';
14
- import { validateFps } from './validation/validate-fps.js';
15
11
  import type { MediaVolumeContextValue, SetMediaVolumeContextValue } from './volume-position-state.js';
16
12
  import type { WatchRemotionStaticFilesPayload } from './watch-static-file.js';
17
13
  import { useRemotionContexts } from './wrap-remotion-context.js';
@@ -41,10 +37,6 @@ export declare const Internals: {
41
37
  readonly setupEnvVariables: () => void;
42
38
  readonly MediaVolumeContext: import("react").Context<MediaVolumeContextValue>;
43
39
  readonly SetMediaVolumeContext: import("react").Context<SetMediaVolumeContextValue>;
44
- readonly validateDurationInFrames: typeof validateDurationInFrames;
45
- readonly validateFps: typeof validateFps;
46
- readonly validateDefaultAndInputProps: (defaultProps: unknown, name: "defaultProps" | "inputProps", compositionId: string | null) => void;
47
- readonly validateDimension: typeof validateDimension;
48
40
  readonly getRemotionEnvironment: () => RemotionEnvironment;
49
41
  readonly SharedAudioContext: import("react").Context<{
50
42
  registerAudio: (aud: import("./index.js").RemotionAudioProps, audioId: string) => {
@@ -73,7 +65,6 @@ export declare const Internals: {
73
65
  readonly compositionsRef: import("react").RefObject<{
74
66
  getCompositions: () => import("./CompositionManager.js").TCompMetadataWithCalcFunction<import("zod").AnyZodObject, Record<string, unknown>>[];
75
67
  }>;
76
- readonly DELAY_RENDER_CALLSTACK_TOKEN: "The delayRender was called:";
77
68
  readonly portalNode: () => HTMLElement;
78
69
  readonly waitForRoot: (fn: (comp: import("react").FC<{}>) => void) => () => void;
79
70
  readonly CanUseRemotionHooksProvider: import("react").FC<{
@@ -90,17 +81,11 @@ export declare const Internals: {
90
81
  children?: import("react").ReactNode;
91
82
  }>;
92
83
  readonly useIsPlayer: () => boolean;
93
- readonly validateFrame: ({ allowFloats, durationInFrames, frame, }: {
94
- frame: number;
95
- durationInFrames: number;
96
- allowFloats: boolean;
97
- }) => void;
98
84
  readonly EditorPropsProvider: import("react").FC<{
99
85
  children: import("react").ReactNode;
100
86
  }>;
101
87
  readonly EditorPropsContext: import("react").Context<import("./EditorProps.js").EditorPropsContextType>;
102
88
  readonly usePreload: (src: string) => string;
103
- readonly processColor: typeof processColor;
104
89
  readonly NonceContext: import("react").Context<import("./nonce.js").TNonceContext>;
105
90
  readonly resolveVideoConfig: ({ composition, editorProps: editorPropsOrUndefined, signal, inputProps, }: {
106
91
  composition: import("./CompositionManager.js").TCompMetadataWithCalcFunction<import("zod").AnyZodObject, Record<string, unknown>>;
@@ -126,16 +111,8 @@ export declare const Internals: {
126
111
  }>>;
127
112
  readonly REMOTION_STUDIO_CONTAINER_ELEMENT: "__remotion-studio-container";
128
113
  readonly RenderAssetManager: import("react").Context<import("./RenderAssetManager.js").RenderAssetManagerContext>;
129
- readonly bundleName: "bundle.js";
130
- readonly bundleMapName: "bundle.js.map";
131
114
  readonly persistCurrentFrame: (frame: number, composition: string) => void;
132
115
  readonly useTimelineSetFrame: () => (u: import("react").SetStateAction<Record<string, number>>) => void;
133
- readonly serializeJSONWithDate: ({ data, indent, staticBase, }: {
134
- data: Record<string, unknown>;
135
- indent: number | undefined;
136
- staticBase: string | null;
137
- }) => SerializedJSONWithCustomFields;
138
- readonly deserializeJSONWithCustomFields: (data: string) => Record<string, unknown>;
139
116
  readonly FILE_TOKEN: "remotion-file:";
140
117
  readonly DATE_TOKEN: "remotion-date:";
141
118
  readonly NativeLayersProvider: import("react").FC<{
@@ -30,12 +30,10 @@ const Composition_js_1 = require("./Composition.js");
30
30
  const CompositionManager_js_1 = require("./CompositionManager.js");
31
31
  const CompositionManagerContext_js_1 = require("./CompositionManagerContext.js");
32
32
  const CSSUtils = __importStar(require("./default-css.js"));
33
- const delay_render_js_1 = require("./delay-render.js");
34
33
  const EditorProps_js_1 = require("./EditorProps.js");
35
34
  const get_preview_dom_element_js_1 = require("./get-preview-dom-element.js");
36
35
  const get_remotion_environment_js_1 = require("./get-remotion-environment.js");
37
36
  const input_props_serialization_js_1 = require("./input-props-serialization.js");
38
- const interpolate_colors_js_1 = require("./interpolate-colors.js");
39
37
  const is_player_js_1 = require("./is-player.js");
40
38
  const NativeLayers_js_1 = require("./NativeLayers.js");
41
39
  const nonce_js_1 = require("./nonce.js");
@@ -56,12 +54,7 @@ const truthy_js_1 = require("./truthy.js");
56
54
  const use_lazy_component_js_1 = require("./use-lazy-component.js");
57
55
  const use_unsafe_video_config_js_1 = require("./use-unsafe-video-config.js");
58
56
  const use_video_js_1 = require("./use-video.js");
59
- const validate_frame_js_1 = require("./validate-frame.js");
60
57
  const validate_composition_id_js_1 = require("./validation/validate-composition-id.js");
61
- const validate_default_props_js_1 = require("./validation/validate-default-props.js");
62
- const validate_dimensions_js_1 = require("./validation/validate-dimensions.js");
63
- const validate_duration_in_frames_js_1 = require("./validation/validate-duration-in-frames.js");
64
- const validate_fps_js_1 = require("./validation/validate-fps.js");
65
58
  const duration_state_js_1 = require("./video/duration-state.js");
66
59
  const video_fragment_js_1 = require("./video/video-fragment.js");
67
60
  const volume_position_state_js_1 = require("./volume-position-state.js");
@@ -88,10 +81,6 @@ exports.Internals = {
88
81
  setupEnvVariables: setup_env_variables_js_1.setupEnvVariables,
89
82
  MediaVolumeContext: volume_position_state_js_1.MediaVolumeContext,
90
83
  SetMediaVolumeContext: volume_position_state_js_1.SetMediaVolumeContext,
91
- validateDurationInFrames: validate_duration_in_frames_js_1.validateDurationInFrames,
92
- validateFps: validate_fps_js_1.validateFps,
93
- validateDefaultAndInputProps: validate_default_props_js_1.validateDefaultAndInputProps,
94
- validateDimension: validate_dimensions_js_1.validateDimension,
95
84
  getRemotionEnvironment: get_remotion_environment_js_1.getRemotionEnvironment,
96
85
  SharedAudioContext: shared_audio_tags_js_1.SharedAudioContext,
97
86
  SharedAudioContextProvider: shared_audio_tags_js_1.SharedAudioContextProvider,
@@ -99,7 +88,6 @@ exports.Internals = {
99
88
  isCompositionIdValid: validate_composition_id_js_1.isCompositionIdValid,
100
89
  getPreviewDomElement: get_preview_dom_element_js_1.getPreviewDomElement,
101
90
  compositionsRef: CompositionManager_js_1.compositionsRef,
102
- DELAY_RENDER_CALLSTACK_TOKEN: delay_render_js_1.DELAY_RENDER_CALLSTACK_TOKEN,
103
91
  portalNode: portal_node_js_1.portalNode,
104
92
  waitForRoot: register_root_js_1.waitForRoot,
105
93
  CanUseRemotionHooksProvider: CanUseRemotionHooks_js_1.CanUseRemotionHooksProvider,
@@ -108,11 +96,9 @@ exports.Internals = {
108
96
  DurationsContextProvider: duration_state_js_1.DurationsContextProvider,
109
97
  IsPlayerContextProvider: is_player_js_1.IsPlayerContextProvider,
110
98
  useIsPlayer: is_player_js_1.useIsPlayer,
111
- validateFrame: validate_frame_js_1.validateFrame,
112
99
  EditorPropsProvider: EditorProps_js_1.EditorPropsProvider,
113
100
  EditorPropsContext: EditorProps_js_1.EditorPropsContext,
114
101
  usePreload: prefetch_js_1.usePreload,
115
- processColor: interpolate_colors_js_1.processColor,
116
102
  NonceContext: nonce_js_1.NonceContext,
117
103
  resolveVideoConfig: resolve_video_config_js_1.resolveVideoConfig,
118
104
  useResolvedVideoConfig: ResolveCompositionConfig_js_1.useResolvedVideoConfig,
@@ -120,12 +106,8 @@ exports.Internals = {
120
106
  ResolveCompositionConfig: ResolveCompositionConfig_js_1.ResolveCompositionConfig,
121
107
  REMOTION_STUDIO_CONTAINER_ELEMENT: get_preview_dom_element_js_1.REMOTION_STUDIO_CONTAINER_ELEMENT,
122
108
  RenderAssetManager: RenderAssetManager_js_1.RenderAssetManager,
123
- bundleName: 'bundle.js',
124
- bundleMapName: 'bundle.js.map',
125
109
  persistCurrentFrame: timeline_position_state_js_1.persistCurrentFrame,
126
110
  useTimelineSetFrame: timeline_position_state_js_1.useTimelineSetFrame,
127
- serializeJSONWithDate: input_props_serialization_js_1.serializeJSONWithDate,
128
- deserializeJSONWithCustomFields: input_props_serialization_js_1.deserializeJSONWithCustomFields,
129
111
  FILE_TOKEN: input_props_serialization_js_1.FILE_TOKEN,
130
112
  DATE_TOKEN: input_props_serialization_js_1.DATE_TOKEN,
131
113
  NativeLayersProvider: NativeLayers_js_1.NativeLayersProvider,
@@ -0,0 +1,32 @@
1
+ export type { TRenderAsset } from './CompositionManager';
2
+ export { EasingFunction, ExtrapolateType, interpolate, InterpolateOptions, } from './interpolate';
3
+ export type { ClipRegion } from './NativeLayers';
4
+ export { random, RandomSeed } from './random.js';
5
+ export type { VideoConfig } from './video-config';
6
+ import { processColor } from './interpolate-colors';
7
+ import { truthy } from './truthy';
8
+ import { validateDimension } from './validation/validate-dimensions';
9
+ import { validateDurationInFrames } from './validation/validate-duration-in-frames';
10
+ import { validateFps } from './validation/validate-fps';
11
+ export declare const NoReactInternals: {
12
+ processColor: typeof processColor;
13
+ truthy: typeof truthy;
14
+ validateFps: typeof validateFps;
15
+ validateDimension: typeof validateDimension;
16
+ validateDurationInFrames: typeof validateDurationInFrames;
17
+ validateDefaultAndInputProps: (defaultProps: unknown, name: "defaultProps" | "inputProps", compositionId: string | null) => void;
18
+ validateFrame: ({ allowFloats, durationInFrames, frame, }: {
19
+ frame: number;
20
+ durationInFrames: number;
21
+ allowFloats: boolean;
22
+ }) => void;
23
+ serializeJSONWithDate: ({ data, indent, staticBase, }: {
24
+ data: Record<string, unknown>;
25
+ indent: number | undefined;
26
+ staticBase: string | null;
27
+ }) => import("./input-props-serialization").SerializedJSONWithCustomFields;
28
+ bundleName: string;
29
+ bundleMapName: string;
30
+ deserializeJSONWithCustomFields: (data: string) => Record<string, unknown>;
31
+ DELAY_RENDER_CALLSTACK_TOKEN: string;
32
+ };
@@ -0,0 +1,30 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.NoReactInternals = exports.random = exports.interpolate = void 0;
4
+ var interpolate_1 = require("./interpolate");
5
+ Object.defineProperty(exports, "interpolate", { enumerable: true, get: function () { return interpolate_1.interpolate; } });
6
+ var random_js_1 = require("./random.js");
7
+ Object.defineProperty(exports, "random", { enumerable: true, get: function () { return random_js_1.random; } });
8
+ const delay_render_1 = require("./delay-render");
9
+ const input_props_serialization_1 = require("./input-props-serialization");
10
+ const interpolate_colors_1 = require("./interpolate-colors");
11
+ const truthy_1 = require("./truthy");
12
+ const validate_frame_1 = require("./validate-frame");
13
+ const validate_default_props_1 = require("./validation/validate-default-props");
14
+ const validate_dimensions_1 = require("./validation/validate-dimensions");
15
+ const validate_duration_in_frames_1 = require("./validation/validate-duration-in-frames");
16
+ const validate_fps_1 = require("./validation/validate-fps");
17
+ exports.NoReactInternals = {
18
+ processColor: interpolate_colors_1.processColor,
19
+ truthy: truthy_1.truthy,
20
+ validateFps: validate_fps_1.validateFps,
21
+ validateDimension: validate_dimensions_1.validateDimension,
22
+ validateDurationInFrames: validate_duration_in_frames_1.validateDurationInFrames,
23
+ validateDefaultAndInputProps: validate_default_props_1.validateDefaultAndInputProps,
24
+ validateFrame: validate_frame_1.validateFrame,
25
+ serializeJSONWithDate: input_props_serialization_1.serializeJSONWithDate,
26
+ bundleName: 'bundle.js',
27
+ bundleMapName: 'bundle.js.map',
28
+ deserializeJSONWithCustomFields: input_props_serialization_1.deserializeJSONWithCustomFields,
29
+ DELAY_RENDER_CALLSTACK_TOKEN: delay_render_1.DELAY_RENDER_CALLSTACK_TOKEN,
30
+ };
@@ -30,6 +30,14 @@ const useMediaPlayback = ({ mediaRef, src, mediaType, playbackRate: localPlaybac
30
30
  const { fps } = (0, use_video_config_js_1.useVideoConfig)();
31
31
  const mediaStartsAt = (0, use_audio_frame_js_1.useMediaStartsAt)();
32
32
  const playbackRate = localPlaybackRate * globalPlaybackRate;
33
+ // For short audio, a lower acceptable time shift is used
34
+ const acceptableTimeShiftButLessThanDuration = (() => {
35
+ var _a;
36
+ if ((_a = mediaRef.current) === null || _a === void 0 ? void 0 : _a.duration) {
37
+ return Math.min(mediaRef.current.duration, acceptableTimeshift !== null && acceptableTimeshift !== void 0 ? acceptableTimeshift : exports.DEFAULT_ACCEPTABLE_TIMESHIFT);
38
+ }
39
+ return acceptableTimeshift;
40
+ })();
33
41
  (0, react_1.useEffect)(() => {
34
42
  var _a;
35
43
  if (!playing) {
@@ -62,7 +70,7 @@ const useMediaPlayback = ({ mediaRef, src, mediaType, playbackRate: localPlaybac
62
70
  : desiredUnclampedTime;
63
71
  const isTime = mediaRef.current.currentTime;
64
72
  const timeShift = Math.abs(shouldBeTime - isTime);
65
- if (timeShift > acceptableTimeshift) {
73
+ if (timeShift > acceptableTimeShiftButLessThanDuration) {
66
74
  // If scrubbing around, adjust timing
67
75
  // or if time shift is bigger than 0.45sec
68
76
  seek(mediaRef, shouldBeTime);
@@ -101,6 +109,7 @@ const useMediaPlayback = ({ mediaRef, src, mediaType, playbackRate: localPlaybac
101
109
  localPlaybackRate,
102
110
  onlyWarnForMediaSeekingError,
103
111
  acceptableTimeshift,
112
+ acceptableTimeShiftButLessThanDuration,
104
113
  ]);
105
114
  };
106
115
  exports.useMediaPlayback = useMediaPlayback;
@@ -1 +1 @@
1
- export declare const VERSION = "4.0.71";
1
+ export declare const VERSION = "4.0.73";
@@ -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.71';
5
+ exports.VERSION = '4.0.73';
@@ -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, ...withoutTransparent } = otherProps;
39
- return ((0, jsx_runtime_1.jsx)(VideoForDevelopment_js_1.VideoForDevelopment, { onDuration: onDuration, onlyWarnForMediaSeekingError: true, ...withoutTransparent }));
39
+ return ((0, jsx_runtime_1.jsx)(VideoForDevelopment_js_1.VideoForDevelopment, { _remotionInternalNativeLoopPassed: false, onDuration: onDuration, onlyWarnForMediaSeekingError: true, ...withoutTransparent }));
40
40
  };
41
41
  exports.OffthreadVideo = OffthreadVideo;
@@ -18,7 +18,7 @@ const VideoForDevelopment_js_1 = require("./VideoForDevelopment.js");
18
18
  const VideoForRendering_js_1 = require("./VideoForRendering.js");
19
19
  const VideoForwardingFunction = (props, ref) => {
20
20
  var _a;
21
- const { startFrom, endAt, name, ...otherProps } = props;
21
+ const { startFrom, endAt, name, _remotionInternalNativeLoopPassed, ...otherProps } = props;
22
22
  const { loop, ...propsOtherThanLoop } = props;
23
23
  const { fps } = (0, use_video_config_js_1.useVideoConfig)();
24
24
  const environment = (0, get_remotion_environment_js_1.getRemotionEnvironment)();
@@ -40,7 +40,7 @@ const VideoForwardingFunction = (props, ref) => {
40
40
  mediaDuration,
41
41
  playbackRate: (_a = props.playbackRate) !== null && _a !== void 0 ? _a : 1,
42
42
  startFrom,
43
- }), layout: "none", name: name, children: (0, jsx_runtime_1.jsx)(exports.Video, { ...propsOtherThanLoop, ref: ref }) }));
43
+ }), layout: "none", name: name, children: (0, jsx_runtime_1.jsx)(exports.Video, { ...propsOtherThanLoop, ref: ref, _remotionInternalNativeLoopPassed: true }) }));
44
44
  }
45
45
  if (typeof startFrom !== 'undefined' || typeof endAt !== 'undefined') {
46
46
  (0, validate_start_from_props_js_1.validateStartFromProps)(startFrom, endAt);
@@ -52,7 +52,7 @@ const VideoForwardingFunction = (props, ref) => {
52
52
  if (environment.isRendering) {
53
53
  return ((0, jsx_runtime_1.jsx)(VideoForRendering_js_1.VideoForRendering, { onDuration: onDuration, ...otherProps, ref: ref }));
54
54
  }
55
- return ((0, jsx_runtime_1.jsx)(VideoForDevelopment_js_1.VideoForDevelopment, { onlyWarnForMediaSeekingError: false, ...otherProps, ref: ref, onDuration: onDuration }));
55
+ return ((0, jsx_runtime_1.jsx)(VideoForDevelopment_js_1.VideoForDevelopment, { onlyWarnForMediaSeekingError: false, ...otherProps, ref: ref, onDuration: onDuration, _remotionInternalNativeLoopPassed: _remotionInternalNativeLoopPassed !== null && _remotionInternalNativeLoopPassed !== void 0 ? _remotionInternalNativeLoopPassed : false }));
56
56
  };
57
57
  const forward = react_1.forwardRef;
58
58
  /**
@@ -10,4 +10,5 @@ export declare const VideoForDevelopment: ForwardRefExoticComponent<Omit<React.D
10
10
  } & {
11
11
  onlyWarnForMediaSeekingError: boolean;
12
12
  onDuration: (src: string, durationInSeconds: number) => void;
13
+ _remotionInternalNativeLoopPassed: boolean;
13
14
  } & RefAttributes<HTMLVideoElement>>;
@@ -21,7 +21,7 @@ const VideoForDevelopmentRefForwardingFunction = (props, ref) => {
21
21
  const parentSequence = (0, react_1.useContext)(SequenceContext_js_1.SequenceContext);
22
22
  const { volume, muted, playbackRate, onlyWarnForMediaSeekingError, src, onDuration,
23
23
  // @ts-expect-error
24
- acceptableTimeShift, acceptableTimeShiftInSeconds, toneFrequency, name, ...nativeProps } = props;
24
+ acceptableTimeShift, acceptableTimeShiftInSeconds, toneFrequency, name, _remotionInternalNativeLoopPassed, ...nativeProps } = props;
25
25
  if (typeof acceptableTimeShift !== 'undefined') {
26
26
  throw new Error('acceptableTimeShift has been removed. Use acceptableTimeShiftInSeconds instead.');
27
27
  }
@@ -129,7 +129,7 @@ const VideoForDevelopmentRefForwardingFunction = (props, ref) => {
129
129
  current.preload = 'auto';
130
130
  }
131
131
  }, []);
132
- return ((0, jsx_runtime_1.jsx)("video", { ref: videoRef, muted: muted || mediaMuted, playsInline: true, src: actualSrc, ...nativeProps }));
132
+ return ((0, jsx_runtime_1.jsx)("video", { ref: videoRef, muted: muted || mediaMuted, playsInline: true, src: actualSrc, loop: _remotionInternalNativeLoopPassed, ...nativeProps }));
133
133
  };
134
134
  // Copy types from forwardRef but not necessary to remove ref
135
135
  exports.VideoForDevelopment = (0, react_1.forwardRef)(VideoForDevelopmentRefForwardingFunction);
@@ -17,7 +17,7 @@ const use_unsafe_video_config_js_1 = require("../use-unsafe-video-config.js");
17
17
  const volume_prop_js_1 = require("../volume-prop.js");
18
18
  const warn_about_non_seekable_media_js_1 = require("../warn-about-non-seekable-media.js");
19
19
  const get_current_time_js_1 = require("./get-current-time.js");
20
- const VideoForRenderingForwardFunction = ({ onError, volume: volumeProp, allowAmplificationDuringRender, playbackRate, onDuration, toneFrequency, name, ...props }, ref) => {
20
+ const VideoForRenderingForwardFunction = ({ onError, volume: volumeProp, allowAmplificationDuringRender, playbackRate, onDuration, toneFrequency, name, acceptableTimeShiftInSeconds, ...props }, ref) => {
21
21
  const absoluteFrame = (0, timeline_position_state_js_1.useTimelinePosition)();
22
22
  const frame = (0, use_current_frame_js_1.useCurrentFrame)();
23
23
  const volumePropsFrame = (0, use_audio_frame_js_1.useFrameForVolumeProp)();
@@ -3,6 +3,10 @@ import type { VolumeProp } from '../volume-prop.js';
3
3
  export type RemotionMainVideoProps = {
4
4
  startFrom?: number;
5
5
  endAt?: number;
6
+ /**
7
+ * @deprecated Only for internal `transparent` use
8
+ */
9
+ _remotionInternalNativeLoopPassed?: boolean;
6
10
  };
7
11
  export type RemotionVideoProps = Omit<React.DetailedHTMLProps<React.VideoHTMLAttributes<HTMLVideoElement>, HTMLVideoElement>, 'autoPlay' | 'controls' | 'onEnded' | 'nonce'> & {
8
12
  name?: string;