remotion 3.3.25 → 3.3.26
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 +1 -1
- package/dist/Satori.d.ts +5 -0
- package/dist/Satori.js +92 -0
- package/dist/audio/Audio.d.ts +1 -1
- package/dist/get-static-files.d.ts +16 -1
- package/dist/index.d.ts +3 -0
- package/dist/index.js +3 -1
- package/dist/satori-embedded.d.ts +918 -0
- package/dist/satori-embedded.js +29 -0
- package/dist/static-file.d.ts +4 -0
- package/dist/static-file.js +4 -0
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/dist/video/Video.d.ts +2 -2
- package/dist/video/Video.js +2 -1
- package/dist/video/VideoForDevelopment.js +1 -1
- package/dist/video/video-fragment.d.ts +6 -0
- package/dist/video/video-fragment.js +24 -1
- package/package.json +4 -4
package/dist/video/Video.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import type { RemotionMainVideoProps } from './props';
|
|
3
|
-
export declare const Video:
|
|
3
|
+
export declare const Video: (props: Omit<React.DetailedHTMLProps<React.VideoHTMLAttributes<HTMLVideoElement>, HTMLVideoElement>, "nonce" | "onEnded" | "autoPlay" | "controls"> & {
|
|
4
4
|
volume?: import("../volume-prop").VolumeProp | undefined;
|
|
5
5
|
playbackRate?: number | undefined;
|
|
6
6
|
acceptableTimeShiftInSeconds?: number | undefined;
|
|
7
7
|
allowAmplificationDuringRender?: boolean | undefined;
|
|
8
|
-
} & RemotionMainVideoProps
|
|
8
|
+
} & RemotionMainVideoProps & React.RefAttributes<HTMLVideoElement | null>) => React.ReactElement | null;
|
package/dist/video/Video.js
CHANGED
|
@@ -45,4 +45,5 @@ const VideoForwardingFunction = (props, ref) => {
|
|
|
45
45
|
}
|
|
46
46
|
return ((0, jsx_runtime_1.jsx)(VideoForDevelopment_1.VideoForDevelopment, { onlyWarnForMediaSeekingError: false, ...otherProps, ref: ref, onDuration: onDuration }));
|
|
47
47
|
};
|
|
48
|
-
|
|
48
|
+
const forward = react_1.forwardRef;
|
|
49
|
+
exports.Video = forward(VideoForwardingFunction);
|
|
@@ -57,7 +57,7 @@ const VideoForDevelopmentRefForwardingFunction = (props, ref) => {
|
|
|
57
57
|
const duration = parentSequence
|
|
58
58
|
? Math.min(parentSequence.durationInFrames, durationInFrames)
|
|
59
59
|
: durationInFrames;
|
|
60
|
-
const actualSrc = (0, video_fragment_1.
|
|
60
|
+
const actualSrc = (0, video_fragment_1.useAppendVideoFragment)({
|
|
61
61
|
actualSrc: (0, prefetch_1.usePreload)(src),
|
|
62
62
|
actualFrom,
|
|
63
63
|
duration,
|
|
@@ -1,3 +1,9 @@
|
|
|
1
|
+
export declare const useAppendVideoFragment: ({ actualSrc: initialActualSrc, actualFrom: initialActualFrom, duration: initialDuration, fps, }: {
|
|
2
|
+
actualSrc: string;
|
|
3
|
+
actualFrom: number;
|
|
4
|
+
duration: number;
|
|
5
|
+
fps: number;
|
|
6
|
+
}) => string;
|
|
1
7
|
export declare const appendVideoFragment: ({ actualSrc, actualFrom, duration, fps, }: {
|
|
2
8
|
actualSrc: string;
|
|
3
9
|
actualFrom: number;
|
|
@@ -1,9 +1,32 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.appendVideoFragment = void 0;
|
|
3
|
+
exports.appendVideoFragment = exports.useAppendVideoFragment = void 0;
|
|
4
|
+
const react_1 = require("react");
|
|
4
5
|
const toSeconds = (time, fps) => {
|
|
5
6
|
return Math.round((time / fps) * 100) / 100;
|
|
6
7
|
};
|
|
8
|
+
const isSubsetOfDuration = (prevStartFrom, newStartFrom, prevDuration, newDuration) => {
|
|
9
|
+
return (prevStartFrom <= newStartFrom &&
|
|
10
|
+
prevStartFrom + prevDuration >= newStartFrom + newDuration);
|
|
11
|
+
};
|
|
12
|
+
const useAppendVideoFragment = ({ actualSrc: initialActualSrc, actualFrom: initialActualFrom, duration: initialDuration, fps, }) => {
|
|
13
|
+
const actualFromRef = (0, react_1.useRef)(initialActualFrom);
|
|
14
|
+
const actualDuration = (0, react_1.useRef)(initialDuration);
|
|
15
|
+
const actualSrc = (0, react_1.useRef)(initialActualSrc);
|
|
16
|
+
if (!isSubsetOfDuration || initialActualSrc !== actualSrc.current) {
|
|
17
|
+
actualFromRef.current = initialActualFrom;
|
|
18
|
+
actualDuration.current = initialDuration;
|
|
19
|
+
actualSrc.current = initialActualSrc;
|
|
20
|
+
}
|
|
21
|
+
const appended = (0, exports.appendVideoFragment)({
|
|
22
|
+
actualSrc: actualSrc.current,
|
|
23
|
+
actualFrom: actualFromRef.current,
|
|
24
|
+
duration: actualDuration.current,
|
|
25
|
+
fps,
|
|
26
|
+
});
|
|
27
|
+
return appended;
|
|
28
|
+
};
|
|
29
|
+
exports.useAppendVideoFragment = useAppendVideoFragment;
|
|
7
30
|
const appendVideoFragment = ({ actualSrc, actualFrom, duration, fps, }) => {
|
|
8
31
|
var _a;
|
|
9
32
|
if (actualSrc.startsWith('data:')) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "remotion",
|
|
3
|
-
"version": "3.3.
|
|
3
|
+
"version": "3.3.26",
|
|
4
4
|
"description": "Render videos in React",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -28,8 +28,8 @@
|
|
|
28
28
|
"@jonny/eslint-config": "3.0.266",
|
|
29
29
|
"@testing-library/react": "13.3.0",
|
|
30
30
|
"@types/node": "^16.7.5",
|
|
31
|
-
"@types/react": "18.0.
|
|
32
|
-
"@types/react-dom": "18.0.
|
|
31
|
+
"@types/react": "18.0.26",
|
|
32
|
+
"@types/react-dom": "18.0.10",
|
|
33
33
|
"@types/webpack-env": "^1.16.0",
|
|
34
34
|
"@vitejs/plugin-react": "^2.0.0",
|
|
35
35
|
"eslint": "8.25.0",
|
|
@@ -68,5 +68,5 @@
|
|
|
68
68
|
]
|
|
69
69
|
}
|
|
70
70
|
},
|
|
71
|
-
"gitHead": "
|
|
71
|
+
"gitHead": "8efe8771f7c2b1d22bd50e8c81cc37ae054dfae9"
|
|
72
72
|
}
|