From f44e3da16df6f28da310ab61fe86e72f07e6cc70 Mon Sep 17 00:00:00 2001 From: Lucas Gelfond Date: Wed, 1 Jan 2025 22:06:41 +0100 Subject: [PATCH] temporary downgrade to fix --- apps/angular-app/src/app/app.component.ts | 8 ++++---- apps/nextjs-app/app/Home.tsx | 2 +- apps/react-vite-app/src/App.tsx | 2 +- apps/website/docs/getting-started/usage.md | 20 ++++++++++---------- packages/ffmpeg/src/const.ts | 2 +- scripts/download-assets.js | 2 +- 6 files changed, 18 insertions(+), 18 deletions(-) diff --git a/apps/angular-app/src/app/app.component.ts b/apps/angular-app/src/app/app.component.ts index abcf8d7..8c27460 100644 --- a/apps/angular-app/src/app/app.component.ts +++ b/apps/angular-app/src/app/app.component.ts @@ -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.7/dist/esm'; +const baseURL = 'https://unpkg.com/@ffmpeg/core-mt@0.12.6/dist/esm'; @Component({ selector: 'app-root', @@ -26,11 +26,11 @@ export class AppComponent { coreURL: await toBlobURL(`${baseURL}/ffmpeg-core.js`, 'text/javascript'), wasmURL: await toBlobURL( `${baseURL}/ffmpeg-core.wasm`, - 'application/wasm' + 'application/wasm', ), workerURL: await toBlobURL( `${baseURL}/ffmpeg-core.worker.js`, - 'text/javascript' + 'text/javascript', ), }); this.loaded = true; @@ -43,7 +43,7 @@ export class AppComponent { const fileData = await this.ffmpeg.readFile('output.mp4'); const data = new Uint8Array(fileData as ArrayBuffer); this.videoURL = URL.createObjectURL( - new Blob([data.buffer], { type: 'video/mp4' }) + new Blob([data.buffer], { type: 'video/mp4' }), ); } } diff --git a/apps/nextjs-app/app/Home.tsx b/apps/nextjs-app/app/Home.tsx index 17d5605..540c619 100644 --- a/apps/nextjs-app/app/Home.tsx +++ b/apps/nextjs-app/app/Home.tsx @@ -13,7 +13,7 @@ export default function Home() { const load = async () => { setIsLoading(true); - const baseURL = "https://unpkg.com/@ffmpeg/core@0.12.7/dist/umd"; + const baseURL = "https://unpkg.com/@ffmpeg/core@0.12.6/dist/umd"; const ffmpeg = ffmpegRef.current; ffmpeg.on("log", ({ message }) => { if (messageRef.current) messageRef.current.innerHTML = message; diff --git a/apps/react-vite-app/src/App.tsx b/apps/react-vite-app/src/App.tsx index 2a71db0..3db4eb6 100644 --- a/apps/react-vite-app/src/App.tsx +++ b/apps/react-vite-app/src/App.tsx @@ -9,7 +9,7 @@ function App() { const messageRef = useRef(null); const load = async () => { - const baseURL = "https://unpkg.com/@ffmpeg/core-mt@0.12.7/dist/esm"; + const baseURL = "https://unpkg.com/@ffmpeg/core-mt@0.12.6/dist/esm"; const ffmpeg = ffmpegRef.current; ffmpeg.on("log", ({ message }) => { if (messageRef.current) messageRef.current.innerHTML = message; diff --git a/apps/website/docs/getting-started/usage.md b/apps/website/docs/getting-started/usage.md index 7bb7448..0d4d08d 100644 --- a/apps/website/docs/getting-started/usage.md +++ b/apps/website/docs/getting-started/usage.md @@ -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.7/dist/umd~~ => https://unpkg.com/@ffmpeg/core@0.12.7/dist/esm +~~https://unpkg.com/@ffmpeg/core@0.12.6/dist/umd~~ => https://unpkg.com/@ffmpeg/core@0.12.6/dist/esm ::: ```jsx live @@ -24,7 +24,7 @@ function() { const messageRef = useRef(null); const load = async () => { - const baseURL = 'https://unpkg.com/@ffmpeg/core@0.12.7/dist/umd' + const baseURL = 'https://unpkg.com/@ffmpeg/core@0.12.6/dist/umd' const ffmpeg = ffmpegRef.current; ffmpeg.on('log', ({ message }) => { messageRef.current.innerHTML = message; @@ -81,7 +81,7 @@ function() { const messageRef = useRef(null); const load = async () => { - const baseURL = 'https://unpkg.com/@ffmpeg/core-mt@0.12.7/dist/umd' + const baseURL = 'https://unpkg.com/@ffmpeg/core-mt@0.12.6/dist/umd' const ffmpeg = ffmpegRef.current; ffmpeg.on('log', ({ message }) => { messageRef.current.innerHTML = message; @@ -134,7 +134,7 @@ function() { const messageRef = useRef(null); const load = async () => { - const baseURL = 'https://unpkg.com/@ffmpeg/core@0.12.7/dist/umd' + const baseURL = 'https://unpkg.com/@ffmpeg/core@0.12.6/dist/umd' const ffmpeg = ffmpegRef.current; ffmpeg.on('log', ({ message }) => { messageRef.current.innerHTML = message; @@ -192,7 +192,7 @@ function() { const messageRef = useRef(null); const load = async () => { - const baseURL = 'https://unpkg.com/@ffmpeg/core@0.12.7/dist/umd' + const baseURL = 'https://unpkg.com/@ffmpeg/core@0.12.6/dist/umd' const ffmpeg = ffmpegRef.current; // Listen to progress event instead of log. ffmpeg.on('progress', ({ progress, time }) => { @@ -243,7 +243,7 @@ function() { const messageRef = useRef(null); const load = async () => { - const baseURL = 'https://unpkg.com/@ffmpeg/core@0.12.7/dist/umd' + const baseURL = 'https://unpkg.com/@ffmpeg/core@0.12.6/dist/umd' const ffmpeg = ffmpegRef.current; ffmpeg.on('log', ({ message }) => { messageRef.current.innerHTML = message; @@ -313,7 +313,7 @@ function() { const messageRef = useRef(null); const load = async () => { - const baseURL = 'https://unpkg.com/@ffmpeg/core@0.12.7/dist/umd' + const baseURL = 'https://unpkg.com/@ffmpeg/core@0.12.6/dist/umd' const ffmpeg = ffmpegRef.current; ffmpeg.on('log', ({ message }) => { messageRef.current.innerHTML = message; @@ -372,7 +372,7 @@ function() { const messageRef = useRef(null); const load = async () => { - const baseURL = 'https://unpkg.com/@ffmpeg/core@0.12.7/dist/umd' + const baseURL = 'https://unpkg.com/@ffmpeg/core@0.12.6/dist/umd' const ffmpeg = ffmpegRef.current; ffmpeg.on('log', ({ message }) => { messageRef.current.innerHTML = message; @@ -426,7 +426,7 @@ function() { :::note Required: -- @ffmpeg/ffmpeg@0.12.7+ +- @ffmpeg/ffmpeg@0.12.6+ - @ffmpeg/core@0.12.4+ ::: @@ -437,7 +437,7 @@ Please Check this PR: [Add WORKERFS support](https://github.com/ffmpegwasm/ffmpe :::note Required: -- @ffmpeg/ffmpeg@0.12.7+ +- @ffmpeg/ffmpeg@0.12.6+ - @ffmpeg/core@0.12.4+ ::: diff --git a/packages/ffmpeg/src/const.ts b/packages/ffmpeg/src/const.ts index 8e4b34e..5dfe4ab 100644 --- a/packages/ffmpeg/src/const.ts +++ b/packages/ffmpeg/src/const.ts @@ -1,7 +1,7 @@ export const MIME_TYPE_JAVASCRIPT = "text/javascript"; export const MIME_TYPE_WASM = "application/wasm"; -export const CORE_VERSION = "0.12.7"; +export const CORE_VERSION = "0.12.6"; export const CORE_URL = `https://unpkg.com/@ffmpeg/core@${CORE_VERSION}/dist/umd/ffmpeg-core.js`; export enum FFMessageType { diff --git a/scripts/download-assets.js b/scripts/download-assets.js index a20545d..f739ca2 100644 --- a/scripts/download-assets.js +++ b/scripts/download-assets.js @@ -4,7 +4,7 @@ const fs = require("fs"); const NPM_URL = "https://registry.npmjs.org"; const ROOT = "public/assets"; -const FFMPEG_VERSION = "0.12.7"; +const FFMPEG_VERSION = "0.12.6"; const UTIL_VERSION = "0.12.0"; const CORE_VERSION = "0.12.8"; const CORE_MT_VERSION = "0.12.8";