@remotion/media-utils 4.0.390 → 4.0.391
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.
|
@@ -234,18 +234,27 @@ const useWindowedAudioData = ({ src, frame, fps, windowInSeconds, channelIndex =
|
|
|
234
234
|
sampleRate: audioUtils.metadata.sampleRate,
|
|
235
235
|
};
|
|
236
236
|
}, [src, waveFormMap, audioUtils === null || audioUtils === void 0 ? void 0 : audioUtils.metadata, availableWindows]);
|
|
237
|
+
const isBeyondAudioDuration = audioUtils
|
|
238
|
+
? currentTime >= audioUtils.metadata.durationInSeconds
|
|
239
|
+
: false;
|
|
237
240
|
(0, react_1.useLayoutEffect)(() => {
|
|
238
241
|
if (currentAudioData) {
|
|
239
242
|
return;
|
|
240
243
|
}
|
|
244
|
+
if (isBeyondAudioDuration) {
|
|
245
|
+
return;
|
|
246
|
+
}
|
|
241
247
|
const handle = delayRender(`Waiting for audio data with src="${src}" to be loaded`);
|
|
242
248
|
return () => {
|
|
243
249
|
continueRender(handle);
|
|
244
250
|
};
|
|
245
|
-
}, [
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
251
|
+
}, [
|
|
252
|
+
currentAudioData,
|
|
253
|
+
src,
|
|
254
|
+
delayRender,
|
|
255
|
+
continueRender,
|
|
256
|
+
isBeyondAudioDuration,
|
|
257
|
+
]);
|
|
249
258
|
const audioData = isBeyondAudioDuration ? null : currentAudioData;
|
|
250
259
|
return {
|
|
251
260
|
audioData,
|
package/package.json
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"url": "https://github.com/remotion-dev/remotion/tree/main/packages/media-utils"
|
|
4
4
|
},
|
|
5
5
|
"name": "@remotion/media-utils",
|
|
6
|
-
"version": "4.0.
|
|
6
|
+
"version": "4.0.391",
|
|
7
7
|
"description": "Utilities for working with media files",
|
|
8
8
|
"main": "dist/index.js",
|
|
9
9
|
"sideEffects": false,
|
|
@@ -18,9 +18,9 @@
|
|
|
18
18
|
"url": "https://github.com/remotion-dev/remotion/issues"
|
|
19
19
|
},
|
|
20
20
|
"dependencies": {
|
|
21
|
-
"@remotion/media-parser": "4.0.
|
|
22
|
-
"@remotion/webcodecs": "4.0.
|
|
23
|
-
"remotion": "4.0.
|
|
21
|
+
"@remotion/media-parser": "4.0.391",
|
|
22
|
+
"@remotion/webcodecs": "4.0.391",
|
|
23
|
+
"remotion": "4.0.391",
|
|
24
24
|
"mediabunny": "1.25.8"
|
|
25
25
|
},
|
|
26
26
|
"peerDependencies": {
|
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
"react-dom": ">=16.8.0"
|
|
29
29
|
},
|
|
30
30
|
"devDependencies": {
|
|
31
|
-
"@remotion/eslint-config-internal": "4.0.
|
|
31
|
+
"@remotion/eslint-config-internal": "4.0.391",
|
|
32
32
|
"eslint": "9.19.0"
|
|
33
33
|
},
|
|
34
34
|
"keywords": [
|