@bendyline/squisq-video-react 2.4.23 → 2.4.24
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/{chunk-47ODXCBA.js → chunk-BOSF6GLF.js} +1 -1
- package/dist/{chunk-TUZLVOSP.js → chunk-JQLHRJY3.js} +1 -1
- package/dist/{chunk-ISYJJJXN.js → chunk-RIXBIX3H.js} +18 -3
- package/dist/components/index.js +3 -3
- package/dist/encoder/index.js +1 -1
- package/dist/hooks/index.js +2 -2
- package/dist/index.js +3 -3
- package/package.json +4 -4
|
@@ -333,10 +333,21 @@ async function encodeAacTrack(audioBuffer, sink, bitrate) {
|
|
|
333
333
|
const sampleRate = audioBuffer.sampleRate;
|
|
334
334
|
const channels = audioBuffer.numberOfChannels;
|
|
335
335
|
let encodeError = null;
|
|
336
|
+
let inFlight = 0;
|
|
337
|
+
let wake;
|
|
336
338
|
const encoder = new AudioEncoder({
|
|
337
|
-
output: (chunk, meta) =>
|
|
339
|
+
output: (chunk, meta) => {
|
|
340
|
+
inFlight = Math.max(0, inFlight - 1);
|
|
341
|
+
try {
|
|
342
|
+
sink.addAudioChunk(chunk, meta ?? void 0);
|
|
343
|
+
} catch (error) {
|
|
344
|
+
encodeError = error instanceof Error ? error : new Error(String(error));
|
|
345
|
+
}
|
|
346
|
+
wake?.();
|
|
347
|
+
},
|
|
338
348
|
error: (err) => {
|
|
339
349
|
encodeError = err instanceof Error ? err : new Error(String(err));
|
|
350
|
+
wake?.();
|
|
340
351
|
}
|
|
341
352
|
});
|
|
342
353
|
encoder.configure({ codec: "mp4a.40.2", sampleRate, numberOfChannels: channels, bitrate });
|
|
@@ -352,8 +363,11 @@ async function encodeAacTrack(audioBuffer, sink, bitrate) {
|
|
|
352
363
|
try {
|
|
353
364
|
for (let offset = 0; offset < total; offset += AAC_FRAME_SAMPLES) {
|
|
354
365
|
if (encodeError) throw encodeError;
|
|
355
|
-
|
|
356
|
-
await
|
|
366
|
+
while (inFlight >= queueLimit) {
|
|
367
|
+
await new Promise((resolve) => {
|
|
368
|
+
wake = resolve;
|
|
369
|
+
});
|
|
370
|
+
wake = void 0;
|
|
357
371
|
if (encodeError) throw encodeError;
|
|
358
372
|
}
|
|
359
373
|
const count = Math.min(AAC_FRAME_SAMPLES, total - offset);
|
|
@@ -371,6 +385,7 @@ async function encodeAacTrack(audioBuffer, sink, bitrate) {
|
|
|
371
385
|
data: planar
|
|
372
386
|
});
|
|
373
387
|
try {
|
|
388
|
+
inFlight++;
|
|
374
389
|
encoder.encode(audioData);
|
|
375
390
|
} finally {
|
|
376
391
|
audioData.close();
|
package/dist/components/index.js
CHANGED
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
import {
|
|
2
2
|
VideoExportButton,
|
|
3
3
|
VideoExportModal
|
|
4
|
-
} from "../chunk-
|
|
4
|
+
} from "../chunk-JQLHRJY3.js";
|
|
5
5
|
import {
|
|
6
6
|
CoverImageExportModal,
|
|
7
7
|
coverImageFilename,
|
|
8
8
|
validateCoverImageDimensions
|
|
9
9
|
} from "../chunk-JDIMPME5.js";
|
|
10
10
|
import "../chunk-3NJDHK62.js";
|
|
11
|
-
import "../chunk-
|
|
11
|
+
import "../chunk-BOSF6GLF.js";
|
|
12
12
|
import "../chunk-A52VG7RA.js";
|
|
13
13
|
import "../chunk-C7NEHV5X.js";
|
|
14
|
-
import "../chunk-
|
|
14
|
+
import "../chunk-RIXBIX3H.js";
|
|
15
15
|
import "../chunk-5MFQMJ5Z.js";
|
|
16
16
|
export {
|
|
17
17
|
CoverImageExportModal,
|
package/dist/encoder/index.js
CHANGED
package/dist/hooks/index.js
CHANGED
|
@@ -3,12 +3,12 @@ import {
|
|
|
3
3
|
resolveVideoCoverFramePlan,
|
|
4
4
|
resolveVideoExportCover,
|
|
5
5
|
useVideoExport
|
|
6
|
-
} from "../chunk-
|
|
6
|
+
} from "../chunk-BOSF6GLF.js";
|
|
7
7
|
import {
|
|
8
8
|
useFrameCapture
|
|
9
9
|
} from "../chunk-A52VG7RA.js";
|
|
10
10
|
import "../chunk-C7NEHV5X.js";
|
|
11
|
-
import "../chunk-
|
|
11
|
+
import "../chunk-RIXBIX3H.js";
|
|
12
12
|
import "../chunk-5MFQMJ5Z.js";
|
|
13
13
|
export {
|
|
14
14
|
DEFAULT_VIDEO_COVER_PRE_ROLL_SECONDS,
|
package/dist/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
2
|
VideoExportButton,
|
|
3
3
|
VideoExportModal
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-JQLHRJY3.js";
|
|
5
5
|
import {
|
|
6
6
|
CoverImageExportModal,
|
|
7
7
|
coverImageFilename,
|
|
@@ -13,7 +13,7 @@ import {
|
|
|
13
13
|
resolveVideoCoverFramePlan,
|
|
14
14
|
resolveVideoExportCover,
|
|
15
15
|
useVideoExport
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-BOSF6GLF.js";
|
|
17
17
|
import {
|
|
18
18
|
useFrameCapture
|
|
19
19
|
} from "./chunk-A52VG7RA.js";
|
|
@@ -30,7 +30,7 @@ import {
|
|
|
30
30
|
supportsWebCodecs,
|
|
31
31
|
supportsWebCodecsAac,
|
|
32
32
|
supportsWebCodecsH264
|
|
33
|
-
} from "./chunk-
|
|
33
|
+
} from "./chunk-RIXBIX3H.js";
|
|
34
34
|
import {
|
|
35
35
|
createMediaEditRenderManager,
|
|
36
36
|
createMediaEditRenderer,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bendyline/squisq-video-react",
|
|
3
|
-
"version": "2.4.
|
|
3
|
+
"version": "2.4.24",
|
|
4
4
|
"description": "React components for browser-based MP4 and animated-GIF export of Squisq documents",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "Bendyline",
|
|
@@ -77,9 +77,9 @@
|
|
|
77
77
|
"react-dom": "^18.0.0 || ^19.0.0"
|
|
78
78
|
},
|
|
79
79
|
"dependencies": {
|
|
80
|
-
"@bendyline/squisq": "2.11.
|
|
81
|
-
"@bendyline/squisq-video": "2.3.
|
|
82
|
-
"@bendyline/squisq-react": "2.11.
|
|
80
|
+
"@bendyline/squisq": "2.11.18",
|
|
81
|
+
"@bendyline/squisq-video": "2.3.22",
|
|
82
|
+
"@bendyline/squisq-react": "2.11.20",
|
|
83
83
|
"@ffmpeg/core": "0.12.9",
|
|
84
84
|
"@ffmpeg/ffmpeg": "0.12.15",
|
|
85
85
|
"@ffmpeg/util": "0.12.2",
|