remotion 3.0.19 → 3.0.22
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/.turbo/turbo-build.log +5 -5
- package/dist/AbsoluteFill.d.ts +4 -0
- package/dist/AbsoluteFill.js +4 -0
- package/dist/Composition.d.ts +1 -5
- package/dist/Composition.js +3 -29
- package/dist/CompositionManager.d.ts +1 -4
- package/dist/Folder.d.ts +15 -0
- package/dist/Folder.js +33 -0
- package/dist/Sequence.d.ts +19 -0
- package/dist/Sequence.js +123 -0
- package/dist/audio/Audio.d.ts +2 -2
- package/dist/audio/Audio.js +2 -2
- package/dist/audio/AudioForDevelopment.d.ts +2 -2
- package/dist/audio/AudioForRendering.d.ts +1 -1
- package/dist/audio/AudioForRendering.js +5 -5
- package/dist/audio/use-audio-frame.js +4 -4
- package/dist/config/override-webpack.d.ts +1 -7
- package/dist/default-css.d.ts +1 -0
- package/dist/default-css.js +8 -1
- package/dist/freeze.d.ts +2 -2
- package/dist/freeze.js +2 -2
- package/dist/index.d.ts +7 -4
- package/dist/index.js +7 -6
- package/dist/internals.d.ts +3 -1
- package/dist/internals.js +7 -4
- package/dist/interpolate-colors.d.ts +5 -0
- package/dist/interpolate-colors.js +401 -0
- package/dist/register-root.d.ts +1 -0
- package/dist/register-root.js +20 -5
- package/dist/series/index.d.ts +1 -1
- package/dist/series/index.js +2 -2
- package/dist/use-current-frame.d.ts +7 -0
- package/dist/use-current-frame.js +25 -0
- package/dist/use-media-in-timeline.js +2 -2
- package/dist/use-media-playback.js +3 -3
- package/dist/use-unsafe-video-config.js +2 -2
- package/dist/validation/validate-offthreadvideo-image-format.d.ts +1 -0
- package/dist/validation/validate-offthreadvideo-image-format.js +15 -0
- package/dist/video/OffthreadVideo.js +4 -2
- package/dist/video/OffthreadVideoForRendering.js +17 -9
- package/dist/video/Video.d.ts +2 -2
- package/dist/video/Video.js +2 -2
- package/dist/video/VideoForDevelopment.d.ts +1 -1
- package/dist/video/VideoForRendering.d.ts +1 -1
- package/dist/video/VideoForRendering.js +5 -5
- package/dist/video/index.d.ts +1 -1
- package/dist/video/props.d.ts +2 -0
- package/dist/wrap-remotion-context.d.ts +1 -1
- package/dist/wrap-remotion-context.js +3 -3
- package/package.json +2 -2
- package/.turbo/turbo-lint.log +0 -11
- package/.turbo/turbo-test.log +0 -63
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.validateOffthreadVideoImageFormat = void 0;
|
|
4
|
+
const validateOffthreadVideoImageFormat = (input) => {
|
|
5
|
+
if (typeof input === 'undefined') {
|
|
6
|
+
return;
|
|
7
|
+
}
|
|
8
|
+
if (typeof input !== 'string') {
|
|
9
|
+
throw new TypeError(`<OffthreadVideo imageFormat=""> must be a string, but got ${JSON.stringify(input)} instead.`);
|
|
10
|
+
}
|
|
11
|
+
if (input !== 'png' && input !== 'jpeg') {
|
|
12
|
+
throw new TypeError(`<OffthreadVideo imageFormat=""> must be either "png" or "jpeg", but got ${input}`);
|
|
13
|
+
}
|
|
14
|
+
};
|
|
15
|
+
exports.validateOffthreadVideoImageFormat = validateOffthreadVideoImageFormat;
|
|
@@ -3,9 +3,10 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.OffthreadVideo = void 0;
|
|
4
4
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
5
|
const get_environment_1 = require("../get-environment");
|
|
6
|
-
const
|
|
6
|
+
const Sequence_1 = require("../Sequence");
|
|
7
7
|
const validate_media_props_1 = require("../validate-media-props");
|
|
8
8
|
const validate_start_from_props_1 = require("../validate-start-from-props");
|
|
9
|
+
const validate_offthreadvideo_image_format_1 = require("../validation/validate-offthreadvideo-image-format");
|
|
9
10
|
const OffthreadVideoForRendering_1 = require("./OffthreadVideoForRendering");
|
|
10
11
|
const VideoForDevelopment_1 = require("./VideoForDevelopment");
|
|
11
12
|
const OffthreadVideo = (props) => {
|
|
@@ -14,9 +15,10 @@ const OffthreadVideo = (props) => {
|
|
|
14
15
|
(0, validate_start_from_props_1.validateStartFromProps)(startFrom, endAt);
|
|
15
16
|
const startFromFrameNo = startFrom !== null && startFrom !== void 0 ? startFrom : 0;
|
|
16
17
|
const endAtFrameNo = endAt !== null && endAt !== void 0 ? endAt : Infinity;
|
|
17
|
-
return ((0, jsx_runtime_1.jsx)(
|
|
18
|
+
return ((0, jsx_runtime_1.jsx)(Sequence_1.Sequence, { layout: "none", from: 0 - startFromFrameNo, showInTimeline: false, durationInFrames: endAtFrameNo, children: (0, jsx_runtime_1.jsx)(exports.OffthreadVideo, { ...otherProps }) }));
|
|
18
19
|
}
|
|
19
20
|
(0, validate_media_props_1.validateMediaProps)(props, 'Video');
|
|
21
|
+
(0, validate_offthreadvideo_image_format_1.validateOffthreadVideoImageFormat)(props.imageFormat);
|
|
20
22
|
if ((0, get_environment_1.getRemotionEnvironment)() === 'rendering') {
|
|
21
23
|
return (0, jsx_runtime_1.jsx)(OffthreadVideoForRendering_1.OffthreadVideoForRendering, { ...otherProps });
|
|
22
24
|
}
|
|
@@ -6,19 +6,22 @@ const react_1 = require("react");
|
|
|
6
6
|
const absolute_src_1 = require("../absolute-src");
|
|
7
7
|
const use_audio_frame_1 = require("../audio/use-audio-frame");
|
|
8
8
|
const CompositionManager_1 = require("../CompositionManager");
|
|
9
|
+
const default_css_1 = require("../default-css");
|
|
9
10
|
const Img_1 = require("../Img");
|
|
11
|
+
const internals_1 = require("../internals");
|
|
10
12
|
const random_1 = require("../random");
|
|
11
|
-
const
|
|
12
|
-
const
|
|
13
|
+
const Sequence_1 = require("../Sequence");
|
|
14
|
+
const use_current_frame_1 = require("../use-current-frame");
|
|
13
15
|
const use_unsafe_video_config_1 = require("../use-unsafe-video-config");
|
|
14
16
|
const volume_prop_1 = require("../volume-prop");
|
|
15
17
|
const get_current_time_1 = require("./get-current-time");
|
|
16
|
-
const
|
|
17
|
-
|
|
18
|
-
const
|
|
18
|
+
const DEFAULT_IMAGE_FORMAT = 'jpeg';
|
|
19
|
+
const OffthreadVideoForRendering = ({ onError, volume: volumeProp, playbackRate, src, muted, imageFormat, ...props }) => {
|
|
20
|
+
const absoluteFrame = (0, use_current_frame_1.useAbsoluteCurrentFrame)();
|
|
21
|
+
const frame = (0, use_current_frame_1.useCurrentFrame)();
|
|
19
22
|
const volumePropsFrame = (0, use_audio_frame_1.useFrameForVolumeProp)();
|
|
20
23
|
const videoConfig = (0, use_unsafe_video_config_1.useUnsafeVideoConfig)();
|
|
21
|
-
const sequenceContext = (0, react_1.useContext)(
|
|
24
|
+
const sequenceContext = (0, react_1.useContext)(Sequence_1.SequenceContext);
|
|
22
25
|
const mediaStartsAt = (0, use_audio_frame_1.useMediaStartsAt)();
|
|
23
26
|
const { registerAsset, unregisterAsset } = (0, react_1.useContext)(CompositionManager_1.CompositionManager);
|
|
24
27
|
if (!src) {
|
|
@@ -77,11 +80,16 @@ const OffthreadVideoForRendering = ({ onError, volume: volumeProp, playbackRate,
|
|
|
77
80
|
}) / videoConfig.fps);
|
|
78
81
|
}, [frame, mediaStartsAt, playbackRate, videoConfig.fps]);
|
|
79
82
|
const actualSrc = (0, react_1.useMemo)(() => {
|
|
80
|
-
return `http://localhost:${window.remotion_proxyPort}/proxy?src=${encodeURIComponent((0, absolute_src_1.getAbsoluteSrc)(src))}&time=${encodeURIComponent(currentTime)}`;
|
|
81
|
-
}, [currentTime, src]);
|
|
83
|
+
return `http://localhost:${window.remotion_proxyPort}/proxy?src=${encodeURIComponent((0, absolute_src_1.getAbsoluteSrc)(src))}&time=${encodeURIComponent(currentTime)}&imageFormat=${imageFormat !== null && imageFormat !== void 0 ? imageFormat : DEFAULT_IMAGE_FORMAT}`;
|
|
84
|
+
}, [currentTime, imageFormat, src]);
|
|
82
85
|
const onErr = (0, react_1.useCallback)((e) => {
|
|
83
86
|
onError === null || onError === void 0 ? void 0 : onError(e);
|
|
84
87
|
}, [onError]);
|
|
85
|
-
|
|
88
|
+
const className = (0, react_1.useMemo)(() => {
|
|
89
|
+
return [default_css_1.OFFTHREAD_VIDEO_CLASS_NAME, props.className]
|
|
90
|
+
.filter(internals_1.Internals.truthy)
|
|
91
|
+
.join(' ');
|
|
92
|
+
}, [props.className]);
|
|
93
|
+
return ((0, jsx_runtime_1.jsx)(Img_1.Img, { src: actualSrc, className: className, ...props, onError: onErr }));
|
|
86
94
|
};
|
|
87
95
|
exports.OffthreadVideoForRendering = OffthreadVideoForRendering;
|
package/dist/video/Video.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { RemotionMainVideoProps } from './props';
|
|
3
|
-
export declare const Video: React.ForwardRefExoticComponent<Pick<Omit<React.DetailedHTMLProps<React.VideoHTMLAttributes<HTMLVideoElement>, HTMLVideoElement>, "
|
|
3
|
+
export declare const Video: React.ForwardRefExoticComponent<Pick<Omit<React.DetailedHTMLProps<React.VideoHTMLAttributes<HTMLVideoElement>, HTMLVideoElement>, "onEnded" | "autoPlay" | "controls" | "loop"> & {
|
|
4
4
|
volume?: import("../volume-prop").VolumeProp | undefined;
|
|
5
5
|
playbackRate?: number | undefined;
|
|
6
|
-
} & RemotionMainVideoProps, "dir" | "slot" | "style" | "title" | "
|
|
6
|
+
} & RemotionMainVideoProps, "dir" | "slot" | "style" | "title" | "onError" | "volume" | "playbackRate" | "src" | "muted" | "className" | "children" | "id" | "height" | "width" | "key" | "crossOrigin" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "contentEditable" | "contextMenu" | "draggable" | "hidden" | "lang" | "placeholder" | "spellCheck" | "tabIndex" | "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" | "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" | "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" | "controlsList" | "mediaGroup" | "playsInline" | "preload" | "poster" | "disablePictureInPicture" | "disableRemotePlayback" | keyof RemotionMainVideoProps> & React.RefAttributes<HTMLVideoElement>>;
|
package/dist/video/Video.js
CHANGED
|
@@ -4,7 +4,7 @@ exports.Video = void 0;
|
|
|
4
4
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
5
|
const react_1 = require("react");
|
|
6
6
|
const get_environment_1 = require("../get-environment");
|
|
7
|
-
const
|
|
7
|
+
const Sequence_1 = require("../Sequence");
|
|
8
8
|
const validate_media_props_1 = require("../validate-media-props");
|
|
9
9
|
const validate_start_from_props_1 = require("../validate-start-from-props");
|
|
10
10
|
const VideoForDevelopment_1 = require("./VideoForDevelopment");
|
|
@@ -18,7 +18,7 @@ const VideoForwardingFunction = (props, ref) => {
|
|
|
18
18
|
(0, validate_start_from_props_1.validateStartFromProps)(startFrom, endAt);
|
|
19
19
|
const startFromFrameNo = startFrom !== null && startFrom !== void 0 ? startFrom : 0;
|
|
20
20
|
const endAtFrameNo = endAt !== null && endAt !== void 0 ? endAt : Infinity;
|
|
21
|
-
return ((0, jsx_runtime_1.jsx)(
|
|
21
|
+
return ((0, jsx_runtime_1.jsx)(Sequence_1.Sequence, { layout: "none", from: 0 - startFromFrameNo, showInTimeline: false, durationInFrames: endAtFrameNo, children: (0, jsx_runtime_1.jsx)(exports.Video, { ...otherProps, ref: ref }) }));
|
|
22
22
|
}
|
|
23
23
|
(0, validate_media_props_1.validateMediaProps)(props, 'Video');
|
|
24
24
|
if ((0, get_environment_1.getRemotionEnvironment)() === 'rendering') {
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { RemotionVideoProps } from './props';
|
|
3
|
-
export declare const VideoForDevelopment: React.ForwardRefExoticComponent<Pick<RemotionVideoProps, "dir" | "slot" | "style" | "title" | "
|
|
3
|
+
export declare const VideoForDevelopment: React.ForwardRefExoticComponent<Pick<RemotionVideoProps, "dir" | "slot" | "style" | "title" | "onError" | "volume" | "playbackRate" | "src" | "muted" | "className" | "children" | "id" | "height" | "width" | "key" | "crossOrigin" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "contentEditable" | "contextMenu" | "draggable" | "hidden" | "lang" | "placeholder" | "spellCheck" | "tabIndex" | "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" | "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" | "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" | "controlsList" | "mediaGroup" | "playsInline" | "preload" | "poster" | "disablePictureInPicture" | "disableRemotePlayback"> & React.RefAttributes<HTMLVideoElement>>;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { RemotionVideoProps } from './props';
|
|
3
|
-
export declare const VideoForRendering: React.ForwardRefExoticComponent<Pick<RemotionVideoProps, "dir" | "slot" | "style" | "title" | "
|
|
3
|
+
export declare const VideoForRendering: React.ForwardRefExoticComponent<Pick<RemotionVideoProps, "dir" | "slot" | "style" | "title" | "onError" | "volume" | "playbackRate" | "src" | "muted" | "className" | "children" | "id" | "height" | "width" | "key" | "crossOrigin" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "contentEditable" | "contextMenu" | "draggable" | "hidden" | "lang" | "placeholder" | "spellCheck" | "tabIndex" | "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" | "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" | "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" | "controlsList" | "mediaGroup" | "playsInline" | "preload" | "poster" | "disablePictureInPicture" | "disableRemotePlayback"> & React.RefAttributes<HTMLVideoElement>>;
|
|
@@ -9,18 +9,18 @@ const CompositionManager_1 = require("../CompositionManager");
|
|
|
9
9
|
const delay_render_1 = require("../delay-render");
|
|
10
10
|
const is_approximately_the_same_1 = require("../is-approximately-the-same");
|
|
11
11
|
const random_1 = require("../random");
|
|
12
|
-
const
|
|
13
|
-
const
|
|
12
|
+
const Sequence_1 = require("../Sequence");
|
|
13
|
+
const use_current_frame_1 = require("../use-current-frame");
|
|
14
14
|
const use_unsafe_video_config_1 = require("../use-unsafe-video-config");
|
|
15
15
|
const volume_prop_1 = require("../volume-prop");
|
|
16
16
|
const get_current_time_1 = require("./get-current-time");
|
|
17
17
|
const VideoForRenderingForwardFunction = ({ onError, volume: volumeProp, playbackRate, ...props }, ref) => {
|
|
18
|
-
const absoluteFrame = (0,
|
|
19
|
-
const frame = (0,
|
|
18
|
+
const absoluteFrame = (0, use_current_frame_1.useAbsoluteCurrentFrame)();
|
|
19
|
+
const frame = (0, use_current_frame_1.useCurrentFrame)();
|
|
20
20
|
const volumePropsFrame = (0, use_audio_frame_1.useFrameForVolumeProp)();
|
|
21
21
|
const videoConfig = (0, use_unsafe_video_config_1.useUnsafeVideoConfig)();
|
|
22
22
|
const videoRef = (0, react_1.useRef)(null);
|
|
23
|
-
const sequenceContext = (0, react_1.useContext)(
|
|
23
|
+
const sequenceContext = (0, react_1.useContext)(Sequence_1.SequenceContext);
|
|
24
24
|
const mediaStartsAt = (0, use_audio_frame_1.useMediaStartsAt)();
|
|
25
25
|
const { registerAsset, unregisterAsset } = (0, react_1.useContext)(CompositionManager_1.CompositionManager);
|
|
26
26
|
// Generate a string that's as unique as possible for this asset
|
package/dist/video/index.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
export { OffthreadVideo } from './OffthreadVideo';
|
|
2
|
-
export { OffthreadVideoProps as RemotionOffthreadVideoProps, RemotionMainVideoProps, RemotionVideoProps, } from './props';
|
|
2
|
+
export { OffthreadVideoImageFormat, OffthreadVideoProps as RemotionOffthreadVideoProps, RemotionMainVideoProps, RemotionVideoProps, } from './props';
|
|
3
3
|
export { Video } from './Video';
|
package/dist/video/props.d.ts
CHANGED
|
@@ -8,6 +8,7 @@ export declare type RemotionVideoProps = Omit<React.DetailedHTMLProps<React.Vide
|
|
|
8
8
|
volume?: VolumeProp;
|
|
9
9
|
playbackRate?: number;
|
|
10
10
|
};
|
|
11
|
+
export declare type OffthreadVideoImageFormat = 'png' | 'jpeg';
|
|
11
12
|
export declare type OffthreadVideoProps = {
|
|
12
13
|
src: string;
|
|
13
14
|
className?: string;
|
|
@@ -16,4 +17,5 @@ export declare type OffthreadVideoProps = {
|
|
|
16
17
|
playbackRate?: number;
|
|
17
18
|
muted?: boolean;
|
|
18
19
|
onError?: React.ReactEventHandler<HTMLVideoElement | HTMLImageElement>;
|
|
20
|
+
imageFormat?: OffthreadVideoImageFormat;
|
|
19
21
|
};
|
|
@@ -3,7 +3,7 @@ export declare function useRemotionContexts(): {
|
|
|
3
3
|
compositionManagerCtx: import("./CompositionManager").CompositionManagerContext;
|
|
4
4
|
timelineContext: import("./timeline-position-state").TimelineContextValue;
|
|
5
5
|
setTimelineContext: import("./timeline-position-state").SetTimelineContextValue;
|
|
6
|
-
sequenceContext: import("./
|
|
6
|
+
sequenceContext: import("./Sequence").SequenceContextType | null;
|
|
7
7
|
nonceContext: import("./nonce").TNonceContext;
|
|
8
8
|
};
|
|
9
9
|
export interface RemotionContextProviderProps {
|
|
@@ -31,13 +31,13 @@ const jsx_runtime_1 = require("react/jsx-runtime");
|
|
|
31
31
|
const react_1 = __importStar(require("react"));
|
|
32
32
|
const CompositionManager_1 = require("./CompositionManager");
|
|
33
33
|
const nonce_1 = require("./nonce");
|
|
34
|
-
const
|
|
34
|
+
const Sequence_1 = require("./Sequence");
|
|
35
35
|
const timeline_position_state_1 = require("./timeline-position-state");
|
|
36
36
|
function useRemotionContexts() {
|
|
37
37
|
const compositionManagerCtx = react_1.default.useContext(CompositionManager_1.CompositionManager);
|
|
38
38
|
const timelineContext = react_1.default.useContext(timeline_position_state_1.TimelineContext);
|
|
39
39
|
const setTimelineContext = react_1.default.useContext(timeline_position_state_1.SetTimelineContext);
|
|
40
|
-
const sequenceContext = react_1.default.useContext(
|
|
40
|
+
const sequenceContext = react_1.default.useContext(Sequence_1.SequenceContext);
|
|
41
41
|
const nonceContext = react_1.default.useContext(nonce_1.NonceContext);
|
|
42
42
|
return (0, react_1.useMemo)(() => ({
|
|
43
43
|
compositionManagerCtx,
|
|
@@ -56,6 +56,6 @@ function useRemotionContexts() {
|
|
|
56
56
|
exports.useRemotionContexts = useRemotionContexts;
|
|
57
57
|
const RemotionContextProvider = (props) => {
|
|
58
58
|
const { children, contexts } = props;
|
|
59
|
-
return ((0, jsx_runtime_1.jsx)(nonce_1.NonceContext.Provider, { value: contexts.nonceContext, children: (0, jsx_runtime_1.jsx)(CompositionManager_1.CompositionManager.Provider, { value: contexts.compositionManagerCtx, children: (0, jsx_runtime_1.jsx)(timeline_position_state_1.TimelineContext.Provider, { value: contexts.timelineContext, children: (0, jsx_runtime_1.jsx)(timeline_position_state_1.SetTimelineContext.Provider, { value: contexts.setTimelineContext, children: (0, jsx_runtime_1.jsx)(
|
|
59
|
+
return ((0, jsx_runtime_1.jsx)(nonce_1.NonceContext.Provider, { value: contexts.nonceContext, children: (0, jsx_runtime_1.jsx)(CompositionManager_1.CompositionManager.Provider, { value: contexts.compositionManagerCtx, children: (0, jsx_runtime_1.jsx)(timeline_position_state_1.TimelineContext.Provider, { value: contexts.timelineContext, children: (0, jsx_runtime_1.jsx)(timeline_position_state_1.SetTimelineContext.Provider, { value: contexts.setTimelineContext, children: (0, jsx_runtime_1.jsx)(Sequence_1.SequenceContext.Provider, { value: contexts.sequenceContext, children: children }) }) }) }) }));
|
|
60
60
|
};
|
|
61
61
|
exports.RemotionContextProvider = RemotionContextProvider;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "remotion",
|
|
3
|
-
"version": "3.0.
|
|
3
|
+
"version": "3.0.22",
|
|
4
4
|
"description": "Render videos in React",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -55,5 +55,5 @@
|
|
|
55
55
|
"publishConfig": {
|
|
56
56
|
"access": "public"
|
|
57
57
|
},
|
|
58
|
-
"gitHead": "
|
|
58
|
+
"gitHead": "e79cfa299f58a26c84a637174875941898cdab97"
|
|
59
59
|
}
|
package/.turbo/turbo-lint.log
DELETED
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
[34mremotion:lint: [0mcache hit, replaying output [2m47bfa9f28025af3b[0m
|
|
2
|
-
[34mremotion:lint: [0m
|
|
3
|
-
[34mremotion:lint: [0m> remotion@3.0.18 lint /Users/jonathanburger/remotion/packages/core
|
|
4
|
-
[34mremotion:lint: [0m> eslint src --ext ts,tsx
|
|
5
|
-
[34mremotion:lint: [0m
|
|
6
|
-
[34mremotion:lint: [0m
|
|
7
|
-
[34mremotion:lint: [0m/Users/jonathanburger/remotion/packages/core/src/use-lazy-component.ts
|
|
8
|
-
[34mremotion:lint: [0m 9:50 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any
|
|
9
|
-
[34mremotion:lint: [0m
|
|
10
|
-
[34mremotion:lint: [0m✖ 1 problem (0 errors, 1 warning)
|
|
11
|
-
[34mremotion:lint: [0m
|
package/.turbo/turbo-test.log
DELETED
|
@@ -1,63 +0,0 @@
|
|
|
1
|
-
[34mremotion:test: [0mcache hit, replaying output [2m1cf43e6873b6327a[0m
|
|
2
|
-
[34mremotion:test: [0m
|
|
3
|
-
[34mremotion:test: [0m> remotion@3.0.18 test /Users/jonathanburger/remotion/packages/core
|
|
4
|
-
[34mremotion:test: [0m> jest --coverage && node generate-badges.js
|
|
5
|
-
[34mremotion:test: [0m
|
|
6
|
-
[34mremotion:test: [0mwatchman warning: Recrawled this watch 33 times, most recently because:
|
|
7
|
-
[34mremotion:test: [0mMustScanSubDirs UserDroppedTo resolve, please review the information on
|
|
8
|
-
[34mremotion:test: [0mhttps://facebook.github.io/watchman/docs/troubleshooting.html#recrawl
|
|
9
|
-
[34mremotion:test: [0mTo clear this warning, run:
|
|
10
|
-
[34mremotion:test: [0m`watchman watch-del '/Users/jonathanburger/remotion' ; watchman watch-project '/Users/jonathanburger/remotion'`
|
|
11
|
-
[34mremotion:test: [0m
|
|
12
|
-
[34mremotion:test: [0mPASS src/test/easing.test.ts (13.979 s)
|
|
13
|
-
[34mremotion:test: [0mPASS src/test/crf.test.ts (14.647 s)
|
|
14
|
-
[34mremotion:test: [0mPASS src/test/interpolate.test.ts (15.696 s)
|
|
15
|
-
[34mremotion:test: [0mPASS src/test/volume-prop.test.ts
|
|
16
|
-
[34mremotion:test: [0mPASS src/test/interpolateColors.test.ts
|
|
17
|
-
[34mremotion:test: [0mPASS src/test/nested-sequences.test.tsx (19.681 s)
|
|
18
|
-
[34mremotion:test: [0mPASS src/test/pixel-format.test.ts
|
|
19
|
-
[34mremotion:test: [0mPASS src/test/media-validation.test.tsx
|
|
20
|
-
[34mremotion:test: [0mPASS src/test/random.test.ts
|
|
21
|
-
[34mremotion:test: [0mPASS src/test/image-format.test.ts
|
|
22
|
-
[34mremotion:test: [0mPASS src/test/codec.test.ts
|
|
23
|
-
[34mremotion:test: [0mPASS src/test/range.test.tsx (18.241 s)
|
|
24
|
-
[34mremotion:test: [0mPASS src/test/get-current-time.test.ts
|
|
25
|
-
[34mremotion:test: [0mPASS src/test/audio-for-rendering.test.tsx (15.754 s)
|
|
26
|
-
[34mremotion:test: [0mPASS src/test/sequence-validation.test.tsx (17.791 s)
|
|
27
|
-
[34mremotion:test: [0mPASS src/test/use-audio-frame.test.tsx (15.191 s)
|
|
28
|
-
[34mremotion:test: [0mPASS src/test/freeze.test.tsx (25.998 s)
|
|
29
|
-
[34mremotion:test: [0mPASS src/test/series.test.tsx (60.742 s)
|
|
30
|
-
[34mremotion:test: [0mPASS src/test/loop-validation.test.tsx (61.354 s)
|
|
31
|
-
[34mremotion:test: [0mPASS src/test/video.test.tsx (20.932 s)
|
|
32
|
-
[34mremotion:test: [0mPASS src/test/composition-rules.test.tsx (14.804 s)
|
|
33
|
-
[34mremotion:test: [0mPASS src/test/composition-validation.test.tsx (62.791 s)
|
|
34
|
-
[34mremotion:test: [0mPASS src/test/validate-start-from-props.test.ts (6.96 s)
|
|
35
|
-
[34mremotion:test: [0mPASS src/test/log.test.ts
|
|
36
|
-
[34mremotion:test: [0mPASS src/test/measure-spring.test.ts (5.536 s)
|
|
37
|
-
[34mremotion:test: [0mPASS src/test/bezier.test.ts
|
|
38
|
-
[34mremotion:test: [0mPASS src/test/image-sequence.test.ts
|
|
39
|
-
[34mremotion:test: [0mPASS src/test/pro-res-profile.test.ts
|
|
40
|
-
[34mremotion:test: [0mPASS src/test/use-media-tag-volume.test.tsx (14.078 s)
|
|
41
|
-
[34mremotion:test: [0mPASS src/test/concurrency.test.ts
|
|
42
|
-
[34mremotion:test: [0mPASS src/test/overwrite.test.ts
|
|
43
|
-
[34mremotion:test: [0mPASS src/test/use-sync-volume-with-media-tag.test.ts (14.585 s)
|
|
44
|
-
[34mremotion:test: [0mPASS src/test/quality.test.ts (5.434 s)
|
|
45
|
-
[34mremotion:test: [0mPASS src/test/validate-frame.test.ts
|
|
46
|
-
[34mremotion:test: [0mPASS src/test/input-props.test.ts
|
|
47
|
-
[34mremotion:test: [0mPASS src/test/audio.test.tsx (29.868 s)
|
|
48
|
-
[34mremotion:test: [0mPASS src/test/use-media-in-timeline.test.tsx (14.503 s)
|
|
49
|
-
[34mremotion:test: [0mPASS src/test/spring.test.ts
|
|
50
|
-
[34mremotion:test: [0mPASS src/test/webpack-caching.test.ts
|
|
51
|
-
[34mremotion:test: [0mPASS src/test/preview-server.test.ts
|
|
52
|
-
[34mremotion:test: [0mPASS src/test/absolute-src.test.ts
|
|
53
|
-
[34mremotion:test: [0mPASS src/test/ready-manager.test.ts
|
|
54
|
-
[34mremotion:test: [0mPASS src/test/truthy.test.ts
|
|
55
|
-
[34mremotion:test: [0mPASS src/test/get-asset-file-name.test.ts
|
|
56
|
-
[34mremotion:test: [0mPASS src/test/validate-image-format.test.ts
|
|
57
|
-
[34mremotion:test: [0mPASS src/test/Img.test.tsx
|
|
58
|
-
[34mremotion:test: [0m
|
|
59
|
-
[34mremotion:test: [0mTest Suites: 46 passed, 46 total
|
|
60
|
-
[34mremotion:test: [0mTests: 474 passed, 474 total
|
|
61
|
-
[34mremotion:test: [0mSnapshots: 0 total
|
|
62
|
-
[34mremotion:test: [0mTime: 87.932 s
|
|
63
|
-
[34mremotion:test: [0mRan all test suites.
|