remotion 2.6.10 → 2.6.13
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/.turbo/turbo-lint.log +5 -0
- package/coverage/coverage-summary.json +13 -19
- package/dist/IFrame.d.ts.map +1 -1
- package/dist/IFrame.js +1 -1
- package/dist/IFrame.js.map +1 -1
- package/dist/Img.d.ts.map +1 -1
- package/dist/Img.js +1 -1
- package/dist/Img.js.map +1 -1
- package/dist/RemotionRoot.js +1 -1
- package/dist/RemotionRoot.js.map +1 -1
- package/dist/audio/shared-audio-tags.js +1 -1
- package/dist/audio/shared-audio-tags.js.map +1 -1
- package/dist/component-type.d.ts +1 -0
- package/dist/component-type.d.ts.map +1 -0
- package/dist/component-type.js +2 -0
- package/dist/component-type.js.map +1 -0
- package/dist/interpolate.d.ts +11 -0
- package/dist/interpolate.d.ts.map +1 -1
- package/dist/interpolate.js +11 -0
- package/dist/interpolate.js.map +1 -1
- package/dist/ready-manager.d.ts +12 -1
- package/dist/ready-manager.d.ts.map +1 -1
- package/dist/ready-manager.js +32 -2
- package/dist/ready-manager.js.map +1 -1
- package/dist/serie/flatten-children.d.ts +3 -0
- package/dist/serie/flatten-children.d.ts.map +1 -0
- package/dist/serie/flatten-children.js +19 -0
- package/dist/serie/flatten-children.js.map +1 -0
- package/dist/serie/index.d.ts +12 -0
- package/dist/serie/index.d.ts.map +1 -0
- package/dist/serie/index.js +55 -0
- package/dist/serie/index.js.map +1 -0
- package/dist/setup-environment.d.ts +6 -0
- package/dist/setup-environment.d.ts.map +1 -0
- package/dist/setup-environment.js +47 -0
- package/dist/setup-environment.js.map +1 -0
- package/dist/spring/index.d.ts +13 -0
- package/dist/spring/index.d.ts.map +1 -1
- package/dist/spring/index.js +13 -0
- package/dist/spring/index.js.map +1 -1
- package/dist/stagger/index.d.ts +10 -0
- package/dist/stagger/index.d.ts.map +1 -0
- package/dist/stagger/index.js +54 -0
- package/dist/stagger/index.js.map +1 -0
- package/dist/use-current-src.d.ts +3 -0
- package/dist/use-current-src.d.ts.map +1 -0
- package/dist/use-current-src.js +23 -0
- package/dist/use-current-src.js.map +1 -0
- package/dist/use-current-time.d.ts +2 -0
- package/dist/use-current-time.d.ts.map +1 -0
- package/dist/use-current-time.js +12 -0
- package/dist/use-current-time.js.map +1 -0
- package/dist/use-frame.d.ts +5 -0
- package/dist/use-frame.d.ts.map +1 -1
- package/dist/use-frame.js +5 -0
- package/dist/use-frame.js.map +1 -1
- package/dist/use-time.d.ts +2 -0
- package/dist/use-time.d.ts.map +1 -0
- package/dist/use-time.js +15 -0
- package/dist/use-time.js.map +1 -0
- package/dist/use-video-config.d.ts +5 -0
- package/dist/use-video-config.d.ts.map +1 -1
- package/dist/use-video-config.js +5 -0
- package/dist/use-video-config.js.map +1 -1
- package/dist/video/VideoForRendering.js +1 -1
- package/dist/video/VideoForRendering.js.map +1 -1
- package/package.json +13 -2
- package/.turbo/turbo-test.log +0 -63
- package/dist/audio/audio-buffer-to-wav.d.ts +0 -15
- package/dist/audio/audio-buffer-to-wav.d.ts.map +0 -1
- package/dist/audio/audio-buffer-to-wav.js +0 -91
- package/dist/audio/audio-buffer-to-wav.js.map +0 -1
- package/dist/audio/audio-url-helpers.d.ts +0 -2
- package/dist/audio/audio-url-helpers.d.ts.map +0 -1
- package/dist/audio/audio-url-helpers.js +0 -17
- package/dist/audio/audio-url-helpers.js.map +0 -1
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.Serie = void 0;
|
|
4
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
|
+
const react_1 = require("react");
|
|
6
|
+
const sequencing_1 = require("../sequencing");
|
|
7
|
+
const validate_duration_in_frames_1 = require("../validation/validate-duration-in-frames");
|
|
8
|
+
const flatten_children_1 = require("./flatten-children");
|
|
9
|
+
const SeriesSequence = ({ children }) => {
|
|
10
|
+
// eslint-disable-next-line react/jsx-no-useless-fragment
|
|
11
|
+
return jsx_runtime_1.jsx(jsx_runtime_1.Fragment, { children: children }, void 0);
|
|
12
|
+
};
|
|
13
|
+
const Series = ({ children }) => {
|
|
14
|
+
const childrenValue = react_1.useMemo(() => {
|
|
15
|
+
let startFrame = 0;
|
|
16
|
+
return react_1.Children.map(flatten_children_1.flattenChildren(children), (child, i) => {
|
|
17
|
+
var _a;
|
|
18
|
+
const castedChild = child;
|
|
19
|
+
if (typeof castedChild === 'string') {
|
|
20
|
+
if (castedChild.trim() === '') {
|
|
21
|
+
return null;
|
|
22
|
+
}
|
|
23
|
+
throw new TypeError(`The <Serie> component only accepts a list of <Serie.Sequence /> components as it's children, but you passed a string "${castedChild}"`);
|
|
24
|
+
}
|
|
25
|
+
if (castedChild.type !== SeriesSequence) {
|
|
26
|
+
throw new TypeError("The <Serie> component only accepts a list of <Serie.Sequence /> components as it's children");
|
|
27
|
+
}
|
|
28
|
+
const debugInfo = `index = ${i}, duration = ${castedChild.props.durationInFrames}`;
|
|
29
|
+
if (!castedChild || !castedChild.props.children) {
|
|
30
|
+
throw new TypeError(`A <Serie.Sequence /> component (${debugInfo}) doesn't have any children.`);
|
|
31
|
+
}
|
|
32
|
+
const durationInFramesProp = castedChild.props.durationInFrames;
|
|
33
|
+
const { durationInFrames, children: _children, ...passedProps } = castedChild.props;
|
|
34
|
+
validate_duration_in_frames_1.validateDurationInFrames(durationInFramesProp, `<Serie.Sequence />`);
|
|
35
|
+
const offset = (_a = castedChild.props.offset) !== null && _a !== void 0 ? _a : 0;
|
|
36
|
+
if (Number.isNaN(offset)) {
|
|
37
|
+
throw new TypeError(`The "offset" property of a <Serie.Sequence /> must not be NaN, but got NaN (${debugInfo}).`);
|
|
38
|
+
}
|
|
39
|
+
if (!Number.isFinite(offset)) {
|
|
40
|
+
throw new TypeError(`The "offset" property of a <Serie.Sequence /> must be finite, but got ${offset} (${debugInfo}).`);
|
|
41
|
+
}
|
|
42
|
+
if (offset % 1 !== 0) {
|
|
43
|
+
throw new TypeError(`The "offset" property of a <Serie.Sequence /> must be finite, but got ${offset} (${debugInfo}).`);
|
|
44
|
+
}
|
|
45
|
+
const currentStartFrame = startFrame + offset;
|
|
46
|
+
startFrame += durationInFramesProp + offset;
|
|
47
|
+
return (jsx_runtime_1.jsx(sequencing_1.Sequence, Object.assign({ from: currentStartFrame, durationInFrames: durationInFramesProp }, passedProps, { children: child }), void 0));
|
|
48
|
+
});
|
|
49
|
+
}, [children]);
|
|
50
|
+
/* eslint-disable react/jsx-no-useless-fragment */
|
|
51
|
+
return jsx_runtime_1.jsx(jsx_runtime_1.Fragment, { children: childrenValue }, void 0);
|
|
52
|
+
};
|
|
53
|
+
exports.Serie = Series;
|
|
54
|
+
Series.Sequence = SeriesSequence;
|
|
55
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/serie/index.tsx"],"names":[],"mappings":";;;;AAAA,iCAAsE;AACtE,8CAAsD;AACtD,2FAAmF;AACnF,yDAAmD;AASnD,MAAM,cAAc,GAAG,CAAC,EAAC,QAAQ,EAAsB,EAAE,EAAE;IAC1D,yDAAyD;IACzD,OAAO,sDAAG,QAAQ,WAAI,CAAC;AACxB,CAAC,CAAC;AAEF,MAAM,MAAM,GAER,CAAC,EAAC,QAAQ,EAAC,EAAE,EAAE;IAClB,MAAM,aAAa,GAAG,eAAO,CAAC,GAAG,EAAE;QAClC,IAAI,UAAU,GAAG,CAAC,CAAC;QACnB,OAAO,gBAAQ,CAAC,GAAG,CAAC,kCAAe,CAAC,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,CAAC,EAAE,EAAE;;YAC3D,MAAM,WAAW,GAAI,KAKZ,CAAC;YACV,IAAI,OAAO,WAAW,KAAK,QAAQ,EAAE;gBACpC,IAAI,WAAW,CAAC,IAAI,EAAE,KAAK,EAAE,EAAE;oBAC9B,O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N,kBAAC,qBAAQ,kBACR,IAAI,EAAE,iBAAiB,EACvB,gBAAgB,EAAE,oBAAoB,IAClC,WAAW,cAEd,KAAK,YACI,CACX,CAAC;QACH,CAAC,CAAC,CAAC;IACJ,CAAC,EAAE,CAAC,QAAQ,CAAC,CAAC,CAAC;IAEf,kDAAkD;IAClD,OAAO,sDAAG,aAAa,WAAI,CAAC;AAC7B,CAAC,CAAC;AAIgB,uBAAK;AAFvB,MAAM,CAAC,QAAQ,GAAG,cAAc,CAAC"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export declare const ENV_VARIABLES_LOCAL_STORAGE_KEY = "remotion.envVariables";
|
|
2
|
+
export declare const INITIAL_FRAME_LOCAL_STORAGE_KEY = "remotion.initialFrame";
|
|
3
|
+
export declare const ENV_VARIABLES_ENV_NAME: "ENV_VARIABLES";
|
|
4
|
+
export declare const setupEnvVariables: () => void;
|
|
5
|
+
export declare const setupInitialFrame: () => void;
|
|
6
|
+
//# sourceMappingURL=setup-environment.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"setup-environment.d.ts","sourceRoot":"","sources":["../src/setup-environment.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,+BAA+B,0BAA0B,CAAC;AACvE,eAAO,MAAM,+BAA+B,0BAA0B,CAAC;AACvE,eAAO,MAAM,sBAAsB,iBAA2B,CAAC;AA+B/D,eAAO,MAAM,iBAAiB,YAa7B,CAAC;AAEF,eAAO,MAAM,iBAAiB,YAE7B,CAAC"}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.setupInitialFrame = exports.setupEnvVariables = exports.ENV_VARIABLES_ENV_NAME = exports.INITIAL_FRAME_LOCAL_STORAGE_KEY = exports.ENV_VARIABLES_LOCAL_STORAGE_KEY = void 0;
|
|
4
|
+
const get_environment_1 = require("./get-environment");
|
|
5
|
+
exports.ENV_VARIABLES_LOCAL_STORAGE_KEY = 'remotion.envVariables';
|
|
6
|
+
exports.INITIAL_FRAME_LOCAL_STORAGE_KEY = 'remotion.initialFrame';
|
|
7
|
+
exports.ENV_VARIABLES_ENV_NAME = 'ENV_VARIABLES';
|
|
8
|
+
const getInitialFrame = () => {
|
|
9
|
+
const param = localStorage.getItem(exports.INITIAL_FRAME_LOCAL_STORAGE_KEY);
|
|
10
|
+
return param ? Number(param) : 0;
|
|
11
|
+
};
|
|
12
|
+
const getEnvVariables = () => {
|
|
13
|
+
if (get_environment_1.getRemotionEnvironment() === 'rendering') {
|
|
14
|
+
const param = localStorage.getItem(exports.ENV_VARIABLES_LOCAL_STORAGE_KEY);
|
|
15
|
+
if (!param) {
|
|
16
|
+
return {};
|
|
17
|
+
}
|
|
18
|
+
return { ...JSON.parse(param), NODE_ENV: process.env.NODE_ENV };
|
|
19
|
+
}
|
|
20
|
+
if (get_environment_1.getRemotionEnvironment() === 'preview') {
|
|
21
|
+
// Webpack will convert this to an object at compile time.
|
|
22
|
+
// Don't convert this syntax to a computed property.
|
|
23
|
+
return {
|
|
24
|
+
...process.env.ENV_VARIABLES,
|
|
25
|
+
NODE_ENV: process.env.NODE_ENV,
|
|
26
|
+
};
|
|
27
|
+
}
|
|
28
|
+
throw new Error('Can only call getEnvVariables() if environment is `rendering` or `preview`');
|
|
29
|
+
};
|
|
30
|
+
const setupEnvVariables = () => {
|
|
31
|
+
const env = getEnvVariables();
|
|
32
|
+
if (!window.process) {
|
|
33
|
+
window.process = {};
|
|
34
|
+
}
|
|
35
|
+
if (!window.process.env) {
|
|
36
|
+
window.process.env = {};
|
|
37
|
+
}
|
|
38
|
+
Object.keys(env).forEach((key) => {
|
|
39
|
+
window.process.env[key] = env[key];
|
|
40
|
+
});
|
|
41
|
+
};
|
|
42
|
+
exports.setupEnvVariables = setupEnvVariables;
|
|
43
|
+
const setupInitialFrame = () => {
|
|
44
|
+
window.remotion_initialFrame = getInitialFrame();
|
|
45
|
+
};
|
|
46
|
+
exports.setupInitialFrame = setupInitialFrame;
|
|
47
|
+
//# sourceMappingURL=setup-environment.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"setup-environment.js","sourceRoot":"","sources":["../src/setup-environment.ts"],"names":[],"mappings":";;;AAAA,uDAAyD;AAE5C,QAAA,+BAA+B,GAAG,uBAAuB,CAAC;AAC1D,QAAA,+BAA+B,GAAG,uBAAuB,CAAC;AAC1D,QAAA,sBAAsB,GAAG,eAAwB,CAAC;AAE/D,MAAM,eAAe,GAAG,GAAW,EAAE;IACpC,MAAM,KAAK,GAAG,YAAY,CAAC,OAAO,CAAC,uCAA+B,CAAC,CAAC;IACpE,OAAO,KAAK,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;AAClC,CAAC,CAAC;AAEF,MAAM,eAAe,GAAG,GAA2B,EAAE;IACpD,IAAI,wCAAsB,EAAE,KAAK,WAAW,EAAE;QAC7C,MAAM,KAAK,GAAG,YAAY,CAAC,OAAO,CAAC,uCAA+B,CAAC,CAAC;QACpE,IAAI,CAAC,KAAK,EAAE;YACX,OAAO,EAAE,CAAC;SACV;QAED,OAAO,EAAC,GAAG,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,EAAE,QAAQ,EAAE,OAAO,CAAC,GAAG,CAAC,QAAQ,EAAC,CAAC;KAC9D;IAED,IAAI,wCAAsB,EAAE,KAAK,SAAS,EAAE;QAC3C,0DAA0D;QAC1D,oDAAoD;QACpD,OAAO;YACN,GAAK,OAAO,CAAC,GAAG,CAAC,aAAoD;YACrE,QAAQ,EAAE,OAAO,CAAC,GAAG,CAAC,QAAkB;SACxC,CAAC;KACF;IAED,MAAM,IAAI,KAAK,CACd,4EAA4E,CAC5E,CAAC;AACH,CAAC,CAAC;AAEK,MAAM,iBAAiB,GAAG,GAAG,EAAE;IACrC,MAAM,GAAG,GAAG,eAAe,EAAE,CAAC;IAC9B,IAAI,CAAC,MAAM,CAAC,OAAO,EAAE;QACpB,MAAM,CAAC,OAAO,GAAG,EAAoB,CAAC;KACtC;IAED,IAAI,CAAC,MAAM,CAAC,OAAO,CAAC,GAAG,EAAE;QACxB,MAAM,CAAC,OAAO,CAAC,GAAG,GAAG,EAAE,CAAC;KACxB;IAED,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,OAAO,CAAC,CAAC,GAAG,EAAE,EAAE;QAChC,MAAM,CAAC,OAAO,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,GAAG,CAAC,GAAG,CAAC,CAAC;IACpC,CAAC,CAAC,CAAC;AACJ,CAAC,CAAC;AAbW,QAAA,iBAAiB,qBAa5B;AAEK,MAAM,iBAAiB,GAAG,GAAG,EAAE;IACrC,MAAM,CAAC,qBAAqB,GAAG,eAAe,EAAE,CAAC;AAClD,CAAC,CAAC;AAFW,QAAA,iBAAiB,qBAE5B"}
|
package/dist/spring/index.d.ts
CHANGED
|
@@ -1,4 +1,17 @@
|
|
|
1
1
|
import { SpringConfig } from './spring-utils';
|
|
2
|
+
/**
|
|
3
|
+
* Calculates a position based on physical parameters, start and end value, and time.
|
|
4
|
+
* @link https://www.remotion.dev/docs/spring
|
|
5
|
+
* @param {number} frame The current time value. Most of the time you want to pass in the return value of useCurrentFrame.
|
|
6
|
+
* @param {number} fps The framerate at which the animation runs. Pass in the value obtained by `useVideoConfig()`.
|
|
7
|
+
* @param {?Object} config optional object that allows you to customize the physical properties of the animation.
|
|
8
|
+
* @param {number} [config.mass=1] The weight of the spring. If you reduce the mass, the animation becomes faster!
|
|
9
|
+
* @param {number} [config.damping=10] How hard the animation decelerates.
|
|
10
|
+
* @param {number} [config.stiffness=100] Affects bounciness of the animation.
|
|
11
|
+
* @param {boolean} [config.overshootClamping=false] Whether to prevent the animation going beyond the target value.
|
|
12
|
+
* @param {?number} from The initial value of the animation. Default `0`
|
|
13
|
+
* @param {?number} to The end value of the animation. Default `1`
|
|
14
|
+
*/
|
|
2
15
|
export declare function spring({ frame, fps, config, from, to, }: {
|
|
3
16
|
frame: number;
|
|
4
17
|
fps: number;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/spring/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAoB,YAAY,EAAC,MAAM,gBAAgB,CAAC;AAE/D,wBAAgB,MAAM,CAAC,EACtB,KAAK,EACL,GAAG,EACH,MAAW,EACX,IAAQ,EACR,EAAM,GACN,EAAE;IACF,KAAK,EAAE,MAAM,CAAC;IACd,GAAG,EAAE,MAAM,CAAC;IACZ,MAAM,CAAC,EAAE,OAAO,CAAC,YAAY,CAAC,CAAC;IAC/B,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,EAAE,CAAC,EAAE,MAAM,CAAC;CACZ,GAAG,MAAM,CAiBT;AAED,OAAO,EAAC,aAAa,EAAC,MAAM,kBAAkB,CAAC;AAC/C,OAAO,EAAC,YAAY,EAAC,MAAM,gBAAgB,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/spring/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAoB,YAAY,EAAC,MAAM,gBAAgB,CAAC;AAE/D;;;;;;;;;;;;GAYG;AACH,wBAAgB,MAAM,CAAC,EACtB,KAAK,EACL,GAAG,EACH,MAAW,EACX,IAAQ,EACR,EAAM,GACN,EAAE;IACF,KAAK,EAAE,MAAM,CAAC;IACd,GAAG,EAAE,MAAM,CAAC;IACZ,MAAM,CAAC,EAAE,OAAO,CAAC,YAAY,CAAC,CAAC;IAC/B,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,EAAE,CAAC,EAAE,MAAM,CAAC;CACZ,GAAG,MAAM,CAiBT;AAED,OAAO,EAAC,aAAa,EAAC,MAAM,kBAAkB,CAAC;AAC/C,OAAO,EAAC,YAAY,EAAC,MAAM,gBAAgB,CAAC"}
|
package/dist/spring/index.js
CHANGED
|
@@ -2,6 +2,19 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.measureSpring = exports.spring = void 0;
|
|
4
4
|
const spring_utils_1 = require("./spring-utils");
|
|
5
|
+
/**
|
|
6
|
+
* Calculates a position based on physical parameters, start and end value, and time.
|
|
7
|
+
* @link https://www.remotion.dev/docs/spring
|
|
8
|
+
* @param {number} frame The current time value. Most of the time you want to pass in the return value of useCurrentFrame.
|
|
9
|
+
* @param {number} fps The framerate at which the animation runs. Pass in the value obtained by `useVideoConfig()`.
|
|
10
|
+
* @param {?Object} config optional object that allows you to customize the physical properties of the animation.
|
|
11
|
+
* @param {number} [config.mass=1] The weight of the spring. If you reduce the mass, the animation becomes faster!
|
|
12
|
+
* @param {number} [config.damping=10] How hard the animation decelerates.
|
|
13
|
+
* @param {number} [config.stiffness=100] Affects bounciness of the animation.
|
|
14
|
+
* @param {boolean} [config.overshootClamping=false] Whether to prevent the animation going beyond the target value.
|
|
15
|
+
* @param {?number} from The initial value of the animation. Default `0`
|
|
16
|
+
* @param {?number} to The end value of the animation. Default `1`
|
|
17
|
+
*/
|
|
5
18
|
function spring({ frame, fps, config = {}, from = 0, to = 1, }) {
|
|
6
19
|
const spr = (0, spring_utils_1.springCalculation)({
|
|
7
20
|
fps,
|
package/dist/spring/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/spring/index.ts"],"names":[],"mappings":";;;AAAA,iDAA+D;AAE/D,SAAgB,MAAM,CAAC,EACtB,KAAK,EACL,GAAG,EACH,MAAM,GAAG,EAAE,EACX,IAAI,GAAG,CAAC,EACR,EAAE,GAAG,CAAC,GAON;IACA,MAAM,GAAG,GAAG,IAAA,gCAAiB,EAAC;QAC7B,GAAG;QACH,KAAK;QACL,MAAM;QACN,IAAI;QACJ,EAAE;KACF,CAAC,CAAC;IACH,IAAI,CAAC,MAAM,CAAC,iBAAiB,EAAE;QAC9B,OAAO,GAAG,CAAC,OAAO,CAAC;KACnB;IAED,IAAI,EAAE,IAAI,IAAI,EAAE;QACf,OAAO,IAAI,CAAC,GAAG,CAAC,GAAG,CAAC,OAAO,EAAE,EAAE,CAAC,CAAC;KACjC;IAED,OAAO,IAAI,CAAC,GAAG,CAAC,GAAG,CAAC,OAAO,EAAE,EAAE,CAAC,CAAC;AAClC,CAAC;AA7BD,wBA6BC;AAED,mDAA+C;AAAvC,+GAAA,aAAa,OAAA"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/spring/index.ts"],"names":[],"mappings":";;;AAAA,iDAA+D;AAE/D;;;;;;;;;;;;GAYG;AACH,SAAgB,MAAM,CAAC,EACtB,KAAK,EACL,GAAG,EACH,MAAM,GAAG,EAAE,EACX,IAAI,GAAG,CAAC,EACR,EAAE,GAAG,CAAC,GAON;IACA,MAAM,GAAG,GAAG,IAAA,gCAAiB,EAAC;QAC7B,GAAG;QACH,KAAK;QACL,MAAM;QACN,IAAI;QACJ,EAAE;KACF,CAAC,CAAC;IACH,IAAI,CAAC,MAAM,CAAC,iBAAiB,EAAE;QAC9B,OAAO,GAAG,CAAC,OAAO,CAAC;KACnB;IAED,IAAI,EAAE,IAAI,IAAI,EAAE;QACf,OAAO,IAAI,CAAC,GAAG,CAAC,GAAG,CAAC,OAAO,EAAE,EAAE,CAAC,CAAC;KACjC;IAED,OAAO,IAAI,CAAC,GAAG,CAAC,GAAG,CAAC,OAAO,EAAE,EAAE,CAAC,CAAC;AAClC,CAAC;AA7BD,wBA6BC;AAED,mDAA+C;AAAvC,+GAAA,aAAa,OAAA"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { FC, PropsWithChildren } from 'react';
|
|
2
|
+
import { SequenceProps } from '../sequencing';
|
|
3
|
+
declare type StaggerChildProps = PropsWithChildren<{
|
|
4
|
+
durationInFrames: number;
|
|
5
|
+
offset?: number;
|
|
6
|
+
} & Pick<SequenceProps, 'layout' | 'name'>>;
|
|
7
|
+
declare const StaggerChild: ({ children }: StaggerChildProps) => JSX.Element;
|
|
8
|
+
declare const Stagger: FC;
|
|
9
|
+
export { Stagger, StaggerChild };
|
|
10
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/stagger/index.tsx"],"names":[],"mappings":"AAAA,OAAc,EAAW,EAAE,EAAE,iBAAiB,EAAU,MAAM,OAAO,CAAC;AACtE,OAAO,EAAW,aAAa,EAAC,MAAM,eAAe,CAAC;AAGtD,aAAK,iBAAiB,GAAG,iBAAiB,CACzC;IACC,gBAAgB,EAAE,MAAM,CAAC;IACzB,MAAM,CAAC,EAAE,MAAM,CAAC;CAChB,GAAG,IAAI,CAAC,aAAa,EAAE,QAAQ,GAAG,MAAM,CAAC,CAC1C,CAAC;AAEF,QAAA,MAAM,YAAY,iBAAgB,iBAAiB,gBAGlD,CAAC;AAEF,QAAA,MAAM,OAAO,EAAE,EA4Ed,CAAC;AAEF,OAAO,EAAC,OAAO,EAAE,YAAY,EAAC,CAAC"}
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.StaggerChild = exports.Stagger = void 0;
|
|
4
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
|
+
const react_1 = require("react");
|
|
6
|
+
const sequencing_1 = require("../sequencing");
|
|
7
|
+
const validate_duration_in_frames_1 = require("../validation/validate-duration-in-frames");
|
|
8
|
+
const StaggerChild = ({ children }) => {
|
|
9
|
+
// eslint-disable-next-line react/jsx-no-useless-fragment
|
|
10
|
+
return jsx_runtime_1.jsx(jsx_runtime_1.Fragment, { children: children }, void 0);
|
|
11
|
+
};
|
|
12
|
+
exports.StaggerChild = StaggerChild;
|
|
13
|
+
const Stagger = ({ children }) => {
|
|
14
|
+
const childrenValue = react_1.useMemo(() => {
|
|
15
|
+
let startFrame = 0;
|
|
16
|
+
return react_1.Children.map(children, (child, i) => {
|
|
17
|
+
var _a;
|
|
18
|
+
const castedChild = child;
|
|
19
|
+
if (typeof castedChild === 'string') {
|
|
20
|
+
if (castedChild.trim() === '') {
|
|
21
|
+
return null;
|
|
22
|
+
}
|
|
23
|
+
throw new TypeError(`The <Stagger> component only accepts a list of <StaggerChild /> components as it's children, but you passed a string "${castedChild}"`);
|
|
24
|
+
}
|
|
25
|
+
if (castedChild.type !== StaggerChild) {
|
|
26
|
+
throw new TypeError("The <Stagger> component only accepts a list of <StaggerChild /> components as it's children");
|
|
27
|
+
}
|
|
28
|
+
const debugInfo = `index = ${i}, duration = ${castedChild.props.durationInFrames}`;
|
|
29
|
+
if (!castedChild || !castedChild.props.children) {
|
|
30
|
+
throw new TypeError(`A <StaggerChild /> component (${debugInfo}) doesn't have any children.`);
|
|
31
|
+
}
|
|
32
|
+
const durationInFramesProp = castedChild.props.durationInFrames;
|
|
33
|
+
const { durationInFrames, children: _children, ...passedProps } = castedChild.props;
|
|
34
|
+
validate_duration_in_frames_1.validateDurationInFrames(durationInFramesProp, `<StaggerChild />`);
|
|
35
|
+
const offset = (_a = castedChild.props.offset) !== null && _a !== void 0 ? _a : 0;
|
|
36
|
+
if (Number.isNaN(offset)) {
|
|
37
|
+
throw new TypeError(`The "offset" property of a <StaggerChild /> must not be NaN, but got NaN (${debugInfo}).`);
|
|
38
|
+
}
|
|
39
|
+
if (!Number.isFinite(offset)) {
|
|
40
|
+
throw new TypeError(`The "offset" property of a <StaggerChild /> must be finite, but got ${offset} (${debugInfo}).`);
|
|
41
|
+
}
|
|
42
|
+
if (offset % 1 !== 0) {
|
|
43
|
+
throw new TypeError(`The "offset" property of a <StaggerChild /> must be finite, but got ${offset} (${debugInfo}).`);
|
|
44
|
+
}
|
|
45
|
+
const currentStartFrame = startFrame + offset;
|
|
46
|
+
startFrame += durationInFramesProp + offset;
|
|
47
|
+
return (jsx_runtime_1.jsx(sequencing_1.Sequence, Object.assign({ from: currentStartFrame, durationInFrames: durationInFramesProp }, passedProps, { children: child }), void 0));
|
|
48
|
+
});
|
|
49
|
+
}, [children]);
|
|
50
|
+
/* eslint-disable react/jsx-no-useless-fragment */
|
|
51
|
+
return jsx_runtime_1.jsx(jsx_runtime_1.Fragment, { children: childrenValue }, void 0);
|
|
52
|
+
};
|
|
53
|
+
exports.Stagger = Stagger;
|
|
54
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/stagger/index.tsx"],"names":[],"mappings":";;;;AAAA,iCAAsE;AACtE,8CAAsD;AACtD,2FAAmF;AASnF,MAAM,YAAY,GAAG,CAAC,EAAC,QAAQ,EAAoB,EAAE,EAAE;IACtD,yDAAyD;IACzD,OAAO,sDAAG,QAAQ,WAAI,CAAC;AACxB,CAAC,CAAC;AAgFe,oCAAY;AA9E7B,MAAM,OAAO,GAAO,CAAC,EAAC,QAAQ,EAAC,EAAE,EAAE;IAClC,MAAM,aAAa,GAAG,eAAO,CAAC,GAAG,EAAE;QAClC,IAAI,UAAU,GAAG,CAAC,CAAC;QACnB,OAAO,gBAAQ,CAAC,GAAG,CAAC,QAAQ,EAAE,CAAC,KAAK,EAAE,CAAC,EAAE,EAAE;;YAC1C,MAAM,WAAW,GAAI,KAKZ,CAAC;YACV,IAAI,OAAO,WAAW,KAAK,QAAQ,EAAE;gBACpC,IAAI,WAAW,CAAC,IAAI,EAAE,KAAK,EAAE,EAAE;oBAC9B,OAAO,IAAI,CAAC;iBACZ;gBAED,MAAM,IAAI,SAAS,CAClB,yHAAyH,WAAW,GAAG,CACvI,CAAC;aACF;YAED,IAAI,WAAW,CAAC,IAAI,KAAK,YAAY,EAAE;gBACtC,MAAM,IAAI,SAAS,CAClB,6FAA6F,CAC7F,CAAC;aACF;YAED,MAAM,SAAS,GAAG,WAAW,CAAC,gBAAgB,WAAW,CAAC,KAAK,CAAC,gBAAgB,EAAE,CAAC;YAE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+1 @@
|
|
|
1
|
+
{"version":3,"file":"use-current-src.d.ts","sourceRoot":"","sources":["../src/use-current-src.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,SAAS,EAAsB,MAAM,OAAO,CAAC;AAErD,eAAO,MAAM,aAAa,iBACX,UAAU,gBAAgB,GAAG,gBAAgB,CAAC,kBAuB5D,CAAC"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.useCurrentSrc = void 0;
|
|
4
|
+
const react_1 = require("react");
|
|
5
|
+
const useCurrentSrc = (mediaElement) => {
|
|
6
|
+
var _a, _b;
|
|
7
|
+
const currentSrc = (_b = (_a = mediaElement.current) === null || _a === void 0 ? void 0 : _a.currentSrc) !== null && _b !== void 0 ? _b : null;
|
|
8
|
+
const [currentCurrentSrc, setCurrentCurrentSrc] = (0, react_1.useState)(currentSrc !== null && currentSrc !== void 0 ? currentSrc : null);
|
|
9
|
+
(0, react_1.useEffect)(() => {
|
|
10
|
+
const check = () => {
|
|
11
|
+
if (currentCurrentSrc !== currentSrc) {
|
|
12
|
+
setCurrentCurrentSrc(currentSrc);
|
|
13
|
+
}
|
|
14
|
+
};
|
|
15
|
+
const interval = setInterval(check, 100);
|
|
16
|
+
return () => {
|
|
17
|
+
clearInterval(interval);
|
|
18
|
+
};
|
|
19
|
+
}, [currentCurrentSrc, currentSrc]);
|
|
20
|
+
return currentCurrentSrc;
|
|
21
|
+
};
|
|
22
|
+
exports.useCurrentSrc = useCurrentSrc;
|
|
23
|
+
//# sourceMappingURL=use-current-src.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"use-current-src.js","sourceRoot":"","sources":["../src/use-current-src.ts"],"names":[],"mappings":";;;AAAA,iCAAqD;AAE9C,MAAM,aAAa,GAAG,CAC5B,YAA4D,EAC3D,EAAE;;IACH,MAAM,UAAU,GAAG,MAAA,MAAA,YAAY,CAAC,OAAO,0CAAE,UAAU,mCAAI,IAAI,CAAC;IAE5D,MAAM,CAAC,iBAAiB,EAAE,oBAAoB,CAAC,GAAG,IAAA,gBAAQ,EACzD,UAAU,aAAV,UAAU,cAAV,UAAU,GAAI,IAAI,CAClB,CAAC;IAEF,IAAA,iBAAS,EAAC,GAAG,EAAE;QACd,MAAM,KAAK,GAAG,GAAG,EAAE;YAClB,IAAI,iBAAiB,KAAK,UAAU,EAAE;gBACrC,oBAAoB,CAAC,UAAU,CAAC,CAAC;aACjC;QACF,CAAC,CAAC;QAEF,MAAM,QAAQ,GAAG,WAAW,CAAC,KAAK,EAAE,GAAG,CAAC,CAAC;QAEzC,OAAO,GAAG,EAAE;YACX,aAAa,CAAC,QAAQ,CAAC,CAAC;QACzB,CAAC,CAAC;IACH,CAAC,EAAE,CAAC,iBAAiB,EAAE,UAAU,CAAC,CAAC,CAAC;IAEpC,OAAO,iBAAiB,CAAC;AAC1B,CAAC,CAAC;AAxBW,QAAA,aAAa,iBAwBxB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"use-current-time.d.ts","sourceRoot":"","sources":["../src/use-current-time.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,cAAc,QAAO,MAKjC,CAAC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.useCurrentTime = void 0;
|
|
4
|
+
const use_frame_1 = require("./use-frame");
|
|
5
|
+
const use_video_config_1 = require("./use-video-config");
|
|
6
|
+
const useCurrentTime = () => {
|
|
7
|
+
const { fps } = (0, use_video_config_1.useVideoConfig)();
|
|
8
|
+
const currentFrame = (0, use_frame_1.useCurrentFrame)();
|
|
9
|
+
return 1000 * (currentFrame / fps);
|
|
10
|
+
};
|
|
11
|
+
exports.useCurrentTime = useCurrentTime;
|
|
12
|
+
//# sourceMappingURL=use-current-time.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"use-current-time.js","sourceRoot":"","sources":["../src/use-current-time.ts"],"names":[],"mappings":";;;AAAA,2CAA4C;AAC5C,yDAAkD;AAE3C,MAAM,cAAc,GAAG,GAAW,EAAE;IAC1C,MAAM,EAAC,GAAG,EAAC,GAAG,IAAA,iCAAc,GAAE,CAAC;IAC/B,MAAM,YAAY,GAAG,IAAA,2BAAe,GAAE,CAAC;IAEvC,OAAO,IAAI,GAAG,CAAC,YAAY,GAAG,GAAG,CAAC,CAAC;AACpC,CAAC,CAAC;AALW,QAAA,cAAc,kBAKzB"}
|
package/dist/use-frame.d.ts
CHANGED
|
@@ -1,3 +1,8 @@
|
|
|
1
1
|
export declare const useAbsoluteCurrentFrame: () => number;
|
|
2
|
+
/**
|
|
3
|
+
* Get the current frame of the video.
|
|
4
|
+
* Frames are 0-indexed, meaning the first frame is 0, the last frame is the duration of the composition in frames minus one.
|
|
5
|
+
* @link https://www.remotion.dev/docs/use-current-frame
|
|
6
|
+
*/
|
|
2
7
|
export declare const useCurrentFrame: () => number;
|
|
3
8
|
//# sourceMappingURL=use-frame.d.ts.map
|
package/dist/use-frame.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use-frame.d.ts","sourceRoot":"","sources":["../src/use-frame.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,uBAAuB,QAAO,MAI1C,CAAC;AAEF,eAAO,MAAM,eAAe,QAAO,MASlC,CAAC"}
|
|
1
|
+
{"version":3,"file":"use-frame.d.ts","sourceRoot":"","sources":["../src/use-frame.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,uBAAuB,QAAO,MAI1C,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,eAAe,QAAO,MASlC,CAAC"}
|
package/dist/use-frame.js
CHANGED
|
@@ -9,6 +9,11 @@ const useAbsoluteCurrentFrame = () => {
|
|
|
9
9
|
return timelinePosition;
|
|
10
10
|
};
|
|
11
11
|
exports.useAbsoluteCurrentFrame = useAbsoluteCurrentFrame;
|
|
12
|
+
/**
|
|
13
|
+
* Get the current frame of the video.
|
|
14
|
+
* Frames are 0-indexed, meaning the first frame is 0, the last frame is the duration of the composition in frames minus one.
|
|
15
|
+
* @link https://www.remotion.dev/docs/use-current-frame
|
|
16
|
+
*/
|
|
12
17
|
const useCurrentFrame = () => {
|
|
13
18
|
const frame = (0, exports.useAbsoluteCurrentFrame)();
|
|
14
19
|
const context = (0, react_1.useContext)(sequencing_1.SequenceContext);
|
package/dist/use-frame.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use-frame.js","sourceRoot":"","sources":["../src/use-frame.ts"],"names":[],"mappings":";;;AAAA,iCAAiC;AACjC,6CAA6C;AAC7C,uEAA8D;AAEvD,MAAM,uBAAuB,GAAG,GAAW,EAAE;IACnD,MAAM,gBAAgB,GAAG,IAAA,6CAAmB,GAAE,CAAC;IAE/C,OAAO,gBAAgB,CAAC;AACzB,CAAC,CAAC;AAJW,QAAA,uBAAuB,2BAIlC;
|
|
1
|
+
{"version":3,"file":"use-frame.js","sourceRoot":"","sources":["../src/use-frame.ts"],"names":[],"mappings":";;;AAAA,iCAAiC;AACjC,6CAA6C;AAC7C,uEAA8D;AAEvD,MAAM,uBAAuB,GAAG,GAAW,EAAE;IACnD,MAAM,gBAAgB,GAAG,IAAA,6CAAmB,GAAE,CAAC;IAE/C,OAAO,gBAAgB,CAAC;AACzB,CAAC,CAAC;AAJW,QAAA,uBAAuB,2BAIlC;AAEF;;;;GAIG;AACI,MAAM,eAAe,GAAG,GAAW,EAAE;IAC3C,MAAM,KAAK,GAAG,IAAA,+BAAuB,GAAE,CAAC;IACxC,MAAM,OAAO,GAAG,IAAA,kBAAU,EAAC,4BAAe,CAAC,CAAC;IAE5C,MAAM,aAAa,GAAG,OAAO;QAC5B,CAAC,CAAC,OAAO,CAAC,aAAa,GAAG,OAAO,CAAC,YAAY;QAC9C,CAAC,CAAC,CAAC,CAAC;IAEL,OAAO,KAAK,GAAG,aAAa,CAAC;AAC9B,CAAC,CAAC;AATW,QAAA,eAAe,mBAS1B"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"use-time.d.ts","sourceRoot":"","sources":["../src/use-time.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,cAAc,QAAO,MASjC,CAAC"}
|
package/dist/use-time.js
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.useCurrentTime = void 0;
|
|
4
|
+
const use_frame_1 = require("./use-frame");
|
|
5
|
+
const use_video_1 = require("./use-video");
|
|
6
|
+
const useCurrentTime = () => {
|
|
7
|
+
const video = (0, use_video_1.useVideo)();
|
|
8
|
+
const currentFrame = (0, use_frame_1.useCurrentFrame)();
|
|
9
|
+
if ((video === null || video === void 0 ? void 0 : video.fps) && currentFrame) {
|
|
10
|
+
return 1000 * (currentFrame / video.fps);
|
|
11
|
+
}
|
|
12
|
+
return 0;
|
|
13
|
+
};
|
|
14
|
+
exports.useCurrentTime = useCurrentTime;
|
|
15
|
+
//# sourceMappingURL=use-time.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"use-time.js","sourceRoot":"","sources":["../src/use-time.ts"],"names":[],"mappings":";;;AAAA,2CAA8C;AAC9C,2CAAuC;AAEhC,MAAM,cAAc,GAAG,GAAW,EAAE;IACzC,MAAM,KAAK,GAAG,IAAA,oBAAQ,GAAE,CAAC;IACzB,MAAM,YAAY,GAAG,IAAA,2BAAe,GAAE,CAAC;IAErC,IAAI,CAAA,KAAK,aAAL,KAAK,uBAAL,KAAK,CAAE,GAAG,KAAI,YAAY,EAAE;QAC9B,OAAO,IAAI,GAAG,CAAC,YAAY,GAAG,KAAK,CAAC,GAAG,CAAC,CAAC;KAC1C;IAED,OAAO,CAAC,CAAC;AACb,CAAC,CAAC;AATW,QAAA,cAAc,kBASzB"}
|
|
@@ -1,3 +1,8 @@
|
|
|
1
1
|
import { VideoConfig } from './video-config';
|
|
2
|
+
/**
|
|
3
|
+
* Get some info about the context of the video that you are making.
|
|
4
|
+
* Returns an object containing `fps`, `width`, `height` and `durationInFrames`, all of type `number`.
|
|
5
|
+
* @link https://www.remotion.dev/docs/use-video-config
|
|
6
|
+
*/
|
|
2
7
|
export declare const useVideoConfig: () => VideoConfig;
|
|
3
8
|
//# sourceMappingURL=use-video-config.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use-video-config.d.ts","sourceRoot":"","sources":["../src/use-video-config.ts"],"names":[],"mappings":"AACA,OAAO,EAAC,WAAW,EAAC,MAAM,gBAAgB,CAAC;AAE3C,eAAO,MAAM,cAAc,QAAO,WAUjC,CAAC"}
|
|
1
|
+
{"version":3,"file":"use-video-config.d.ts","sourceRoot":"","sources":["../src/use-video-config.ts"],"names":[],"mappings":"AACA,OAAO,EAAC,WAAW,EAAC,MAAM,gBAAgB,CAAC;AAE3C;;;;GAIG;AACH,eAAO,MAAM,cAAc,QAAO,WAUjC,CAAC"}
|
package/dist/use-video-config.js
CHANGED
|
@@ -2,6 +2,11 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.useVideoConfig = void 0;
|
|
4
4
|
const use_unsafe_video_config_1 = require("./use-unsafe-video-config");
|
|
5
|
+
/**
|
|
6
|
+
* Get some info about the context of the video that you are making.
|
|
7
|
+
* Returns an object containing `fps`, `width`, `height` and `durationInFrames`, all of type `number`.
|
|
8
|
+
* @link https://www.remotion.dev/docs/use-video-config
|
|
9
|
+
*/
|
|
5
10
|
const useVideoConfig = () => {
|
|
6
11
|
const videoConfig = (0, use_unsafe_video_config_1.useUnsafeVideoConfig)();
|
|
7
12
|
if (!videoConfig) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use-video-config.js","sourceRoot":"","sources":["../src/use-video-config.ts"],"names":[],"mappings":";;;AAAA,uEAA+D;
|
|
1
|
+
{"version":3,"file":"use-video-config.js","sourceRoot":"","sources":["../src/use-video-config.ts"],"names":[],"mappings":";;;AAAA,uEAA+D;AAG/D;;;;GAIG;AACI,MAAM,cAAc,GAAG,GAAgB,EAAE;IAC/C,MAAM,WAAW,GAAG,IAAA,8CAAoB,GAAE,CAAC;IAE3C,IAAI,CAAC,WAAW,EAAE;QACjB,MAAM,IAAI,KAAK,CACd,sOAAsO,CACtO,CAAC;KACF;IAED,OAAO,WAAW,CAAC;AACpB,CAAC,CAAC;AAVW,QAAA,cAAc,kBAUzB"}
|
|
@@ -89,7 +89,7 @@ const VideoForRenderingForwardFunction = ({ onError, volume: volumeProp, playbac
|
|
|
89
89
|
startFrom: -mediaStartsAt,
|
|
90
90
|
});
|
|
91
91
|
})();
|
|
92
|
-
const handle = (0, ready_manager_1.delayRender)();
|
|
92
|
+
const handle = (0, ready_manager_1.delayRender)(`Rendering <Video /> with src="${props.src}"`);
|
|
93
93
|
if (process.env.NODE_ENV === 'test') {
|
|
94
94
|
(0, ready_manager_1.continueRender)(handle);
|
|
95
95
|
return;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"VideoForRendering.js","sourceRoot":"","sources":["../../src/video/VideoForRendering.tsx"],"names":[],"mappings":";;;;AAAA,iCAOe;AACf,kDAA+C;AAC/C,8DAGkC;AAClC,8DAAyD;AACzD,4EAAoE;AACpE,wDAAiD;AACjD,sCAAiC;AACjC,oDAA6D;AAC7D,8CAA8C;AAC9C,4CAAsE;AACtE,wEAAgE;AAChE,gDAA8C;AAC9C,yDAAgD;AAGhD,MAAM,gCAAgC,GAGlC,CAAC,EAAC,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,YAAY,EAAE,GAAG,KAAK,EAAC,EAAE,GAAG,EAAE,EAAE;IAClE,MAAM,aAAa,GAAG,IAAA,mCAAuB,GAAE,CAAC;IAEhD,MAAM,KAAK,GAAG,IAAA,2BAAe,GAAE,CAAC;IACh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AC,KAAK,CAAC,EAAE;gBAChD,uEAAuE;gBACvE,yFAAyF;gBAEzF,0DAA0D;gBAC1D,UAAU,CAAC,GAAG,EAAE;oBACf,IAAA,8BAAc,EAAC,MAAM,CAAC,CAAC;gBACxB,CAAC,EAAE,GAAG,CAAC,CAAC;aACR;iBAAM;gBACN,IAAA,8BAAc,EAAC,MAAM,CAAC,CAAC;aACvB;QACF,CAAC,EACD,EAAC,IAAI,EAAE,IAAI,EAAC,CACZ,CAAC;QACF,QAAQ,CAAC,OAAO,CAAC,gBAAgB,CAChC,OAAO,EACP,GAAG,EAAE;YACJ,IAAA,8BAAc,EAAC,MAAM,CAAC,CAAC;QACxB,CAAC,EACD,EAAC,IAAI,EAAE,IAAI,EAAC,CACZ,CAAC;QACF,QAAQ,CAAC,OAAO,CAAC,gBAAgB,CAChC,OAAO,EACP,CAAC,GAAG,EAAE,EAAE;YACP,OAAO,CAAC,KAAK,CAAC,yBAAyB,EAAE,GAAG,CAAC,CAAC;YAC9C,IAAA,8BAAc,EAAC,MAAM,CAAC,CAAC;QACxB,CAAC,EACD,EAAC,IAAI,EAAE,IAAI,EAAC,CACZ,CAAC;IACH,CAAC,EAAE;QACF,gBAAgB;QAChB,KAAK,CAAC,GAAG;QACT,YAAY;QACZ,WAAW,CAAC,GAAG;QACf,KAAK;QACL,aAAa;KACb,CAAC,CAAC;IAEH,OAAO,kCAAO,GAAG,EAAE,QAAQ,KAAM,KAAK,EAAE,OAAO,EAAE,OAAO,WAAI,CAAC;AAC9D,CAAC,CAAC;AAEW,QAAA,iBAAiB,GAAG,IAAA,kBAAU,EAAC,gCAAgC,CAAC,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "remotion",
|
|
3
|
-
"version": "2.6.
|
|
3
|
+
"version": "2.6.13",
|
|
4
4
|
"description": "Render videos in React",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -15,6 +15,9 @@
|
|
|
15
15
|
"repository": {
|
|
16
16
|
"url": "https://github.com/remotion-dev/remotion"
|
|
17
17
|
},
|
|
18
|
+
"bugs": {
|
|
19
|
+
"url": "https://github.com/remotion-dev/remotion/issues"
|
|
20
|
+
},
|
|
18
21
|
"author": "",
|
|
19
22
|
"license": "SEE LICENSE IN LICENSE.md",
|
|
20
23
|
"peerDependencies": {
|
|
@@ -41,8 +44,16 @@
|
|
|
41
44
|
"typescript": "^4.5.5",
|
|
42
45
|
"webpack": "5.60.0"
|
|
43
46
|
},
|
|
47
|
+
"keywords": [
|
|
48
|
+
"remotion",
|
|
49
|
+
"ffmpeg",
|
|
50
|
+
"video",
|
|
51
|
+
"react",
|
|
52
|
+
"puppeteer",
|
|
53
|
+
"player"
|
|
54
|
+
],
|
|
44
55
|
"publishConfig": {
|
|
45
56
|
"access": "public"
|
|
46
57
|
},
|
|
47
|
-
"gitHead": "
|
|
58
|
+
"gitHead": "f382c9698d1e43ea56d5d10174fe0a7419e31fd2"
|
|
48
59
|
}
|
package/.turbo/turbo-test.log
DELETED
|
@@ -1,63 +0,0 @@
|
|
|
1
|
-
[32mremotion:test: [0mcache hit, replaying output [2m246c1f334c8c4222[0m
|
|
2
|
-
[32mremotion:test: [0m
|
|
3
|
-
[32mremotion:test: [0m> remotion@2.6.7 test /Users/jonathanburger/remotion/packages/core
|
|
4
|
-
[32mremotion:test: [0m> jest --coverage && node generate-badges.js
|
|
5
|
-
[32mremotion:test: [0m
|
|
6
|
-
[32mremotion:test: [0mwatchman warning: Recrawled this watch 45 times, most recently because:
|
|
7
|
-
[32mremotion:test: [0mMustScanSubDirs UserDroppedTo resolve, please review the information on
|
|
8
|
-
[32mremotion:test: [0mhttps://facebook.github.io/watchman/docs/troubleshooting.html#recrawl
|
|
9
|
-
[32mremotion:test: [0mTo clear this warning, run:
|
|
10
|
-
[32mremotion:test: [0m`watchman watch-del '/Users/jonathanburger/remotion' ; watchman watch-project '/Users/jonathanburger/remotion'`
|
|
11
|
-
[32mremotion:test: [0m
|
|
12
|
-
[32mremotion:test: [0mPASS src/test/interpolate.test.ts (30.996 s)
|
|
13
|
-
[32mremotion:test: [0mPASS src/test/easing.test.ts (32.793 s)
|
|
14
|
-
[32mremotion:test: [0mPASS src/test/nested-sequences.test.tsx (42.235 s)
|
|
15
|
-
[32mremotion:test: [0mPASS src/test/audio.test.tsx (12.855 s)
|
|
16
|
-
[32mremotion:test: [0mPASS src/test/sequence-validation.test.tsx
|
|
17
|
-
[32mremotion:test: [0mPASS src/test/video.test.tsx (47.656 s)
|
|
18
|
-
[32mremotion:test: [0mPASS src/test/composition-validation.test.tsx (47.783 s)
|
|
19
|
-
[32mremotion:test: [0mPASS src/test/composition-rules.test.tsx (5.656 s)
|
|
20
|
-
[32mremotion:test: [0mPASS src/test/series.test.tsx (48.255 s)
|
|
21
|
-
[32mremotion:test: [0mPASS src/test/loop-validation.test.tsx (47.533 s)
|
|
22
|
-
[32mremotion:test: [0mPASS src/test/Img.test.tsx
|
|
23
|
-
[32mremotion:test: [0mPASS src/test/random.test.ts
|
|
24
|
-
[32mremotion:test: [0mPASS src/test/freeze.test.tsx (17.297 s)
|
|
25
|
-
[32mremotion:test: [0mPASS src/test/ready-manager.test.ts
|
|
26
|
-
[32mremotion:test: [0mPASS src/test/codec.test.ts
|
|
27
|
-
[32mremotion:test: [0mPASS src/test/concurrency.test.ts
|
|
28
|
-
[32mremotion:test: [0mPASS src/test/use-media-in-timeline.test.tsx
|
|
29
|
-
[32mremotion:test: [0mPASS src/test/crf.test.ts
|
|
30
|
-
[32mremotion:test: [0mPASS src/test/use-audio-frame.test.tsx
|
|
31
|
-
[32mremotion:test: [0mPASS src/test/use-sync-volume-with-media-tag.test.ts
|
|
32
|
-
[32mremotion:test: [0mPASS src/test/audio-for-rendering.test.tsx
|
|
33
|
-
[32mremotion:test: [0mPASS src/test/range.test.tsx
|
|
34
|
-
[32mremotion:test: [0mPASS src/test/measure-spring.test.ts
|
|
35
|
-
[32mremotion:test: [0mPASS src/test/interpolateColors.test.ts
|
|
36
|
-
[32mremotion:test: [0mPASS src/test/truthy.test.ts
|
|
37
|
-
[32mremotion:test: [0mPASS src/test/preview-server.test.ts
|
|
38
|
-
[32mremotion:test: [0mPASS src/test/absolute-src.test.ts
|
|
39
|
-
[32mremotion:test: [0mPASS src/test/get-current-time.test.ts
|
|
40
|
-
[32mremotion:test: [0mPASS src/test/use-media-tag-volume.test.tsx
|
|
41
|
-
[32mremotion:test: [0mPASS src/test/pixel-format.test.ts
|
|
42
|
-
[32mremotion:test: [0mPASS src/test/bezier.test.ts
|
|
43
|
-
[32mremotion:test: [0mPASS src/test/spring.test.ts
|
|
44
|
-
[32mremotion:test: [0mPASS src/test/input-props.test.ts
|
|
45
|
-
[32mremotion:test: [0mPASS src/test/volume-prop.test.ts
|
|
46
|
-
[32mremotion:test: [0mPASS src/test/get-asset-file-name.test.ts
|
|
47
|
-
[32mremotion:test: [0mPASS src/test/quality.test.ts
|
|
48
|
-
[32mremotion:test: [0mPASS src/test/validate-start-from-props.test.ts
|
|
49
|
-
[32mremotion:test: [0mPASS src/test/media-validation.test.tsx
|
|
50
|
-
[32mremotion:test: [0mPASS src/test/image-sequence.test.ts
|
|
51
|
-
[32mremotion:test: [0mPASS src/test/webpack-caching.test.ts
|
|
52
|
-
[32mremotion:test: [0mPASS src/test/validate-frame.test.ts
|
|
53
|
-
[32mremotion:test: [0mPASS src/test/image-format.test.ts
|
|
54
|
-
[32mremotion:test: [0mPASS src/test/overwrite.test.ts
|
|
55
|
-
[32mremotion:test: [0mPASS src/test/validate-image-format.test.ts
|
|
56
|
-
[32mremotion:test: [0mPASS src/test/pro-res-profile.test.ts
|
|
57
|
-
[32mremotion:test: [0mPASS src/test/log.test.ts
|
|
58
|
-
[32mremotion:test: [0m
|
|
59
|
-
[32mremotion:test: [0mTest Suites: 46 passed, 46 total
|
|
60
|
-
[32mremotion:test: [0mTests: 475 passed, 475 total
|
|
61
|
-
[32mremotion:test: [0mSnapshots: 0 total
|
|
62
|
-
[32mremotion:test: [0mTime: 55.671 s
|
|
63
|
-
[32mremotion:test: [0mRan all test suites.
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
declare function audioBufferToWav(buffer: AudioBuffer, opt: {
|
|
2
|
-
float32: boolean;
|
|
3
|
-
}): ArrayBuffer;
|
|
4
|
-
declare function encodeWAV({ samples, format, sampleRate, numChannels, bitDepth, }: {
|
|
5
|
-
samples: Float32Array;
|
|
6
|
-
format: 3 | 1;
|
|
7
|
-
sampleRate: number;
|
|
8
|
-
numChannels: number;
|
|
9
|
-
bitDepth: 32 | 16;
|
|
10
|
-
}): ArrayBuffer;
|
|
11
|
-
declare function interleave(inputL: Float32Array, inputR: Float32Array): Float32Array;
|
|
12
|
-
declare function writeFloat32(output: DataView, offset: number, input: Float32Array): void;
|
|
13
|
-
declare function floatTo16BitPCM(output: DataView, offset: number, input: Float32Array): void;
|
|
14
|
-
declare function writeString(view: DataView, offset: number, string: string): void;
|
|
15
|
-
//# sourceMappingURL=audio-buffer-to-wav.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"audio-buffer-to-wav.d.ts","sourceRoot":"","sources":["../../src/audio/audio-buffer-to-wav.ts"],"names":[],"mappings":"AAEA,iBAAS,gBAAgB,CACxB,MAAM,EAAE,WAAW,EACnB,GAAG,EAAE;IACJ,OAAO,EAAE,OAAO,CAAC;CACjB,eAqBD;AAED,iBAAS,SAAS,CAAC,EAClB,OAAO,EACP,MAAM,EACN,UAAU,EACV,WAAW,EACX,QAAQ,GACR,EAAE;IACF,OAAO,EAAE,YAAY,CAAC;IACtB,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC;IACd,UAAU,EAAE,MAAM,CAAC;IACnB,WAAW,EAAE,MAAM,CAAC;IACpB,QAAQ,EAAE,EAAE,GAAG,EAAE,CAAC;CAClB,eAyCA;AAED,iBAAS,UAAU,CAAC,MAAM,EAAE,YAAY,EAAE,MAAM,EAAE,YAAY,gBAc7D;AAED,iBAAS,YAAY,CAAC,MAAM,EAAE,QAAQ,EAAE,MAAM,EAAE,MAAM,EAAE,KAAK,EAAE,YAAY,QAI1E;AAED,iBAAS,eAAe,CACvB,MAAM,EAAE,QAAQ,EAChB,MAAM,EAAE,MAAM,EACd,KAAK,EAAE,YAAY,QAMnB;AAED,iBAAS,WAAW,CAAC,IAAI,EAAE,QAAQ,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,QAIlE"}
|