remotion 3.3.31 → 3.3.33
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/dist/LayerMaster.js +12 -2
- package/dist/layers.d.ts +2 -2
- package/dist/layers.js +7 -0
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/dist/video/NativeVideo.d.ts +5 -0
- package/dist/video/NativeVideo.js +33 -0
- package/dist/video/NativeVideoForRendering.d.ts +8 -0
- package/dist/video/NativeVideoForRendering.js +14 -0
- package/package.json +2 -2
- package/.turbo/turbo-build.log +0 -4
- package/.turbo/turbo-lint.log +0 -10
- package/.turbo/turbo-test.log +0 -1379
- package/dist/satori-embedded.d.ts +0 -918
- package/dist/satori-embedded.js +0 -29
package/dist/LayerMaster.js
CHANGED
|
@@ -4,6 +4,7 @@ exports.LayerMaster = void 0;
|
|
|
4
4
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
5
|
const react_1 = require("react");
|
|
6
6
|
const AbsoluteFill_1 = require("./AbsoluteFill");
|
|
7
|
+
const get_environment_1 = require("./get-environment");
|
|
7
8
|
const LayerMaster = ({ layers, defaultProps, inputProps, fallbackComponent: FallbackComponent, }) => {
|
|
8
9
|
return (
|
|
9
10
|
// TODO: Same styles as normal
|
|
@@ -20,8 +21,17 @@ const LayerMaster = ({ layers, defaultProps, inputProps, fallbackComponent: Fall
|
|
|
20
21
|
}
|
|
21
22
|
// SVG should not support suspense
|
|
22
23
|
if (layer.type === 'svg') {
|
|
23
|
-
|
|
24
|
-
|
|
24
|
+
if ((0, get_environment_1.getRemotionEnvironment)() === 'rendering') {
|
|
25
|
+
return null;
|
|
26
|
+
}
|
|
27
|
+
return ((0, jsx_runtime_1.jsx)(AbsoluteFill_1.AbsoluteFill, { children: (0, jsx_runtime_1.jsx)(Comp, { ...defaultProps, ...inputProps }, String(i)) }));
|
|
28
|
+
}
|
|
29
|
+
if (layer.type === 'video') {
|
|
30
|
+
if ((0, get_environment_1.getRemotionEnvironment)() === 'rendering') {
|
|
31
|
+
return null;
|
|
32
|
+
}
|
|
33
|
+
// TODO: AbsoluteFill is different flex direction
|
|
34
|
+
return ((0, jsx_runtime_1.jsx)(AbsoluteFill_1.AbsoluteFill, { children: (0, jsx_runtime_1.jsx)(Comp, { ...defaultProps, ...inputProps }, String(i)) }));
|
|
25
35
|
}
|
|
26
36
|
throw new Error('Unknown layer type');
|
|
27
37
|
}) }));
|
package/dist/layers.d.ts
CHANGED
|
@@ -3,7 +3,7 @@ import React from 'react';
|
|
|
3
3
|
export declare type LooseComponentType<T> = ComponentType<T> | ((props: T) => React.ReactNode);
|
|
4
4
|
export declare type InputLayer<T> = {
|
|
5
5
|
component: LooseComponentType<T>;
|
|
6
|
-
type: 'web' | 'svg';
|
|
6
|
+
type: 'web' | 'svg' | 'video';
|
|
7
7
|
};
|
|
8
8
|
export declare type CompProps<T> = {
|
|
9
9
|
lazyComponent: () => Promise<{
|
|
@@ -16,7 +16,7 @@ export declare type CompProps<T> = {
|
|
|
16
16
|
};
|
|
17
17
|
export declare type Layer<T> = {
|
|
18
18
|
component: LazyExoticComponent<ComponentType<T>>;
|
|
19
|
-
type: 'web' | 'svg';
|
|
19
|
+
type: 'web' | 'svg' | 'video';
|
|
20
20
|
};
|
|
21
21
|
export declare type SmallLayer = Pick<Layer<unknown>, 'type'>;
|
|
22
22
|
export declare const convertComponentTypesToLayers: <T>(compProps: CompProps<T>) => Layer<T>[];
|
package/dist/layers.js
CHANGED
|
@@ -33,6 +33,13 @@ const inputLayersToLayers = (layers) => {
|
|
|
33
33
|
type: 'web',
|
|
34
34
|
};
|
|
35
35
|
}
|
|
36
|
+
// No lazy for Video allowed!
|
|
37
|
+
if (layer.type === 'video') {
|
|
38
|
+
return {
|
|
39
|
+
component: layer.component,
|
|
40
|
+
type: 'video',
|
|
41
|
+
};
|
|
42
|
+
}
|
|
36
43
|
// No lazy for SVG allowed!
|
|
37
44
|
return {
|
|
38
45
|
component: layer.component,
|
package/dist/version.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const VERSION = "3.3.
|
|
1
|
+
export declare const VERSION = "3.3.33";
|
package/dist/version.js
CHANGED
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.NativeVideo = void 0;
|
|
4
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
|
+
const react_1 = require("react");
|
|
6
|
+
const get_environment_1 = require("../get-environment");
|
|
7
|
+
const Sequence_1 = require("../Sequence");
|
|
8
|
+
const validate_media_props_1 = require("../validate-media-props");
|
|
9
|
+
const validate_start_from_props_1 = require("../validate-start-from-props");
|
|
10
|
+
const NativeVideoForRendering_1 = require("./NativeVideoForRendering");
|
|
11
|
+
const VideoForDevelopment_1 = require("./VideoForDevelopment");
|
|
12
|
+
const NativeVideo = (props) => {
|
|
13
|
+
const { startFrom, endAt, ...otherProps } = props;
|
|
14
|
+
const onDuration = (0, react_1.useCallback)(() => undefined, []);
|
|
15
|
+
if (typeof props.src !== 'string') {
|
|
16
|
+
throw new TypeError(`The \`<NativeVideo>\` tag requires a string for \`src\`, but got ${JSON.stringify(props.src)} instead.`);
|
|
17
|
+
}
|
|
18
|
+
if (typeof startFrom !== 'undefined' || typeof endAt !== 'undefined') {
|
|
19
|
+
(0, validate_start_from_props_1.validateStartFromProps)(startFrom, endAt);
|
|
20
|
+
const startFromFrameNo = startFrom !== null && startFrom !== void 0 ? startFrom : 0;
|
|
21
|
+
const endAtFrameNo = endAt !== null && endAt !== void 0 ? endAt : Infinity;
|
|
22
|
+
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.NativeVideo, { ...otherProps }) }));
|
|
23
|
+
}
|
|
24
|
+
(0, validate_media_props_1.validateMediaProps)(props, 'Video');
|
|
25
|
+
if ((0, get_environment_1.getRemotionEnvironment)() === 'rendering') {
|
|
26
|
+
throw new Error('Cannot render in the browser');
|
|
27
|
+
}
|
|
28
|
+
if ((0, get_environment_1.getRemotionEnvironment)() === 'server-rendering') {
|
|
29
|
+
return (0, jsx_runtime_1.jsx)(NativeVideoForRendering_1.NativeVideoForRendering, { ...otherProps });
|
|
30
|
+
}
|
|
31
|
+
return ((0, jsx_runtime_1.jsx)(VideoForDevelopment_1.VideoForDevelopment, { onDuration: onDuration, onlyWarnForMediaSeekingError: true, ...otherProps }));
|
|
32
|
+
};
|
|
33
|
+
exports.NativeVideo = NativeVideo;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.NativeVideoForRendering = void 0;
|
|
4
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
|
+
const use_current_frame_1 = require("../use-current-frame");
|
|
6
|
+
const NativeVideoForRendering = ({ src }) => {
|
|
7
|
+
const frame = (0, use_current_frame_1.useCurrentFrame)();
|
|
8
|
+
return ((0, jsx_runtime_1.jsx)("div", {
|
|
9
|
+
// eslint-disable-next-line react/no-danger
|
|
10
|
+
dangerouslySetInnerHTML: {
|
|
11
|
+
__html: JSON.stringify({ src, frame }),
|
|
12
|
+
} }));
|
|
13
|
+
};
|
|
14
|
+
exports.NativeVideoForRendering = NativeVideoForRendering;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "remotion",
|
|
3
|
-
"version": "3.3.
|
|
3
|
+
"version": "3.3.33",
|
|
4
4
|
"description": "Render videos in React",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -65,5 +65,5 @@
|
|
|
65
65
|
]
|
|
66
66
|
}
|
|
67
67
|
},
|
|
68
|
-
"gitHead": "
|
|
68
|
+
"gitHead": "0356b9108673ac98c41990f192b101f7a6574ed0"
|
|
69
69
|
}
|
package/.turbo/turbo-build.log
DELETED
package/.turbo/turbo-lint.log
DELETED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
> remotion@3.3.19 lint /Users/jonathanburger/remotion/packages/core
|
|
3
|
-
> eslint src --ext ts,tsx
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
/Users/jonathanburger/remotion/packages/core/src/use-lazy-component.ts
|
|
7
|
-
9:50 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any
|
|
8
|
-
|
|
9
|
-
✖ 1 problem (0 errors, 1 warning)
|
|
10
|
-
|