remotion 3.3.11 → 3.3.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 +1 -1
- package/dist/Clipper.d.ts +9 -0
- package/dist/Clipper.js +18 -0
- package/dist/config.d.ts +0 -5
- package/dist/get-static-files.d.ts +2 -0
- package/dist/get-static-files.js +31 -0
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/dist/video/VideoForDevelopment.js +17 -1
- package/dist/video/video-fragment.d.ts +6 -0
- package/dist/video/video-fragment.js +26 -0
- package/package.json +2 -2
package/.turbo/turbo-build.log
CHANGED
package/dist/Clipper.js
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.Clipper = void 0;
|
|
4
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
|
+
const react_1 = require("react");
|
|
6
|
+
const AbsoluteFill_1 = require("./AbsoluteFill");
|
|
7
|
+
const CompositionManager_1 = require("./CompositionManager");
|
|
8
|
+
const Clipper = ({ height, width, x, y, hide, children }) => {
|
|
9
|
+
const context = (0, react_1.useContext)(CompositionManager_1.CompositionManager);
|
|
10
|
+
(0, react_1.useEffect)(() => {
|
|
11
|
+
context.setClipRegion({ height, hide: Boolean(hide), width, x, y });
|
|
12
|
+
return () => {
|
|
13
|
+
context.setClipRegion(null);
|
|
14
|
+
};
|
|
15
|
+
}, [context, height, hide, width, x, y]);
|
|
16
|
+
return (0, jsx_runtime_1.jsx)(AbsoluteFill_1.AbsoluteFill, { children: children });
|
|
17
|
+
};
|
|
18
|
+
exports.Clipper = Clipper;
|
package/dist/config.d.ts
CHANGED
|
@@ -106,11 +106,6 @@ export declare type ConfigType = {
|
|
|
106
106
|
* Default: true
|
|
107
107
|
*/
|
|
108
108
|
readonly setChromiumHeadlessMode: (should: boolean) => void;
|
|
109
|
-
/**
|
|
110
|
-
* If true, your installed Chrome extensions will be enabled.
|
|
111
|
-
* Default: false
|
|
112
|
-
*/
|
|
113
|
-
readonly setEnableChromiumExtensions: (should: boolean) => void;
|
|
114
109
|
/**
|
|
115
110
|
* Set the OpenGL rendering backend for Chrome. Possible values: 'egl', 'angle', 'swiftshader' and 'swangle'.
|
|
116
111
|
* Default: 'swangle' in Lambda, null elsewhere.
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getStaticFiles = void 0;
|
|
4
|
+
let warnedServer = false;
|
|
5
|
+
let warnedPlayer = false;
|
|
6
|
+
const warnServerOnce = () => {
|
|
7
|
+
if (warnedServer) {
|
|
8
|
+
return;
|
|
9
|
+
}
|
|
10
|
+
warnedServer = true;
|
|
11
|
+
console.warn('Called getStaticFiles() on the server. The API is only available in the browser. An empty array was returned.');
|
|
12
|
+
};
|
|
13
|
+
const warnPlayerOnce = () => {
|
|
14
|
+
if (warnedPlayer) {
|
|
15
|
+
return;
|
|
16
|
+
}
|
|
17
|
+
warnedPlayer = true;
|
|
18
|
+
console.warn('Called getStaticFiles() while using the Remotion Player. The API is only available while using the Remotion Preview. An empty array was returned.');
|
|
19
|
+
};
|
|
20
|
+
const getStaticFiles = () => {
|
|
21
|
+
if (typeof document === 'undefined') {
|
|
22
|
+
warnServerOnce();
|
|
23
|
+
return [];
|
|
24
|
+
}
|
|
25
|
+
if (window.remotion_isPlayer) {
|
|
26
|
+
warnPlayerOnce();
|
|
27
|
+
return [];
|
|
28
|
+
}
|
|
29
|
+
return window.remotion_staticFiles;
|
|
30
|
+
};
|
|
31
|
+
exports.getStaticFiles = getStaticFiles;
|
package/dist/version.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const VERSION = "3.3.
|
|
1
|
+
export declare const VERSION = "3.3.13";
|
package/dist/version.js
CHANGED
|
@@ -5,15 +5,20 @@ const jsx_runtime_1 = require("react/jsx-runtime");
|
|
|
5
5
|
const react_1 = require("react");
|
|
6
6
|
const use_audio_frame_1 = require("../audio/use-audio-frame");
|
|
7
7
|
const prefetch_1 = require("../prefetch");
|
|
8
|
+
const Sequence_1 = require("../Sequence");
|
|
8
9
|
const use_media_in_timeline_1 = require("../use-media-in-timeline");
|
|
9
10
|
const use_media_playback_1 = require("../use-media-playback");
|
|
10
11
|
const use_media_tag_volume_1 = require("../use-media-tag-volume");
|
|
11
12
|
const use_sync_volume_with_media_tag_1 = require("../use-sync-volume-with-media-tag");
|
|
13
|
+
const use_video_config_1 = require("../use-video-config");
|
|
12
14
|
const volume_position_state_1 = require("../volume-position-state");
|
|
15
|
+
const video_fragment_1 = require("./video-fragment");
|
|
13
16
|
const VideoForDevelopmentRefForwardingFunction = (props, ref) => {
|
|
14
17
|
var _a;
|
|
15
18
|
const videoRef = (0, react_1.useRef)(null);
|
|
16
19
|
const volumePropFrame = (0, use_audio_frame_1.useFrameForVolumeProp)();
|
|
20
|
+
const { fps, durationInFrames } = (0, use_video_config_1.useVideoConfig)();
|
|
21
|
+
const parentSequence = (0, react_1.useContext)(Sequence_1.SequenceContext);
|
|
17
22
|
const { volume, muted, playbackRate, onlyWarnForMediaSeekingError, src, onDuration, acceptableTimeshift, ...nativeProps } = props;
|
|
18
23
|
const actualVolume = (0, use_media_tag_volume_1.useMediaTagVolume)(videoRef);
|
|
19
24
|
const [mediaVolume] = (0, volume_position_state_1.useMediaVolumeState)();
|
|
@@ -40,7 +45,18 @@ const VideoForDevelopmentRefForwardingFunction = (props, ref) => {
|
|
|
40
45
|
onlyWarnForMediaSeekingError,
|
|
41
46
|
acceptableTimeshift: acceptableTimeshift !== null && acceptableTimeshift !== void 0 ? acceptableTimeshift : use_media_playback_1.DEFAULT_ACCEPTABLE_TIMESHIFT,
|
|
42
47
|
});
|
|
43
|
-
const
|
|
48
|
+
const actualFrom = parentSequence
|
|
49
|
+
? parentSequence.relativeFrom + parentSequence.cumulatedFrom
|
|
50
|
+
: 0;
|
|
51
|
+
const duration = parentSequence
|
|
52
|
+
? Math.min(parentSequence.durationInFrames, durationInFrames)
|
|
53
|
+
: durationInFrames;
|
|
54
|
+
const actualSrc = (0, video_fragment_1.appendVideoFragment)({
|
|
55
|
+
actualSrc: (0, prefetch_1.usePreload)(src),
|
|
56
|
+
actualFrom,
|
|
57
|
+
duration,
|
|
58
|
+
fps,
|
|
59
|
+
});
|
|
44
60
|
(0, react_1.useImperativeHandle)(ref, () => {
|
|
45
61
|
return videoRef.current;
|
|
46
62
|
}, []);
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.appendVideoFragment = void 0;
|
|
4
|
+
const toSeconds = (time, fps) => {
|
|
5
|
+
return Math.round((time / fps) * 100) / 100;
|
|
6
|
+
};
|
|
7
|
+
const appendVideoFragment = ({ actualSrc, actualFrom, duration, fps, }) => {
|
|
8
|
+
var _a;
|
|
9
|
+
if (actualSrc.startsWith('data:')) {
|
|
10
|
+
return actualSrc;
|
|
11
|
+
}
|
|
12
|
+
const existingHash = Boolean(new URL(actualSrc, (_a = window.location.href) !== null && _a !== void 0 ? _a : 'http://localhost:3000').hash);
|
|
13
|
+
if (existingHash) {
|
|
14
|
+
return actualSrc;
|
|
15
|
+
}
|
|
16
|
+
if (!Number.isFinite(actualFrom)) {
|
|
17
|
+
return actualSrc;
|
|
18
|
+
}
|
|
19
|
+
actualSrc += `#t=${toSeconds(-actualFrom, fps)}`;
|
|
20
|
+
if (!Number.isFinite(duration)) {
|
|
21
|
+
return actualSrc;
|
|
22
|
+
}
|
|
23
|
+
actualSrc += `,${toSeconds(duration, fps)}`;
|
|
24
|
+
return actualSrc;
|
|
25
|
+
};
|
|
26
|
+
exports.appendVideoFragment = appendVideoFragment;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "remotion",
|
|
3
|
-
"version": "3.3.
|
|
3
|
+
"version": "3.3.13",
|
|
4
4
|
"description": "Render videos in React",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -55,5 +55,5 @@
|
|
|
55
55
|
"publishConfig": {
|
|
56
56
|
"access": "public"
|
|
57
57
|
},
|
|
58
|
-
"gitHead": "
|
|
58
|
+
"gitHead": "5149292492bbbd27d48935e0aea371251c21588d"
|
|
59
59
|
}
|