remotion 3.0.20 → 3.0.23
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 +2 -2
- package/.turbo/turbo-lint.log +11 -0
- package/README.md +1 -1
- package/dist/AbsoluteFill.d.ts +6 -1
- package/dist/AbsoluteFill.js +4 -0
- package/dist/Composition.d.ts +2 -5
- package/dist/Composition.js +3 -29
- package/dist/CompositionManager.d.ts +3 -5
- 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/Still.d.ts +1 -1
- package/dist/audio/Audio.d.ts +3 -3
- package/dist/audio/Audio.js +2 -2
- package/dist/audio/AudioForDevelopment.d.ts +2 -2
- package/dist/audio/AudioForRendering.d.ts +2 -2
- package/dist/audio/AudioForRendering.js +5 -5
- package/dist/audio/props.d.ts +1 -1
- package/dist/audio/shared-audio-tags.d.ts +1 -1
- package/dist/audio/use-audio-frame.js +4 -4
- package/dist/compress-assets.d.ts +1 -1
- package/dist/config/chromium-flags.d.ts +1 -1
- package/dist/config/crf.d.ts +1 -1
- package/dist/config/image-format.d.ts +1 -1
- package/dist/config/image-sequence.d.ts +1 -1
- package/dist/config/index.d.ts +12 -12
- package/dist/config/log.d.ts +1 -1
- package/dist/config/override-webpack.d.ts +1 -1
- package/dist/config/pixel-format.d.ts +1 -1
- package/dist/config/prores-profile.d.ts +1 -1
- 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 +6 -5
- package/dist/index.js +7 -6
- package/dist/internals.d.ts +14 -13
- package/dist/internals.js +6 -4
- package/dist/interpolate-colors.d.ts +5 -0
- package/dist/interpolate-colors.js +401 -0
- package/dist/is-audio-codec.d.ts +1 -1
- package/dist/play-and-handle-not-allowed-error.d.ts +1 -1
- package/dist/register-root.d.ts +1 -1
- package/dist/series/index.d.ts +2 -2
- package/dist/series/index.js +2 -2
- package/dist/spring/index.d.ts +1 -1
- package/dist/spring/measure-spring.d.ts +1 -1
- package/dist/timeline-inout-position-state.d.ts +1 -1
- package/dist/timeline-position-state.d.ts +1 -1
- package/dist/use-current-frame.d.ts +7 -0
- package/dist/use-current-frame.js +25 -0
- package/dist/use-lazy-component.d.ts +3 -3
- package/dist/use-media-in-timeline.d.ts +2 -2
- package/dist/use-media-in-timeline.js +2 -2
- package/dist/use-media-playback.d.ts +1 -1
- package/dist/use-media-playback.js +3 -3
- package/dist/use-media-tag-volume.d.ts +1 -1
- package/dist/use-sync-volume-with-media-tag.d.ts +2 -2
- package/dist/use-unsafe-video-config.d.ts +1 -1
- package/dist/use-unsafe-video-config.js +2 -2
- package/dist/use-video-config.d.ts +1 -1
- package/dist/validate-media-props.d.ts +3 -3
- package/dist/validation/validate-image-format.d.ts +1 -1
- 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.d.ts +1 -1
- package/dist/video/OffthreadVideo.js +4 -2
- package/dist/video/OffthreadVideoForRendering.d.ts +1 -1
- package/dist/video/OffthreadVideoForRendering.js +17 -15
- package/dist/video/Video.d.ts +3 -3
- package/dist/video/Video.js +2 -2
- package/dist/video/VideoForDevelopment.d.ts +2 -2
- package/dist/video/VideoForRendering.d.ts +2 -2
- package/dist/video/VideoForRendering.js +5 -5
- package/dist/video/index.d.ts +1 -1
- package/dist/video/props.d.ts +4 -2
- package/dist/wrap-remotion-context.d.ts +1 -1
- package/dist/wrap-remotion-context.js +3 -3
- package/package.json +3 -3
|
@@ -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,17 +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
|
-
const
|
|
86
|
-
return
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
return (0, jsx_runtime_1.jsx)(Img_1.Img, { src: actualSrc, style: actualStyle, ...props, onError: onErr });
|
|
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 }));
|
|
92
94
|
};
|
|
93
95
|
exports.OffthreadVideoForRendering = OffthreadVideoForRendering;
|
package/dist/video/Video.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { RemotionMainVideoProps } from './props';
|
|
3
|
-
export declare const Video: React.ForwardRefExoticComponent<Pick<Omit<React.DetailedHTMLProps<React.VideoHTMLAttributes<HTMLVideoElement>, HTMLVideoElement>, "
|
|
2
|
+
import type { RemotionMainVideoProps } from './props';
|
|
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, "
|
|
6
|
+
} & RemotionMainVideoProps, "style" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "className" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "hidden" | "id" | "lang" | "placeholder" | "slot" | "spellCheck" | "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" | "height" | "width" | "key" | "controlsList" | "crossOrigin" | "mediaGroup" | "muted" | "playsInline" | "preload" | "src" | "poster" | "disablePictureInPicture" | "disableRemotePlayback" | "volume" | "playbackRate" | 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
|
-
import { RemotionVideoProps } from './props';
|
|
3
|
-
export declare const VideoForDevelopment: React.ForwardRefExoticComponent<Pick<RemotionVideoProps, "
|
|
2
|
+
import type { RemotionVideoProps } from './props';
|
|
3
|
+
export declare const VideoForDevelopment: React.ForwardRefExoticComponent<Pick<RemotionVideoProps, "style" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "className" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "hidden" | "id" | "lang" | "placeholder" | "slot" | "spellCheck" | "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" | "height" | "width" | "key" | "controlsList" | "crossOrigin" | "mediaGroup" | "muted" | "playsInline" | "preload" | "src" | "poster" | "disablePictureInPicture" | "disableRemotePlayback" | "volume" | "playbackRate"> & React.RefAttributes<HTMLVideoElement>>;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { RemotionVideoProps } from './props';
|
|
3
|
-
export declare const VideoForRendering: React.ForwardRefExoticComponent<Pick<RemotionVideoProps, "
|
|
2
|
+
import type { RemotionVideoProps } from './props';
|
|
3
|
+
export declare const VideoForRendering: React.ForwardRefExoticComponent<Pick<RemotionVideoProps, "style" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "className" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "hidden" | "id" | "lang" | "placeholder" | "slot" | "spellCheck" | "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" | "height" | "width" | "key" | "controlsList" | "crossOrigin" | "mediaGroup" | "muted" | "playsInline" | "preload" | "src" | "poster" | "disablePictureInPicture" | "disableRemotePlayback" | "volume" | "playbackRate"> & 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
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { VolumeProp } from '../volume-prop';
|
|
1
|
+
import type React from 'react';
|
|
2
|
+
import type { VolumeProp } from '../volume-prop';
|
|
3
3
|
export declare type RemotionMainVideoProps = {
|
|
4
4
|
startFrom?: number;
|
|
5
5
|
endAt?: number;
|
|
@@ -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.23",
|
|
4
4
|
"description": "Render videos in React",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
"react-dom": ">=16.8.0"
|
|
26
26
|
},
|
|
27
27
|
"devDependencies": {
|
|
28
|
-
"@jonny/eslint-config": "3.0.
|
|
28
|
+
"@jonny/eslint-config": "3.0.266",
|
|
29
29
|
"@testing-library/react": "13.1.1",
|
|
30
30
|
"@types/jest": "^27.4.0",
|
|
31
31
|
"@types/node": "^16.7.5",
|
|
@@ -55,5 +55,5 @@
|
|
|
55
55
|
"publishConfig": {
|
|
56
56
|
"access": "public"
|
|
57
57
|
},
|
|
58
|
-
"gitHead": "
|
|
58
|
+
"gitHead": "34ed74cec020662252ce42ec52223d9f66a0252b"
|
|
59
59
|
}
|