@mce/mp4 0.11.4 → 0.12.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/dist/index.js +3 -3
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -50,7 +50,8 @@ function plugin() {
|
|
|
50
50
|
width,
|
|
51
51
|
height,
|
|
52
52
|
fonts,
|
|
53
|
-
|
|
53
|
+
keyframes: Array.from({ length: ~~((endTime - startTime) / spf) }, (_, i) => startTime + i * spf),
|
|
54
|
+
onKeyframe: async (data2, { duration, progress }) => {
|
|
54
55
|
const bitmap = await createImageBitmap(new ImageData(data2, width, height));
|
|
55
56
|
await encoder.encode({
|
|
56
57
|
data: bitmap,
|
|
@@ -60,8 +61,7 @@ function plugin() {
|
|
|
60
61
|
bitmap.close();
|
|
61
62
|
timestamp += duration;
|
|
62
63
|
onProgress?.(progress);
|
|
63
|
-
}
|
|
64
|
-
keyframes: Array.from({ length: ~~((endTime - startTime) / spf) }, (_, i) => startTime + i * spf)
|
|
64
|
+
}
|
|
65
65
|
});
|
|
66
66
|
return await encoder.flush();
|
|
67
67
|
}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mce/mp4",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.
|
|
4
|
+
"version": "0.12.0",
|
|
5
5
|
"description": "MP4 plugin for mce",
|
|
6
6
|
"author": "wxm",
|
|
7
7
|
"license": "MIT",
|
|
@@ -49,7 +49,7 @@
|
|
|
49
49
|
"modern-mp4": "^0.2.0"
|
|
50
50
|
},
|
|
51
51
|
"devDependencies": {
|
|
52
|
-
"mce": "0.
|
|
52
|
+
"mce": "0.12.0"
|
|
53
53
|
},
|
|
54
54
|
"peerDependencies": {
|
|
55
55
|
"mce": "^0"
|