@bendyline/squisq-video-react 2.4.16 → 2.4.18
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-RO52S6GO.js → chunk-A6ED7EVY.js} +1 -1
- package/dist/{chunk-SLLH2RTX.js → chunk-JKWCZION.js} +14 -2
- package/dist/{chunk-M5AK4MMV.js → chunk-KJQVUVOG.js} +1 -1
- package/dist/{chunk-TUIVBMAK.js → chunk-MI4EJXTD.js} +42 -19
- package/dist/{chunk-2C4BEAWT.js → chunk-QJWEZRZS.js} +33 -1
- package/dist/components/index.js +4 -4
- package/dist/cover-image/index.js +2 -2
- package/dist/dashboard-image/index.js +1 -1
- package/dist/hooks/index.js +2 -2
- package/dist/index.js +5 -5
- package/dist/media-edit/index.js +1 -1
- package/package.json +4 -4
|
@@ -426,7 +426,13 @@ function useProcessedAudio(manager) {
|
|
|
426
426
|
manager ? manager.getIndexVersion : zero,
|
|
427
427
|
zero
|
|
428
428
|
);
|
|
429
|
-
return useCallback(
|
|
429
|
+
return useCallback(
|
|
430
|
+
(clip) => {
|
|
431
|
+
void indexVersion;
|
|
432
|
+
return manager?.processedAudio(clip);
|
|
433
|
+
},
|
|
434
|
+
[manager, indexVersion]
|
|
435
|
+
);
|
|
430
436
|
}
|
|
431
437
|
function useMediaEditStatus(manager) {
|
|
432
438
|
const version = useSyncExternalStore(
|
|
@@ -434,7 +440,13 @@ function useMediaEditStatus(manager) {
|
|
|
434
440
|
manager ? manager.getVersion : zero,
|
|
435
441
|
zero
|
|
436
442
|
);
|
|
437
|
-
return useCallback(
|
|
443
|
+
return useCallback(
|
|
444
|
+
(clip) => {
|
|
445
|
+
void version;
|
|
446
|
+
return manager?.status(clip) ?? null;
|
|
447
|
+
},
|
|
448
|
+
[manager, version]
|
|
449
|
+
);
|
|
438
450
|
}
|
|
439
451
|
function useMediaEditRenders(manager, doc) {
|
|
440
452
|
useEffect(() => {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
useFrameCapture
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-QJWEZRZS.js";
|
|
4
4
|
import {
|
|
5
5
|
EXPORT_AUDIO_CHANNELS,
|
|
6
6
|
EXPORT_AUDIO_SAMPLE_RATE,
|
|
@@ -494,7 +494,7 @@ function useVideoExport(options = {}) {
|
|
|
494
494
|
const [estimatedRemaining, setEstimatedRemaining] = useState(0);
|
|
495
495
|
const encoderRef = useRef(null);
|
|
496
496
|
const gifAbortRef = useRef(null);
|
|
497
|
-
const
|
|
497
|
+
const runRef = useRef(null);
|
|
498
498
|
const downloadUrlRef = useRef(null);
|
|
499
499
|
const startTimeRef = useRef(0);
|
|
500
500
|
const elapsedTimerRef = useRef(null);
|
|
@@ -503,6 +503,8 @@ function useVideoExport(options = {}) {
|
|
|
503
503
|
const frameCapture = useFrameCapture();
|
|
504
504
|
useEffect(() => {
|
|
505
505
|
return () => {
|
|
506
|
+
runRef.current?.abort();
|
|
507
|
+
runRef.current = null;
|
|
506
508
|
if (elapsedTimerRef.current) clearInterval(elapsedTimerRef.current);
|
|
507
509
|
if (downloadUrlRef.current) {
|
|
508
510
|
URL.revokeObjectURL(downloadUrlRef.current);
|
|
@@ -515,6 +517,8 @@ function useVideoExport(options = {}) {
|
|
|
515
517
|
};
|
|
516
518
|
}, [frameCapture]);
|
|
517
519
|
const reset = useCallback(() => {
|
|
520
|
+
runRef.current?.abort();
|
|
521
|
+
runRef.current = null;
|
|
518
522
|
if (downloadUrlRef.current) {
|
|
519
523
|
URL.revokeObjectURL(downloadUrlRef.current);
|
|
520
524
|
downloadUrlRef.current = null;
|
|
@@ -543,10 +547,10 @@ function useVideoExport(options = {}) {
|
|
|
543
547
|
setElapsed(0);
|
|
544
548
|
setEstimatedRemaining(0);
|
|
545
549
|
if (elapsedTimerRef.current) clearInterval(elapsedTimerRef.current);
|
|
546
|
-
cancelledRef.current = false;
|
|
547
550
|
}, [frameCapture]);
|
|
548
551
|
const cancel = useCallback(() => {
|
|
549
|
-
|
|
552
|
+
runRef.current?.abort();
|
|
553
|
+
runRef.current = null;
|
|
550
554
|
if (elapsedTimerRef.current) clearInterval(elapsedTimerRef.current);
|
|
551
555
|
if (encoderRef.current) {
|
|
552
556
|
encoderRef.current.close();
|
|
@@ -561,7 +565,10 @@ function useVideoExport(options = {}) {
|
|
|
561
565
|
}, [frameCapture]);
|
|
562
566
|
const startExport = useCallback(
|
|
563
567
|
async (doc, config) => {
|
|
564
|
-
|
|
568
|
+
cancel();
|
|
569
|
+
const run = new AbortController();
|
|
570
|
+
runRef.current = run;
|
|
571
|
+
const cancelled = () => run.signal.aborted || runRef.current !== run;
|
|
565
572
|
if (downloadUrlRef.current) {
|
|
566
573
|
URL.revokeObjectURL(downloadUrlRef.current);
|
|
567
574
|
downloadUrlRef.current = null;
|
|
@@ -623,6 +630,7 @@ function useVideoExport(options = {}) {
|
|
|
623
630
|
images = /* @__PURE__ */ new Map();
|
|
624
631
|
ownsLoadedImages = true;
|
|
625
632
|
const entries = await config.mediaProvider.listMedia();
|
|
633
|
+
if (cancelled()) return;
|
|
626
634
|
const references = collectDocumentMediaReferences(doc);
|
|
627
635
|
const neededEntries = entries.filter(
|
|
628
636
|
(entry) => references.has(entry.name) || references.has(`./${entry.name}`)
|
|
@@ -633,11 +641,14 @@ function useVideoExport(options = {}) {
|
|
|
633
641
|
);
|
|
634
642
|
}
|
|
635
643
|
for (const entry of neededEntries) {
|
|
636
|
-
if (
|
|
644
|
+
if (cancelled()) return;
|
|
637
645
|
const url2 = await config.mediaProvider.resolveUrl(entry.name);
|
|
646
|
+
if (cancelled()) return;
|
|
638
647
|
const resource = await fetchResourceBytes(url2, {
|
|
639
|
-
policy: resolveExportMediaResourcePolicy(entry.size, config.resourcePolicy)
|
|
648
|
+
policy: resolveExportMediaResourcePolicy(entry.size, config.resourcePolicy),
|
|
649
|
+
signal: run.signal
|
|
640
650
|
});
|
|
651
|
+
if (cancelled()) return;
|
|
641
652
|
const data = toArrayBuffer(resource.bytes);
|
|
642
653
|
images.set(entry.name, data);
|
|
643
654
|
}
|
|
@@ -659,7 +670,7 @@ function useVideoExport(options = {}) {
|
|
|
659
670
|
},
|
|
660
671
|
captionMode
|
|
661
672
|
);
|
|
662
|
-
if (
|
|
673
|
+
if (cancelled()) return;
|
|
663
674
|
if (docDuration <= 0) {
|
|
664
675
|
throw new Error("Document has zero duration \u2014 nothing to export");
|
|
665
676
|
}
|
|
@@ -676,11 +687,13 @@ function useVideoExport(options = {}) {
|
|
|
676
687
|
void 0,
|
|
677
688
|
document
|
|
678
689
|
).catch(() => false);
|
|
690
|
+
if (cancelled()) return;
|
|
679
691
|
const audioBitrate = (QUALITY_PRESETS[quality] ?? QUALITY_PRESETS.normal).audioBitrate;
|
|
680
692
|
const timeline = effectiveOutputFormat === "mp4" && audioPolicy !== "omit" ? config.processedAudio ? computeAudioTimeline(doc, coverPlan.audioOffset, {
|
|
681
693
|
processedAudio: config.processedAudio
|
|
682
694
|
}) : computeAudioTimeline(doc, coverPlan.audioOffset) : [];
|
|
683
695
|
const aacSupported = timeline.length > 0 ? await supportsWebCodecsAac(EXPORT_AUDIO_SAMPLE_RATE, EXPORT_AUDIO_CHANNELS) : false;
|
|
696
|
+
if (cancelled()) return;
|
|
684
697
|
const tierDecision = selectAudioTier({
|
|
685
698
|
hasClips: timeline.length > 0,
|
|
686
699
|
aacSupported,
|
|
@@ -703,6 +716,7 @@ function useVideoExport(options = {}) {
|
|
|
703
716
|
resourcePolicy: config.resourcePolicy
|
|
704
717
|
});
|
|
705
718
|
try {
|
|
719
|
+
if (cancelled()) return;
|
|
706
720
|
const missingSources = [...new Set(timeline.map((clip) => clip.src))].filter(
|
|
707
721
|
(src) => !buffers.has(src)
|
|
708
722
|
);
|
|
@@ -723,6 +737,7 @@ function useVideoExport(options = {}) {
|
|
|
723
737
|
totalAudioDur,
|
|
724
738
|
EXPORT_AUDIO_SAMPLE_RATE
|
|
725
739
|
);
|
|
740
|
+
if (cancelled()) return;
|
|
726
741
|
if (!renderedAudio) {
|
|
727
742
|
audioReasonLocal = "No included video source contained a decodable audio track.";
|
|
728
743
|
}
|
|
@@ -738,7 +753,7 @@ function useVideoExport(options = {}) {
|
|
|
738
753
|
}
|
|
739
754
|
const useInlineAudio = renderedAudio !== null && tierDecision.tier === 1;
|
|
740
755
|
const useFfmpegAudio = renderedAudio !== null && tierDecision.tier === 2;
|
|
741
|
-
if (
|
|
756
|
+
if (cancelled()) return;
|
|
742
757
|
let encoder;
|
|
743
758
|
if (canUseWebCodecs) {
|
|
744
759
|
encoder = createEncoder({
|
|
@@ -779,6 +794,7 @@ function useVideoExport(options = {}) {
|
|
|
779
794
|
void 0,
|
|
780
795
|
document
|
|
781
796
|
);
|
|
797
|
+
if (cancelled()) return;
|
|
782
798
|
setBackend(selectedBackend);
|
|
783
799
|
} else {
|
|
784
800
|
throw new Error(
|
|
@@ -804,7 +820,7 @@ function useVideoExport(options = {}) {
|
|
|
804
820
|
}
|
|
805
821
|
if (ownsLoadedImages) images?.clear();
|
|
806
822
|
images = void 0;
|
|
807
|
-
if (
|
|
823
|
+
if (cancelled()) return;
|
|
808
824
|
setProgress(CAPTURE_PROGRESS_START);
|
|
809
825
|
setPhase(`Capturing frame 1/${totalFrames}`);
|
|
810
826
|
setCurrentFrameTime(0);
|
|
@@ -813,9 +829,10 @@ function useVideoExport(options = {}) {
|
|
|
813
829
|
const frameBoundaryTimes = [captureStartTime];
|
|
814
830
|
if (coverFrameCount > 0) await frameCapture.setCoverVisible(true);
|
|
815
831
|
for (let i = 0; i < totalFrames; i++) {
|
|
816
|
-
if (
|
|
832
|
+
if (cancelled()) return;
|
|
817
833
|
if (coverFrameCount > 0 && i === coverFrameCount) {
|
|
818
834
|
await frameCapture.setCoverVisible(false);
|
|
835
|
+
if (cancelled()) return;
|
|
819
836
|
}
|
|
820
837
|
const time = i / fps;
|
|
821
838
|
const captureTime = coverPlan.captureTimeForFrame(i);
|
|
@@ -826,9 +843,12 @@ function useVideoExport(options = {}) {
|
|
|
826
843
|
totalFrames,
|
|
827
844
|
onLateResult: releaseEncoderFrame,
|
|
828
845
|
activityDocument: document,
|
|
829
|
-
onRecoveryWait: () =>
|
|
846
|
+
onRecoveryWait: () => {
|
|
847
|
+
if (!cancelled())
|
|
848
|
+
setPhase(`Frame ${i + 1}/${totalFrames} is taking unusually long \u2014 still waiting\u2026`);
|
|
849
|
+
}
|
|
830
850
|
});
|
|
831
|
-
if (
|
|
851
|
+
if (cancelled()) {
|
|
832
852
|
releaseEncoderFrame(frame);
|
|
833
853
|
return;
|
|
834
854
|
}
|
|
@@ -849,6 +869,7 @@ function useVideoExport(options = {}) {
|
|
|
849
869
|
void 0,
|
|
850
870
|
document
|
|
851
871
|
);
|
|
872
|
+
if (cancelled()) return;
|
|
852
873
|
const completedFrames = i + 1;
|
|
853
874
|
const completedAt = performance.now();
|
|
854
875
|
frameBoundaryTimes.push(completedAt);
|
|
@@ -868,16 +889,17 @@ function useVideoExport(options = {}) {
|
|
|
868
889
|
setEstimatedRemaining(Math.round(avgPerFrame * (totalFrames - completedFrames)));
|
|
869
890
|
setElapsed(Math.floor((performance.now() - startTimeRef.current) / 1e3));
|
|
870
891
|
}
|
|
871
|
-
if (
|
|
892
|
+
if (cancelled()) return;
|
|
872
893
|
setState("encoding");
|
|
873
894
|
setPhase(effectiveOutputFormat === "gif" ? "Finalizing GIF frames\u2026" : "Finalizing video\u2026");
|
|
874
895
|
setProgress(95);
|
|
875
896
|
let outputBytes = effectiveOutputFormat === "mp4" && !useFfmpegAudio && encoder.finalizeBlob ? await encoder.finalizeBlob() : await encoder.finalize();
|
|
876
|
-
|
|
877
|
-
if (
|
|
897
|
+
if (cancelled()) return;
|
|
898
|
+
if (encoderRef.current === encoder) encoderRef.current = null;
|
|
878
899
|
if (effectiveOutputFormat === "gif") {
|
|
879
900
|
setPhase("Generating GIF palette\u2026");
|
|
880
901
|
const videoOnly = outputBytes instanceof Blob ? new Uint8Array(await outputBytes.arrayBuffer()) : outputBytes instanceof Uint8Array ? outputBytes : new Uint8Array(outputBytes);
|
|
902
|
+
if (cancelled()) return;
|
|
881
903
|
const gifAbort = new AbortController();
|
|
882
904
|
gifAbortRef.current = gifAbort;
|
|
883
905
|
try {
|
|
@@ -895,6 +917,7 @@ function useVideoExport(options = {}) {
|
|
|
895
917
|
try {
|
|
896
918
|
const wav = audioBufferToWav(renderedAudio);
|
|
897
919
|
const videoOnly = outputBytes instanceof Blob ? new Uint8Array(await outputBytes.arrayBuffer()) : outputBytes instanceof Uint8Array ? outputBytes : new Uint8Array(outputBytes);
|
|
920
|
+
if (cancelled()) return;
|
|
898
921
|
outputBytes = await muxAudioWithFfmpegWasm(
|
|
899
922
|
videoOnly,
|
|
900
923
|
wav,
|
|
@@ -908,7 +931,7 @@ function useVideoExport(options = {}) {
|
|
|
908
931
|
if (audioPolicy === "require") throw new Error(audioReasonLocal);
|
|
909
932
|
}
|
|
910
933
|
}
|
|
911
|
-
if (
|
|
934
|
+
if (cancelled()) return;
|
|
912
935
|
const mimeType = effectiveOutputFormat === "gif" ? "image/gif" : "video/mp4";
|
|
913
936
|
const blob = outputBytes instanceof Blob ? outputBytes : new Blob(
|
|
914
937
|
[
|
|
@@ -932,8 +955,8 @@ function useVideoExport(options = {}) {
|
|
|
932
955
|
if (elapsedTimerRef.current) clearInterval(elapsedTimerRef.current);
|
|
933
956
|
frameCapture.destroy();
|
|
934
957
|
} catch (err) {
|
|
958
|
+
if (cancelled()) return;
|
|
935
959
|
if (elapsedTimerRef.current) clearInterval(elapsedTimerRef.current);
|
|
936
|
-
if (cancelledRef.current) return;
|
|
937
960
|
const message = err instanceof Error ? err.message : String(err);
|
|
938
961
|
setState("error");
|
|
939
962
|
setError(message);
|
|
@@ -947,7 +970,7 @@ function useVideoExport(options = {}) {
|
|
|
947
970
|
frameCapture.destroy();
|
|
948
971
|
}
|
|
949
972
|
},
|
|
950
|
-
[frameCapture]
|
|
973
|
+
[frameCapture, cancel]
|
|
951
974
|
);
|
|
952
975
|
return {
|
|
953
976
|
state,
|
|
@@ -1186,6 +1186,7 @@ function getFrameVisualStateKey(captureRoot, timelineTime, options = {}) {
|
|
|
1186
1186
|
});
|
|
1187
1187
|
}
|
|
1188
1188
|
function useFrameCapture() {
|
|
1189
|
+
const generationRef = useRef(0);
|
|
1189
1190
|
const containerRef = useRef(null);
|
|
1190
1191
|
const rootRef = useRef(null);
|
|
1191
1192
|
const renderAPIRef = useRef(null);
|
|
@@ -1207,6 +1208,11 @@ function useFrameCapture() {
|
|
|
1207
1208
|
const captionLayerHasContentRef = useRef(false);
|
|
1208
1209
|
const init = useCallback(
|
|
1209
1210
|
async (doc, renderOptions, captionMode) => {
|
|
1211
|
+
const generation = ++generationRef.current;
|
|
1212
|
+
const assertActive = () => {
|
|
1213
|
+
if (generationRef.current !== generation)
|
|
1214
|
+
throw new Error("Frame capture initialization cancelled");
|
|
1215
|
+
};
|
|
1210
1216
|
if (rootRef.current || containerRef.current || mediaProviderRef.current || captureCanvasRef.current || captureBaseCanvasRef.current || videoFramesRef.current) {
|
|
1211
1217
|
const oldVideoFrames = videoFramesRef.current;
|
|
1212
1218
|
videoFramesRef.current = null;
|
|
@@ -1256,6 +1262,7 @@ function useFrameCapture() {
|
|
|
1256
1262
|
resolve();
|
|
1257
1263
|
}, 0);
|
|
1258
1264
|
});
|
|
1265
|
+
assertActive();
|
|
1259
1266
|
}
|
|
1260
1267
|
const width = renderOptions.width ?? 1920;
|
|
1261
1268
|
const height = renderOptions.height ?? 1080;
|
|
@@ -1341,6 +1348,7 @@ function useFrameCapture() {
|
|
|
1341
1348
|
}
|
|
1342
1349
|
});
|
|
1343
1350
|
await new Promise((resolve) => setTimeout(resolve, 0));
|
|
1351
|
+
assertActive();
|
|
1344
1352
|
if (mediaProvider) {
|
|
1345
1353
|
root.render(
|
|
1346
1354
|
createElement(
|
|
@@ -1376,17 +1384,22 @@ function useFrameCapture() {
|
|
|
1376
1384
|
);
|
|
1377
1385
|
}, CAPTURE_SETUP_TIMEOUT_MS);
|
|
1378
1386
|
try {
|
|
1387
|
+
assertActive();
|
|
1379
1388
|
const captureRoot = container.querySelector("#squisq-capture-root");
|
|
1380
1389
|
if (!(captureRoot instanceof HTMLElement)) {
|
|
1381
1390
|
throw new Error("Capture root element not found after player initialization.");
|
|
1382
1391
|
}
|
|
1383
1392
|
await waitForCaptureMediaResolutions(mediaResolutionTrackerRef.current, captureRoot);
|
|
1393
|
+
assertActive();
|
|
1384
1394
|
stage = "loading fonts and images";
|
|
1385
1395
|
await waitForCaptureAssets(captureRoot, decodedImagesRef.current);
|
|
1396
|
+
assertActive();
|
|
1386
1397
|
stage = "opening video decoders";
|
|
1387
1398
|
await videoFrames.attach(captureRoot);
|
|
1399
|
+
assertActive();
|
|
1388
1400
|
stage = "indexing video sources";
|
|
1389
1401
|
await primeIndeterminateCaptureVideos(captureRoot, primedCaptureVideosRef.current);
|
|
1402
|
+
assertActive();
|
|
1390
1403
|
clearTimeout(setupTimeout);
|
|
1391
1404
|
resolve(api.getDuration());
|
|
1392
1405
|
} catch (assetError) {
|
|
@@ -1399,14 +1412,20 @@ function useFrameCapture() {
|
|
|
1399
1412
|
[]
|
|
1400
1413
|
);
|
|
1401
1414
|
const setCoverVisible = useCallback(async (visible) => {
|
|
1415
|
+
const generation = generationRef.current;
|
|
1402
1416
|
const api = renderAPIRef.current;
|
|
1403
1417
|
if (!api) throw new Error("Frame capture not initialized \xE2\u20AC\u201D call init() first");
|
|
1404
1418
|
if (visible) await api.showCover();
|
|
1405
1419
|
else await api.hideCover();
|
|
1420
|
+
if (generationRef.current !== generation) return;
|
|
1406
1421
|
lastVisualStateKeyRef.current = null;
|
|
1407
1422
|
}, []);
|
|
1408
1423
|
const captureCanvasFrame = useCallback(
|
|
1409
1424
|
async (time, options = {}) => {
|
|
1425
|
+
const generation = generationRef.current;
|
|
1426
|
+
const assertActive = () => {
|
|
1427
|
+
if (generationRef.current !== generation) throw new Error("Frame capture cancelled");
|
|
1428
|
+
};
|
|
1410
1429
|
const container = containerRef.current;
|
|
1411
1430
|
const api = renderAPIRef.current;
|
|
1412
1431
|
const captureCanvas = captureCanvasRef.current;
|
|
@@ -1420,11 +1439,18 @@ function useFrameCapture() {
|
|
|
1420
1439
|
throw new Error("Capture root element not found");
|
|
1421
1440
|
}
|
|
1422
1441
|
const videoFrames = videoFramesRef.current;
|
|
1423
|
-
const prepareCaptureVideos = async () =>
|
|
1442
|
+
const prepareCaptureVideos = async () => {
|
|
1443
|
+
const attached = await videoFrames?.attach(root) ?? 0;
|
|
1444
|
+
assertActive();
|
|
1445
|
+
const primed = await primeIndeterminateCaptureVideos(root, primedCaptureVideosRef.current);
|
|
1446
|
+
assertActive();
|
|
1447
|
+
return attached + primed;
|
|
1448
|
+
};
|
|
1424
1449
|
await prepareCaptureVideos();
|
|
1425
1450
|
try {
|
|
1426
1451
|
await api.seekTo(time);
|
|
1427
1452
|
} catch (seekError) {
|
|
1453
|
+
assertActive();
|
|
1428
1454
|
if (!await prepareCaptureVideos()) {
|
|
1429
1455
|
throw seekError;
|
|
1430
1456
|
}
|
|
@@ -1440,7 +1466,9 @@ function useFrameCapture() {
|
|
|
1440
1466
|
);
|
|
1441
1467
|
}
|
|
1442
1468
|
await waitForCaptureMediaResolutions(mediaResolutionTrackerRef.current, root);
|
|
1469
|
+
assertActive();
|
|
1443
1470
|
await waitForCaptureAssets(root, decodedImagesRef.current);
|
|
1471
|
+
assertActive();
|
|
1444
1472
|
const compositePlan = resolveScheduledVideoCompositePlan(root, {
|
|
1445
1473
|
includeFullFrameOverlays: true
|
|
1446
1474
|
});
|
|
@@ -1474,6 +1502,7 @@ function useFrameCapture() {
|
|
|
1474
1502
|
backgroundColor: hasUnderlays ? null : "#000000",
|
|
1475
1503
|
logging: false,
|
|
1476
1504
|
onclone: async (_clonedDocument, clonedRoot) => {
|
|
1505
|
+
assertActive();
|
|
1477
1506
|
if (compositePlan) {
|
|
1478
1507
|
if (hasUnderlays) clearScheduledUnderlayBackdrops(clonedRoot);
|
|
1479
1508
|
clonedRoot.querySelectorAll(SCHEDULED_MEDIA_SELECTOR).forEach((element) => element.remove());
|
|
@@ -1496,6 +1525,7 @@ function useFrameCapture() {
|
|
|
1496
1525
|
} finally {
|
|
1497
1526
|
releaseCaptureCloneCanvases(transientCloneCanvases);
|
|
1498
1527
|
}
|
|
1528
|
+
assertActive();
|
|
1499
1529
|
hasCapturedFrameRef.current = true;
|
|
1500
1530
|
lastVisualStateKeyRef.current = visualStateKey;
|
|
1501
1531
|
}
|
|
@@ -1551,6 +1581,7 @@ function useFrameCapture() {
|
|
|
1551
1581
|
},
|
|
1552
1582
|
ignoreElements: (element) => shouldIgnoreCaptureCaptionSibling(element, root, captionOverlays)
|
|
1553
1583
|
});
|
|
1584
|
+
assertActive();
|
|
1554
1585
|
}
|
|
1555
1586
|
captionLayerKeyRef.current = captionKey;
|
|
1556
1587
|
captionLayerHasContentRef.current = hasCaptionText;
|
|
@@ -1580,6 +1611,7 @@ function useFrameCapture() {
|
|
|
1580
1611
|
[captureCanvasFrame]
|
|
1581
1612
|
);
|
|
1582
1613
|
const destroy = useCallback(() => {
|
|
1614
|
+
generationRef.current++;
|
|
1583
1615
|
if (rootRef.current) {
|
|
1584
1616
|
rootRef.current.unmount();
|
|
1585
1617
|
rootRef.current = null;
|
package/dist/components/index.js
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import {
|
|
2
2
|
VideoExportButton,
|
|
3
3
|
VideoExportModal
|
|
4
|
-
} from "../chunk-
|
|
4
|
+
} from "../chunk-A6ED7EVY.js";
|
|
5
5
|
import {
|
|
6
6
|
CoverImageExportModal,
|
|
7
7
|
coverImageFilename,
|
|
8
8
|
validateCoverImageDimensions
|
|
9
|
-
} from "../chunk-
|
|
9
|
+
} from "../chunk-KJQVUVOG.js";
|
|
10
10
|
import "../chunk-3NJDHK62.js";
|
|
11
|
-
import "../chunk-
|
|
12
|
-
import "../chunk-
|
|
11
|
+
import "../chunk-MI4EJXTD.js";
|
|
12
|
+
import "../chunk-QJWEZRZS.js";
|
|
13
13
|
import "../chunk-4GFZ3GUE.js";
|
|
14
14
|
import "../chunk-GBIYYDMY.js";
|
|
15
15
|
import "../chunk-5MFQMJ5Z.js";
|
|
@@ -2,9 +2,9 @@ import {
|
|
|
2
2
|
CoverImageExportModal,
|
|
3
3
|
coverImageFilename,
|
|
4
4
|
validateCoverImageDimensions
|
|
5
|
-
} from "../chunk-
|
|
5
|
+
} from "../chunk-KJQVUVOG.js";
|
|
6
6
|
import "../chunk-3NJDHK62.js";
|
|
7
|
-
import "../chunk-
|
|
7
|
+
import "../chunk-QJWEZRZS.js";
|
|
8
8
|
import "../chunk-4GFZ3GUE.js";
|
|
9
9
|
export {
|
|
10
10
|
CoverImageExportModal,
|
package/dist/hooks/index.js
CHANGED
|
@@ -3,10 +3,10 @@ import {
|
|
|
3
3
|
resolveVideoCoverFramePlan,
|
|
4
4
|
resolveVideoExportCover,
|
|
5
5
|
useVideoExport
|
|
6
|
-
} from "../chunk-
|
|
6
|
+
} from "../chunk-MI4EJXTD.js";
|
|
7
7
|
import {
|
|
8
8
|
useFrameCapture
|
|
9
|
-
} from "../chunk-
|
|
9
|
+
} from "../chunk-QJWEZRZS.js";
|
|
10
10
|
import "../chunk-4GFZ3GUE.js";
|
|
11
11
|
import "../chunk-GBIYYDMY.js";
|
|
12
12
|
import "../chunk-5MFQMJ5Z.js";
|
package/dist/index.js
CHANGED
|
@@ -1,22 +1,22 @@
|
|
|
1
1
|
import {
|
|
2
2
|
VideoExportButton,
|
|
3
3
|
VideoExportModal
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-A6ED7EVY.js";
|
|
5
5
|
import {
|
|
6
6
|
CoverImageExportModal,
|
|
7
7
|
coverImageFilename,
|
|
8
8
|
validateCoverImageDimensions
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-KJQVUVOG.js";
|
|
10
10
|
import "./chunk-3NJDHK62.js";
|
|
11
11
|
import {
|
|
12
12
|
DEFAULT_VIDEO_COVER_PRE_ROLL_SECONDS,
|
|
13
13
|
resolveVideoCoverFramePlan,
|
|
14
14
|
resolveVideoExportCover,
|
|
15
15
|
useVideoExport
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-MI4EJXTD.js";
|
|
17
17
|
import {
|
|
18
18
|
useFrameCapture
|
|
19
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-QJWEZRZS.js";
|
|
20
20
|
import "./chunk-4GFZ3GUE.js";
|
|
21
21
|
import {
|
|
22
22
|
createEncoder,
|
|
@@ -30,7 +30,7 @@ import {
|
|
|
30
30
|
useMediaEditRenders,
|
|
31
31
|
useMediaEditStatus,
|
|
32
32
|
useProcessedAudio
|
|
33
|
-
} from "./chunk-
|
|
33
|
+
} from "./chunk-JKWCZION.js";
|
|
34
34
|
import "./chunk-TL2IMDIZ.js";
|
|
35
35
|
import "./chunk-5MFQMJ5Z.js";
|
|
36
36
|
export {
|
package/dist/media-edit/index.js
CHANGED
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.18",
|
|
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.12",
|
|
81
|
+
"@bendyline/squisq-video": "2.3.16",
|
|
82
|
+
"@bendyline/squisq-react": "2.11.14",
|
|
83
83
|
"@ffmpeg/core": "0.12.9",
|
|
84
84
|
"@ffmpeg/ffmpeg": "0.12.15",
|
|
85
85
|
"@ffmpeg/util": "0.12.2",
|