remotion 3.0.20 → 3.0.23
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.turbo/turbo-build.log +2 -2
- package/.turbo/turbo-lint.log +11 -0
- package/README.md +1 -1
- package/dist/AbsoluteFill.d.ts +6 -1
- package/dist/AbsoluteFill.js +4 -0
- package/dist/Composition.d.ts +2 -5
- package/dist/Composition.js +3 -29
- package/dist/CompositionManager.d.ts +3 -5
- package/dist/Folder.d.ts +15 -0
- package/dist/Folder.js +33 -0
- package/dist/Sequence.d.ts +19 -0
- package/dist/Sequence.js +123 -0
- package/dist/Still.d.ts +1 -1
- package/dist/audio/Audio.d.ts +3 -3
- package/dist/audio/Audio.js +2 -2
- package/dist/audio/AudioForDevelopment.d.ts +2 -2
- package/dist/audio/AudioForRendering.d.ts +2 -2
- package/dist/audio/AudioForRendering.js +5 -5
- package/dist/audio/props.d.ts +1 -1
- package/dist/audio/shared-audio-tags.d.ts +1 -1
- package/dist/audio/use-audio-frame.js +4 -4
- package/dist/compress-assets.d.ts +1 -1
- package/dist/config/chromium-flags.d.ts +1 -1
- package/dist/config/crf.d.ts +1 -1
- package/dist/config/image-format.d.ts +1 -1
- package/dist/config/image-sequence.d.ts +1 -1
- package/dist/config/index.d.ts +12 -12
- package/dist/config/log.d.ts +1 -1
- package/dist/config/override-webpack.d.ts +1 -1
- package/dist/config/pixel-format.d.ts +1 -1
- package/dist/config/prores-profile.d.ts +1 -1
- package/dist/default-css.d.ts +1 -0
- package/dist/default-css.js +8 -1
- package/dist/freeze.d.ts +2 -2
- package/dist/freeze.js +2 -2
- package/dist/index.d.ts +6 -5
- package/dist/index.js +7 -6
- package/dist/internals.d.ts +14 -13
- package/dist/internals.js +6 -4
- package/dist/interpolate-colors.d.ts +5 -0
- package/dist/interpolate-colors.js +401 -0
- package/dist/is-audio-codec.d.ts +1 -1
- package/dist/play-and-handle-not-allowed-error.d.ts +1 -1
- package/dist/register-root.d.ts +1 -1
- package/dist/series/index.d.ts +2 -2
- package/dist/series/index.js +2 -2
- package/dist/spring/index.d.ts +1 -1
- package/dist/spring/measure-spring.d.ts +1 -1
- package/dist/timeline-inout-position-state.d.ts +1 -1
- package/dist/timeline-position-state.d.ts +1 -1
- package/dist/use-current-frame.d.ts +7 -0
- package/dist/use-current-frame.js +25 -0
- package/dist/use-lazy-component.d.ts +3 -3
- package/dist/use-media-in-timeline.d.ts +2 -2
- package/dist/use-media-in-timeline.js +2 -2
- package/dist/use-media-playback.d.ts +1 -1
- package/dist/use-media-playback.js +3 -3
- package/dist/use-media-tag-volume.d.ts +1 -1
- package/dist/use-sync-volume-with-media-tag.d.ts +2 -2
- package/dist/use-unsafe-video-config.d.ts +1 -1
- package/dist/use-unsafe-video-config.js +2 -2
- package/dist/use-video-config.d.ts +1 -1
- package/dist/validate-media-props.d.ts +3 -3
- package/dist/validation/validate-image-format.d.ts +1 -1
- package/dist/validation/validate-offthreadvideo-image-format.d.ts +1 -0
- package/dist/validation/validate-offthreadvideo-image-format.js +15 -0
- package/dist/video/OffthreadVideo.d.ts +1 -1
- package/dist/video/OffthreadVideo.js +4 -2
- package/dist/video/OffthreadVideoForRendering.d.ts +1 -1
- package/dist/video/OffthreadVideoForRendering.js +17 -15
- package/dist/video/Video.d.ts +3 -3
- package/dist/video/Video.js +2 -2
- package/dist/video/VideoForDevelopment.d.ts +2 -2
- package/dist/video/VideoForRendering.d.ts +2 -2
- package/dist/video/VideoForRendering.js +5 -5
- package/dist/video/index.d.ts +1 -1
- package/dist/video/props.d.ts +4 -2
- package/dist/wrap-remotion-context.d.ts +1 -1
- package/dist/wrap-remotion-context.js +3 -3
- package/package.json +3 -3
package/.turbo/turbo-build.log
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
[35mremotion:build: [0mcache hit, replaying output [
|
|
1
|
+
[35mremotion:build: [0mcache hit, replaying output [2m70c5549abb6a419f[0m
|
|
2
2
|
[35mremotion:build: [0m
|
|
3
|
-
[35mremotion:build: [0m> remotion@3.0.
|
|
3
|
+
[35mremotion:build: [0m> remotion@3.0.22 build /Users/jonathanburger/remotion/packages/core
|
|
4
4
|
[35mremotion:build: [0m> tsc -d
|
|
5
5
|
[35mremotion:build: [0m
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
[36mremotion:lint: [0mcache hit, replaying output [2m83f1866e0041ca52[0m
|
|
2
|
+
[36mremotion:lint: [0m
|
|
3
|
+
[36mremotion:lint: [0m> remotion@3.0.22 lint /Users/jonathanburger/remotion/packages/core
|
|
4
|
+
[36mremotion:lint: [0m> eslint src --ext ts,tsx "--fix"
|
|
5
|
+
[36mremotion:lint: [0m
|
|
6
|
+
[36mremotion:lint: [0m
|
|
7
|
+
[36mremotion:lint: [0m/Users/jonathanburger/remotion/packages/core/src/use-lazy-component.ts
|
|
8
|
+
[36mremotion:lint: [0m 10:50 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any
|
|
9
|
+
[36mremotion:lint: [0m
|
|
10
|
+
[36mremotion:lint: [0m✖ 1 problem (0 errors, 1 warning)
|
|
11
|
+
[36mremotion:lint: [0m
|
package/README.md
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
</a>
|
|
5
5
|
</p>
|
|
6
6
|
|
|
7
|
-
[](https://
|
|
7
|
+
[](https://remotion.dev/discord)
|
|
8
8
|
[](https://www.npmjs.org/package/remotion)
|
|
9
9
|
[](https://npmcharts.com/compare/remotion?minimal=true)
|
|
10
10
|
[](https://packagephobia.now.sh/result?p=remotion)
|
package/dist/AbsoluteFill.d.ts
CHANGED
|
@@ -1,2 +1,7 @@
|
|
|
1
|
-
import
|
|
1
|
+
import type { HTMLAttributes } from 'react';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
/**
|
|
4
|
+
* An absolutely positioned <div> element with 100% width, height, and a column flex style
|
|
5
|
+
* @link https://www.remotion.dev/docs/absolute-fill
|
|
6
|
+
*/
|
|
2
7
|
export declare const AbsoluteFill: React.FC<HTMLAttributes<HTMLDivElement>>;
|
package/dist/AbsoluteFill.js
CHANGED
|
@@ -3,6 +3,10 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.AbsoluteFill = void 0;
|
|
4
4
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
5
|
const react_1 = require("react");
|
|
6
|
+
/**
|
|
7
|
+
* An absolutely positioned <div> element with 100% width, height, and a column flex style
|
|
8
|
+
* @link https://www.remotion.dev/docs/absolute-fill
|
|
9
|
+
*/
|
|
6
10
|
const AbsoluteFill = (props) => {
|
|
7
11
|
const { style, ...other } = props;
|
|
8
12
|
const actualStyle = (0, react_1.useMemo)(() => {
|
package/dist/Composition.d.ts
CHANGED
|
@@ -1,8 +1,5 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
name: string;
|
|
4
|
-
children: React.ReactNode;
|
|
5
|
-
}>;
|
|
1
|
+
import type { ComponentType } from 'react';
|
|
2
|
+
import React from 'react';
|
|
6
3
|
declare type LooseComponentType<T> = ComponentType<T> | ((props: T) => React.ReactNode);
|
|
7
4
|
export declare type CompProps<T> = {
|
|
8
5
|
lazyComponent: () => Promise<{
|
package/dist/Composition.js
CHANGED
|
@@ -1,49 +1,23 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.Composition =
|
|
3
|
+
exports.Composition = void 0;
|
|
4
4
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
5
|
const react_1 = require("react");
|
|
6
6
|
const react_dom_1 = require("react-dom");
|
|
7
7
|
const CompositionManager_1 = require("./CompositionManager");
|
|
8
8
|
const input_props_1 = require("./config/input-props");
|
|
9
9
|
const delay_render_1 = require("./delay-render");
|
|
10
|
+
const Folder_1 = require("./Folder");
|
|
10
11
|
const get_environment_1 = require("./get-environment");
|
|
11
12
|
const loading_indicator_1 = require("./loading-indicator");
|
|
12
13
|
const nonce_1 = require("./nonce");
|
|
13
14
|
const portal_node_1 = require("./portal-node");
|
|
14
|
-
const truthy_1 = require("./truthy");
|
|
15
15
|
const use_lazy_component_1 = require("./use-lazy-component");
|
|
16
16
|
const use_video_1 = require("./use-video");
|
|
17
17
|
const validate_composition_id_1 = require("./validation/validate-composition-id");
|
|
18
18
|
const validate_dimensions_1 = require("./validation/validate-dimensions");
|
|
19
19
|
const validate_duration_in_frames_1 = require("./validation/validate-duration-in-frames");
|
|
20
|
-
const validate_folder_name_1 = require("./validation/validate-folder-name");
|
|
21
20
|
const validate_fps_1 = require("./validation/validate-fps");
|
|
22
|
-
const FolderContext = (0, react_1.createContext)({
|
|
23
|
-
folderName: null,
|
|
24
|
-
parentName: null,
|
|
25
|
-
});
|
|
26
|
-
const Folder = ({ name, children, }) => {
|
|
27
|
-
const parent = (0, react_1.useContext)(FolderContext);
|
|
28
|
-
const { registerFolder, unregisterFolder } = (0, react_1.useContext)(CompositionManager_1.CompositionManager);
|
|
29
|
-
(0, validate_folder_name_1.validateFolderName)(name);
|
|
30
|
-
const parentNameArr = [parent.parentName, parent.folderName].filter(truthy_1.truthy);
|
|
31
|
-
const parentName = parentNameArr.length === 0 ? null : parentNameArr.join('/');
|
|
32
|
-
const value = (0, react_1.useMemo)(() => {
|
|
33
|
-
return {
|
|
34
|
-
folderName: name,
|
|
35
|
-
parentName,
|
|
36
|
-
};
|
|
37
|
-
}, [name, parentName]);
|
|
38
|
-
(0, react_1.useEffect)(() => {
|
|
39
|
-
registerFolder(name, parentName);
|
|
40
|
-
return () => {
|
|
41
|
-
unregisterFolder(name, parentName);
|
|
42
|
-
};
|
|
43
|
-
}, [name, parent.folderName, parentName, registerFolder, unregisterFolder]);
|
|
44
|
-
return ((0, jsx_runtime_1.jsx)(FolderContext.Provider, { value: value, children: children }));
|
|
45
|
-
};
|
|
46
|
-
exports.Folder = Folder;
|
|
47
21
|
const Fallback = () => {
|
|
48
22
|
(0, react_1.useEffect)(() => {
|
|
49
23
|
const fallback = (0, delay_render_1.delayRender)('Waiting for Root component to unsuspend');
|
|
@@ -56,7 +30,7 @@ const Composition = ({ width, height, fps, durationInFrames, id, defaultProps, .
|
|
|
56
30
|
const video = (0, use_video_1.useVideo)();
|
|
57
31
|
const lazy = (0, use_lazy_component_1.useLazyComponent)(compProps);
|
|
58
32
|
const nonce = (0, nonce_1.useNonce)();
|
|
59
|
-
const { folderName, parentName } = (0, react_1.useContext)(FolderContext);
|
|
33
|
+
const { folderName, parentName } = (0, react_1.useContext)(Folder_1.FolderContext);
|
|
60
34
|
(0, react_1.useEffect)(() => {
|
|
61
35
|
// Ensure it's a URL safe id
|
|
62
36
|
if (!id) {
|
|
@@ -1,4 +1,6 @@
|
|
|
1
|
-
import
|
|
1
|
+
import type { ComponentType, LazyExoticComponent } from 'react';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import type { TFolder } from './Folder';
|
|
2
4
|
export declare type TComposition<T = unknown> = {
|
|
3
5
|
width: number;
|
|
4
6
|
height: number;
|
|
@@ -74,10 +76,6 @@ export declare const CompositionManager: React.Context<CompositionManagerContext
|
|
|
74
76
|
export declare const compositionsRef: React.RefObject<{
|
|
75
77
|
getCompositions: () => TCompMetadata[];
|
|
76
78
|
}>;
|
|
77
|
-
export declare type TFolder = {
|
|
78
|
-
name: string;
|
|
79
|
-
parent: string | null;
|
|
80
|
-
};
|
|
81
79
|
export declare const CompositionManagerProvider: React.FC<{
|
|
82
80
|
children: React.ReactNode;
|
|
83
81
|
}>;
|
package/dist/Folder.d.ts
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { FC } from 'react';
|
|
2
|
+
export declare type TFolder = {
|
|
3
|
+
name: string;
|
|
4
|
+
parent: string | null;
|
|
5
|
+
};
|
|
6
|
+
declare type FolderContextType = {
|
|
7
|
+
folderName: string | null;
|
|
8
|
+
parentName: string | null;
|
|
9
|
+
};
|
|
10
|
+
export declare const FolderContext: import("react").Context<FolderContextType>;
|
|
11
|
+
export declare const Folder: FC<{
|
|
12
|
+
name: string;
|
|
13
|
+
children: React.ReactNode;
|
|
14
|
+
}>;
|
|
15
|
+
export {};
|
package/dist/Folder.js
ADDED
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.Folder = exports.FolderContext = void 0;
|
|
4
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
|
+
const react_1 = require("react");
|
|
6
|
+
const CompositionManager_1 = require("./CompositionManager");
|
|
7
|
+
const truthy_1 = require("./truthy");
|
|
8
|
+
const validate_folder_name_1 = require("./validation/validate-folder-name");
|
|
9
|
+
exports.FolderContext = (0, react_1.createContext)({
|
|
10
|
+
folderName: null,
|
|
11
|
+
parentName: null,
|
|
12
|
+
});
|
|
13
|
+
const Folder = ({ name, children, }) => {
|
|
14
|
+
const parent = (0, react_1.useContext)(exports.FolderContext);
|
|
15
|
+
const { registerFolder, unregisterFolder } = (0, react_1.useContext)(CompositionManager_1.CompositionManager);
|
|
16
|
+
(0, validate_folder_name_1.validateFolderName)(name);
|
|
17
|
+
const parentNameArr = [parent.parentName, parent.folderName].filter(truthy_1.truthy);
|
|
18
|
+
const parentName = parentNameArr.length === 0 ? null : parentNameArr.join('/');
|
|
19
|
+
const value = (0, react_1.useMemo)(() => {
|
|
20
|
+
return {
|
|
21
|
+
folderName: name,
|
|
22
|
+
parentName,
|
|
23
|
+
};
|
|
24
|
+
}, [name, parentName]);
|
|
25
|
+
(0, react_1.useEffect)(() => {
|
|
26
|
+
registerFolder(name, parentName);
|
|
27
|
+
return () => {
|
|
28
|
+
unregisterFolder(name, parentName);
|
|
29
|
+
};
|
|
30
|
+
}, [name, parent.folderName, parentName, registerFolder, unregisterFolder]);
|
|
31
|
+
return ((0, jsx_runtime_1.jsx)(exports.FolderContext.Provider, { value: value, children: children }));
|
|
32
|
+
};
|
|
33
|
+
exports.Folder = Folder;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
export declare type SequenceContextType = {
|
|
3
|
+
cumulatedFrom: number;
|
|
4
|
+
relativeFrom: number;
|
|
5
|
+
parentFrom: number;
|
|
6
|
+
durationInFrames: number;
|
|
7
|
+
id: string;
|
|
8
|
+
};
|
|
9
|
+
export declare const SequenceContext: React.Context<SequenceContextType | null>;
|
|
10
|
+
export declare type SequenceProps = {
|
|
11
|
+
children: React.ReactNode;
|
|
12
|
+
from: number;
|
|
13
|
+
durationInFrames?: number;
|
|
14
|
+
name?: string;
|
|
15
|
+
layout?: 'absolute-fill' | 'none';
|
|
16
|
+
showInTimeline?: boolean;
|
|
17
|
+
showLoopTimesInTimeline?: number;
|
|
18
|
+
};
|
|
19
|
+
export declare const Sequence: React.FC<SequenceProps>;
|
package/dist/Sequence.js
ADDED
|
@@ -0,0 +1,123 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.Sequence = exports.SequenceContext = void 0;
|
|
4
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
|
+
const react_1 = require("react");
|
|
6
|
+
const CompositionManager_1 = require("./CompositionManager");
|
|
7
|
+
const get_timeline_clip_name_1 = require("./get-timeline-clip-name");
|
|
8
|
+
const nonce_1 = require("./nonce");
|
|
9
|
+
const timeline_position_state_1 = require("./timeline-position-state");
|
|
10
|
+
const use_current_frame_1 = require("./use-current-frame");
|
|
11
|
+
const use_unsafe_video_config_1 = require("./use-unsafe-video-config");
|
|
12
|
+
exports.SequenceContext = (0, react_1.createContext)(null);
|
|
13
|
+
const Sequence = ({ from, durationInFrames = Infinity, children, name, layout = 'absolute-fill', showInTimeline = true, showLoopTimesInTimeline, }) => {
|
|
14
|
+
const [id] = (0, react_1.useState)(() => String(Math.random()));
|
|
15
|
+
const parentSequence = (0, react_1.useContext)(exports.SequenceContext);
|
|
16
|
+
const { rootId } = (0, react_1.useContext)(timeline_position_state_1.TimelineContext);
|
|
17
|
+
const cumulatedFrom = parentSequence
|
|
18
|
+
? parentSequence.cumulatedFrom + parentSequence.relativeFrom
|
|
19
|
+
: 0;
|
|
20
|
+
const actualFrom = cumulatedFrom + from;
|
|
21
|
+
const nonce = (0, nonce_1.useNonce)();
|
|
22
|
+
if (layout !== 'absolute-fill' && layout !== 'none') {
|
|
23
|
+
throw new TypeError(`The layout prop of <Sequence /> expects either "absolute-fill" or "none", but you passed: ${layout}`);
|
|
24
|
+
}
|
|
25
|
+
if (typeof durationInFrames !== 'number') {
|
|
26
|
+
throw new TypeError(`You passed to durationInFrames an argument of type ${typeof durationInFrames}, but it must be a number.`);
|
|
27
|
+
}
|
|
28
|
+
if (durationInFrames <= 0) {
|
|
29
|
+
throw new TypeError(`durationInFrames must be positive, but got ${durationInFrames}`);
|
|
30
|
+
}
|
|
31
|
+
// Infinity is non-integer but allowed!
|
|
32
|
+
if (durationInFrames % 1 !== 0 && Number.isFinite(durationInFrames)) {
|
|
33
|
+
throw new TypeError(`The "durationInFrames" of a sequence must be an integer, but got ${durationInFrames}.`);
|
|
34
|
+
}
|
|
35
|
+
if (typeof from !== 'number') {
|
|
36
|
+
throw new TypeError(`You passed to the "from" props of your <Sequence> an argument of type ${typeof from}, but it must be a number.`);
|
|
37
|
+
}
|
|
38
|
+
if (from % 1 !== 0) {
|
|
39
|
+
throw new TypeError(`The "from" prop of a sequence must be an integer, but got ${from}.`);
|
|
40
|
+
}
|
|
41
|
+
const absoluteFrame = (0, use_current_frame_1.useAbsoluteCurrentFrame)();
|
|
42
|
+
const unsafeVideoConfig = (0, use_unsafe_video_config_1.useUnsafeVideoConfig)();
|
|
43
|
+
const compositionDuration = unsafeVideoConfig
|
|
44
|
+
? unsafeVideoConfig.durationInFrames
|
|
45
|
+
: 0;
|
|
46
|
+
const actualDurationInFrames = Math.min(compositionDuration - from, parentSequence
|
|
47
|
+
? Math.min(parentSequence.durationInFrames +
|
|
48
|
+
(parentSequence.cumulatedFrom + parentSequence.relativeFrom) -
|
|
49
|
+
actualFrom, durationInFrames)
|
|
50
|
+
: durationInFrames);
|
|
51
|
+
const { registerSequence, unregisterSequence } = (0, react_1.useContext)(CompositionManager_1.CompositionManager);
|
|
52
|
+
const contextValue = (0, react_1.useMemo)(() => {
|
|
53
|
+
var _a;
|
|
54
|
+
return {
|
|
55
|
+
cumulatedFrom,
|
|
56
|
+
relativeFrom: from,
|
|
57
|
+
durationInFrames: actualDurationInFrames,
|
|
58
|
+
parentFrom: (_a = parentSequence === null || parentSequence === void 0 ? void 0 : parentSequence.relativeFrom) !== null && _a !== void 0 ? _a : 0,
|
|
59
|
+
id,
|
|
60
|
+
};
|
|
61
|
+
}, [
|
|
62
|
+
cumulatedFrom,
|
|
63
|
+
from,
|
|
64
|
+
actualDurationInFrames,
|
|
65
|
+
parentSequence === null || parentSequence === void 0 ? void 0 : parentSequence.relativeFrom,
|
|
66
|
+
id,
|
|
67
|
+
]);
|
|
68
|
+
const timelineClipName = (0, react_1.useMemo)(() => {
|
|
69
|
+
return name !== null && name !== void 0 ? name : (0, get_timeline_clip_name_1.getTimelineClipName)(children);
|
|
70
|
+
}, [children, name]);
|
|
71
|
+
(0, react_1.useEffect)(() => {
|
|
72
|
+
var _a;
|
|
73
|
+
registerSequence({
|
|
74
|
+
from,
|
|
75
|
+
duration: actualDurationInFrames,
|
|
76
|
+
id,
|
|
77
|
+
displayName: timelineClipName,
|
|
78
|
+
parent: (_a = parentSequence === null || parentSequence === void 0 ? void 0 : parentSequence.id) !== null && _a !== void 0 ? _a : null,
|
|
79
|
+
type: 'sequence',
|
|
80
|
+
rootId,
|
|
81
|
+
showInTimeline,
|
|
82
|
+
nonce,
|
|
83
|
+
showLoopTimesInTimeline,
|
|
84
|
+
});
|
|
85
|
+
return () => {
|
|
86
|
+
unregisterSequence(id);
|
|
87
|
+
};
|
|
88
|
+
}, [
|
|
89
|
+
durationInFrames,
|
|
90
|
+
actualFrom,
|
|
91
|
+
id,
|
|
92
|
+
name,
|
|
93
|
+
registerSequence,
|
|
94
|
+
timelineClipName,
|
|
95
|
+
unregisterSequence,
|
|
96
|
+
parentSequence === null || parentSequence === void 0 ? void 0 : parentSequence.id,
|
|
97
|
+
actualDurationInFrames,
|
|
98
|
+
rootId,
|
|
99
|
+
from,
|
|
100
|
+
showInTimeline,
|
|
101
|
+
nonce,
|
|
102
|
+
showLoopTimesInTimeline,
|
|
103
|
+
]);
|
|
104
|
+
const endThreshold = (() => {
|
|
105
|
+
return actualFrom + durationInFrames - 1;
|
|
106
|
+
})();
|
|
107
|
+
const content = absoluteFrame < actualFrom
|
|
108
|
+
? null
|
|
109
|
+
: absoluteFrame > endThreshold
|
|
110
|
+
? null
|
|
111
|
+
: children;
|
|
112
|
+
return ((0, jsx_runtime_1.jsx)(exports.SequenceContext.Provider, { value: contextValue, children: content === null ? null : layout === 'absolute-fill' ? ((0, jsx_runtime_1.jsx)("div", { style: {
|
|
113
|
+
position: 'absolute',
|
|
114
|
+
display: 'flex',
|
|
115
|
+
width: '100%',
|
|
116
|
+
height: '100%',
|
|
117
|
+
top: 0,
|
|
118
|
+
bottom: 0,
|
|
119
|
+
left: 0,
|
|
120
|
+
right: 0,
|
|
121
|
+
}, children: content })) : (content) }));
|
|
122
|
+
};
|
|
123
|
+
exports.Sequence = Sequence;
|
package/dist/Still.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { StillProps } from './Composition';
|
|
1
|
+
import type { StillProps } from './Composition';
|
|
2
2
|
export declare const Still: <T>(props: StillProps<T>) => JSX.Element;
|
package/dist/audio/Audio.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { RemotionMainAudioProps } from './props';
|
|
3
|
-
export declare const Audio: React.ForwardRefExoticComponent<Pick<Omit<React.DetailedHTMLProps<React.AudioHTMLAttributes<HTMLAudioElement>, HTMLAudioElement>, "
|
|
2
|
+
import type { RemotionMainAudioProps } from './props';
|
|
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, "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" | "key" | "controlsList" | "crossOrigin" | "mediaGroup" | "muted" | "playsInline" | "preload" | "src" | "volume" | "playbackRate" | keyof RemotionMainAudioProps> & React.RefAttributes<HTMLAudioElement>>;
|
package/dist/audio/Audio.js
CHANGED
|
@@ -4,7 +4,7 @@ exports.Audio = 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 AudioForDevelopment_1 = require("./AudioForDevelopment");
|
|
@@ -21,7 +21,7 @@ const AudioRefForwardingFunction = (props, ref) => {
|
|
|
21
21
|
(0, validate_start_from_props_1.validateStartFromProps)(startFrom, endAt);
|
|
22
22
|
const startFromFrameNo = startFrom !== null && startFrom !== void 0 ? startFrom : 0;
|
|
23
23
|
const endAtFrameNo = endAt !== null && endAt !== void 0 ? endAt : Infinity;
|
|
24
|
-
return ((0, jsx_runtime_1.jsx)(
|
|
24
|
+
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.Audio, { ...otherProps, ref: ref }) }));
|
|
25
25
|
}
|
|
26
26
|
(0, validate_media_props_1.validateMediaProps)(props, 'Audio');
|
|
27
27
|
if ((0, get_environment_1.getRemotionEnvironment)() === 'rendering') {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
export declare const AudioForDevelopment: React.ForwardRefExoticComponent<Pick<Omit<React.DetailedHTMLProps<React.AudioHTMLAttributes<HTMLAudioElement>, HTMLAudioElement>, "
|
|
2
|
+
export declare const AudioForDevelopment: React.ForwardRefExoticComponent<Pick<Omit<React.DetailedHTMLProps<React.AudioHTMLAttributes<HTMLAudioElement>, HTMLAudioElement>, "onEnded" | "autoPlay" | "controls" | "loop"> & {
|
|
3
3
|
volume?: import("../volume-prop").VolumeProp | undefined;
|
|
4
4
|
playbackRate?: number | undefined;
|
|
5
5
|
} & {
|
|
6
6
|
shouldPreMountAudioTags: boolean;
|
|
7
|
-
}, "
|
|
7
|
+
}, "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" | "key" | "controlsList" | "crossOrigin" | "mediaGroup" | "muted" | "playsInline" | "preload" | "src" | "volume" | "playbackRate" | "shouldPreMountAudioTags"> & React.RefAttributes<HTMLAudioElement>>;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { RemotionAudioProps } from './props';
|
|
3
|
-
export declare const AudioForRendering: React.ForwardRefExoticComponent<Pick<RemotionAudioProps, "
|
|
2
|
+
import type { RemotionAudioProps } from './props';
|
|
3
|
+
export declare const AudioForRendering: React.ForwardRefExoticComponent<Pick<RemotionAudioProps, "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" | "key" | "controlsList" | "crossOrigin" | "mediaGroup" | "muted" | "playsInline" | "preload" | "src" | "volume" | "playbackRate"> & React.RefAttributes<HTMLAudioElement>>;
|
|
@@ -6,16 +6,16 @@ const react_1 = require("react");
|
|
|
6
6
|
const absolute_src_1 = require("../absolute-src");
|
|
7
7
|
const CompositionManager_1 = require("../CompositionManager");
|
|
8
8
|
const random_1 = require("../random");
|
|
9
|
-
const
|
|
10
|
-
const
|
|
9
|
+
const Sequence_1 = require("../Sequence");
|
|
10
|
+
const use_current_frame_1 = require("../use-current-frame");
|
|
11
11
|
const volume_prop_1 = require("../volume-prop");
|
|
12
12
|
const use_audio_frame_1 = require("./use-audio-frame");
|
|
13
13
|
const AudioForRenderingRefForwardingFunction = (props, ref) => {
|
|
14
14
|
const audioRef = (0, react_1.useRef)(null);
|
|
15
|
-
const absoluteFrame = (0,
|
|
15
|
+
const absoluteFrame = (0, use_current_frame_1.useAbsoluteCurrentFrame)();
|
|
16
16
|
const volumePropFrame = (0, use_audio_frame_1.useFrameForVolumeProp)();
|
|
17
|
-
const frame = (0,
|
|
18
|
-
const sequenceContext = (0, react_1.useContext)(
|
|
17
|
+
const frame = (0, use_current_frame_1.useCurrentFrame)();
|
|
18
|
+
const sequenceContext = (0, react_1.useContext)(Sequence_1.SequenceContext);
|
|
19
19
|
const { registerAsset, unregisterAsset } = (0, react_1.useContext)(CompositionManager_1.CompositionManager);
|
|
20
20
|
// Generate a string that's as unique as possible for this asset
|
|
21
21
|
// but at the same time the same on all threads
|
package/dist/audio/props.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { RemotionAudioProps } from './props';
|
|
2
|
+
import type { RemotionAudioProps } from './props';
|
|
3
3
|
/**
|
|
4
4
|
* This functionality of Remotion will keep a certain amount
|
|
5
5
|
* of <audio> tags pre-mounted and by default filled with an empty audio track.
|
|
@@ -2,11 +2,11 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.useFrameForVolumeProp = exports.useMediaStartsAt = void 0;
|
|
4
4
|
const react_1 = require("react");
|
|
5
|
-
const
|
|
6
|
-
const
|
|
5
|
+
const Sequence_1 = require("../Sequence");
|
|
6
|
+
const use_current_frame_1 = require("../use-current-frame");
|
|
7
7
|
const useMediaStartsAt = () => {
|
|
8
8
|
var _a;
|
|
9
|
-
const parentSequence = (0, react_1.useContext)(
|
|
9
|
+
const parentSequence = (0, react_1.useContext)(Sequence_1.SequenceContext);
|
|
10
10
|
const startsAt = Math.min(0, (_a = parentSequence === null || parentSequence === void 0 ? void 0 : parentSequence.relativeFrom) !== null && _a !== void 0 ? _a : 0);
|
|
11
11
|
return startsAt;
|
|
12
12
|
};
|
|
@@ -16,7 +16,7 @@ exports.useMediaStartsAt = useMediaStartsAt;
|
|
|
16
16
|
* we calculate the way more intuitive value for currentFrame
|
|
17
17
|
*/
|
|
18
18
|
const useFrameForVolumeProp = () => {
|
|
19
|
-
const frame = (0,
|
|
19
|
+
const frame = (0, use_current_frame_1.useCurrentFrame)();
|
|
20
20
|
const startsAt = (0, exports.useMediaStartsAt)();
|
|
21
21
|
return frame + startsAt;
|
|
22
22
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { TAsset } from './CompositionManager';
|
|
1
|
+
import type { TAsset } from './CompositionManager';
|
|
2
2
|
/**
|
|
3
3
|
* Since audio or video can be base64-encoded, those can be really long strings.
|
|
4
4
|
* Since we track the `src` property for every frame, Node.JS can run out of memory easily. Instead of duplicating the src for every frame, we save memory by replacing the full base 64 encoded data with a string `same-as-[asset-id]-[frame]` referencing a previous asset with the same src.
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { OpenGlRenderer } from '../validation/validate-opengl-renderer';
|
|
1
|
+
import type { OpenGlRenderer } from '../validation/validate-opengl-renderer';
|
|
2
2
|
export declare const DEFAULT_OPENGL_RENDERER: OpenGlRenderer | null;
|
|
3
3
|
export declare const getChromiumDisableWebSecurity: () => boolean;
|
|
4
4
|
export declare const setChromiumDisableWebSecurity: (should: boolean) => void;
|
package/dist/config/crf.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { PixelFormat } from './pixel-format';
|
|
1
|
+
import type { PixelFormat } from './pixel-format';
|
|
2
2
|
declare const validOptions: readonly ["png", "jpeg", "none"];
|
|
3
3
|
export declare type ImageFormat = typeof validOptions[number];
|
|
4
4
|
export declare type StillImageFormat = 'png' | 'jpeg';
|