remotion 4.0.0-offthread.28 → 4.0.0-offthread.32
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
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
[
|
|
2
|
-
[
|
|
3
|
-
[
|
|
4
|
-
[
|
|
5
|
-
[
|
|
1
|
+
[33mremotion:build: [0mcache hit, replaying output [2madb0281825e06cd7[0m
|
|
2
|
+
[33mremotion:build: [0m
|
|
3
|
+
[33mremotion:build: [0m> remotion@3.0.10 build /Users/jonathanburger/remotion/packages/core
|
|
4
|
+
[33mremotion:build: [0m> tsc -d
|
|
5
|
+
[33mremotion:build: [0m
|
package/dist/Img.js
CHANGED
|
@@ -10,11 +10,12 @@ const ImgRefForwarding = ({ onError, ...props }, ref) => {
|
|
|
10
10
|
return imageRef.current;
|
|
11
11
|
});
|
|
12
12
|
const didGetError = (0, react_1.useCallback)((e) => {
|
|
13
|
+
var _a;
|
|
13
14
|
if (onError) {
|
|
14
15
|
onError(e);
|
|
15
16
|
}
|
|
16
17
|
else {
|
|
17
|
-
console.error('Error loading image:', e, 'Handle the event using the onError() prop to make this message disappear.');
|
|
18
|
+
console.error('Error loading image with src:', (_a = imageRef.current) === null || _a === void 0 ? void 0 : _a.src, e, 'Handle the event using the onError() prop to make this message disappear.');
|
|
18
19
|
}
|
|
19
20
|
}, [onError]);
|
|
20
21
|
// If image source switches, make new handle
|
|
@@ -21,6 +21,7 @@ const OffthreadVideoForRendering = ({ onError, volume: volumeProp, playbackRate,
|
|
|
21
21
|
const sequenceContext = (0, react_1.useContext)(sequencing_1.SequenceContext);
|
|
22
22
|
const mediaStartsAt = (0, use_audio_frame_1.useMediaStartsAt)();
|
|
23
23
|
const { registerAsset, unregisterAsset } = (0, react_1.useContext)(CompositionManager_1.CompositionManager);
|
|
24
|
+
const [crash, setCrash] = (0, react_1.useState)(false);
|
|
24
25
|
if (!src) {
|
|
25
26
|
throw new TypeError('No `src` was passed to <OffthreadVideo>.');
|
|
26
27
|
}
|
|
@@ -79,6 +80,27 @@ const OffthreadVideoForRendering = ({ onError, volume: volumeProp, playbackRate,
|
|
|
79
80
|
const actualSrc = (0, react_1.useMemo)(() => {
|
|
80
81
|
return `http://localhost:${window.remotion_proxyPort}/proxy?src=${encodeURIComponent((0, absolute_src_1.getAbsoluteSrc)(src))}&time=${encodeURIComponent(currentTime)}`;
|
|
81
82
|
}, [currentTime, src]);
|
|
82
|
-
|
|
83
|
+
const onErr = (0, react_1.useCallback)((e) => {
|
|
84
|
+
console.log('ERROR', actualSrc);
|
|
85
|
+
fetch(actualSrc)
|
|
86
|
+
.then((res) => {
|
|
87
|
+
console.log('fetch', res.status);
|
|
88
|
+
return res.text();
|
|
89
|
+
})
|
|
90
|
+
.then((text) => {
|
|
91
|
+
console.log('TEXT', text);
|
|
92
|
+
})
|
|
93
|
+
.catch((err) => {
|
|
94
|
+
console.log('MSG', err.message);
|
|
95
|
+
})
|
|
96
|
+
.finally(() => {
|
|
97
|
+
setCrash(true);
|
|
98
|
+
});
|
|
99
|
+
onError === null || onError === void 0 ? void 0 : onError(e);
|
|
100
|
+
}, [actualSrc, onError]);
|
|
101
|
+
if (crash) {
|
|
102
|
+
throw new Error('crash');
|
|
103
|
+
}
|
|
104
|
+
return (0, jsx_runtime_1.jsx)(Img_1.Img, { src: actualSrc, ...props, onError: onErr }, void 0);
|
|
83
105
|
};
|
|
84
106
|
exports.OffthreadVideoForRendering = OffthreadVideoForRendering;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "remotion",
|
|
3
|
-
"version": "4.0.0-offthread.
|
|
3
|
+
"version": "4.0.0-offthread.32+90ec968c7",
|
|
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": "90ec968c7621839fc5e1d4b7510edd45f4bf366e"
|
|
59
59
|
}
|