remotion 4.0.0-prefetch.9 → 4.0.0-prefetchapi.16
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 +0 -0
- package/dist/AbsoluteFill.js +0 -0
- package/dist/CanUseRemotionHooks.d.ts +0 -0
- package/dist/CanUseRemotionHooks.js +0 -0
- package/dist/Composition.d.ts +0 -0
- package/dist/Composition.js +0 -0
- package/dist/CompositionManager.d.ts +0 -0
- package/dist/CompositionManager.js +0 -0
- package/dist/Folder.d.ts +0 -0
- package/dist/Folder.js +0 -0
- package/dist/IFrame.d.ts +0 -0
- package/dist/IFrame.js +0 -0
- package/dist/Img.d.ts +0 -0
- package/dist/Img.js +2 -2
- package/dist/RemotionRoot.d.ts +0 -0
- package/dist/RemotionRoot.js +0 -0
- package/dist/Sequence.d.ts +0 -0
- package/dist/Sequence.js +0 -0
- package/dist/Still.d.ts +0 -0
- package/dist/Still.js +0 -0
- package/dist/absolute-src.d.ts +0 -0
- package/dist/absolute-src.js +0 -0
- package/dist/asset-types.d.ts +0 -0
- package/dist/asset-types.js +0 -0
- package/dist/audio/Audio.d.ts +1 -1
- package/dist/audio/Audio.js +0 -0
- package/dist/audio/AudioForDevelopment.d.ts +0 -0
- package/dist/audio/AudioForDevelopment.js +2 -2
- package/dist/audio/AudioForRendering.d.ts +0 -0
- package/dist/audio/AudioForRendering.js +0 -0
- package/dist/audio/index.d.ts +0 -0
- package/dist/audio/index.js +0 -0
- package/dist/audio/props.d.ts +0 -0
- package/dist/audio/props.js +0 -0
- package/dist/audio/shared-audio-tags.d.ts +0 -0
- package/dist/audio/shared-audio-tags.js +0 -0
- package/dist/audio/use-audio-frame.d.ts +0 -0
- package/dist/audio/use-audio-frame.js +0 -0
- package/dist/bezier.d.ts +0 -0
- package/dist/bezier.js +0 -0
- package/dist/config/input-props.d.ts +0 -0
- package/dist/config/input-props.js +0 -0
- package/dist/config.d.ts +0 -0
- package/dist/config.js +0 -0
- package/dist/default-css.d.ts +0 -0
- package/dist/default-css.js +0 -0
- package/dist/delay-render.d.ts +0 -0
- package/dist/delay-render.js +0 -0
- package/dist/easing.d.ts +0 -0
- package/dist/easing.js +0 -0
- package/dist/freeze.d.ts +0 -0
- package/dist/freeze.js +0 -0
- package/dist/get-asset-file-name.d.ts +0 -0
- package/dist/get-asset-file-name.js +0 -0
- package/dist/get-environment.d.ts +0 -0
- package/dist/get-environment.js +2 -2
- package/dist/get-preview-dom-element.d.ts +0 -0
- package/dist/get-preview-dom-element.js +0 -0
- package/dist/get-timeline-clip-name.d.ts +0 -0
- package/dist/get-timeline-clip-name.js +0 -0
- package/dist/index.d.ts +1 -1
- package/dist/index.js +3 -3
- package/dist/internals.d.ts +4 -1
- package/dist/internals.js +2 -0
- package/dist/interpolate-colors.d.ts +0 -0
- package/dist/interpolate-colors.js +0 -0
- package/dist/interpolate.d.ts +0 -0
- package/dist/interpolate.js +0 -0
- package/dist/is-approximately-the-same.d.ts +0 -0
- package/dist/is-approximately-the-same.js +0 -0
- package/dist/loading-indicator.d.ts +0 -0
- package/dist/loading-indicator.js +0 -0
- package/dist/loop/index.d.ts +0 -0
- package/dist/loop/index.js +0 -0
- package/dist/multiple-versions-warning.d.ts +0 -0
- package/dist/multiple-versions-warning.js +0 -0
- package/dist/nonce.d.ts +0 -0
- package/dist/nonce.js +0 -0
- package/dist/play-and-handle-not-allowed-error.d.ts +0 -0
- package/dist/play-and-handle-not-allowed-error.js +0 -0
- package/dist/portal-node.d.ts +0 -0
- package/dist/portal-node.js +0 -0
- package/dist/prefetch.d.ts +7 -0
- package/dist/prefetch.js +86 -0
- package/dist/preload.js +10 -3
- package/dist/random.d.ts +0 -0
- package/dist/random.js +0 -0
- package/dist/register-root.d.ts +0 -0
- package/dist/register-root.js +0 -0
- package/dist/series/flatten-children.d.ts +0 -0
- package/dist/series/flatten-children.js +0 -0
- package/dist/series/index.d.ts +0 -0
- package/dist/series/index.js +0 -0
- package/dist/setup-env-variables.d.ts +0 -0
- package/dist/setup-env-variables.js +0 -0
- package/dist/spring/index.d.ts +0 -0
- package/dist/spring/index.js +0 -0
- package/dist/spring/measure-spring.d.ts +0 -0
- package/dist/spring/measure-spring.js +0 -0
- package/dist/spring/spring-utils.d.ts +0 -0
- package/dist/spring/spring-utils.js +0 -0
- package/dist/static-file.d.ts +0 -0
- package/dist/static-file.js +0 -0
- package/dist/timeline-position-state.d.ts +0 -0
- package/dist/timeline-position-state.js +0 -0
- package/dist/truthy.d.ts +0 -0
- package/dist/truthy.js +0 -0
- package/dist/use-current-frame.d.ts +0 -0
- package/dist/use-current-frame.js +0 -0
- package/dist/use-lazy-component.d.ts +0 -0
- package/dist/use-lazy-component.js +0 -0
- package/dist/use-media-in-timeline.d.ts +0 -0
- package/dist/use-media-in-timeline.js +0 -0
- package/dist/use-media-playback.d.ts +0 -0
- package/dist/use-media-playback.js +0 -0
- package/dist/use-media-tag-volume.d.ts +0 -0
- package/dist/use-media-tag-volume.js +0 -0
- package/dist/use-sync-volume-with-media-tag.d.ts +0 -0
- package/dist/use-sync-volume-with-media-tag.js +0 -0
- package/dist/use-unsafe-video-config.d.ts +0 -0
- package/dist/use-unsafe-video-config.js +0 -0
- package/dist/use-video-config.d.ts +0 -0
- package/dist/use-video-config.js +0 -0
- package/dist/use-video.d.ts +1 -1
- package/dist/use-video.js +0 -0
- package/dist/validate-media-props.d.ts +0 -0
- package/dist/validate-media-props.js +0 -0
- package/dist/validate-start-from-props.d.ts +0 -0
- package/dist/validate-start-from-props.js +0 -0
- package/dist/validation/validate-composition-id.d.ts +0 -0
- package/dist/validation/validate-composition-id.js +0 -0
- package/dist/validation/validate-dimensions.d.ts +0 -0
- package/dist/validation/validate-dimensions.js +0 -0
- package/dist/validation/validate-duration-in-frames.d.ts +0 -0
- package/dist/validation/validate-duration-in-frames.js +0 -0
- package/dist/validation/validate-folder-name.d.ts +0 -0
- package/dist/validation/validate-folder-name.js +0 -0
- package/dist/validation/validate-fps.d.ts +0 -0
- package/dist/validation/validate-fps.js +0 -0
- package/dist/validation/validate-offthreadvideo-image-format.d.ts +0 -0
- package/dist/validation/validate-offthreadvideo-image-format.js +0 -0
- package/dist/validation/validation-spring-duration.d.ts +0 -0
- package/dist/validation/validation-spring-duration.js +0 -0
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/dist/video/OffthreadVideo.d.ts +0 -0
- package/dist/video/OffthreadVideo.js +0 -0
- package/dist/video/OffthreadVideoForRendering.d.ts +0 -0
- package/dist/video/OffthreadVideoForRendering.js +0 -0
- package/dist/video/Video.d.ts +1 -1
- package/dist/video/Video.js +0 -0
- package/dist/video/VideoForDevelopment.d.ts +0 -0
- package/dist/video/VideoForDevelopment.js +2 -2
- package/dist/video/VideoForRendering.d.ts +0 -0
- package/dist/video/VideoForRendering.js +0 -0
- package/dist/video/get-current-time.d.ts +0 -0
- package/dist/video/get-current-time.js +0 -0
- package/dist/video/index.d.ts +0 -0
- package/dist/video/index.js +0 -0
- package/dist/video/props.d.ts +0 -0
- package/dist/video/props.js +0 -0
- package/dist/video-config.d.ts +0 -0
- package/dist/video-config.js +0 -0
- package/dist/volume-position-state.d.ts +0 -0
- package/dist/volume-position-state.js +0 -0
- package/dist/volume-prop.d.ts +0 -0
- package/dist/volume-prop.js +0 -0
- package/dist/warn-about-non-seekable-media.d.ts +0 -0
- package/dist/warn-about-non-seekable-media.js +0 -0
- package/dist/wrap-remotion-context.d.ts +0 -0
- package/dist/wrap-remotion-context.js +0 -0
- package/package.json +2 -2
- package/dist/config/bundle-out-dir.d.ts +0 -2
- package/dist/config/bundle-out-dir.js +0 -12
- package/dist/config/public-path.d.ts +0 -2
- package/dist/config/public-path.js +0 -12
package/.turbo/turbo-build.log
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
[
|
|
2
|
-
[
|
|
3
|
-
[
|
|
4
|
-
[
|
|
5
|
-
[
|
|
1
|
+
[32mremotion:build: [0mcache hit, replaying output [2m28df07482870d016[0m
|
|
2
|
+
[32mremotion:build: [0m
|
|
3
|
+
[32mremotion:build: [0m> remotion@3.2.16 build /Users/jonathanburger/remotion/packages/core
|
|
4
|
+
[32mremotion:build: [0m> tsc -d
|
|
5
|
+
[32mremotion:build: [0m
|
package/dist/AbsoluteFill.d.ts
CHANGED
|
File without changes
|
package/dist/AbsoluteFill.js
CHANGED
|
File without changes
|
|
File without changes
|
|
File without changes
|
package/dist/Composition.d.ts
CHANGED
|
File without changes
|
package/dist/Composition.js
CHANGED
|
File without changes
|
|
File without changes
|
|
File without changes
|
package/dist/Folder.d.ts
CHANGED
|
File without changes
|
package/dist/Folder.js
CHANGED
|
File without changes
|
package/dist/IFrame.d.ts
CHANGED
|
File without changes
|
package/dist/IFrame.js
CHANGED
|
File without changes
|
package/dist/Img.d.ts
CHANGED
|
File without changes
|
package/dist/Img.js
CHANGED
|
@@ -4,13 +4,13 @@ exports.Img = void 0;
|
|
|
4
4
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
5
|
const react_1 = require("react");
|
|
6
6
|
const delay_render_1 = require("./delay-render");
|
|
7
|
-
const
|
|
7
|
+
const prefetch_1 = require("./prefetch");
|
|
8
8
|
const ImgRefForwarding = ({ onError, src, ...props }, ref) => {
|
|
9
9
|
const imageRef = (0, react_1.useRef)(null);
|
|
10
10
|
(0, react_1.useImperativeHandle)(ref, () => {
|
|
11
11
|
return imageRef.current;
|
|
12
12
|
});
|
|
13
|
-
const actualSrc = (0,
|
|
13
|
+
const actualSrc = (0, prefetch_1.usePreload)(src);
|
|
14
14
|
const didGetError = (0, react_1.useCallback)((e) => {
|
|
15
15
|
var _a;
|
|
16
16
|
if (onError) {
|
package/dist/RemotionRoot.d.ts
CHANGED
|
File without changes
|
package/dist/RemotionRoot.js
CHANGED
|
File without changes
|
package/dist/Sequence.d.ts
CHANGED
|
File without changes
|
package/dist/Sequence.js
CHANGED
|
File without changes
|
package/dist/Still.d.ts
CHANGED
|
File without changes
|
package/dist/Still.js
CHANGED
|
File without changes
|
package/dist/absolute-src.d.ts
CHANGED
|
File without changes
|
package/dist/absolute-src.js
CHANGED
|
File without changes
|
package/dist/asset-types.d.ts
CHANGED
|
File without changes
|
package/dist/asset-types.js
CHANGED
|
File without changes
|
package/dist/audio/Audio.d.ts
CHANGED
|
@@ -3,4 +3,4 @@ import type { RemotionMainAudioProps } from './props';
|
|
|
3
3
|
export declare const Audio: React.ForwardRefExoticComponent<Pick<Omit<React.DetailedHTMLProps<React.AudioHTMLAttributes<HTMLAudioElement>, HTMLAudioElement>, "onEnded" | "autoPlay" | "controls" | "loop"> & {
|
|
4
4
|
volume?: import("../volume-prop").VolumeProp | undefined;
|
|
5
5
|
playbackRate?: number | undefined;
|
|
6
|
-
} & RemotionMainAudioProps, "
|
|
6
|
+
} & RemotionMainAudioProps, "id" | "key" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "className" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "hidden" | "lang" | "placeholder" | "slot" | "spellCheck" | "style" | "tabIndex" | "title" | "translate" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "color" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "children" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "src" | "volume" | "playbackRate" | "controlsList" | "crossOrigin" | "mediaGroup" | "muted" | "playsInline" | "preload" | keyof RemotionMainAudioProps> & React.RefAttributes<HTMLAudioElement>>;
|
package/dist/audio/Audio.js
CHANGED
|
File without changes
|
|
File without changes
|
|
@@ -3,7 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.AudioForDevelopment = void 0;
|
|
4
4
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
5
|
const react_1 = require("react");
|
|
6
|
-
const
|
|
6
|
+
const prefetch_1 = require("../prefetch");
|
|
7
7
|
const random_1 = require("../random");
|
|
8
8
|
const Sequence_1 = require("../Sequence");
|
|
9
9
|
const use_media_in_timeline_1 = require("../use-media-in-timeline");
|
|
@@ -25,7 +25,7 @@ const AudioForDevelopmentForwardRefFunction = (props, ref) => {
|
|
|
25
25
|
if (!src) {
|
|
26
26
|
throw new TypeError("No 'src' was passed to <Audio>.");
|
|
27
27
|
}
|
|
28
|
-
const preloadedSrc = (0,
|
|
28
|
+
const preloadedSrc = (0, prefetch_1.usePreload)(src);
|
|
29
29
|
const propsToPass = (0, react_1.useMemo)(() => {
|
|
30
30
|
return {
|
|
31
31
|
muted: muted || mediaMuted,
|
|
File without changes
|
|
File without changes
|
package/dist/audio/index.d.ts
CHANGED
|
File without changes
|
package/dist/audio/index.js
CHANGED
|
File without changes
|
package/dist/audio/props.d.ts
CHANGED
|
File without changes
|
package/dist/audio/props.js
CHANGED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
package/dist/bezier.d.ts
CHANGED
|
File without changes
|
package/dist/bezier.js
CHANGED
|
File without changes
|
|
File without changes
|
|
File without changes
|
package/dist/config.d.ts
CHANGED
|
File without changes
|
package/dist/config.js
CHANGED
|
File without changes
|
package/dist/default-css.d.ts
CHANGED
|
File without changes
|
package/dist/default-css.js
CHANGED
|
File without changes
|
package/dist/delay-render.d.ts
CHANGED
|
File without changes
|
package/dist/delay-render.js
CHANGED
|
File without changes
|
package/dist/easing.d.ts
CHANGED
|
File without changes
|
package/dist/easing.js
CHANGED
|
File without changes
|
package/dist/freeze.d.ts
CHANGED
|
File without changes
|
package/dist/freeze.js
CHANGED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
package/dist/get-environment.js
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.getRemotionEnvironment = void 0;
|
|
4
4
|
const getRemotionEnvironment = () => {
|
|
5
|
-
if (process.env.NODE_ENV === 'production') {
|
|
5
|
+
if (typeof process !== 'undefined' && process.env.NODE_ENV === 'production') {
|
|
6
6
|
if (typeof window !== 'undefined' && window.remotion_isPlayer) {
|
|
7
7
|
return 'player-production';
|
|
8
8
|
}
|
|
@@ -11,7 +11,7 @@ const getRemotionEnvironment = () => {
|
|
|
11
11
|
// The Jest framework sets NODE_ENV as test.
|
|
12
12
|
// Right now we don't need to treat it in a special
|
|
13
13
|
// way which is good - defaulting to `rendering`.
|
|
14
|
-
if (process.env.NODE_ENV === 'test') {
|
|
14
|
+
if (typeof process !== 'undefined' && process.env.NODE_ENV === 'test') {
|
|
15
15
|
return 'rendering';
|
|
16
16
|
}
|
|
17
17
|
if (typeof window !== 'undefined' && window.remotion_isPlayer) {
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
package/dist/index.d.ts
CHANGED
|
@@ -56,7 +56,7 @@ export * from './internals';
|
|
|
56
56
|
export * from './interpolate';
|
|
57
57
|
export { interpolateColors } from './interpolate-colors';
|
|
58
58
|
export { Loop } from './loop';
|
|
59
|
-
export {
|
|
59
|
+
export { prefetch } from './prefetch';
|
|
60
60
|
export * from './random';
|
|
61
61
|
export { registerRoot } from './register-root';
|
|
62
62
|
export { Sequence } from './Sequence';
|
package/dist/index.js
CHANGED
|
@@ -14,7 +14,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
14
14
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
exports.useCurrentFrame = exports.staticFile = exports.Series = exports.Sequence = exports.registerRoot = exports.
|
|
17
|
+
exports.useCurrentFrame = exports.staticFile = exports.Series = exports.Sequence = exports.registerRoot = exports.prefetch = exports.Loop = exports.interpolateColors = exports.getInputProps = exports.Config = void 0;
|
|
18
18
|
require("./asset-types");
|
|
19
19
|
const multiple_versions_warning_1 = require("./multiple-versions-warning");
|
|
20
20
|
(0, multiple_versions_warning_1.checkMultipleRemotionVersions)();
|
|
@@ -37,8 +37,8 @@ var interpolate_colors_1 = require("./interpolate-colors");
|
|
|
37
37
|
Object.defineProperty(exports, "interpolateColors", { enumerable: true, get: function () { return interpolate_colors_1.interpolateColors; } });
|
|
38
38
|
var loop_1 = require("./loop");
|
|
39
39
|
Object.defineProperty(exports, "Loop", { enumerable: true, get: function () { return loop_1.Loop; } });
|
|
40
|
-
var
|
|
41
|
-
Object.defineProperty(exports, "
|
|
40
|
+
var prefetch_1 = require("./prefetch");
|
|
41
|
+
Object.defineProperty(exports, "prefetch", { enumerable: true, get: function () { return prefetch_1.prefetch; } });
|
|
42
42
|
__exportStar(require("./random"), exports);
|
|
43
43
|
var register_root_1 = require("./register-root");
|
|
44
44
|
Object.defineProperty(exports, "registerRoot", { enumerable: true, get: function () { return register_root_1.registerRoot; } });
|
package/dist/internals.d.ts
CHANGED
|
@@ -18,11 +18,11 @@ export declare const Internals: {
|
|
|
18
18
|
children: import("react").ReactNode;
|
|
19
19
|
}>;
|
|
20
20
|
useVideo: () => {
|
|
21
|
-
defaultProps: unknown;
|
|
22
21
|
height: number;
|
|
23
22
|
width: number;
|
|
24
23
|
fps: number;
|
|
25
24
|
durationInFrames: number;
|
|
25
|
+
defaultProps: unknown;
|
|
26
26
|
id: string;
|
|
27
27
|
folderName: string | null;
|
|
28
28
|
parentFolderName: string | null;
|
|
@@ -79,6 +79,9 @@ export declare const Internals: {
|
|
|
79
79
|
}>;
|
|
80
80
|
CanUseRemotionHooks: import("react").Context<boolean>;
|
|
81
81
|
enableLegacyRemotionConfig: () => void;
|
|
82
|
+
PreloadProvider: import("react").FC<{
|
|
83
|
+
children: import("react").ReactNode;
|
|
84
|
+
}>;
|
|
82
85
|
};
|
|
83
86
|
declare type WebpackConfiguration = Configuration;
|
|
84
87
|
declare type WebpackOverrideFn = (currentConfiguration: WebpackConfiguration) => WebpackConfiguration;
|
package/dist/internals.js
CHANGED
|
@@ -33,6 +33,7 @@ const delay_render_1 = require("./delay-render");
|
|
|
33
33
|
const get_environment_1 = require("./get-environment");
|
|
34
34
|
const get_preview_dom_element_1 = require("./get-preview-dom-element");
|
|
35
35
|
const portal_node_1 = require("./portal-node");
|
|
36
|
+
const preload_state_1 = require("./preload-state");
|
|
36
37
|
const register_root_1 = require("./register-root");
|
|
37
38
|
const RemotionRoot_1 = require("./RemotionRoot");
|
|
38
39
|
const Sequence_1 = require("./Sequence");
|
|
@@ -88,4 +89,5 @@ exports.Internals = {
|
|
|
88
89
|
CanUseRemotionHooksProvider: CanUseRemotionHooks_1.CanUseRemotionHooksProvider,
|
|
89
90
|
CanUseRemotionHooks: CanUseRemotionHooks_1.CanUseRemotionHooks,
|
|
90
91
|
enableLegacyRemotionConfig: config_1.enableLegacyRemotionConfig,
|
|
92
|
+
PreloadProvider: preload_state_1.PreloadProvider,
|
|
91
93
|
};
|
|
File without changes
|
|
File without changes
|
package/dist/interpolate.d.ts
CHANGED
|
File without changes
|
package/dist/interpolate.js
CHANGED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
package/dist/loop/index.d.ts
CHANGED
|
File without changes
|
package/dist/loop/index.js
CHANGED
|
File without changes
|
|
File without changes
|
|
File without changes
|
package/dist/nonce.d.ts
CHANGED
|
File without changes
|
package/dist/nonce.js
CHANGED
|
File without changes
|
|
File without changes
|
|
File without changes
|
package/dist/portal-node.d.ts
CHANGED
|
File without changes
|
package/dist/portal-node.js
CHANGED
|
File without changes
|
package/dist/prefetch.js
ADDED
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.prefetch = exports.usePreload = void 0;
|
|
4
|
+
const react_1 = require("react");
|
|
5
|
+
const get_environment_1 = require("./get-environment");
|
|
6
|
+
const preload_state_1 = require("./preload-state");
|
|
7
|
+
const usePreload = (src) => {
|
|
8
|
+
var _a;
|
|
9
|
+
const { preloads } = (0, react_1.useContext)(preload_state_1.PreloadContext);
|
|
10
|
+
return (_a = preloads[src]) !== null && _a !== void 0 ? _a : src;
|
|
11
|
+
};
|
|
12
|
+
exports.usePreload = usePreload;
|
|
13
|
+
const prefetch = (src) => {
|
|
14
|
+
if ((0, get_environment_1.getRemotionEnvironment)() === 'rendering') {
|
|
15
|
+
return {
|
|
16
|
+
unpreload: () => undefined,
|
|
17
|
+
waitForDone: () => Promise.resolve(src),
|
|
18
|
+
};
|
|
19
|
+
}
|
|
20
|
+
let canceled = false;
|
|
21
|
+
let objectUrl = null;
|
|
22
|
+
let resolve = () => undefined;
|
|
23
|
+
let reject = () => undefined;
|
|
24
|
+
const waitUntilDone = new Promise((res, rej) => {
|
|
25
|
+
resolve = res;
|
|
26
|
+
reject = rej;
|
|
27
|
+
});
|
|
28
|
+
const controller = new AbortController();
|
|
29
|
+
let canBeAborted = true;
|
|
30
|
+
fetch(src, {
|
|
31
|
+
signal: controller.signal,
|
|
32
|
+
})
|
|
33
|
+
.then((res) => {
|
|
34
|
+
canBeAborted = false;
|
|
35
|
+
if (canceled) {
|
|
36
|
+
return null;
|
|
37
|
+
}
|
|
38
|
+
if (!res.ok) {
|
|
39
|
+
throw new Error(`HTTP error, status = ${res.status}`);
|
|
40
|
+
}
|
|
41
|
+
return res.blob();
|
|
42
|
+
})
|
|
43
|
+
.then((buf) => {
|
|
44
|
+
var _a;
|
|
45
|
+
if (canceled) {
|
|
46
|
+
return;
|
|
47
|
+
}
|
|
48
|
+
if (buf) {
|
|
49
|
+
objectUrl = URL.createObjectURL(buf);
|
|
50
|
+
(_a = preload_state_1.preloadRef.current) === null || _a === void 0 ? void 0 : _a.setPreloads((p) => ({
|
|
51
|
+
...p,
|
|
52
|
+
[src]: objectUrl,
|
|
53
|
+
}));
|
|
54
|
+
resolve(objectUrl);
|
|
55
|
+
}
|
|
56
|
+
})
|
|
57
|
+
.catch((err) => {
|
|
58
|
+
reject(err);
|
|
59
|
+
});
|
|
60
|
+
return {
|
|
61
|
+
unpreload: () => {
|
|
62
|
+
var _a;
|
|
63
|
+
if (objectUrl) {
|
|
64
|
+
URL.revokeObjectURL(objectUrl);
|
|
65
|
+
(_a = preload_state_1.preloadRef.current) === null || _a === void 0 ? void 0 : _a.setPreloads((p) => {
|
|
66
|
+
const copy = { ...p };
|
|
67
|
+
delete copy[src];
|
|
68
|
+
return copy;
|
|
69
|
+
});
|
|
70
|
+
}
|
|
71
|
+
else {
|
|
72
|
+
canceled = true;
|
|
73
|
+
if (canBeAborted) {
|
|
74
|
+
try {
|
|
75
|
+
controller.abort();
|
|
76
|
+
}
|
|
77
|
+
catch (e) { }
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
},
|
|
81
|
+
waitForDone: () => {
|
|
82
|
+
return waitUntilDone;
|
|
83
|
+
},
|
|
84
|
+
};
|
|
85
|
+
};
|
|
86
|
+
exports.prefetch = prefetch;
|
package/dist/preload.js
CHANGED
|
@@ -25,11 +25,13 @@ const fetchAndPreload = (src) => {
|
|
|
25
25
|
resolve = res;
|
|
26
26
|
reject = rej;
|
|
27
27
|
});
|
|
28
|
-
const
|
|
28
|
+
const controller = new AbortController();
|
|
29
|
+
let canBeAborted = true;
|
|
29
30
|
fetch(src, {
|
|
30
|
-
signal,
|
|
31
|
+
signal: controller.signal,
|
|
31
32
|
})
|
|
32
33
|
.then((res) => {
|
|
34
|
+
canBeAborted = false;
|
|
33
35
|
if (canceled) {
|
|
34
36
|
return null;
|
|
35
37
|
}
|
|
@@ -68,7 +70,12 @@ const fetchAndPreload = (src) => {
|
|
|
68
70
|
}
|
|
69
71
|
else {
|
|
70
72
|
canceled = true;
|
|
71
|
-
|
|
73
|
+
if (canBeAborted) {
|
|
74
|
+
try {
|
|
75
|
+
controller.abort();
|
|
76
|
+
}
|
|
77
|
+
catch (e) { }
|
|
78
|
+
}
|
|
72
79
|
}
|
|
73
80
|
},
|
|
74
81
|
waitForDone: () => {
|
package/dist/random.d.ts
CHANGED
|
File without changes
|
package/dist/random.js
CHANGED
|
File without changes
|
package/dist/register-root.d.ts
CHANGED
|
File without changes
|
package/dist/register-root.js
CHANGED
|
File without changes
|
|
File without changes
|
|
File without changes
|
package/dist/series/index.d.ts
CHANGED
|
File without changes
|
package/dist/series/index.js
CHANGED
|
File without changes
|
|
File without changes
|
|
File without changes
|
package/dist/spring/index.d.ts
CHANGED
|
File without changes
|
package/dist/spring/index.js
CHANGED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
package/dist/static-file.d.ts
CHANGED
|
File without changes
|
package/dist/static-file.js
CHANGED
|
File without changes
|
|
File without changes
|
|
File without changes
|
package/dist/truthy.d.ts
CHANGED
|
File without changes
|
package/dist/truthy.js
CHANGED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
package/dist/use-video-config.js
CHANGED
|
File without changes
|
package/dist/use-video.d.ts
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
export declare const useVideo: () => {
|
|
3
|
-
defaultProps: unknown;
|
|
4
3
|
height: number;
|
|
5
4
|
width: number;
|
|
6
5
|
fps: number;
|
|
7
6
|
durationInFrames: number;
|
|
7
|
+
defaultProps: unknown;
|
|
8
8
|
id: string;
|
|
9
9
|
folderName: string | null;
|
|
10
10
|
parentFolderName: string | null;
|
package/dist/use-video.js
CHANGED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
package/dist/version.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const VERSION = "4.0.0-
|
|
1
|
+
export declare const VERSION = "4.0.0-prefetchapi.16+486ce6105";
|
package/dist/version.js
CHANGED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
package/dist/video/Video.d.ts
CHANGED
|
@@ -3,4 +3,4 @@ import type { 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, "
|
|
6
|
+
} & RemotionMainVideoProps, "id" | "height" | "width" | "key" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "className" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "hidden" | "lang" | "placeholder" | "slot" | "spellCheck" | "style" | "tabIndex" | "title" | "translate" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "color" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "children" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "src" | "volume" | "playbackRate" | "controlsList" | "crossOrigin" | "mediaGroup" | "muted" | "playsInline" | "preload" | "poster" | "disablePictureInPicture" | "disableRemotePlayback" | keyof RemotionMainVideoProps> & React.RefAttributes<HTMLVideoElement>>;
|
package/dist/video/Video.js
CHANGED
|
File without changes
|
|
File without changes
|
|
@@ -4,7 +4,7 @@ exports.VideoForDevelopment = void 0;
|
|
|
4
4
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
5
|
const react_1 = require("react");
|
|
6
6
|
const use_audio_frame_1 = require("../audio/use-audio-frame");
|
|
7
|
-
const
|
|
7
|
+
const prefetch_1 = require("../prefetch");
|
|
8
8
|
const use_media_in_timeline_1 = require("../use-media-in-timeline");
|
|
9
9
|
const use_media_playback_1 = require("../use-media-playback");
|
|
10
10
|
const use_media_tag_volume_1 = require("../use-media-tag-volume");
|
|
@@ -39,7 +39,7 @@ const VideoForDevelopmentRefForwardingFunction = (props, ref) => {
|
|
|
39
39
|
playbackRate: (_a = props.playbackRate) !== null && _a !== void 0 ? _a : 1,
|
|
40
40
|
onlyWarnForMediaSeekingError,
|
|
41
41
|
});
|
|
42
|
-
const actualSrc = (0,
|
|
42
|
+
const actualSrc = (0, prefetch_1.usePreload)(src);
|
|
43
43
|
(0, react_1.useImperativeHandle)(ref, () => {
|
|
44
44
|
return videoRef.current;
|
|
45
45
|
});
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
package/dist/video/index.d.ts
CHANGED
|
File without changes
|
package/dist/video/index.js
CHANGED
|
File without changes
|
package/dist/video/props.d.ts
CHANGED
|
File without changes
|
package/dist/video/props.js
CHANGED
|
File without changes
|
package/dist/video-config.d.ts
CHANGED
|
File without changes
|
package/dist/video-config.js
CHANGED
|
File without changes
|
|
File without changes
|
|
File without changes
|
package/dist/volume-prop.d.ts
CHANGED
|
File without changes
|
package/dist/volume-prop.js
CHANGED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "remotion",
|
|
3
|
-
"version": "4.0.0-
|
|
3
|
+
"version": "4.0.0-prefetchapi.16+486ce6105",
|
|
4
4
|
"description": "Render videos in React",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -54,5 +54,5 @@
|
|
|
54
54
|
"publishConfig": {
|
|
55
55
|
"access": "public"
|
|
56
56
|
},
|
|
57
|
-
"gitHead": "
|
|
57
|
+
"gitHead": "486ce6105d52f9494351e4fbf564f6cfb0b10408"
|
|
58
58
|
}
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.setBundleOutDir = exports.getBundleOutDir = void 0;
|
|
4
|
-
let bundleOutDir = null;
|
|
5
|
-
const getBundleOutDir = () => {
|
|
6
|
-
return bundleOutDir;
|
|
7
|
-
};
|
|
8
|
-
exports.getBundleOutDir = getBundleOutDir;
|
|
9
|
-
const setBundleOutDir = (path) => {
|
|
10
|
-
bundleOutDir = path;
|
|
11
|
-
};
|
|
12
|
-
exports.setBundleOutDir = setBundleOutDir;
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.setPublicPath = exports.getPublicPath = void 0;
|
|
4
|
-
let publicPath = null;
|
|
5
|
-
const getPublicPath = () => {
|
|
6
|
-
return publicPath;
|
|
7
|
-
};
|
|
8
|
-
exports.getPublicPath = getPublicPath;
|
|
9
|
-
const setPublicPath = (path) => {
|
|
10
|
-
publicPath = path;
|
|
11
|
-
};
|
|
12
|
-
exports.setPublicPath = setPublicPath;
|