image-to-pixel 3.0.1 → 3.2.0
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/README.md +72 -69
- package/dist/editor.css +1 -1
- package/dist/editor.css.map +2 -2
- package/dist/editor.esm.js +54 -54
- package/dist/editor.esm.js.map +4 -4
- package/dist/image-to-pixel.bundle.esm.js +16 -16
- package/dist/image-to-pixel.bundle.esm.js.map +3 -3
- package/dist/image-to-pixel.cjs +13 -9
- package/dist/image-to-pixel.cjs.map +2 -2
- package/dist/image-to-pixel.esm.js +13 -9
- package/dist/image-to-pixel.esm.js.map +2 -2
- package/dist/image-to-pixel.js +13 -9
- package/dist/image-to-pixel.js.map +2 -2
- package/dist/image-to-pixel.min.js +11 -11
- package/dist/image-to-pixel.min.js.map +3 -3
- package/dist/video.esm.js +2 -2
- package/dist/video.esm.js.map +4 -4
- package/lib/core/video/audio.js +159 -0
- package/lib/core/video/frames.js +52 -7
- package/lib/core/video/mux-mp4.js +320 -131
- package/lib/core/video/mux-webm.js +168 -127
- package/lib/editor/exporter.js +103 -21
- package/lib/editor/icons.js +65 -61
- package/lib/editor/index.js +288 -30
- package/lib/editor/inspector.js +66 -15
- package/lib/editor/library.js +188 -182
- package/lib/editor/storyboard.js +566 -0
- package/lib/editor/styles/editor.css +71 -1
- package/lib/editor/timeline-preview.js +142 -0
- package/lib/editor/workspace.js +62 -0
- package/lib/index.js +31 -31
- package/lib/video.js +122 -92
- package/package.json +92 -92
- package/types/index.d.ts +2 -0
- package/types/video.d.ts +99 -43
package/dist/image-to-pixel.cjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! image-to-pixel v3.0
|
|
1
|
+
/*! image-to-pixel v3.2.0 | MIT | https://github.com/Tezumie/Image-to-Pixel */
|
|
2
2
|
var __create = Object.create;
|
|
3
3
|
var __defProp = Object.defineProperty;
|
|
4
4
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
@@ -2490,17 +2490,21 @@ async function forEachFrame(video, opts) {
|
|
|
2490
2490
|
await videoReady(video);
|
|
2491
2491
|
const wasPaused = video.paused;
|
|
2492
2492
|
video.pause();
|
|
2493
|
-
const times = frameTimes({ duration: video.duration, ...opts });
|
|
2494
|
-
|
|
2495
|
-
|
|
2496
|
-
|
|
2497
|
-
|
|
2493
|
+
const times = Array.isArray(opts.times) ? opts.times.filter((t) => Number.isFinite(t)).slice(0, opts.maxFrames ?? Infinity) : frameTimes({ duration: video.duration, ...opts });
|
|
2494
|
+
try {
|
|
2495
|
+
for (let i = 0; i < times.length; i++) {
|
|
2496
|
+
if (opts.signal?.aborted) throw new DOMException("Aborted", "AbortError");
|
|
2497
|
+
await seekTo(video, times[i]);
|
|
2498
|
+
if (opts.signal?.aborted) throw new DOMException("Aborted", "AbortError");
|
|
2499
|
+
await opts.onFrame({ index: i, time: times[i], total: times.length });
|
|
2500
|
+
}
|
|
2501
|
+
} finally {
|
|
2502
|
+
if (!wasPaused) video.play().catch(() => {
|
|
2503
|
+
});
|
|
2498
2504
|
}
|
|
2499
|
-
if (!wasPaused) video.play().catch(() => {
|
|
2500
|
-
});
|
|
2501
2505
|
return times.length;
|
|
2502
2506
|
}
|
|
2503
2507
|
|
|
2504
2508
|
// lib/index.js
|
|
2505
|
-
var VERSION = true ? "3.0
|
|
2509
|
+
var VERSION = true ? "3.2.0" : "dev";
|
|
2506
2510
|
//# sourceMappingURL=image-to-pixel.cjs.map
|