nuxt-ui-elements 0.1.30 → 0.1.31
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/module.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { defineUploaderPlugin } from "../types.js";
|
|
2
2
|
import { useFFMpeg } from "../../useFFMpeg.js";
|
|
3
3
|
import { watchEffect } from "vue";
|
|
4
|
-
export const PluginVideoCompressor = defineUploaderPlugin((pluginOptions) => {
|
|
4
|
+
export const PluginVideoCompressor = defineUploaderPlugin((pluginOptions = {}) => {
|
|
5
5
|
return {
|
|
6
6
|
id: "video-compressor",
|
|
7
7
|
hooks: {
|
|
@@ -35,10 +35,7 @@ export const PluginVideoCompressor = defineUploaderPlugin((pluginOptions) => {
|
|
|
35
35
|
try {
|
|
36
36
|
context.emit("start", { file, originalSize: file.size });
|
|
37
37
|
const inputUrl = URL.createObjectURL(file.data);
|
|
38
|
-
const ffmpeg = useFFMpeg({
|
|
39
|
-
inputUrl,
|
|
40
|
-
convertOptions: []
|
|
41
|
-
});
|
|
38
|
+
const ffmpeg = useFFMpeg({ inputUrl });
|
|
42
39
|
await ffmpeg.load();
|
|
43
40
|
watchEffect(() => {
|
|
44
41
|
context.emit("progress", { file, percentage: Math.round(ffmpeg.progress.value * 100) });
|
package/package.json
CHANGED