@remotion/lottie 3.2.30 → 3.2.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/dist/Lottie.js +10 -0
- package/package.json +4 -4
package/dist/Lottie.js
CHANGED
|
@@ -60,6 +60,7 @@ const Lottie = ({ animationData, className, direction, loop, playbackRate, style
|
|
|
60
60
|
}
|
|
61
61
|
}, [playbackRate]);
|
|
62
62
|
(0, react_1.useEffect)(() => {
|
|
63
|
+
var _a;
|
|
63
64
|
if (!animationRef.current) {
|
|
64
65
|
return;
|
|
65
66
|
}
|
|
@@ -71,6 +72,15 @@ const Lottie = ({ animationData, className, direction, loop, playbackRate, style
|
|
|
71
72
|
totalFrames,
|
|
72
73
|
});
|
|
73
74
|
animationRef.current.goToAndStop(nextFrame, true);
|
|
75
|
+
const images = (_a = containerRef.current) === null || _a === void 0 ? void 0 : _a.querySelectorAll('image');
|
|
76
|
+
images.forEach((img) => {
|
|
77
|
+
const imgHandle = (0, remotion_1.delayRender)(`Waiting for lottie image with src="${img.href.baseVal}" to load`);
|
|
78
|
+
// https://stackoverflow.com/a/46839799
|
|
79
|
+
img.addEventListener('load', () => {
|
|
80
|
+
(0, remotion_1.continueRender)(imgHandle);
|
|
81
|
+
}, { once: true });
|
|
82
|
+
img.setAttributeNS('http://www.w3.org/1999/xlink', 'xlink:href', img.href.baseVal);
|
|
83
|
+
});
|
|
74
84
|
}, [direction, frame, loop, playbackRate]);
|
|
75
85
|
return (0, jsx_runtime_1.jsx)("div", { ref: containerRef, className: className, style: style });
|
|
76
86
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@remotion/lottie",
|
|
3
|
-
"version": "3.2.
|
|
3
|
+
"version": "3.2.32",
|
|
4
4
|
"description": "Remotion Lottie",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"sideEffects": false,
|
|
@@ -27,7 +27,7 @@
|
|
|
27
27
|
],
|
|
28
28
|
"license": "SEE LICENSE IN LICENSE.md",
|
|
29
29
|
"dependencies": {
|
|
30
|
-
"remotion": "3.2.
|
|
30
|
+
"remotion": "3.2.32"
|
|
31
31
|
},
|
|
32
32
|
"peerDependencies": {
|
|
33
33
|
"lottie-web": "^5",
|
|
@@ -45,7 +45,7 @@
|
|
|
45
45
|
"react": "^18.0.0",
|
|
46
46
|
"react-dom": "^18.0.0",
|
|
47
47
|
"typescript": "^4.7.0",
|
|
48
|
-
"vitest": "
|
|
48
|
+
"vitest": "0.18.0"
|
|
49
49
|
},
|
|
50
50
|
"keywords": [
|
|
51
51
|
"remotion",
|
|
@@ -58,5 +58,5 @@
|
|
|
58
58
|
"publishConfig": {
|
|
59
59
|
"access": "public"
|
|
60
60
|
},
|
|
61
|
-
"gitHead": "
|
|
61
|
+
"gitHead": "4f7ab3637405d140041f898f95f78c99943d1b40"
|
|
62
62
|
}
|