temporary downgrade to fix

This commit is contained in:
Lucas Gelfond 2025-01-01 22:06:41 +01:00
parent 95026d90e2
commit f44e3da16d
6 changed files with 18 additions and 18 deletions

View File

@ -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' }),
);
}
}

View File

@ -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;

View File

@ -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.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;

View File

@ -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+
:::

View File

@ -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 {

View File

@ -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";