Update vue-vite-app with mt version

This commit is contained in:
Jerome Wu
2023-08-09 17:18:28 +08:00
parent 681037db97
commit 716a229ecb
2 changed files with 9 additions and 2 deletions

View File

@@ -11,7 +11,7 @@ import type { LogEvent } from '@ffmpeg/ffmpeg/dist/esm/types'
import { fetchFile, toBlobURL } from '@ffmpeg/util'
import { defineComponent, ref } from 'vue'
const baseURL = 'https://unpkg.com/@ffmpeg/core@0.12.1/dist/esm'
const baseURL = 'https://unpkg.com/@ffmpeg/core-mt@0.12.2/dist/esm'
const videoURL = 'https://ffmpegwasm.netlify.app/video/video-15s.avi'
export default defineComponent({
@@ -28,7 +28,8 @@ export default defineComponent({
})
await ffmpeg.load({
coreURL: await toBlobURL(`${baseURL}/ffmpeg-core.js`, 'text/javascript'),
wasmURL: await toBlobURL(`${baseURL}/ffmpeg-core.wasm`, 'applicaiton/wasm')
wasmURL: await toBlobURL(`${baseURL}/ffmpeg-core.wasm`, 'applicaiton/wasm'),
workerURL: await toBlobURL(`${baseURL}/ffmpeg-core.worker.js`, 'text/javascript')
})
message.value = 'Start transcoding'
await ffmpeg.writeFile('test.avi', await fetchFile(videoURL))