remotion 4.0.0-fastlambda.8 → 4.0.0-lambda.1
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 +5 -1
- package/dist/Composition.d.ts +2 -6
- package/dist/Composition.js +30 -27
- package/dist/CompositionManager.d.ts +2 -5
- package/dist/CompositionManager.js +6 -2
- package/dist/Folder.d.ts +15 -0
- package/dist/Folder.js +33 -0
- package/dist/IFrame.js +1 -1
- package/dist/Img.js +26 -21
- package/dist/RemotionRoot.js +1 -1
- package/dist/Sequence.d.ts +19 -0
- package/dist/Sequence.js +123 -0
- package/dist/Still.js +1 -1
- package/dist/audio/Audio.d.ts +1 -1
- package/dist/audio/Audio.js +4 -4
- package/dist/audio/AudioForDevelopment.d.ts +1 -1
- package/dist/audio/AudioForDevelopment.js +1 -1
- package/dist/audio/AudioForRendering.d.ts +1 -1
- package/dist/audio/AudioForRendering.js +6 -6
- package/dist/audio/index.js +5 -1
- package/dist/audio/shared-audio-tags.js +6 -2
- package/dist/audio/use-audio-frame.js +4 -4
- package/dist/config/bundle-out-dir.d.ts +2 -0
- package/dist/config/bundle-out-dir.js +12 -0
- package/dist/config/chromium-flags.d.ts +1 -1
- package/dist/config/every-nth-file.d.ts +2 -0
- package/dist/config/every-nth-file.js +12 -0
- package/dist/config/ffmpeg-executable.d.ts +2 -0
- package/dist/config/ffmpeg-executable.js +10 -1
- package/dist/config/index.d.ts +9 -4
- package/dist/config/index.js +7 -2
- package/dist/config/log.d.ts +1 -1
- package/dist/config/loop.d.ts +3 -0
- package/dist/config/loop.js +15 -0
- package/dist/config/override-webpack.d.ts +1 -7
- package/dist/config/public-path.d.ts +2 -0
- package/dist/config/public-path.js +12 -0
- package/dist/delay-render.d.ts +1 -1
- package/dist/freeze.d.ts +2 -2
- package/dist/freeze.js +2 -2
- package/dist/index.d.ts +9 -5
- package/dist/index.js +13 -7
- package/dist/internals.d.ts +8 -7
- package/dist/internals.js +13 -6
- package/dist/interpolate-colors.d.ts +5 -0
- package/dist/interpolate-colors.js +401 -0
- package/dist/loading-indicator.d.ts +2 -0
- package/dist/loading-indicator.js +35 -0
- package/dist/loop/index.js +1 -1
- package/dist/perf/index.d.ts +1 -1
- package/dist/perf/index.js +2 -0
- package/dist/portal-node.d.ts +1 -0
- package/dist/portal-node.js +23 -0
- package/dist/register-root.d.ts +1 -0
- package/dist/register-root.js +20 -5
- package/dist/sequencing/index.js +1 -1
- package/dist/series/index.d.ts +1 -1
- package/dist/series/index.js +4 -4
- package/dist/use-current-frame.d.ts +7 -0
- package/dist/use-current-frame.js +25 -0
- package/dist/use-lazy-component.js +5 -1
- 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/validate-media-props.d.ts +2 -1
- package/dist/validation/validate-every-nth-frame.d.ts +1 -0
- package/dist/validation/validate-every-nth-frame.js +21 -0
- package/dist/validation/validate-opengl-renderer.d.ts +1 -1
- package/dist/validation/validate-opengl-renderer.js +1 -1
- package/dist/video/OffthreadVideo.d.ts +3 -0
- package/dist/video/OffthreadVideo.js +25 -0
- package/dist/video/OffthreadVideoForRendering.d.ts +3 -0
- package/dist/video/OffthreadVideoForRendering.js +93 -0
- package/dist/video/Video.d.ts +1 -1
- package/dist/video/Video.js +4 -4
- package/dist/video/VideoForDevelopment.d.ts +1 -1
- package/dist/video/VideoForDevelopment.js +1 -1
- package/dist/video/VideoForRendering.d.ts +1 -1
- package/dist/video/VideoForRendering.js +10 -6
- package/dist/video/get-current-time.d.ts +5 -0
- package/dist/video/get-current-time.js +10 -2
- package/dist/video/index.d.ts +3 -2
- package/dist/video/index.js +5 -12
- package/dist/video/props.d.ts +10 -1
- package/dist/wrap-remotion-context.d.ts +1 -1
- package/dist/wrap-remotion-context.js +8 -4
- package/package.json +3 -3
- package/.turbo/turbo-lint.log +0 -11
- package/.turbo/turbo-test.log +0 -78
|
@@ -2,11 +2,11 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.useUnsafeVideoConfig = void 0;
|
|
4
4
|
const react_1 = require("react");
|
|
5
|
-
const
|
|
5
|
+
const Sequence_1 = require("./Sequence");
|
|
6
6
|
const use_video_1 = require("./use-video");
|
|
7
7
|
const useUnsafeVideoConfig = () => {
|
|
8
8
|
var _a;
|
|
9
|
-
const context = (0, react_1.useContext)(
|
|
9
|
+
const context = (0, react_1.useContext)(Sequence_1.SequenceContext);
|
|
10
10
|
const ctxDuration = (_a = context === null || context === void 0 ? void 0 : context.durationInFrames) !== null && _a !== void 0 ? _a : null;
|
|
11
11
|
const video = (0, use_video_1.useVideo)();
|
|
12
12
|
return (0, react_1.useMemo)(() => {
|
|
@@ -1,3 +1,4 @@
|
|
|
1
1
|
import { RemotionAudioProps } from './audio';
|
|
2
2
|
import { RemotionVideoProps } from './video';
|
|
3
|
-
|
|
3
|
+
import { OffthreadVideoProps } from './video/props';
|
|
4
|
+
export declare const validateMediaProps: (props: RemotionVideoProps | RemotionAudioProps | OffthreadVideoProps, component: 'Video' | 'Audio') => void;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const validateEveryNthFrame: (everyNthFrame: unknown) => void;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.validateEveryNthFrame = void 0;
|
|
4
|
+
const validateEveryNthFrame = (everyNthFrame) => {
|
|
5
|
+
if (typeof everyNthFrame === 'undefined') {
|
|
6
|
+
throw new TypeError(`Argument missing for parameter "everyNthFrame"`);
|
|
7
|
+
}
|
|
8
|
+
if (typeof everyNthFrame !== 'number') {
|
|
9
|
+
throw new TypeError(`Argument passed to "everyNthFrame" is not a number: ${everyNthFrame}`);
|
|
10
|
+
}
|
|
11
|
+
if (everyNthFrame < 1) {
|
|
12
|
+
throw new RangeError(`The value for "everyNthFrame" cannot be below 1, but is ${everyNthFrame}`);
|
|
13
|
+
}
|
|
14
|
+
if (!Number.isFinite(everyNthFrame)) {
|
|
15
|
+
throw new RangeError(`"everyNthFrame" ${everyNthFrame} is not finite`);
|
|
16
|
+
}
|
|
17
|
+
if (everyNthFrame % 1 !== 0) {
|
|
18
|
+
throw new RangeError(`Argument for everyNthFrame must be an integer, but got ${everyNthFrame}`);
|
|
19
|
+
}
|
|
20
|
+
};
|
|
21
|
+
exports.validateEveryNthFrame = validateEveryNthFrame;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
declare const validRenderers: readonly ["angle", "egl", "swiftshader"];
|
|
1
|
+
declare const validRenderers: readonly ["swangle", "angle", "egl", "swiftshader"];
|
|
2
2
|
export declare type OpenGlRenderer = typeof validRenderers[number];
|
|
3
3
|
export declare const validateOpenGlRenderer: (option: OpenGlRenderer | null) => OpenGlRenderer | null;
|
|
4
4
|
export {};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.validateOpenGlRenderer = void 0;
|
|
4
|
-
const validRenderers = ['angle', 'egl', 'swiftshader'];
|
|
4
|
+
const validRenderers = ['swangle', 'angle', 'egl', 'swiftshader'];
|
|
5
5
|
const validateOpenGlRenderer = (option) => {
|
|
6
6
|
if (option === null) {
|
|
7
7
|
return null;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.OffthreadVideo = void 0;
|
|
4
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
|
+
const get_environment_1 = require("../get-environment");
|
|
6
|
+
const Sequence_1 = require("../Sequence");
|
|
7
|
+
const validate_media_props_1 = require("../validate-media-props");
|
|
8
|
+
const validate_start_from_props_1 = require("../validate-start-from-props");
|
|
9
|
+
const OffthreadVideoForRendering_1 = require("./OffthreadVideoForRendering");
|
|
10
|
+
const VideoForDevelopment_1 = require("./VideoForDevelopment");
|
|
11
|
+
const OffthreadVideo = (props) => {
|
|
12
|
+
const { startFrom, endAt, ...otherProps } = props;
|
|
13
|
+
if (typeof startFrom !== 'undefined' || typeof endAt !== 'undefined') {
|
|
14
|
+
(0, validate_start_from_props_1.validateStartFromProps)(startFrom, endAt);
|
|
15
|
+
const startFromFrameNo = startFrom !== null && startFrom !== void 0 ? startFrom : 0;
|
|
16
|
+
const endAtFrameNo = endAt !== null && endAt !== void 0 ? endAt : Infinity;
|
|
17
|
+
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
|
+
(0, validate_media_props_1.validateMediaProps)(props, 'Video');
|
|
20
|
+
if ((0, get_environment_1.getRemotionEnvironment)() === 'rendering') {
|
|
21
|
+
return (0, jsx_runtime_1.jsx)(OffthreadVideoForRendering_1.OffthreadVideoForRendering, { ...otherProps });
|
|
22
|
+
}
|
|
23
|
+
return (0, jsx_runtime_1.jsx)(VideoForDevelopment_1.VideoForDevelopment, { ...otherProps });
|
|
24
|
+
};
|
|
25
|
+
exports.OffthreadVideo = OffthreadVideo;
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.OffthreadVideoForRendering = void 0;
|
|
4
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
|
+
const react_1 = require("react");
|
|
6
|
+
const absolute_src_1 = require("../absolute-src");
|
|
7
|
+
const use_audio_frame_1 = require("../audio/use-audio-frame");
|
|
8
|
+
const CompositionManager_1 = require("../CompositionManager");
|
|
9
|
+
const Img_1 = require("../Img");
|
|
10
|
+
const random_1 = require("../random");
|
|
11
|
+
const Sequence_1 = require("../Sequence");
|
|
12
|
+
const use_current_frame_1 = require("../use-current-frame");
|
|
13
|
+
const use_unsafe_video_config_1 = require("../use-unsafe-video-config");
|
|
14
|
+
const volume_prop_1 = require("../volume-prop");
|
|
15
|
+
const get_current_time_1 = require("./get-current-time");
|
|
16
|
+
const OffthreadVideoForRendering = ({ onError, volume: volumeProp, playbackRate, src, muted, style, ...props }) => {
|
|
17
|
+
const absoluteFrame = (0, use_current_frame_1.useAbsoluteCurrentFrame)();
|
|
18
|
+
const frame = (0, use_current_frame_1.useCurrentFrame)();
|
|
19
|
+
const volumePropsFrame = (0, use_audio_frame_1.useFrameForVolumeProp)();
|
|
20
|
+
const videoConfig = (0, use_unsafe_video_config_1.useUnsafeVideoConfig)();
|
|
21
|
+
const sequenceContext = (0, react_1.useContext)(Sequence_1.SequenceContext);
|
|
22
|
+
const mediaStartsAt = (0, use_audio_frame_1.useMediaStartsAt)();
|
|
23
|
+
const { registerAsset, unregisterAsset } = (0, react_1.useContext)(CompositionManager_1.CompositionManager);
|
|
24
|
+
if (!src) {
|
|
25
|
+
throw new TypeError('No `src` was passed to <OffthreadVideo>.');
|
|
26
|
+
}
|
|
27
|
+
// Generate a string that's as unique as possible for this asset
|
|
28
|
+
// but at the same time the same on all threads
|
|
29
|
+
const id = (0, react_1.useMemo)(() => `video-${(0, random_1.random)(src !== null && src !== void 0 ? src : '')}-${sequenceContext === null || sequenceContext === void 0 ? void 0 : sequenceContext.cumulatedFrom}-${sequenceContext === null || sequenceContext === void 0 ? void 0 : sequenceContext.relativeFrom}-${sequenceContext === null || sequenceContext === void 0 ? void 0 : sequenceContext.durationInFrames}-muted:${muted}`, [
|
|
30
|
+
src,
|
|
31
|
+
muted,
|
|
32
|
+
sequenceContext === null || sequenceContext === void 0 ? void 0 : sequenceContext.cumulatedFrom,
|
|
33
|
+
sequenceContext === null || sequenceContext === void 0 ? void 0 : sequenceContext.relativeFrom,
|
|
34
|
+
sequenceContext === null || sequenceContext === void 0 ? void 0 : sequenceContext.durationInFrames,
|
|
35
|
+
]);
|
|
36
|
+
if (!videoConfig) {
|
|
37
|
+
throw new Error('No video config found');
|
|
38
|
+
}
|
|
39
|
+
const volume = (0, volume_prop_1.evaluateVolume)({
|
|
40
|
+
volume: volumeProp,
|
|
41
|
+
frame: volumePropsFrame,
|
|
42
|
+
mediaVolume: 1,
|
|
43
|
+
});
|
|
44
|
+
(0, react_1.useEffect)(() => {
|
|
45
|
+
if (!src) {
|
|
46
|
+
throw new Error('No src passed');
|
|
47
|
+
}
|
|
48
|
+
if (muted) {
|
|
49
|
+
return;
|
|
50
|
+
}
|
|
51
|
+
registerAsset({
|
|
52
|
+
type: 'video',
|
|
53
|
+
src: (0, absolute_src_1.getAbsoluteSrc)(src),
|
|
54
|
+
id,
|
|
55
|
+
frame: absoluteFrame,
|
|
56
|
+
volume,
|
|
57
|
+
mediaFrame: frame,
|
|
58
|
+
playbackRate: playbackRate !== null && playbackRate !== void 0 ? playbackRate : 1,
|
|
59
|
+
});
|
|
60
|
+
return () => unregisterAsset(id);
|
|
61
|
+
}, [
|
|
62
|
+
muted,
|
|
63
|
+
src,
|
|
64
|
+
registerAsset,
|
|
65
|
+
id,
|
|
66
|
+
unregisterAsset,
|
|
67
|
+
volume,
|
|
68
|
+
frame,
|
|
69
|
+
absoluteFrame,
|
|
70
|
+
playbackRate,
|
|
71
|
+
]);
|
|
72
|
+
const currentTime = (0, react_1.useMemo)(() => {
|
|
73
|
+
return ((0, get_current_time_1.getExpectedMediaFrameUncorrected)({
|
|
74
|
+
frame,
|
|
75
|
+
playbackRate: playbackRate || 1,
|
|
76
|
+
startFrom: -mediaStartsAt,
|
|
77
|
+
}) / videoConfig.fps);
|
|
78
|
+
}, [frame, mediaStartsAt, playbackRate, videoConfig.fps]);
|
|
79
|
+
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]);
|
|
82
|
+
const onErr = (0, react_1.useCallback)((e) => {
|
|
83
|
+
onError === null || onError === void 0 ? void 0 : onError(e);
|
|
84
|
+
}, [onError]);
|
|
85
|
+
const actualStyle = (0, react_1.useMemo)(() => {
|
|
86
|
+
return {
|
|
87
|
+
objectFit: 'contain',
|
|
88
|
+
...(style !== null && style !== void 0 ? style : {}),
|
|
89
|
+
};
|
|
90
|
+
}, [style]);
|
|
91
|
+
return (0, jsx_runtime_1.jsx)(Img_1.Img, { src: actualSrc, style: actualStyle, ...props, onError: onErr });
|
|
92
|
+
};
|
|
93
|
+
exports.OffthreadVideoForRendering = OffthreadVideoForRendering;
|
package/dist/video/Video.d.ts
CHANGED
|
@@ -3,4 +3,4 @@ import { RemotionMainVideoProps } from './props';
|
|
|
3
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, "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" | "
|
|
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" | "volume" | "playbackRate" | "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,12 +18,12 @@ 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') {
|
|
25
|
-
return (0, jsx_runtime_1.jsx)(VideoForRendering_1.VideoForRendering, { ...otherProps, ref: ref }
|
|
25
|
+
return (0, jsx_runtime_1.jsx)(VideoForRendering_1.VideoForRendering, { ...otherProps, ref: ref });
|
|
26
26
|
}
|
|
27
|
-
return (0, jsx_runtime_1.jsx)(VideoForDevelopment_1.VideoForDevelopment, { ...otherProps, ref: ref }
|
|
27
|
+
return (0, jsx_runtime_1.jsx)(VideoForDevelopment_1.VideoForDevelopment, { ...otherProps, ref: ref });
|
|
28
28
|
};
|
|
29
29
|
exports.Video = (0, react_1.forwardRef)(VideoForwardingFunction);
|
|
@@ -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, "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" | "
|
|
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" | "volume" | "playbackRate" | "poster" | "disablePictureInPicture" | "disableRemotePlayback"> & React.RefAttributes<HTMLVideoElement>>;
|
|
@@ -40,6 +40,6 @@ const VideoForDevelopmentRefForwardingFunction = (props, ref) => {
|
|
|
40
40
|
(0, react_1.useImperativeHandle)(ref, () => {
|
|
41
41
|
return videoRef.current;
|
|
42
42
|
});
|
|
43
|
-
return ((0, jsx_runtime_1.jsx)("video", { ref: videoRef, muted: muted || mediaMuted, playsInline: true, ...nativeProps }
|
|
43
|
+
return ((0, jsx_runtime_1.jsx)("video", { ref: videoRef, muted: muted || mediaMuted, playsInline: true, ...nativeProps }));
|
|
44
44
|
};
|
|
45
45
|
exports.VideoForDevelopment = (0, react_1.forwardRef)(VideoForDevelopmentRefForwardingFunction);
|
|
@@ -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, "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" | "
|
|
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" | "volume" | "playbackRate" | "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
|
|
@@ -129,6 +129,10 @@ const VideoForRenderingForwardFunction = ({ onError, volume: volumeProp, playbac
|
|
|
129
129
|
throw new Error('The browser threw an errir');
|
|
130
130
|
}
|
|
131
131
|
}, { once: true });
|
|
132
|
+
// If video skips to another frame or unmounts, we clear the created handle
|
|
133
|
+
return () => {
|
|
134
|
+
(0, delay_render_1.continueRender)(handle);
|
|
135
|
+
};
|
|
132
136
|
}, [
|
|
133
137
|
volumePropsFrame,
|
|
134
138
|
props.src,
|
|
@@ -137,6 +141,6 @@ const VideoForRenderingForwardFunction = ({ onError, volume: volumeProp, playbac
|
|
|
137
141
|
frame,
|
|
138
142
|
mediaStartsAt,
|
|
139
143
|
]);
|
|
140
|
-
return (0, jsx_runtime_1.jsx)("video", { ref: videoRef, ...props, onError: onError }
|
|
144
|
+
return (0, jsx_runtime_1.jsx)("video", { ref: videoRef, ...props, onError: onError });
|
|
141
145
|
};
|
|
142
146
|
exports.VideoForRendering = (0, react_1.forwardRef)(VideoForRenderingForwardFunction);
|
|
@@ -1,3 +1,8 @@
|
|
|
1
|
+
export declare const getExpectedMediaFrameUncorrected: ({ frame, playbackRate, startFrom, }: {
|
|
2
|
+
frame: number;
|
|
3
|
+
playbackRate: number;
|
|
4
|
+
startFrom: number;
|
|
5
|
+
}) => number;
|
|
1
6
|
export declare const getMediaTime: ({ fps, frame, src, playbackRate, startFrom, }: {
|
|
2
7
|
fps: number;
|
|
3
8
|
frame: number;
|
|
@@ -1,10 +1,18 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
// Calculate the `.currentTime` of a video or audio element
|
|
3
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
-
exports.getMediaTime = void 0;
|
|
4
|
+
exports.getMediaTime = exports.getExpectedMediaFrameUncorrected = void 0;
|
|
5
5
|
const interpolate_1 = require("../interpolate");
|
|
6
|
+
const getExpectedMediaFrameUncorrected = ({ frame, playbackRate, startFrom, }) => {
|
|
7
|
+
return (0, interpolate_1.interpolate)(frame, [-1, startFrom, startFrom + 1], [-1, startFrom, startFrom + playbackRate]);
|
|
8
|
+
};
|
|
9
|
+
exports.getExpectedMediaFrameUncorrected = getExpectedMediaFrameUncorrected;
|
|
6
10
|
const getMediaTime = ({ fps, frame, src, playbackRate, startFrom, }) => {
|
|
7
|
-
const expectedFrame = (0,
|
|
11
|
+
const expectedFrame = (0, exports.getExpectedMediaFrameUncorrected)({
|
|
12
|
+
frame,
|
|
13
|
+
playbackRate,
|
|
14
|
+
startFrom,
|
|
15
|
+
});
|
|
8
16
|
if (src.endsWith('mp4')) {
|
|
9
17
|
// In Chrome, for MP4s, if 30fps, the first frame is still displayed at 0.033333
|
|
10
18
|
// even though after that it increases by 0.033333333 each.
|
package/dist/video/index.d.ts
CHANGED
|
@@ -1,2 +1,3 @@
|
|
|
1
|
-
export
|
|
2
|
-
export
|
|
1
|
+
export { OffthreadVideo } from './OffthreadVideo';
|
|
2
|
+
export { OffthreadVideoProps as RemotionOffthreadVideoProps, RemotionMainVideoProps, RemotionVideoProps, } from './props';
|
|
3
|
+
export { Video } from './Video';
|
package/dist/video/index.js
CHANGED
|
@@ -1,14 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
|
|
5
|
-
}) : (function(o, m, k, k2) {
|
|
6
|
-
if (k2 === undefined) k2 = k;
|
|
7
|
-
o[k2] = m[k];
|
|
8
|
-
}));
|
|
9
|
-
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
10
|
-
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
11
|
-
};
|
|
12
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
13
|
-
|
|
14
|
-
|
|
3
|
+
exports.Video = exports.OffthreadVideo = void 0;
|
|
4
|
+
var OffthreadVideo_1 = require("./OffthreadVideo");
|
|
5
|
+
Object.defineProperty(exports, "OffthreadVideo", { enumerable: true, get: function () { return OffthreadVideo_1.OffthreadVideo; } });
|
|
6
|
+
var Video_1 = require("./Video");
|
|
7
|
+
Object.defineProperty(exports, "Video", { enumerable: true, get: function () { return Video_1.Video; } });
|
package/dist/video/props.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
import React from 'react';
|
|
2
2
|
import { VolumeProp } from '../volume-prop';
|
|
3
3
|
export declare type RemotionMainVideoProps = {
|
|
4
4
|
startFrom?: number;
|
|
@@ -8,3 +8,12 @@ export declare type RemotionVideoProps = Omit<React.DetailedHTMLProps<React.Vide
|
|
|
8
8
|
volume?: VolumeProp;
|
|
9
9
|
playbackRate?: number;
|
|
10
10
|
};
|
|
11
|
+
export declare type OffthreadVideoProps = {
|
|
12
|
+
src: string;
|
|
13
|
+
className?: string;
|
|
14
|
+
style?: React.CSSProperties;
|
|
15
|
+
volume?: VolumeProp;
|
|
16
|
+
playbackRate?: number;
|
|
17
|
+
muted?: boolean;
|
|
18
|
+
onError?: React.ReactEventHandler<HTMLVideoElement | HTMLImageElement>;
|
|
19
|
+
};
|
|
@@ -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 {
|
|
@@ -1,7 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
3
|
if (k2 === undefined) k2 = k;
|
|
4
|
-
Object.
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
5
9
|
}) : (function(o, m, k, k2) {
|
|
6
10
|
if (k2 === undefined) k2 = k;
|
|
7
11
|
o[k2] = m[k];
|
|
@@ -27,13 +31,13 @@ const jsx_runtime_1 = require("react/jsx-runtime");
|
|
|
27
31
|
const react_1 = __importStar(require("react"));
|
|
28
32
|
const CompositionManager_1 = require("./CompositionManager");
|
|
29
33
|
const nonce_1 = require("./nonce");
|
|
30
|
-
const
|
|
34
|
+
const Sequence_1 = require("./Sequence");
|
|
31
35
|
const timeline_position_state_1 = require("./timeline-position-state");
|
|
32
36
|
function useRemotionContexts() {
|
|
33
37
|
const compositionManagerCtx = react_1.default.useContext(CompositionManager_1.CompositionManager);
|
|
34
38
|
const timelineContext = react_1.default.useContext(timeline_position_state_1.TimelineContext);
|
|
35
39
|
const setTimelineContext = react_1.default.useContext(timeline_position_state_1.SetTimelineContext);
|
|
36
|
-
const sequenceContext = react_1.default.useContext(
|
|
40
|
+
const sequenceContext = react_1.default.useContext(Sequence_1.SequenceContext);
|
|
37
41
|
const nonceContext = react_1.default.useContext(nonce_1.NonceContext);
|
|
38
42
|
return (0, react_1.useMemo)(() => ({
|
|
39
43
|
compositionManagerCtx,
|
|
@@ -52,6 +56,6 @@ function useRemotionContexts() {
|
|
|
52
56
|
exports.useRemotionContexts = useRemotionContexts;
|
|
53
57
|
const RemotionContextProvider = (props) => {
|
|
54
58
|
const { children, contexts } = props;
|
|
55
|
-
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 }) }) }) }) }));
|
|
56
60
|
};
|
|
57
61
|
exports.RemotionContextProvider = RemotionContextProvider;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "remotion",
|
|
3
|
-
"version": "4.0.0-
|
|
3
|
+
"version": "4.0.0-lambda.1+5a0913230",
|
|
4
4
|
"description": "Render videos in React",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -41,7 +41,7 @@
|
|
|
41
41
|
"react-test-renderer": "^18.0.0",
|
|
42
42
|
"rimraf": "^3.0.2",
|
|
43
43
|
"ts-jest": "^27.0.5",
|
|
44
|
-
"typescript": "^4.
|
|
44
|
+
"typescript": "^4.7.0",
|
|
45
45
|
"webpack": "5.72.0"
|
|
46
46
|
},
|
|
47
47
|
"keywords": [
|
|
@@ -55,5 +55,5 @@
|
|
|
55
55
|
"publishConfig": {
|
|
56
56
|
"access": "public"
|
|
57
57
|
},
|
|
58
|
-
"gitHead": "
|
|
58
|
+
"gitHead": "5a091323018b016b7c05adcd4d3d2a5c9df292a8"
|
|
59
59
|
}
|
package/.turbo/turbo-lint.log
DELETED
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
[33mremotion:lint: [0mcache hit, replaying output [2mcfd1b8e3d4bfaf71[0m
|
|
2
|
-
[33mremotion:lint: [0m
|
|
3
|
-
[33mremotion:lint: [0m> remotion@2.6.15 lint /Users/jonathanburger/remotion/packages/core
|
|
4
|
-
[33mremotion:lint: [0m> eslint src --ext ts,tsx
|
|
5
|
-
[33mremotion:lint: [0m
|
|
6
|
-
[33mremotion:lint: [0m
|
|
7
|
-
[33mremotion:lint: [0m/Users/jonathanburger/remotion/packages/core/src/use-lazy-component.ts
|
|
8
|
-
[33mremotion:lint: [0m 9:50 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any
|
|
9
|
-
[33mremotion:lint: [0m
|
|
10
|
-
[33mremotion:lint: [0m✖ 1 problem (0 errors, 1 warning)
|
|
11
|
-
[33mremotion:lint: [0m
|