RELEASE: v12.13 (main) | v12.9 (core/core-mt) | v12.4 (types)
This commit is contained in:
@@ -4,7 +4,7 @@ import { RouterOutlet } from '@angular/router';
|
||||
import { FFmpeg } from '@ffmpeg/ffmpeg';
|
||||
import { fetchFile, toBlobURL } from '@ffmpeg/util';
|
||||
|
||||
const baseURL = 'https://unpkg.com/@ffmpeg/core-mt@0.12.6/dist/esm';
|
||||
const baseURL = 'https://unpkg.com/@ffmpeg/core-mt@0.12.9/dist/esm';
|
||||
|
||||
@Component({
|
||||
selector: 'app-root',
|
||||
|
||||
@@ -13,7 +13,7 @@ export default function Home() {
|
||||
|
||||
const load = async () => {
|
||||
setIsLoading(true);
|
||||
const baseURL = "https://unpkg.com/@ffmpeg/core@0.12.6/dist/umd";
|
||||
const baseURL = "https://unpkg.com/@ffmpeg/core@0.12.9/dist/umd";
|
||||
const ffmpeg = ffmpegRef.current;
|
||||
ffmpeg.on("log", ({ message }) => {
|
||||
if (messageRef.current) messageRef.current.innerHTML = message;
|
||||
|
||||
@@ -9,7 +9,7 @@ function App() {
|
||||
const messageRef = useRef<HTMLParagraphElement | null>(null);
|
||||
|
||||
const load = async () => {
|
||||
const baseURL = "https://unpkg.com/@ffmpeg/core-mt@0.12.6/dist/esm";
|
||||
const baseURL = "https://unpkg.com/@ffmpeg/core-mt@0.12.9/dist/esm";
|
||||
const ffmpeg = ffmpegRef.current;
|
||||
ffmpeg.on("log", ({ message }) => {
|
||||
if (messageRef.current) messageRef.current.innerHTML = message;
|
||||
|
||||
@@ -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-mt@0.12.7/dist/esm'
|
||||
const baseURL = 'https://unpkg.com/@ffmpeg/core-mt@0.12.9/dist/esm'
|
||||
const videoURL = 'https://raw.githubusercontent.com/ffmpegwasm/testdata/master/video-15s.avi'
|
||||
|
||||
export default defineComponent({
|
||||
@@ -36,7 +36,9 @@ export default defineComponent({
|
||||
await ffmpeg.exec(['-i', 'test.avi', 'test.mp4'])
|
||||
message.value = 'Complete transcoding'
|
||||
const data = await ffmpeg.readFile('test.mp4')
|
||||
video.value = URL.createObjectURL(new Blob([(data as Uint8Array).buffer], { type: 'video/mp4' }))
|
||||
video.value = URL.createObjectURL(
|
||||
new Blob([(data as Uint8Array).buffer], { type: 'video/mp4' })
|
||||
)
|
||||
}
|
||||
return {
|
||||
video,
|
||||
|
||||
@@ -11,7 +11,7 @@ It is recommended to read [Overview](/docs/overview) first.
|
||||
:::caution
|
||||
If you are a [vite](https://vitejs.dev/) user, use `esm` in **baseURL** instead of `umd`:
|
||||
|
||||
~~https://unpkg.com/@ffmpeg/core@0.12.6/dist/umd~~ => https://unpkg.com/@ffmpeg/core@0.12.6/dist/esm
|
||||
~~https://unpkg.com/@ffmpeg/core@0.12.9/dist/umd~~ => https://unpkg.com/@ffmpeg/core@0.12.9/dist/esm
|
||||
:::
|
||||
|
||||
```jsx live
|
||||
|
||||
Reference in New Issue
Block a user