@remotion/media-utils 4.0.73 → 4.0.75
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/use-audio-data.js +8 -3
- package/package.json +2 -2
package/dist/use-audio-data.js
CHANGED
|
@@ -26,9 +26,14 @@ const useAudioData = (src) => {
|
|
|
26
26
|
const [metadata, setMetadata] = (0, react_1.useState)(null);
|
|
27
27
|
const fetchMetadata = (0, react_1.useCallback)(async () => {
|
|
28
28
|
const handle = (0, remotion_1.delayRender)(`Waiting for audio metadata with src="${src}" to be loaded`);
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
29
|
+
try {
|
|
30
|
+
const data = await (0, get_audio_data_1.getAudioData)(src);
|
|
31
|
+
if (mountState.current.isMounted) {
|
|
32
|
+
setMetadata(data);
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
catch (err) {
|
|
36
|
+
(0, remotion_1.cancelRender)(err);
|
|
32
37
|
}
|
|
33
38
|
(0, remotion_1.continueRender)(handle);
|
|
34
39
|
}, [src]);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@remotion/media-utils",
|
|
3
|
-
"version": "4.0.
|
|
3
|
+
"version": "4.0.75",
|
|
4
4
|
"description": "Utility functions for audio and video",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"sideEffects": false,
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
"url": "https://github.com/remotion-dev/remotion/issues"
|
|
14
14
|
},
|
|
15
15
|
"dependencies": {
|
|
16
|
-
"remotion": "4.0.
|
|
16
|
+
"remotion": "4.0.75"
|
|
17
17
|
},
|
|
18
18
|
"peerDependencies": {
|
|
19
19
|
"react": ">=16.8.0",
|