From c87cf457be2948405af8a5e38b0971b33cb037e4 Mon Sep 17 00:00:00 2001 From: Jerome Wu Date: Thu, 27 Jul 2023 00:32:56 +0800 Subject: [PATCH] Fix playground bug --- apps/website/src/components/Playground/const.ts | 10 +++++----- apps/website/src/components/Playground/index.tsx | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/apps/website/src/components/Playground/const.ts b/apps/website/src/components/Playground/const.ts index 23cdc70..188b88b 100644 --- a/apps/website/src/components/Playground/const.ts +++ b/apps/website/src/components/Playground/const.ts @@ -4,11 +4,11 @@ export const CORE_URL = `https://unpkg.com/@ffmpeg/core@${CORE_VERSION}/dist/umd export const CORE_MT_URL = `https://unpkg.com/@ffmpeg/core-mt@${CORE_VERSION}/dist/umd/ffmpeg-core.js`; export const CORE_SIZE = { - [`https://unpkg.com/@ffmpeg/core@${CORE_VERSION}/dist/umd/ffmpeg-core.js`]: 111646, - [`https://unpkg.com/@ffmpeg/core@${CORE_VERSION}/dist/umd/ffmpeg-core.wasm`]: 31967534, - [`https://unpkg.com/@ffmpeg/core-mt@${CORE_VERSION}/dist/umd/ffmpeg-core.js`]: 130002, - [`https://unpkg.com/@ffmpeg/core-mt@${CORE_VERSION}/dist/umd/ffmpeg-core.wasm`]: 32441947, - [`https://unpkg.com/@ffmpeg/core-mt@${CORE_VERSION}/dist/umd/ffmpeg-core.worker.js`]: 2978, + [`https://unpkg.com/@ffmpeg/core@${CORE_VERSION}/dist/umd/ffmpeg-core.js`]: 109667, + [`https://unpkg.com/@ffmpeg/core@${CORE_VERSION}/dist/umd/ffmpeg-core.wasm`]: 31598677, + [`https://unpkg.com/@ffmpeg/core-mt@${CORE_VERSION}/dist/umd/ffmpeg-core.js`]: 127674, + [`https://unpkg.com/@ffmpeg/core-mt@${CORE_VERSION}/dist/umd/ffmpeg-core.wasm`]: 32077318, + [`https://unpkg.com/@ffmpeg/core-mt@${CORE_VERSION}/dist/umd/ffmpeg-core.worker.js`]: 2915, }; export const SAMPLE_FILES = { diff --git a/apps/website/src/components/Playground/index.tsx b/apps/website/src/components/Playground/index.tsx index 1126960..3782870 100644 --- a/apps/website/src/components/Playground/index.tsx +++ b/apps/website/src/components/Playground/index.tsx @@ -22,6 +22,7 @@ export default function Playground() { const ffmpeg = useRef(new FFmpeg()); const load = async (mt: boolean = false) => { + setState(State.LOADING); const setProgress = ({ url: _url, received: _received }) => { setURL(_url as string); setReceived(_received); @@ -48,7 +49,6 @@ export default function Playground() { setProgress ) : ""; - setState(State.LOADING); ffmpeg.current.terminate(); await ffmpeg.current.load({ coreURL,