File tree Expand file tree Collapse file tree 1 file changed +5
-1
lines changed
apps/website/docs/getting-started Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -17,6 +17,7 @@ a ~31 MB ffmpeg-core.wasm.
1717// import { FFmpeg } from '@ffmpeg/ffmpeg';
1818// import { fetchFile } from '@ffmpeg/util';
1919function () {
20+ const baseURL = ' https://unpkg.com/@ffmpeg/core@0.12.1/dist/umd'
2021 const [loaded , setLoaded ] = useState (false );
2122 const ffmpegRef = useRef (new FFmpeg ());
2223 const videoRef = useRef (null );
@@ -27,7 +28,10 @@ function() {
2728 ffmpeg .on (" log" , ({ message }) => {
2829 messageRef .current .innerHTML = message;
2930 });
30- await ffmpeg .load ();
31+ await ffmpeg .load ({
32+ coreURL: await toBlobURL (` ${ baseURL} /ffmpeg-core.js` ),
33+ wasmURL: await toBlobURL (` ${ baseURL} /ffmpeg-core.wasm` ),
34+ });
3135 setLoaded (true );
3236 }
3337
You can’t perform that action at this time.
0 commit comments