remotion 4.0.178 → 4.0.180
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/.rollup.cache/Users/jonathanburger/remotion/packages/core/dist/esm/CanUseRemotionHooks.d.ts +1 -1
- package/.rollup.cache/Users/jonathanburger/remotion/packages/core/dist/esm/Composition.js +3 -3
- package/.rollup.cache/Users/jonathanburger/remotion/packages/core/dist/esm/CompositionManager.d.ts +2 -4
- package/.rollup.cache/Users/jonathanburger/remotion/packages/core/dist/esm/CompositionManager.js +1 -1
- package/.rollup.cache/Users/jonathanburger/remotion/packages/core/dist/esm/IFrame.d.ts +1 -4
- package/.rollup.cache/Users/jonathanburger/remotion/packages/core/dist/esm/IFrame.js +2 -5
- package/.rollup.cache/Users/jonathanburger/remotion/packages/core/dist/esm/Img.d.ts +3 -5
- package/.rollup.cache/Users/jonathanburger/remotion/packages/core/dist/esm/Img.js +5 -18
- package/.rollup.cache/Users/jonathanburger/remotion/packages/core/dist/esm/RemotionRoot.d.ts +2 -2
- package/.rollup.cache/Users/jonathanburger/remotion/packages/core/dist/esm/RemotionRoot.js +4 -5
- package/.rollup.cache/Users/jonathanburger/remotion/packages/core/dist/esm/ResolveCompositionConfig.js +1 -1
- package/.rollup.cache/Users/jonathanburger/remotion/packages/core/dist/esm/Sequence.d.ts +2 -11
- package/.rollup.cache/Users/jonathanburger/remotion/packages/core/dist/esm/Sequence.js +3 -43
- package/.rollup.cache/Users/jonathanburger/remotion/packages/core/dist/esm/SequenceContext.d.ts +0 -1
- package/.rollup.cache/Users/jonathanburger/remotion/packages/core/dist/esm/audio/Audio.d.ts +1 -4
- package/.rollup.cache/Users/jonathanburger/remotion/packages/core/dist/esm/audio/Audio.js +1 -1
- package/.rollup.cache/Users/jonathanburger/remotion/packages/core/dist/esm/audio/AudioForPreview.d.ts +6 -7
- package/.rollup.cache/Users/jonathanburger/remotion/packages/core/dist/esm/audio/AudioForPreview.js +5 -10
- package/.rollup.cache/Users/jonathanburger/remotion/packages/core/dist/esm/audio/AudioForRendering.d.ts +1 -4
- package/.rollup.cache/Users/jonathanburger/remotion/packages/core/dist/esm/audio/AudioForRendering.js +7 -18
- package/.rollup.cache/Users/jonathanburger/remotion/packages/core/dist/esm/audio/props.d.ts +0 -4
- package/.rollup.cache/Users/jonathanburger/remotion/packages/core/dist/esm/audio/use-audio-frame.d.ts +1 -2
- package/.rollup.cache/Users/jonathanburger/remotion/packages/core/dist/esm/audio/use-audio-frame.js +2 -7
- package/.rollup.cache/Users/jonathanburger/remotion/packages/core/dist/esm/delay-render.d.ts +1 -7
- package/.rollup.cache/Users/jonathanburger/remotion/packages/core/dist/esm/delay-render.js +5 -11
- package/.rollup.cache/Users/jonathanburger/remotion/packages/core/dist/esm/freeze.js +9 -5
- package/.rollup.cache/Users/jonathanburger/remotion/packages/core/dist/esm/index.d.ts +4 -6
- package/.rollup.cache/Users/jonathanburger/remotion/packages/core/dist/esm/internals.d.ts +9 -4
- package/.rollup.cache/Users/jonathanburger/remotion/packages/core/dist/esm/internals.js +5 -0
- package/.rollup.cache/Users/jonathanburger/remotion/packages/core/dist/esm/loop/index.d.ts +5 -13
- package/.rollup.cache/Users/jonathanburger/remotion/packages/core/dist/esm/loop/index.js +3 -15
- package/.rollup.cache/Users/jonathanburger/remotion/packages/core/dist/esm/no-react.d.ts +2 -12
- package/.rollup.cache/Users/jonathanburger/remotion/packages/core/dist/esm/no-react.js +2 -12
- package/.rollup.cache/Users/jonathanburger/remotion/packages/core/dist/esm/series/index.js +1 -1
- package/.rollup.cache/Users/jonathanburger/remotion/packages/core/dist/esm/spring/index.d.ts +2 -2
- package/.rollup.cache/Users/jonathanburger/remotion/packages/core/dist/esm/spring/measure-spring.d.ts +1 -1
- package/.rollup.cache/Users/jonathanburger/remotion/packages/core/dist/esm/test/audio-for-rendering.test.js +11 -10
- package/.rollup.cache/Users/jonathanburger/remotion/packages/core/dist/esm/test/freeze.test.js +1 -1
- package/.rollup.cache/Users/jonathanburger/remotion/packages/core/dist/esm/test/not-all-props-in-media-tags.test.js +3 -3
- package/.rollup.cache/Users/jonathanburger/remotion/packages/core/dist/esm/test/sequence-from-initial-offset.test.js +17 -2
- package/.rollup.cache/Users/jonathanburger/remotion/packages/core/dist/esm/test/sequence-validation.test.js +4 -3
- package/.rollup.cache/Users/jonathanburger/remotion/packages/core/dist/esm/test/spring-bench.test.js +1 -1
- package/.rollup.cache/Users/jonathanburger/remotion/packages/core/dist/esm/test/spring.test.js +3 -3
- package/.rollup.cache/Users/jonathanburger/remotion/packages/core/dist/esm/test/static-file-errors.test.js +4 -6
- package/.rollup.cache/Users/jonathanburger/remotion/packages/core/dist/esm/test/use-media-in-timeline.test.js +4 -3
- package/.rollup.cache/Users/jonathanburger/remotion/packages/core/dist/esm/test/use-media-tag-volume.test.js +31 -1
- package/.rollup.cache/Users/jonathanburger/remotion/packages/core/dist/esm/test/video.test.js +2 -1
- package/.rollup.cache/Users/jonathanburger/remotion/packages/core/dist/esm/test/wrap-sequence-context.d.ts +3 -1
- package/.rollup.cache/Users/jonathanburger/remotion/packages/core/dist/esm/test/wrap-sequence-context.js +1 -1
- package/.rollup.cache/Users/jonathanburger/remotion/packages/core/dist/esm/use-media-buffering.d.ts +1 -5
- package/.rollup.cache/Users/jonathanburger/remotion/packages/core/dist/esm/use-media-buffering.js +2 -12
- package/.rollup.cache/Users/jonathanburger/remotion/packages/core/dist/esm/use-media-in-timeline.d.ts +1 -2
- package/.rollup.cache/Users/jonathanburger/remotion/packages/core/dist/esm/use-media-in-timeline.js +3 -5
- package/.rollup.cache/Users/jonathanburger/remotion/packages/core/dist/esm/version.d.ts +1 -1
- package/.rollup.cache/Users/jonathanburger/remotion/packages/core/dist/esm/version.js +1 -1
- package/.rollup.cache/Users/jonathanburger/remotion/packages/core/dist/esm/video/OffthreadVideo.js +1 -1
- package/.rollup.cache/Users/jonathanburger/remotion/packages/core/dist/esm/video/OffthreadVideoForRendering.js +5 -8
- package/.rollup.cache/Users/jonathanburger/remotion/packages/core/dist/esm/video/Video.d.ts +2 -5
- package/.rollup.cache/Users/jonathanburger/remotion/packages/core/dist/esm/video/Video.js +2 -2
- package/.rollup.cache/Users/jonathanburger/remotion/packages/core/dist/esm/video/VideoForPreview.d.ts +7 -7
- package/.rollup.cache/Users/jonathanburger/remotion/packages/core/dist/esm/video/VideoForPreview.js +10 -13
- package/.rollup.cache/Users/jonathanburger/remotion/packages/core/dist/esm/video/VideoForRendering.d.ts +1 -4
- package/.rollup.cache/Users/jonathanburger/remotion/packages/core/dist/esm/video/VideoForRendering.js +7 -18
- package/.rollup.cache/Users/jonathanburger/remotion/packages/core/dist/esm/video/index.d.ts +1 -1
- package/.rollup.cache/Users/jonathanburger/remotion/packages/core/dist/esm/video/props.d.ts +0 -5
- package/.rollup.cache/Users/jonathanburger/remotion/packages/core/dist/esm/video/video-fragment.js +5 -9
- package/.rollup.cache/Users/jonathanburger/remotion/packages/core/dist/esm/wrap-remotion-context.js +3 -3
- package/.rollup.cache/Users/jonathanburger/remotion/packages/core/dist/tsconfig-esm.tsbuildinfo +1 -1
- package/dist/cjs/validation/validate-composition-id.js +1 -1
- package/dist/cjs/version.d.ts +1 -1
- package/dist/cjs/version.js +1 -1
- package/dist/cjs/video/Video.d.ts +1 -1
- package/dist/cjs/video/VideoForPreview.js +1 -1
- package/dist/cjs/video/VideoForRendering.d.ts +1 -1
- package/dist/cjs/video/props.d.ts +1 -1
- package/dist/esm/index.mjs +3 -2
- package/dist/esm/version.mjs +1 -1
- package/dist/tsconfig-esm.tsbuildinfo +1 -0
- package/package.json +1 -1
- package/.rollup.cache/Users/jonathanburger/remotion/packages/core/dist/esm/v5-flag.d.ts +0 -1
- package/.rollup.cache/Users/jonathanburger/remotion/packages/core/dist/esm/v5-flag.js +0 -1
|
@@ -4,15 +4,15 @@ import { createPortal } from 'react-dom';
|
|
|
4
4
|
import { AbsoluteFill } from './AbsoluteFill.js';
|
|
5
5
|
import { CanUseRemotionHooks, CanUseRemotionHooksProvider, } from './CanUseRemotionHooks.js';
|
|
6
6
|
import { CompositionManager } from './CompositionManagerContext.js';
|
|
7
|
-
import { FolderContext } from './Folder.js';
|
|
8
|
-
import { NativeLayersContext } from './NativeLayers.js';
|
|
9
|
-
import { useResolvedVideoConfig } from './ResolveCompositionConfig.js';
|
|
10
7
|
import { continueRender, delayRender } from './delay-render.js';
|
|
8
|
+
import { FolderContext } from './Folder.js';
|
|
11
9
|
import { getRemotionEnvironment } from './get-remotion-environment.js';
|
|
12
10
|
import { useIsPlayer } from './is-player.js';
|
|
13
11
|
import { Loading } from './loading-indicator.js';
|
|
12
|
+
import { NativeLayersContext } from './NativeLayers.js';
|
|
14
13
|
import { useNonce } from './nonce.js';
|
|
15
14
|
import { portalNode } from './portal-node.js';
|
|
15
|
+
import { useResolvedVideoConfig } from './ResolveCompositionConfig.js';
|
|
16
16
|
import { useLazyComponent } from './use-lazy-component.js';
|
|
17
17
|
import { useVideo } from './use-video.js';
|
|
18
18
|
import { validateCompositionId } from './validation/validate-composition-id.js';
|
package/.rollup.cache/Users/jonathanburger/remotion/packages/core/dist/esm/CompositionManager.d.ts
CHANGED
|
@@ -54,7 +54,6 @@ export type TSequence = {
|
|
|
54
54
|
nonce: number;
|
|
55
55
|
loopDisplay: LoopDisplay | undefined;
|
|
56
56
|
stack: string | null;
|
|
57
|
-
premountDisplay: number | null;
|
|
58
57
|
} & EnhancedTSequenceData;
|
|
59
58
|
export type TRenderAsset = {
|
|
60
59
|
type: 'audio' | 'video';
|
|
@@ -66,13 +65,12 @@ export type TRenderAsset = {
|
|
|
66
65
|
playbackRate: number;
|
|
67
66
|
allowAmplificationDuringRender: boolean;
|
|
68
67
|
toneFrequency: number | null;
|
|
69
|
-
audioStartFrame: number;
|
|
70
68
|
};
|
|
71
69
|
export declare const compositionsRef: React.RefObject<{
|
|
72
70
|
getCompositions: () => TCompMetadataWithCalcFunction<AnyZodObject, Record<string, unknown>>[];
|
|
73
71
|
}>;
|
|
74
72
|
export declare const CompositionManagerProvider: React.FC<{
|
|
75
|
-
|
|
76
|
-
|
|
73
|
+
children: React.ReactNode;
|
|
74
|
+
numberOfAudioTags: number;
|
|
77
75
|
}>;
|
|
78
76
|
export {};
|
package/.rollup.cache/Users/jonathanburger/remotion/packages/core/dist/esm/CompositionManager.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
2
|
import React, { useCallback, useImperativeHandle, useMemo, useRef, useState, } from 'react';
|
|
3
|
+
import { SharedAudioContextProvider } from './audio/shared-audio-tags.js';
|
|
3
4
|
import { CompositionManager } from './CompositionManagerContext.js';
|
|
4
5
|
import { RenderAssetManagerProvider } from './RenderAssetManager.js';
|
|
5
6
|
import { ResolveCompositionConfig } from './ResolveCompositionConfig.js';
|
|
6
7
|
import { SequenceManagerProvider } from './SequenceManager.js';
|
|
7
|
-
import { SharedAudioContextProvider } from './audio/shared-audio-tags.js';
|
|
8
8
|
export const compositionsRef = React.createRef();
|
|
9
9
|
export const CompositionManagerProvider = ({ children, numberOfAudioTags }) => {
|
|
10
10
|
var _a;
|
|
@@ -3,7 +3,4 @@ import React from 'react';
|
|
|
3
3
|
* @description The <IFrame /> can be used like a regular <iframe> HTML tag.
|
|
4
4
|
* @see [Documentation](https://www.remotion.dev/docs/iframe)
|
|
5
5
|
*/
|
|
6
|
-
export declare const IFrame: React.ForwardRefExoticComponent<Omit<React.
|
|
7
|
-
readonly delayRenderRetries?: number | undefined;
|
|
8
|
-
readonly delayRenderTimeoutInMilliseconds?: number | undefined;
|
|
9
|
-
}, "ref"> & React.RefAttributes<HTMLIFrameElement>>;
|
|
6
|
+
export declare const IFrame: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.IframeHTMLAttributes<HTMLIFrameElement>, HTMLIFrameElement>, "ref"> & React.RefAttributes<HTMLIFrameElement>>;
|
|
@@ -1,11 +1,8 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
2
|
import { forwardRef, useCallback, useState } from 'react';
|
|
3
3
|
import { continueRender, delayRender } from './delay-render.js';
|
|
4
|
-
const IFrameRefForwarding = ({ onLoad, onError,
|
|
5
|
-
const [handle] = useState(() => delayRender(`Loading <IFrame> with source ${props.src}
|
|
6
|
-
retries: delayRenderRetries !== null && delayRenderRetries !== void 0 ? delayRenderRetries : undefined,
|
|
7
|
-
timeoutInMilliseconds: delayRenderTimeoutInMilliseconds !== null && delayRenderTimeoutInMilliseconds !== void 0 ? delayRenderTimeoutInMilliseconds : undefined,
|
|
8
|
-
}));
|
|
4
|
+
const IFrameRefForwarding = ({ onLoad, onError, ...props }, ref) => {
|
|
5
|
+
const [handle] = useState(() => delayRender(`Loading <IFrame> with source ${props.src}`));
|
|
9
6
|
const didLoad = useCallback((e) => {
|
|
10
7
|
continueRender(handle);
|
|
11
8
|
onLoad === null || onLoad === void 0 ? void 0 : onLoad(e);
|
|
@@ -1,10 +1,8 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
export type ImgProps = Omit<React.DetailedHTMLProps<React.ImgHTMLAttributes<HTMLImageElement>, HTMLImageElement>, 'src'> & {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
readonly delayRenderTimeoutInMilliseconds?: number;
|
|
7
|
-
readonly src: string;
|
|
3
|
+
maxRetries?: number;
|
|
4
|
+
pauseWhenLoading?: boolean;
|
|
5
|
+
src: string;
|
|
8
6
|
};
|
|
9
7
|
/**
|
|
10
8
|
* @description Works just like a regular HTML img tag. When you use the <Img> tag, Remotion will ensure that the image is loaded before rendering the frame.
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
import { forwardRef, useCallback,
|
|
3
|
-
import { SequenceContext } from './SequenceContext.js';
|
|
2
|
+
import { forwardRef, useCallback, useImperativeHandle, useLayoutEffect, useRef, } from 'react';
|
|
4
3
|
import { cancelRender } from './cancel-render.js';
|
|
5
4
|
import { continueRender, delayRender } from './delay-render.js';
|
|
6
5
|
import { usePreload } from './prefetch.js';
|
|
@@ -8,11 +7,10 @@ import { useBufferState } from './use-buffer-state.js';
|
|
|
8
7
|
function exponentialBackoff(errorCount) {
|
|
9
8
|
return 1000 * 2 ** (errorCount - 1);
|
|
10
9
|
}
|
|
11
|
-
const ImgRefForwarding = ({ onError, maxRetries = 2, src, pauseWhenLoading,
|
|
10
|
+
const ImgRefForwarding = ({ onError, maxRetries = 2, src, pauseWhenLoading, ...props }, ref) => {
|
|
12
11
|
const imageRef = useRef(null);
|
|
13
12
|
const errors = useRef({});
|
|
14
13
|
const { delayPlayback } = useBufferState();
|
|
15
|
-
const sequenceContext = useContext(SequenceContext);
|
|
16
14
|
if (!src) {
|
|
17
15
|
throw new Error('No "src" prop was passed to <Img>.');
|
|
18
16
|
}
|
|
@@ -62,17 +60,13 @@ const ImgRefForwarding = ({ onError, maxRetries = 2, src, pauseWhenLoading, dela
|
|
|
62
60
|
cancelRender('Error loading image with src: ' + ((_l = imageRef.current) === null || _l === void 0 ? void 0 : _l.src));
|
|
63
61
|
}, [maxRetries, onError, retryIn]);
|
|
64
62
|
if (typeof window !== 'undefined') {
|
|
65
|
-
const isPremounting = Boolean(sequenceContext === null || sequenceContext === void 0 ? void 0 : sequenceContext.premounting);
|
|
66
63
|
// eslint-disable-next-line react-hooks/rules-of-hooks
|
|
67
64
|
useLayoutEffect(() => {
|
|
68
65
|
if (process.env.NODE_ENV === 'test') {
|
|
69
66
|
return;
|
|
70
67
|
}
|
|
71
|
-
const newHandle = delayRender('Loading <Img> with src=' + actualSrc
|
|
72
|
-
|
|
73
|
-
timeoutInMilliseconds: delayRenderTimeoutInMilliseconds !== null && delayRenderTimeoutInMilliseconds !== void 0 ? delayRenderTimeoutInMilliseconds : undefined,
|
|
74
|
-
});
|
|
75
|
-
const unblock = pauseWhenLoading && !isPremounting
|
|
68
|
+
const newHandle = delayRender('Loading <Img> with src=' + actualSrc);
|
|
69
|
+
const unblock = pauseWhenLoading
|
|
76
70
|
? delayPlayback().unblock
|
|
77
71
|
: () => undefined;
|
|
78
72
|
const { current } = imageRef;
|
|
@@ -101,14 +95,7 @@ const ImgRefForwarding = ({ onError, maxRetries = 2, src, pauseWhenLoading, dela
|
|
|
101
95
|
unblock();
|
|
102
96
|
continueRender(newHandle);
|
|
103
97
|
};
|
|
104
|
-
}, [
|
|
105
|
-
actualSrc,
|
|
106
|
-
delayPlayback,
|
|
107
|
-
delayRenderRetries,
|
|
108
|
-
delayRenderTimeoutInMilliseconds,
|
|
109
|
-
pauseWhenLoading,
|
|
110
|
-
isPremounting,
|
|
111
|
-
]);
|
|
98
|
+
}, [actualSrc, delayPlayback, pauseWhenLoading]);
|
|
112
99
|
}
|
|
113
100
|
return (_jsx("img", { ...props, ref: imageRef, src: actualSrc, onError: didGetError }));
|
|
114
101
|
};
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
2
|
import { useEffect, useLayoutEffect, useMemo, useRef, useState, } from 'react';
|
|
3
|
+
import { BufferingProvider } from './buffering.js';
|
|
3
4
|
import { CompositionManagerProvider } from './CompositionManager.js';
|
|
5
|
+
import { continueRender, delayRender } from './delay-render.js';
|
|
4
6
|
import { EditorPropsProvider } from './EditorProps.js';
|
|
5
7
|
import { NativeLayersProvider } from './NativeLayers.js';
|
|
6
|
-
import { BufferingProvider } from './buffering.js';
|
|
7
|
-
import { continueRender, delayRender } from './delay-render.js';
|
|
8
8
|
import { NonceContext } from './nonce.js';
|
|
9
9
|
import { PrefetchProvider } from './prefetch-state.js';
|
|
10
10
|
import { random } from './random.js';
|
|
11
|
-
import { SetTimelineContext, TimelineContext,
|
|
11
|
+
import { getInitialFrameState, SetTimelineContext, TimelineContext, } from './timeline-position-state.js';
|
|
12
12
|
import { DurationsContextProvider } from './video/duration-state.js';
|
|
13
13
|
export const RemotionRoot = ({ children, numberOfAudioTags }) => {
|
|
14
14
|
const [remotionRootId] = useState(() => String(random(null)));
|
|
@@ -21,8 +21,7 @@ export const RemotionRoot = ({ children, numberOfAudioTags }) => {
|
|
|
21
21
|
if (typeof window !== 'undefined') {
|
|
22
22
|
// eslint-disable-next-line react-hooks/rules-of-hooks
|
|
23
23
|
useLayoutEffect(() => {
|
|
24
|
-
window.remotion_setFrame = (f, composition
|
|
25
|
-
window.remotion_attempt = attempt;
|
|
24
|
+
window.remotion_setFrame = (f, composition) => {
|
|
26
25
|
const id = delayRender(`Setting the current frame to ${f}`);
|
|
27
26
|
setFrame((s) => ({
|
|
28
27
|
...s,
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
2
|
import { createContext, createRef, useCallback, useContext, useEffect, useImperativeHandle, useMemo, useState, } from 'react';
|
|
3
3
|
import { CompositionManager } from './CompositionManagerContext.js';
|
|
4
|
-
import { EditorPropsContext } from './EditorProps.js';
|
|
5
4
|
import { getInputProps } from './config/input-props.js';
|
|
5
|
+
import { EditorPropsContext } from './EditorProps.js';
|
|
6
6
|
import { getRemotionEnvironment } from './get-remotion-environment.js';
|
|
7
7
|
import { resolveVideoConfig } from './resolve-video-config.js';
|
|
8
8
|
import { validateDimension } from './validation/validate-dimensions.js';
|
|
@@ -2,7 +2,6 @@ import React from 'react';
|
|
|
2
2
|
import type { LoopDisplay } from './CompositionManager.js';
|
|
3
3
|
export type LayoutAndStyle = {
|
|
4
4
|
layout?: 'absolute-fill';
|
|
5
|
-
premountFor?: number;
|
|
6
5
|
style?: React.CSSProperties;
|
|
7
6
|
className?: string;
|
|
8
7
|
} | {
|
|
@@ -18,19 +17,11 @@ export type SequencePropsWithoutDuration = {
|
|
|
18
17
|
/**
|
|
19
18
|
* @deprecated For internal use only.
|
|
20
19
|
*/
|
|
21
|
-
|
|
20
|
+
loopDisplay?: LoopDisplay;
|
|
22
21
|
/**
|
|
23
22
|
* @deprecated For internal use only.
|
|
24
23
|
*/
|
|
25
|
-
|
|
26
|
-
/**
|
|
27
|
-
* @deprecated For internal use only.
|
|
28
|
-
*/
|
|
29
|
-
_remotionInternalStack?: string;
|
|
30
|
-
/**
|
|
31
|
-
* @deprecated For internal use only.
|
|
32
|
-
*/
|
|
33
|
-
_remotionInternalIsPremounting?: boolean;
|
|
24
|
+
stack?: string;
|
|
34
25
|
} & LayoutAndStyle;
|
|
35
26
|
export type SequenceProps = {
|
|
36
27
|
durationInFrames?: number;
|
|
@@ -1,16 +1,13 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
/* eslint-disable @typescript-eslint/no-use-before-define */
|
|
3
2
|
import { forwardRef, useContext, useEffect, useMemo, useState, } from 'react';
|
|
4
3
|
import { AbsoluteFill } from './AbsoluteFill.js';
|
|
5
|
-
import { SequenceContext } from './SequenceContext.js';
|
|
6
|
-
import { SequenceManager, SequenceVisibilityToggleContext, } from './SequenceManager.js';
|
|
7
4
|
import { getRemotionEnvironment } from './get-remotion-environment.js';
|
|
8
5
|
import { useNonce } from './nonce.js';
|
|
6
|
+
import { SequenceContext } from './SequenceContext.js';
|
|
7
|
+
import { SequenceManager, SequenceVisibilityToggleContext, } from './SequenceManager.js';
|
|
9
8
|
import { TimelineContext, useTimelinePosition, } from './timeline-position-state.js';
|
|
10
9
|
import { useVideoConfig } from './use-video-config.js';
|
|
11
|
-
|
|
12
|
-
import { useCurrentFrame } from './use-current-frame';
|
|
13
|
-
const RegularSequenceRefForwardingFunction = ({ from = 0, durationInFrames = Infinity, children, name, height, width, showInTimeline = true, _remotionInternalLoopDisplay: loopDisplay, _remotionInternalStack: stack, _remotionInternalPremountDisplay: premountDisplay, ...other }, ref) => {
|
|
10
|
+
const SequenceRefForwardingFunction = ({ from = 0, durationInFrames = Infinity, children, name, height, width, showInTimeline = true, loopDisplay, stack, ...other }, ref) => {
|
|
14
11
|
var _a;
|
|
15
12
|
const { layout = 'absolute-fill' } = other;
|
|
16
13
|
const [id] = useState(() => String(Math.random()));
|
|
@@ -47,10 +44,6 @@ const RegularSequenceRefForwardingFunction = ({ from = 0, durationInFrames = Inf
|
|
|
47
44
|
const actualDurationInFrames = Math.max(0, Math.min(videoConfig.durationInFrames - from, parentSequenceDuration));
|
|
48
45
|
const { registerSequence, unregisterSequence } = useContext(SequenceManager);
|
|
49
46
|
const { hidden } = useContext(SequenceVisibilityToggleContext);
|
|
50
|
-
const premounting = useMemo(() => {
|
|
51
|
-
var _a;
|
|
52
|
-
return ((_a = parentSequence === null || parentSequence === void 0 ? void 0 : parentSequence.premounting) !== null && _a !== void 0 ? _a : Boolean(other._remotionInternalIsPremounting));
|
|
53
|
-
}, [other._remotionInternalIsPremounting, parentSequence === null || parentSequence === void 0 ? void 0 : parentSequence.premounting]);
|
|
54
47
|
const contextValue = useMemo(() => {
|
|
55
48
|
var _a, _b, _c;
|
|
56
49
|
return {
|
|
@@ -61,7 +54,6 @@ const RegularSequenceRefForwardingFunction = ({ from = 0, durationInFrames = Inf
|
|
|
61
54
|
id,
|
|
62
55
|
height: (_b = height !== null && height !== void 0 ? height : parentSequence === null || parentSequence === void 0 ? void 0 : parentSequence.height) !== null && _b !== void 0 ? _b : null,
|
|
63
56
|
width: (_c = width !== null && width !== void 0 ? width : parentSequence === null || parentSequence === void 0 ? void 0 : parentSequence.width) !== null && _c !== void 0 ? _c : null,
|
|
64
|
-
premounting,
|
|
65
57
|
};
|
|
66
58
|
}, [
|
|
67
59
|
cumulatedFrom,
|
|
@@ -71,7 +63,6 @@ const RegularSequenceRefForwardingFunction = ({ from = 0, durationInFrames = Inf
|
|
|
71
63
|
id,
|
|
72
64
|
height,
|
|
73
65
|
width,
|
|
74
|
-
premounting,
|
|
75
66
|
]);
|
|
76
67
|
const timelineClipName = useMemo(() => {
|
|
77
68
|
return name !== null && name !== void 0 ? name : '';
|
|
@@ -93,7 +84,6 @@ const RegularSequenceRefForwardingFunction = ({ from = 0, durationInFrames = Inf
|
|
|
93
84
|
nonce,
|
|
94
85
|
loopDisplay,
|
|
95
86
|
stack: stack !== null && stack !== void 0 ? stack : null,
|
|
96
|
-
premountDisplay: premountDisplay !== null && premountDisplay !== void 0 ? premountDisplay : null,
|
|
97
87
|
});
|
|
98
88
|
return () => {
|
|
99
89
|
unregisterSequence(id);
|
|
@@ -113,7 +103,6 @@ const RegularSequenceRefForwardingFunction = ({ from = 0, durationInFrames = Inf
|
|
|
113
103
|
nonce,
|
|
114
104
|
loopDisplay,
|
|
115
105
|
stack,
|
|
116
|
-
premountDisplay,
|
|
117
106
|
]);
|
|
118
107
|
// Ceil to support floats
|
|
119
108
|
// https://github.com/remotion-dev/remotion/issues/2958
|
|
@@ -141,35 +130,6 @@ const RegularSequenceRefForwardingFunction = ({ from = 0, durationInFrames = Inf
|
|
|
141
130
|
}
|
|
142
131
|
return (_jsx(SequenceContext.Provider, { value: contextValue, children: content === null ? null : other.layout === 'none' ? (content) : (_jsx(AbsoluteFill, { ref: ref, style: defaultStyle, className: other.className, children: content })) }));
|
|
143
132
|
};
|
|
144
|
-
const RegularSequence = forwardRef(RegularSequenceRefForwardingFunction);
|
|
145
|
-
const PremountedSequenceRefForwardingFunction = (props, ref) => {
|
|
146
|
-
const frame = useCurrentFrame();
|
|
147
|
-
if (props.layout === 'none') {
|
|
148
|
-
throw new Error('`<Sequence>` with `premountFor` prop does not support layout="none"');
|
|
149
|
-
}
|
|
150
|
-
const { style: passedStyle, from = 0, premountFor = 0, name, ...otherProps } = props;
|
|
151
|
-
const premountingActive = frame < from && frame >= from - premountFor;
|
|
152
|
-
const style = useMemo(() => {
|
|
153
|
-
var _a;
|
|
154
|
-
return {
|
|
155
|
-
...passedStyle,
|
|
156
|
-
opacity: premountingActive ? 0 : 1,
|
|
157
|
-
pointerEvents: premountingActive
|
|
158
|
-
? 'none'
|
|
159
|
-
: (_a = passedStyle === null || passedStyle === void 0 ? void 0 : passedStyle.pointerEvents) !== null && _a !== void 0 ? _a : undefined,
|
|
160
|
-
};
|
|
161
|
-
}, [premountingActive, passedStyle]);
|
|
162
|
-
return (_jsx(Freeze, { frame: from, active: premountingActive, children: _jsx(Sequence, { ref: ref, from: from, style: style, _remotionInternalPremountDisplay: premountFor, _remotionInternalIsPremounting: premountingActive, ...otherProps }) }));
|
|
163
|
-
};
|
|
164
|
-
const PremountedSequence = forwardRef(PremountedSequenceRefForwardingFunction);
|
|
165
|
-
const SequenceRefForwardingFunction = (props, ref) => {
|
|
166
|
-
if (props.layout !== 'none' &&
|
|
167
|
-
props.premountFor &&
|
|
168
|
-
!getRemotionEnvironment().isRendering) {
|
|
169
|
-
return _jsx(PremountedSequence, { ...props, ref: ref });
|
|
170
|
-
}
|
|
171
|
-
return _jsx(RegularSequence, { ...props, ref: ref });
|
|
172
|
-
};
|
|
173
133
|
/**
|
|
174
134
|
* @description A component that time-shifts its children and wraps them in an absolutely positioned <div>.
|
|
175
135
|
* @see [Documentation](https://www.remotion.dev/docs/sequence)
|
|
@@ -15,12 +15,9 @@ export declare const Audio: React.ForwardRefExoticComponent<Omit<Omit<React.Deta
|
|
|
15
15
|
toneFrequency?: number | undefined;
|
|
16
16
|
pauseWhenBuffering?: boolean | undefined;
|
|
17
17
|
showInTimeline?: boolean | undefined;
|
|
18
|
-
delayRenderTimeoutInMilliseconds?: number | undefined;
|
|
19
|
-
delayRenderRetries?: number | undefined;
|
|
20
|
-
loopVolumeCurveBehavior?: import("./use-audio-frame.js").LoopVolumeCurveBehavior | undefined;
|
|
21
18
|
} & RemotionMainAudioProps & {
|
|
22
19
|
/**
|
|
23
20
|
* @deprecated For internal use only
|
|
24
21
|
*/
|
|
25
|
-
|
|
22
|
+
stack?: string | undefined;
|
|
26
23
|
}, "ref"> & React.RefAttributes<HTMLAudioElement>>;
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
2
|
/* eslint-disable @typescript-eslint/no-use-before-define */
|
|
3
3
|
import { forwardRef, useCallback, useContext } from 'react';
|
|
4
|
-
import { Sequence } from '../Sequence.js';
|
|
5
4
|
import { getAbsoluteSrc } from '../absolute-src.js';
|
|
6
5
|
import { calculateLoopDuration } from '../calculate-loop.js';
|
|
7
6
|
import { cancelRender } from '../cancel-render.js';
|
|
@@ -9,6 +8,7 @@ import { addSequenceStackTraces } from '../enable-sequence-stack-traces.js';
|
|
|
9
8
|
import { getRemotionEnvironment } from '../get-remotion-environment.js';
|
|
10
9
|
import { Loop } from '../loop/index.js';
|
|
11
10
|
import { usePreload } from '../prefetch.js';
|
|
11
|
+
import { Sequence } from '../Sequence.js';
|
|
12
12
|
import { useVideoConfig } from '../use-video-config.js';
|
|
13
13
|
import { validateMediaProps } from '../validate-media-props.js';
|
|
14
14
|
import { validateStartFromProps } from '../validate-start-from-props.js';
|
|
@@ -1,13 +1,12 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import type { RemotionAudioProps } from './props.js';
|
|
3
3
|
type AudioForPreviewProps = RemotionAudioProps & {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
readonly stack?: string | undefined;
|
|
4
|
+
shouldPreMountAudioTags: boolean;
|
|
5
|
+
onDuration: (src: string, durationInSeconds: number) => void;
|
|
6
|
+
pauseWhenBuffering: boolean;
|
|
7
|
+
_remotionInternalNativeLoopPassed: boolean;
|
|
8
|
+
_remotionInternalStack: string | null;
|
|
9
|
+
showInTimeline: boolean;
|
|
11
10
|
};
|
|
12
11
|
export declare const AudioForPreview: React.ForwardRefExoticComponent<Omit<AudioForPreviewProps, "ref"> & React.RefAttributes<HTMLAudioElement>>;
|
|
13
12
|
export {};
|
package/.rollup.cache/Users/jonathanburger/remotion/packages/core/dist/esm/audio/AudioForPreview.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
2
|
import { forwardRef, useContext, useEffect, useImperativeHandle, useMemo, useRef, useState, } from 'react';
|
|
3
|
-
import { SequenceContext } from '../SequenceContext.js';
|
|
4
|
-
import { SequenceVisibilityToggleContext } from '../SequenceManager.js';
|
|
5
3
|
import { usePreload } from '../prefetch.js';
|
|
6
4
|
import { random } from '../random.js';
|
|
5
|
+
import { SequenceContext } from '../SequenceContext.js';
|
|
6
|
+
import { SequenceVisibilityToggleContext } from '../SequenceManager.js';
|
|
7
7
|
import { useMediaBuffering } from '../use-media-buffering.js';
|
|
8
8
|
import { useMediaInTimeline } from '../use-media-in-timeline.js';
|
|
9
9
|
import { DEFAULT_ACCEPTABLE_TIMESHIFT, useMediaPlayback, } from '../use-media-playback.js';
|
|
@@ -18,10 +18,10 @@ const AudioForDevelopmentForwardRefFunction = (props, ref) => {
|
|
|
18
18
|
if (props.shouldPreMountAudioTags !== initialShouldPreMountAudioElements) {
|
|
19
19
|
throw new Error('Cannot change the behavior for pre-mounting audio tags dynamically.');
|
|
20
20
|
}
|
|
21
|
-
const { volume, muted, playbackRate, shouldPreMountAudioTags, src, onDuration, acceptableTimeShiftInSeconds, _remotionInternalNeedsDurationCalculation, _remotionInternalNativeLoopPassed, _remotionInternalStack, allowAmplificationDuringRender, name, pauseWhenBuffering, showInTimeline, loopVolumeCurveBehavior, stack, ...nativeProps } = props;
|
|
22
21
|
const [mediaVolume] = useMediaVolumeState();
|
|
23
22
|
const [mediaMuted] = useMediaMutedState();
|
|
24
|
-
const volumePropFrame = useFrameForVolumeProp(
|
|
23
|
+
const volumePropFrame = useFrameForVolumeProp();
|
|
24
|
+
const { volume, muted, playbackRate, shouldPreMountAudioTags, src, onDuration, acceptableTimeShiftInSeconds, _remotionInternalNeedsDurationCalculation, _remotionInternalNativeLoopPassed, _remotionInternalStack, allowAmplificationDuringRender, name, pauseWhenBuffering, showInTimeline, ...nativeProps } = props;
|
|
25
25
|
const { hidden } = useContext(SequenceVisibilityToggleContext);
|
|
26
26
|
if (!src) {
|
|
27
27
|
throw new TypeError("No 'src' was passed to <Audio>.");
|
|
@@ -75,7 +75,6 @@ const AudioForDevelopmentForwardRefFunction = (props, ref) => {
|
|
|
75
75
|
id: timelineId,
|
|
76
76
|
stack: _remotionInternalStack,
|
|
77
77
|
showInTimeline,
|
|
78
|
-
premountDisplay: null,
|
|
79
78
|
});
|
|
80
79
|
useMediaPlayback({
|
|
81
80
|
mediaRef: audioRef,
|
|
@@ -85,11 +84,7 @@ const AudioForDevelopmentForwardRefFunction = (props, ref) => {
|
|
|
85
84
|
onlyWarnForMediaSeekingError: false,
|
|
86
85
|
acceptableTimeshift: acceptableTimeShiftInSeconds !== null && acceptableTimeShiftInSeconds !== void 0 ? acceptableTimeShiftInSeconds : DEFAULT_ACCEPTABLE_TIMESHIFT,
|
|
87
86
|
});
|
|
88
|
-
useMediaBuffering(
|
|
89
|
-
element: audioRef,
|
|
90
|
-
shouldBuffer: pauseWhenBuffering,
|
|
91
|
-
isPremounting: Boolean(sequenceContext === null || sequenceContext === void 0 ? void 0 : sequenceContext.premounting),
|
|
92
|
-
});
|
|
87
|
+
useMediaBuffering(audioRef, pauseWhenBuffering);
|
|
93
88
|
useImperativeHandle(ref, () => {
|
|
94
89
|
return audioRef.current;
|
|
95
90
|
}, [audioRef]);
|
|
@@ -11,9 +11,6 @@ export declare const AudioForRendering: ForwardRefExoticComponent<Omit<React.Det
|
|
|
11
11
|
toneFrequency?: number | undefined;
|
|
12
12
|
pauseWhenBuffering?: boolean | undefined;
|
|
13
13
|
showInTimeline?: boolean | undefined;
|
|
14
|
-
delayRenderTimeoutInMilliseconds?: number | undefined;
|
|
15
|
-
delayRenderRetries?: number | undefined;
|
|
16
|
-
loopVolumeCurveBehavior?: import("./use-audio-frame.js").LoopVolumeCurveBehavior | undefined;
|
|
17
14
|
} & {
|
|
18
|
-
|
|
15
|
+
onDuration: (src: string, durationInSeconds: number) => void;
|
|
19
16
|
} & RefAttributes<HTMLAudioElement>>;
|
|
@@ -1,19 +1,18 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
2
|
import { forwardRef, useContext, useEffect, useImperativeHandle, useLayoutEffect, useMemo, useRef, } from 'react';
|
|
3
|
-
import { RenderAssetManager } from '../RenderAssetManager.js';
|
|
4
|
-
import { SequenceContext } from '../SequenceContext.js';
|
|
5
3
|
import { getAbsoluteSrc } from '../absolute-src.js';
|
|
6
4
|
import { continueRender, delayRender } from '../delay-render.js';
|
|
7
5
|
import { random } from '../random.js';
|
|
6
|
+
import { RenderAssetManager } from '../RenderAssetManager.js';
|
|
7
|
+
import { SequenceContext } from '../SequenceContext.js';
|
|
8
8
|
import { useTimelinePosition } from '../timeline-position-state.js';
|
|
9
9
|
import { useCurrentFrame } from '../use-current-frame.js';
|
|
10
10
|
import { evaluateVolume } from '../volume-prop.js';
|
|
11
11
|
import { useFrameForVolumeProp } from './use-audio-frame.js';
|
|
12
12
|
const AudioForRenderingRefForwardingFunction = (props, ref) => {
|
|
13
13
|
const audioRef = useRef(null);
|
|
14
|
-
const { volume: volumeProp, playbackRate, allowAmplificationDuringRender, onDuration, toneFrequency, _remotionInternalNeedsDurationCalculation, _remotionInternalNativeLoopPassed, acceptableTimeShiftInSeconds, name, onError, delayRenderRetries, delayRenderTimeoutInMilliseconds, loopVolumeCurveBehavior, ...nativeProps } = props;
|
|
15
14
|
const absoluteFrame = useTimelinePosition();
|
|
16
|
-
const volumePropFrame = useFrameForVolumeProp(
|
|
15
|
+
const volumePropFrame = useFrameForVolumeProp();
|
|
17
16
|
const frame = useCurrentFrame();
|
|
18
17
|
const sequenceContext = useContext(SequenceContext);
|
|
19
18
|
const { registerRenderAsset, unregisterRenderAsset } = useContext(RenderAssetManager);
|
|
@@ -28,6 +27,7 @@ const AudioForRenderingRefForwardingFunction = (props, ref) => {
|
|
|
28
27
|
sequenceContext === null || sequenceContext === void 0 ? void 0 : sequenceContext.cumulatedFrom,
|
|
29
28
|
sequenceContext === null || sequenceContext === void 0 ? void 0 : sequenceContext.durationInFrames,
|
|
30
29
|
]);
|
|
30
|
+
const { volume: volumeProp, playbackRate, allowAmplificationDuringRender, onDuration, toneFrequency, _remotionInternalNeedsDurationCalculation, _remotionInternalNativeLoopPassed, acceptableTimeShiftInSeconds, name, onError, ...nativeProps } = props;
|
|
31
31
|
const volume = evaluateVolume({
|
|
32
32
|
volume: volumeProp,
|
|
33
33
|
frame: volumePropFrame,
|
|
@@ -38,7 +38,7 @@ const AudioForRenderingRefForwardingFunction = (props, ref) => {
|
|
|
38
38
|
return audioRef.current;
|
|
39
39
|
}, []);
|
|
40
40
|
useEffect(() => {
|
|
41
|
-
var _a
|
|
41
|
+
var _a;
|
|
42
42
|
if (!props.src) {
|
|
43
43
|
throw new Error('No src passed');
|
|
44
44
|
}
|
|
@@ -61,7 +61,6 @@ const AudioForRenderingRefForwardingFunction = (props, ref) => {
|
|
|
61
61
|
playbackRate: (_a = props.playbackRate) !== null && _a !== void 0 ? _a : 1,
|
|
62
62
|
allowAmplificationDuringRender: allowAmplificationDuringRender !== null && allowAmplificationDuringRender !== void 0 ? allowAmplificationDuringRender : false,
|
|
63
63
|
toneFrequency: toneFrequency !== null && toneFrequency !== void 0 ? toneFrequency : null,
|
|
64
|
-
audioStartFrame: -((_b = sequenceContext === null || sequenceContext === void 0 ? void 0 : sequenceContext.relativeFrom) !== null && _b !== void 0 ? _b : 0),
|
|
65
64
|
});
|
|
66
65
|
return () => unregisterRenderAsset(id);
|
|
67
66
|
}, [
|
|
@@ -78,7 +77,6 @@ const AudioForRenderingRefForwardingFunction = (props, ref) => {
|
|
|
78
77
|
props.playbackRate,
|
|
79
78
|
allowAmplificationDuringRender,
|
|
80
79
|
toneFrequency,
|
|
81
|
-
sequenceContext === null || sequenceContext === void 0 ? void 0 : sequenceContext.relativeFrom,
|
|
82
80
|
]);
|
|
83
81
|
const { src } = props;
|
|
84
82
|
// The <audio> tag is only rendered if the duration needs to be calculated for the `loop`
|
|
@@ -92,10 +90,7 @@ const AudioForRenderingRefForwardingFunction = (props, ref) => {
|
|
|
92
90
|
if (!needsToRenderAudioTag) {
|
|
93
91
|
return;
|
|
94
92
|
}
|
|
95
|
-
const newHandle = delayRender('Loading <Audio> duration with src=' + src
|
|
96
|
-
retries: delayRenderRetries !== null && delayRenderRetries !== void 0 ? delayRenderRetries : undefined,
|
|
97
|
-
timeoutInMilliseconds: delayRenderTimeoutInMilliseconds !== null && delayRenderTimeoutInMilliseconds !== void 0 ? delayRenderTimeoutInMilliseconds : undefined,
|
|
98
|
-
});
|
|
93
|
+
const newHandle = delayRender('Loading <Audio> duration with src=' + src);
|
|
99
94
|
const { current } = audioRef;
|
|
100
95
|
const didLoad = () => {
|
|
101
96
|
if (current === null || current === void 0 ? void 0 : current.duration) {
|
|
@@ -115,13 +110,7 @@ const AudioForRenderingRefForwardingFunction = (props, ref) => {
|
|
|
115
110
|
current === null || current === void 0 ? void 0 : current.removeEventListener('loadedmetadata', didLoad);
|
|
116
111
|
continueRender(newHandle);
|
|
117
112
|
};
|
|
118
|
-
}, [
|
|
119
|
-
src,
|
|
120
|
-
onDuration,
|
|
121
|
-
needsToRenderAudioTag,
|
|
122
|
-
delayRenderRetries,
|
|
123
|
-
delayRenderTimeoutInMilliseconds,
|
|
124
|
-
]);
|
|
113
|
+
}, [src, onDuration, needsToRenderAudioTag]);
|
|
125
114
|
if (!needsToRenderAudioTag) {
|
|
126
115
|
return null;
|
|
127
116
|
}
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import type { VolumeProp } from '../volume-prop.js';
|
|
3
|
-
import type { LoopVolumeCurveBehavior } from './use-audio-frame.js';
|
|
4
3
|
export type RemotionMainAudioProps = {
|
|
5
4
|
startFrom?: number;
|
|
6
5
|
endAt?: number;
|
|
@@ -16,7 +15,4 @@ export type RemotionAudioProps = Omit<React.DetailedHTMLProps<React.AudioHTMLAtt
|
|
|
16
15
|
toneFrequency?: number;
|
|
17
16
|
pauseWhenBuffering?: boolean;
|
|
18
17
|
showInTimeline?: boolean;
|
|
19
|
-
delayRenderTimeoutInMilliseconds?: number;
|
|
20
|
-
delayRenderRetries?: number;
|
|
21
|
-
loopVolumeCurveBehavior?: LoopVolumeCurveBehavior;
|
|
22
18
|
};
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
export declare const useMediaStartsAt: () => number;
|
|
2
|
-
export type LoopVolumeCurveBehavior = 'repeat' | 'extend';
|
|
3
2
|
/**
|
|
4
3
|
* When passing a function as the prop for `volume`,
|
|
5
4
|
* we calculate the way more intuitive value for currentFrame
|
|
6
5
|
*/
|
|
7
|
-
export declare const useFrameForVolumeProp: (
|
|
6
|
+
export declare const useFrameForVolumeProp: () => number;
|
package/.rollup.cache/Users/jonathanburger/remotion/packages/core/dist/esm/audio/use-audio-frame.js
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { useContext } from 'react';
|
|
2
2
|
import { SequenceContext } from '../SequenceContext.js';
|
|
3
|
-
import { Loop } from '../loop/index.js';
|
|
4
3
|
import { useCurrentFrame } from '../use-current-frame.js';
|
|
5
4
|
export const useMediaStartsAt = () => {
|
|
6
5
|
var _a;
|
|
@@ -12,12 +11,8 @@ export const useMediaStartsAt = () => {
|
|
|
12
11
|
* When passing a function as the prop for `volume`,
|
|
13
12
|
* we calculate the way more intuitive value for currentFrame
|
|
14
13
|
*/
|
|
15
|
-
export const useFrameForVolumeProp = (
|
|
16
|
-
const loop = Loop.useLoop();
|
|
14
|
+
export const useFrameForVolumeProp = () => {
|
|
17
15
|
const frame = useCurrentFrame();
|
|
18
16
|
const startsAt = useMediaStartsAt();
|
|
19
|
-
|
|
20
|
-
return frame + startsAt;
|
|
21
|
-
}
|
|
22
|
-
return frame + startsAt + loop.durationInFrames * loop.iteration;
|
|
17
|
+
return frame + startsAt;
|
|
23
18
|
};
|
package/.rollup.cache/Users/jonathanburger/remotion/packages/core/dist/esm/delay-render.d.ts
CHANGED
|
@@ -1,17 +1,11 @@
|
|
|
1
1
|
export declare const DELAY_RENDER_CALLSTACK_TOKEN = "The delayRender was called:";
|
|
2
|
-
export declare const DELAY_RENDER_RETRIES_LEFT = "Retries left: ";
|
|
3
|
-
export declare const DELAY_RENDER_RETRY_TOKEN = "- Rendering the frame will be retried.";
|
|
4
|
-
export type DelayRenderOptions = {
|
|
5
|
-
timeoutInMilliseconds?: number;
|
|
6
|
-
retries?: number;
|
|
7
|
-
};
|
|
8
2
|
/**
|
|
9
3
|
* @description Call this function to tell Remotion to wait before capturing this frame until data has loaded. Use continueRender() to unblock the render.
|
|
10
4
|
* @param label _optional_ A label to identify the call in case it does time out.
|
|
11
5
|
* @returns {number} An identifier to be passed to continueRender().
|
|
12
6
|
* @see [Documentation](https://www.remotion.dev/docs/delay-render)
|
|
13
7
|
*/
|
|
14
|
-
export declare const delayRender: (label?: string
|
|
8
|
+
export declare const delayRender: (label?: string) => number;
|
|
15
9
|
/**
|
|
16
10
|
* @description Unblock a render that has been blocked by delayRender()
|
|
17
11
|
* @param handle The return value of delayRender().
|