remotion 4.0.70 → 4.0.72
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/audio/Audio.d.ts +2 -1
- package/dist/cjs/audio/Audio.js +2 -2
- package/dist/cjs/audio/AudioForDevelopment.d.ts +1 -0
- package/dist/cjs/audio/AudioForDevelopment.js +2 -1
- package/dist/cjs/audio/AudioForRendering.d.ts +1 -0
- package/dist/cjs/audio/AudioForRendering.js +1 -1
- package/dist/cjs/audio/props.d.ts +1 -0
- package/dist/cjs/index.d.ts +1 -2
- package/dist/cjs/index.js +4 -5
- package/dist/cjs/internals.d.ts +0 -23
- package/dist/cjs/internals.js +0 -18
- package/dist/cjs/no-react.d.ts +32 -0
- package/dist/cjs/no-react.js +30 -0
- package/dist/cjs/use-media-in-timeline.d.ts +2 -1
- package/dist/cjs/use-media-in-timeline.js +3 -2
- package/dist/cjs/validation/validate-composition-id.js +1 -1
- package/dist/cjs/validation/validate-folder-name.js +1 -1
- package/dist/cjs/version.d.ts +1 -1
- package/dist/cjs/version.js +1 -1
- package/dist/cjs/video/OffthreadVideo.js +2 -2
- package/dist/cjs/video/OffthreadVideoForRendering.js +1 -1
- package/dist/cjs/video/Video.d.ts +1 -0
- package/dist/cjs/video/Video.js +3 -3
- package/dist/cjs/video/VideoForDevelopment.d.ts +1 -0
- package/dist/cjs/video/VideoForDevelopment.js +17 -3
- package/dist/cjs/video/VideoForRendering.d.ts +1 -0
- package/dist/cjs/video/VideoForRendering.js +1 -1
- package/dist/cjs/video/props.d.ts +2 -0
- package/dist/cjs/video/video-fragment.d.ts +1 -1
- package/dist/cjs/video/video-fragment.js +11 -17
- package/dist/esm/index.mjs +496 -526
- package/dist/esm/no-react.mjs +748 -0
- package/dist/esm/version.mjs +1 -1
- package/no-react.js +2 -0
- package/package.json +11 -2
- package/rollup-no-react.config.js +22 -0
|
@@ -5,10 +5,11 @@ import type { RemotionMainAudioProps } from './props.js';
|
|
|
5
5
|
* @see [Documentation](https://www.remotion.dev/docs/audio)
|
|
6
6
|
*/
|
|
7
7
|
export declare const Audio: React.ForwardRefExoticComponent<Pick<Omit<React.DetailedHTMLProps<React.AudioHTMLAttributes<HTMLAudioElement>, HTMLAudioElement>, "nonce" | "onEnded" | "onResize" | "onResizeCapture" | "autoPlay" | "controls"> & {
|
|
8
|
+
name?: string | undefined;
|
|
8
9
|
volume?: import("../volume-prop.js").VolumeProp | undefined;
|
|
9
10
|
playbackRate?: number | undefined;
|
|
10
11
|
acceptableTimeShiftInSeconds?: number | undefined;
|
|
11
12
|
allowAmplificationDuringRender?: boolean | undefined;
|
|
12
13
|
_remotionInternalNeedsDurationCalculation?: boolean | undefined;
|
|
13
14
|
toneFrequency?: number | undefined;
|
|
14
|
-
} & 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" | "playbackRate" | "acceptableTimeShiftInSeconds" | "_remotionInternalNeedsDurationCalculation" | "toneFrequency" | keyof RemotionMainAudioProps> & React.RefAttributes<HTMLAudioElement>>;
|
|
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>>;
|
package/dist/cjs/audio/Audio.js
CHANGED
|
@@ -21,7 +21,7 @@ const shared_audio_tags_js_1 = require("./shared-audio-tags.js");
|
|
|
21
21
|
const AudioRefForwardingFunction = (props, ref) => {
|
|
22
22
|
var _a;
|
|
23
23
|
const audioContext = (0, react_1.useContext)(shared_audio_tags_js_1.SharedAudioContext);
|
|
24
|
-
const { startFrom, endAt, ...otherProps } = props;
|
|
24
|
+
const { startFrom, endAt, name, ...otherProps } = props;
|
|
25
25
|
const { loop, ...propsOtherThanLoop } = props;
|
|
26
26
|
const { fps } = (0, use_video_config_js_1.useVideoConfig)();
|
|
27
27
|
const environment = (0, get_remotion_environment_js_1.getRemotionEnvironment)();
|
|
@@ -58,7 +58,7 @@ const AudioRefForwardingFunction = (props, ref) => {
|
|
|
58
58
|
(0, validate_start_from_props_js_1.validateStartFromProps)(startFrom, endAt);
|
|
59
59
|
const startFromFrameNo = startFrom !== null && startFrom !== void 0 ? startFrom : 0;
|
|
60
60
|
const endAtFrameNo = endAt !== null && endAt !== void 0 ? endAt : Infinity;
|
|
61
|
-
return ((0, jsx_runtime_1.jsx)(Sequence_js_1.Sequence, { layout: "none", from: 0 - startFromFrameNo, showInTimeline: false, durationInFrames: endAtFrameNo, children: (0, jsx_runtime_1.jsx)(exports.Audio, { _remotionInternalNeedsDurationCalculation: Boolean(loop), ...otherProps, ref: ref }) }));
|
|
61
|
+
return ((0, jsx_runtime_1.jsx)(Sequence_js_1.Sequence, { layout: "none", from: 0 - startFromFrameNo, showInTimeline: false, durationInFrames: endAtFrameNo, name: name, children: (0, jsx_runtime_1.jsx)(exports.Audio, { _remotionInternalNeedsDurationCalculation: Boolean(loop), ...otherProps, ref: ref }) }));
|
|
62
62
|
}
|
|
63
63
|
(0, validate_media_props_js_1.validateMediaProps)(props, 'Audio');
|
|
64
64
|
if (environment.isRendering) {
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import type { ForwardRefExoticComponent, RefAttributes } from 'react';
|
|
2
2
|
import React from 'react';
|
|
3
3
|
export declare const AudioForDevelopment: ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.AudioHTMLAttributes<HTMLAudioElement>, HTMLAudioElement>, "nonce" | "onEnded" | "onResize" | "onResizeCapture" | "autoPlay" | "controls"> & {
|
|
4
|
+
name?: string | undefined;
|
|
4
5
|
volume?: import("../volume-prop.js").VolumeProp | undefined;
|
|
5
6
|
playbackRate?: number | undefined;
|
|
6
7
|
acceptableTimeShiftInSeconds?: number | undefined;
|
|
@@ -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, ...nativeProps } = props;
|
|
24
|
+
const { volume, muted, playbackRate, shouldPreMountAudioTags, src, onDuration, acceptableTimeShiftInSeconds, _remotionInternalNeedsDurationCalculation, allowAmplificationDuringRender, name, ...nativeProps } = props;
|
|
25
25
|
if (!src) {
|
|
26
26
|
throw new TypeError("No 'src' was passed to <Audio>.");
|
|
27
27
|
}
|
|
@@ -60,6 +60,7 @@ const AudioForDevelopmentForwardRefFunction = (props, ref) => {
|
|
|
60
60
|
src,
|
|
61
61
|
mediaType: 'audio',
|
|
62
62
|
playbackRate: playbackRate !== null && playbackRate !== void 0 ? playbackRate : 1,
|
|
63
|
+
displayName: name !== null && name !== void 0 ? name : null,
|
|
63
64
|
});
|
|
64
65
|
(0, use_media_playback_js_1.useMediaPlayback)({
|
|
65
66
|
mediaRef: audioRef,
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import type { ForwardRefExoticComponent, RefAttributes } from 'react';
|
|
2
2
|
import React from 'react';
|
|
3
3
|
export declare const AudioForRendering: ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.AudioHTMLAttributes<HTMLAudioElement>, HTMLAudioElement>, "nonce" | "onEnded" | "onResize" | "onResizeCapture" | "autoPlay" | "controls"> & {
|
|
4
|
+
name?: string | undefined;
|
|
4
5
|
volume?: import("../volume-prop.js").VolumeProp | undefined;
|
|
5
6
|
playbackRate?: number | undefined;
|
|
6
7
|
acceptableTimeShiftInSeconds?: number | undefined;
|
|
@@ -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, ...nativeProps } = props;
|
|
33
|
+
const { volume: volumeProp, playbackRate, allowAmplificationDuringRender, onDuration, toneFrequency, _remotionInternalNeedsDurationCalculation, acceptableTimeShiftInSeconds, name, ...nativeProps } = props;
|
|
34
34
|
const volume = (0, volume_prop_js_1.evaluateVolume)({
|
|
35
35
|
volume: volumeProp,
|
|
36
36
|
frame: volumePropFrame,
|
|
@@ -5,6 +5,7 @@ export type RemotionMainAudioProps = {
|
|
|
5
5
|
endAt?: number;
|
|
6
6
|
};
|
|
7
7
|
export type RemotionAudioProps = Omit<React.DetailedHTMLProps<React.AudioHTMLAttributes<HTMLAudioElement>, HTMLAudioElement>, 'autoPlay' | 'controls' | 'onEnded' | 'nonce' | 'onResize' | 'onResizeCapture'> & {
|
|
8
|
+
name?: string;
|
|
8
9
|
volume?: VolumeProp;
|
|
9
10
|
playbackRate?: number;
|
|
10
11
|
acceptableTimeShiftInSeconds?: number;
|
package/dist/cjs/index.d.ts
CHANGED
|
@@ -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.
|
|
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");
|
package/dist/cjs/internals.d.ts
CHANGED
|
@@ -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<{
|
package/dist/cjs/internals.js
CHANGED
|
@@ -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
|
+
};
|
|
@@ -1,10 +1,11 @@
|
|
|
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, }: {
|
|
3
|
+
export declare const useMediaInTimeline: ({ volume, mediaVolume, mediaRef, src, mediaType, playbackRate, displayName, }: {
|
|
4
4
|
volume: VolumeProp | undefined;
|
|
5
5
|
mediaVolume: number;
|
|
6
6
|
mediaRef: RefObject<HTMLAudioElement | HTMLVideoElement>;
|
|
7
7
|
src: string | undefined;
|
|
8
8
|
mediaType: 'audio' | 'video';
|
|
9
9
|
playbackRate: number;
|
|
10
|
+
displayName: string | null;
|
|
10
11
|
}) => void;
|
|
@@ -20,7 +20,7 @@ const warnOnce = (message) => {
|
|
|
20
20
|
console.warn(message);
|
|
21
21
|
didWarn[message] = true;
|
|
22
22
|
};
|
|
23
|
-
const useMediaInTimeline = ({ volume, mediaVolume, mediaRef, src, mediaType, playbackRate, }) => {
|
|
23
|
+
const useMediaInTimeline = ({ volume, mediaVolume, mediaRef, src, mediaType, playbackRate, displayName, }) => {
|
|
24
24
|
const videoConfig = (0, use_video_config_js_1.useVideoConfig)();
|
|
25
25
|
const { rootId, audioAndVideoTags } = (0, react_1.useContext)(timeline_position_state_js_1.TimelineContext);
|
|
26
26
|
const parentSequence = (0, react_1.useContext)(SequenceContext_js_1.SequenceContext);
|
|
@@ -76,7 +76,7 @@ const useMediaInTimeline = ({ volume, mediaVolume, mediaRef, src, mediaType, pla
|
|
|
76
76
|
duration,
|
|
77
77
|
from: 0,
|
|
78
78
|
parent: (_a = parentSequence === null || parentSequence === void 0 ? void 0 : parentSequence.id) !== null && _a !== void 0 ? _a : null,
|
|
79
|
-
displayName: (0, get_asset_file_name_js_1.getAssetDisplayName)(src),
|
|
79
|
+
displayName: displayName !== null && displayName !== void 0 ? displayName : (0, get_asset_file_name_js_1.getAssetDisplayName)(src),
|
|
80
80
|
rootId,
|
|
81
81
|
volume: volumes,
|
|
82
82
|
showInTimeline: true,
|
|
@@ -106,6 +106,7 @@ const useMediaInTimeline = ({ volume, mediaVolume, mediaRef, src, mediaType, pla
|
|
|
106
106
|
mediaType,
|
|
107
107
|
startsAt,
|
|
108
108
|
playbackRate,
|
|
109
|
+
displayName,
|
|
109
110
|
]);
|
|
110
111
|
(0, react_1.useEffect)(() => {
|
|
111
112
|
const tag = {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.invalidCompositionErrorMessage = exports.validateCompositionId = exports.isCompositionIdValid = void 0;
|
|
4
|
-
const getRegex = () => /^([a-zA-Z0-9
|
|
4
|
+
const getRegex = () => /^([a-zA-Z0-9-\u4E00-\u9FFF])+$/g;
|
|
5
5
|
const isCompositionIdValid = (id) => id.match(getRegex());
|
|
6
6
|
exports.isCompositionIdValid = isCompositionIdValid;
|
|
7
7
|
const validateCompositionId = (id) => {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.invalidFolderNameErrorMessage = exports.validateFolderName = exports.isFolderNameValid = void 0;
|
|
4
|
-
const getRegex = () => /^([a-zA-Z0-9
|
|
4
|
+
const getRegex = () => /^([a-zA-Z0-9-\u4E00-\u9FFF])+$/g;
|
|
5
5
|
const isFolderNameValid = (name) => name.match(getRegex());
|
|
6
6
|
exports.isFolderNameValid = isFolderNameValid;
|
|
7
7
|
const validateFolderName = (name) => {
|
package/dist/cjs/version.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const VERSION = "4.0.
|
|
1
|
+
export declare const VERSION = "4.0.72";
|
package/dist/cjs/version.js
CHANGED
|
@@ -16,7 +16,7 @@ const VideoForDevelopment_js_1 = require("./VideoForDevelopment.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, ...otherProps } = props;
|
|
19
|
+
const { startFrom, endAt, name, ...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') {
|
|
@@ -29,7 +29,7 @@ const OffthreadVideo = (props) => {
|
|
|
29
29
|
(0, validate_start_from_props_js_1.validateStartFromProps)(startFrom, endAt);
|
|
30
30
|
const startFromFrameNo = startFrom !== null && startFrom !== void 0 ? startFrom : 0;
|
|
31
31
|
const endAtFrameNo = endAt !== null && endAt !== void 0 ? endAt : Infinity;
|
|
32
|
-
return ((0, jsx_runtime_1.jsx)(Sequence_js_1.Sequence, { layout: "none", from: 0 - startFromFrameNo, showInTimeline: false, durationInFrames: endAtFrameNo, children: (0, jsx_runtime_1.jsx)(exports.OffthreadVideo, { ...otherProps }) }));
|
|
32
|
+
return ((0, jsx_runtime_1.jsx)(Sequence_js_1.Sequence, { layout: "none", from: 0 - startFromFrameNo, showInTimeline: false, durationInFrames: endAtFrameNo, name: name, children: (0, jsx_runtime_1.jsx)(exports.OffthreadVideo, { ...otherProps }) }));
|
|
33
33
|
}
|
|
34
34
|
(0, validate_media_props_js_1.validateMediaProps)(props, 'Video');
|
|
35
35
|
if (environment.isRendering) {
|
|
@@ -17,7 +17,7 @@ const use_current_frame_js_1 = require("../use-current-frame.js");
|
|
|
17
17
|
const use_unsafe_video_config_js_1 = require("../use-unsafe-video-config.js");
|
|
18
18
|
const volume_prop_js_1 = require("../volume-prop.js");
|
|
19
19
|
const get_current_time_js_1 = require("./get-current-time.js");
|
|
20
|
-
const OffthreadVideoForRendering = ({ onError, volume: volumeProp, playbackRate, src, muted, allowAmplificationDuringRender, transparent = false, toneFrequency, ...props }) => {
|
|
20
|
+
const OffthreadVideoForRendering = ({ onError, volume: volumeProp, playbackRate, src, muted, allowAmplificationDuringRender, transparent = false, toneFrequency, name, ...props }) => {
|
|
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)();
|
|
@@ -5,6 +5,7 @@ import type { RemotionMainVideoProps } from './props.js';
|
|
|
5
5
|
* @see [Documentation](https://www.remotion.dev/docs/video)
|
|
6
6
|
*/
|
|
7
7
|
export declare const Video: (props: Omit<React.DetailedHTMLProps<React.VideoHTMLAttributes<HTMLVideoElement>, HTMLVideoElement>, "nonce" | "onEnded" | "autoPlay" | "controls"> & {
|
|
8
|
+
name?: string | undefined;
|
|
8
9
|
volume?: import("../volume-prop.js").VolumeProp | undefined;
|
|
9
10
|
playbackRate?: number | undefined;
|
|
10
11
|
acceptableTimeShiftInSeconds?: number | undefined;
|
package/dist/cjs/video/Video.js
CHANGED
|
@@ -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, ...otherProps } = props;
|
|
21
|
+
const { startFrom, endAt, name, ...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,13 +40,13 @@ 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", 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 }) }));
|
|
44
44
|
}
|
|
45
45
|
if (typeof startFrom !== 'undefined' || typeof endAt !== 'undefined') {
|
|
46
46
|
(0, validate_start_from_props_js_1.validateStartFromProps)(startFrom, endAt);
|
|
47
47
|
const startFromFrameNo = startFrom !== null && startFrom !== void 0 ? startFrom : 0;
|
|
48
48
|
const endAtFrameNo = endAt !== null && endAt !== void 0 ? endAt : Infinity;
|
|
49
|
-
return ((0, jsx_runtime_1.jsx)(Sequence_js_1.Sequence, { layout: "none", from: 0 - startFromFrameNo, showInTimeline: false, durationInFrames: endAtFrameNo, children: (0, jsx_runtime_1.jsx)(exports.Video, { ...otherProps, ref: ref }) }));
|
|
49
|
+
return ((0, jsx_runtime_1.jsx)(Sequence_js_1.Sequence, { layout: "none", from: 0 - startFromFrameNo, showInTimeline: false, durationInFrames: endAtFrameNo, name: name, children: (0, jsx_runtime_1.jsx)(exports.Video, { ...otherProps, ref: ref }) }));
|
|
50
50
|
}
|
|
51
51
|
(0, validate_media_props_js_1.validateMediaProps)(props, 'Video');
|
|
52
52
|
if (environment.isRendering) {
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import type { ForwardRefExoticComponent, RefAttributes } from 'react';
|
|
2
2
|
import React from 'react';
|
|
3
3
|
export declare const VideoForDevelopment: ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.VideoHTMLAttributes<HTMLVideoElement>, HTMLVideoElement>, "nonce" | "onEnded" | "autoPlay" | "controls"> & {
|
|
4
|
+
name?: string | undefined;
|
|
4
5
|
volume?: import("../volume-prop.js").VolumeProp | undefined;
|
|
5
6
|
playbackRate?: number | undefined;
|
|
6
7
|
acceptableTimeShiftInSeconds?: number | undefined;
|
|
@@ -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, ...nativeProps } = props;
|
|
24
|
+
acceptableTimeShift, acceptableTimeShiftInSeconds, toneFrequency, name, ...nativeProps } = props;
|
|
25
25
|
if (typeof acceptableTimeShift !== 'undefined') {
|
|
26
26
|
throw new Error('acceptableTimeShift has been removed. Use acceptableTimeShiftInSeconds instead.');
|
|
27
27
|
}
|
|
@@ -35,6 +35,7 @@ const VideoForDevelopmentRefForwardingFunction = (props, ref) => {
|
|
|
35
35
|
mediaType: 'video',
|
|
36
36
|
src,
|
|
37
37
|
playbackRate: (_a = props.playbackRate) !== null && _a !== void 0 ? _a : 1,
|
|
38
|
+
displayName: name !== null && name !== void 0 ? name : null,
|
|
38
39
|
});
|
|
39
40
|
(0, use_sync_volume_with_media_tag_js_1.useSyncVolumeWithMediaTag)({
|
|
40
41
|
volumePropFrame,
|
|
@@ -111,11 +112,24 @@ const VideoForDevelopmentRefForwardingFunction = (props, ref) => {
|
|
|
111
112
|
current.removeEventListener('loadedmetadata', onLoadedMetadata);
|
|
112
113
|
};
|
|
113
114
|
}, [src]);
|
|
114
|
-
|
|
115
|
+
(0, react_1.useEffect)(() => {
|
|
116
|
+
const { current } = videoRef;
|
|
117
|
+
if (!current) {
|
|
118
|
+
return;
|
|
119
|
+
}
|
|
115
120
|
// Without this, on iOS Safari, the video cannot be seeked.
|
|
116
121
|
// if a seek is triggered before `loadedmetadata` is fired,
|
|
117
122
|
// the video will not seek, even if `loadedmetadata` is fired afterwards.
|
|
118
|
-
|
|
123
|
+
// Also, this needs to happen in a useEffect, because otherwise
|
|
124
|
+
// the SSR props will be applied.
|
|
125
|
+
if ((0, video_fragment_js_1.isIosSafari)()) {
|
|
126
|
+
current.preload = 'metadata';
|
|
127
|
+
}
|
|
128
|
+
else {
|
|
129
|
+
current.preload = 'auto';
|
|
130
|
+
}
|
|
131
|
+
}, []);
|
|
132
|
+
return ((0, jsx_runtime_1.jsx)("video", { ref: videoRef, muted: muted || mediaMuted, playsInline: true, src: actualSrc, ...nativeProps }));
|
|
119
133
|
};
|
|
120
134
|
// Copy types from forwardRef but not necessary to remove ref
|
|
121
135
|
exports.VideoForDevelopment = (0, react_1.forwardRef)(VideoForDevelopmentRefForwardingFunction);
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import type { ForwardRefExoticComponent, RefAttributes } from 'react';
|
|
2
2
|
import React from 'react';
|
|
3
3
|
export declare const VideoForRendering: ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.VideoHTMLAttributes<HTMLVideoElement>, HTMLVideoElement>, "nonce" | "onEnded" | "autoPlay" | "controls"> & {
|
|
4
|
+
name?: string | undefined;
|
|
4
5
|
volume?: import("../volume-prop.js").VolumeProp | undefined;
|
|
5
6
|
playbackRate?: number | undefined;
|
|
6
7
|
acceptableTimeShiftInSeconds?: number | undefined;
|
|
@@ -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, ...props }, ref) => {
|
|
20
|
+
const VideoForRenderingForwardFunction = ({ onError, volume: volumeProp, allowAmplificationDuringRender, playbackRate, onDuration, toneFrequency, name, ...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)();
|
|
@@ -5,6 +5,7 @@ export type RemotionMainVideoProps = {
|
|
|
5
5
|
endAt?: number;
|
|
6
6
|
};
|
|
7
7
|
export type RemotionVideoProps = Omit<React.DetailedHTMLProps<React.VideoHTMLAttributes<HTMLVideoElement>, HTMLVideoElement>, 'autoPlay' | 'controls' | 'onEnded' | 'nonce'> & {
|
|
8
|
+
name?: string;
|
|
8
9
|
volume?: VolumeProp;
|
|
9
10
|
playbackRate?: number;
|
|
10
11
|
acceptableTimeShiftInSeconds?: number;
|
|
@@ -20,6 +21,7 @@ type DeprecatedOffthreadVideoProps = {
|
|
|
20
21
|
export type OffthreadVideoProps = {
|
|
21
22
|
src: string;
|
|
22
23
|
className?: string;
|
|
24
|
+
name?: string;
|
|
23
25
|
id?: string;
|
|
24
26
|
style?: React.CSSProperties;
|
|
25
27
|
volume?: VolumeProp;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
export declare const isIosSafari: () => boolean;
|
|
1
2
|
export declare const appendVideoFragment: ({ actualSrc, actualFrom, duration, fps, }: {
|
|
2
3
|
actualSrc: string;
|
|
3
4
|
actualFrom: number;
|
|
@@ -10,4 +11,3 @@ export declare const useAppendVideoFragment: ({ actualSrc: initialActualSrc, act
|
|
|
10
11
|
duration: number;
|
|
11
12
|
fps: number;
|
|
12
13
|
}) => string;
|
|
13
|
-
export declare const isIosSafari: () => boolean;
|