Fix playground bug
This commit is contained in:
parent
4c6a1252d3
commit
c87cf457be
@ -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 = {
|
||||
|
@ -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,
|
||||
|
Loading…
Reference in New Issue
Block a user