remotion 3.2.3 → 3.2.4
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
|
+
[32mremotion:build: [0mcache hit, replaying output [2me51675c52d445313[0m
|
|
2
|
+
[32mremotion:build: [0m
|
|
3
|
+
[32mremotion:build: [0m> remotion@3.2.3 build /Users/jonathanburger/remotion/packages/core
|
|
4
|
+
[32mremotion:build: [0m> tsc -d
|
|
5
|
+
[32mremotion:build: [0m
|
|
@@ -45,6 +45,19 @@ const compareProps = (obj1, obj2) => {
|
|
|
45
45
|
}
|
|
46
46
|
return true;
|
|
47
47
|
};
|
|
48
|
+
const didPropChange = (key, newProp, prevProp) => {
|
|
49
|
+
// /music.mp3 and http://localhost:3000/music.mp3 are the same
|
|
50
|
+
if (key === 'src' &&
|
|
51
|
+
!prevProp.startsWith('data:') &&
|
|
52
|
+
!newProp.startsWith('data:')) {
|
|
53
|
+
return (new URL(prevProp, window.location.origin).toString() !==
|
|
54
|
+
new URL(newProp, window.location.origin).toString());
|
|
55
|
+
}
|
|
56
|
+
if (prevProp === newProp) {
|
|
57
|
+
return false;
|
|
58
|
+
}
|
|
59
|
+
return true;
|
|
60
|
+
};
|
|
48
61
|
exports.SharedAudioContext = (0, react_1.createContext)(null);
|
|
49
62
|
const SharedAudioContextProvider = ({ children, numberOfAudioTags }) => {
|
|
50
63
|
const audios = (0, react_1.useRef)([]);
|
|
@@ -75,7 +88,13 @@ const SharedAudioContextProvider = ({ children, numberOfAudioTags }) => {
|
|
|
75
88
|
if (!data) {
|
|
76
89
|
throw new TypeError('Expected audio data to be there');
|
|
77
90
|
}
|
|
78
|
-
Object.
|
|
91
|
+
Object.keys(data.props).forEach((key) => {
|
|
92
|
+
// @ts-expect-error
|
|
93
|
+
if (didPropChange(key, data.props[key], current[key])) {
|
|
94
|
+
// @ts-expect-error
|
|
95
|
+
current[key] = data.props[key];
|
|
96
|
+
}
|
|
97
|
+
});
|
|
79
98
|
});
|
|
80
99
|
}, [refs]);
|
|
81
100
|
const registerAudio = (0, react_1.useCallback)((aud, audioId) => {
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.Caption = void 0;
|
|
4
|
+
const react_1 = require("react");
|
|
5
|
+
const absolute_src_1 = require("../absolute-src");
|
|
6
|
+
const CompositionManager_1 = require("../CompositionManager");
|
|
7
|
+
const get_environment_1 = require("../get-environment");
|
|
8
|
+
const Caption = (props) => {
|
|
9
|
+
const { language, src, title } = props;
|
|
10
|
+
const { registerCaption, unregisterCaption } = (0, react_1.useContext)(CompositionManager_1.CompositionManager);
|
|
11
|
+
(0, react_1.useEffect)(() => {
|
|
12
|
+
if ((0, get_environment_1.getRemotionEnvironment)() !== 'rendering') {
|
|
13
|
+
return;
|
|
14
|
+
}
|
|
15
|
+
const id = `caption-${src}`;
|
|
16
|
+
registerCaption({
|
|
17
|
+
id,
|
|
18
|
+
language,
|
|
19
|
+
src: (0, absolute_src_1.getAbsoluteSrc)(src),
|
|
20
|
+
title,
|
|
21
|
+
});
|
|
22
|
+
return () => unregisterCaption(id);
|
|
23
|
+
}, [language, registerCaption, src, title, unregisterCaption]);
|
|
24
|
+
return null;
|
|
25
|
+
};
|
|
26
|
+
exports.Caption = Caption;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "remotion",
|
|
3
|
-
"version": "3.2.
|
|
3
|
+
"version": "3.2.4",
|
|
4
4
|
"description": "Render videos in React",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -54,5 +54,5 @@
|
|
|
54
54
|
"publishConfig": {
|
|
55
55
|
"access": "public"
|
|
56
56
|
},
|
|
57
|
-
"gitHead": "
|
|
57
|
+
"gitHead": "ee420b99227e0e5bcf093c108e3695f5d46e3658"
|
|
58
58
|
}
|