@remotion/media 4.0.367 → 4.0.369
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/audio-iterator-manager.js +13 -2
- package/dist/esm/index.mjs +10 -2
- package/package.json +3 -3
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { AudioBufferSink } from 'mediabunny';
|
|
1
|
+
import { AudioBufferSink, InputDisposedError } from 'mediabunny';
|
|
2
2
|
import { isAlreadyQueued, makeAudioIterator, } from './audio/audio-preview-iterator';
|
|
3
3
|
export const audioIteratorManager = ({ audioTrack, delayPlaybackHandleIfNotPremounting, sharedAudioContext, }) => {
|
|
4
4
|
let muted = false;
|
|
@@ -50,7 +50,18 @@ export const audioIteratorManager = ({ audioTrack, delayPlaybackHandleIfNotPremo
|
|
|
50
50
|
audioBufferIterator = iterator;
|
|
51
51
|
// Schedule up to 3 buffers ahead of the current time
|
|
52
52
|
for (let i = 0; i < 3; i++) {
|
|
53
|
-
const result = await iterator.getNext()
|
|
53
|
+
const result = await iterator.getNext().catch((err) => {
|
|
54
|
+
if (iterator.isDestroyed() || err instanceof InputDisposedError) {
|
|
55
|
+
// Fall through
|
|
56
|
+
}
|
|
57
|
+
else {
|
|
58
|
+
throw err;
|
|
59
|
+
}
|
|
60
|
+
});
|
|
61
|
+
if (!result) {
|
|
62
|
+
delayHandle.unblock();
|
|
63
|
+
return;
|
|
64
|
+
}
|
|
54
65
|
if (iterator.isDestroyed()) {
|
|
55
66
|
delayHandle.unblock();
|
|
56
67
|
return;
|
package/dist/esm/index.mjs
CHANGED
|
@@ -48,7 +48,7 @@ import { ALL_FORMATS, Input, UrlSource } from "mediabunny";
|
|
|
48
48
|
import { Internals as Internals3 } from "remotion";
|
|
49
49
|
|
|
50
50
|
// src/audio-iterator-manager.ts
|
|
51
|
-
import { AudioBufferSink } from "mediabunny";
|
|
51
|
+
import { AudioBufferSink, InputDisposedError } from "mediabunny";
|
|
52
52
|
|
|
53
53
|
// src/helpers/round-to-4-digits.ts
|
|
54
54
|
var roundTo4Digits = (timestamp) => {
|
|
@@ -315,7 +315,15 @@ var audioIteratorManager = ({
|
|
|
315
315
|
audioIteratorsCreated++;
|
|
316
316
|
audioBufferIterator = iterator;
|
|
317
317
|
for (let i = 0;i < 3; i++) {
|
|
318
|
-
const result = await iterator.getNext()
|
|
318
|
+
const result = await iterator.getNext().catch((err) => {
|
|
319
|
+
if (iterator.isDestroyed() || err instanceof InputDisposedError) {} else {
|
|
320
|
+
throw err;
|
|
321
|
+
}
|
|
322
|
+
});
|
|
323
|
+
if (!result) {
|
|
324
|
+
delayHandle.unblock();
|
|
325
|
+
return;
|
|
326
|
+
}
|
|
319
327
|
if (iterator.isDestroyed()) {
|
|
320
328
|
delayHandle.unblock();
|
|
321
329
|
return;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@remotion/media",
|
|
3
|
-
"version": "4.0.
|
|
3
|
+
"version": "4.0.369",
|
|
4
4
|
"main": "dist/index.js",
|
|
5
5
|
"types": "dist/index.d.ts",
|
|
6
6
|
"module": "dist/esm/index.mjs",
|
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
},
|
|
23
23
|
"dependencies": {
|
|
24
24
|
"mediabunny": "1.24.2",
|
|
25
|
-
"remotion": "4.0.
|
|
25
|
+
"remotion": "4.0.369",
|
|
26
26
|
"webdriverio": "9.19.2"
|
|
27
27
|
},
|
|
28
28
|
"peerDependencies": {
|
|
@@ -30,7 +30,7 @@
|
|
|
30
30
|
"react-dom": ">=16.8.0"
|
|
31
31
|
},
|
|
32
32
|
"devDependencies": {
|
|
33
|
-
"@remotion/eslint-config-internal": "4.0.
|
|
33
|
+
"@remotion/eslint-config-internal": "4.0.369",
|
|
34
34
|
"@vitest/browser": "^3.2.4",
|
|
35
35
|
"eslint": "9.19.0",
|
|
36
36
|
"react": "19.0.0",
|