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.
17
17
// import { FFmpeg } from '@ffmpeg/ffmpeg';
18
18
// import { fetchFile } from '@ffmpeg/util';
19
19
function () {
20
+ const baseURL = ' https://unpkg.com/@ffmpeg/[email protected] /dist/umd'
20
21
const [loaded , setLoaded ] = useState (false );
21
22
const ffmpegRef = useRef (new FFmpeg ());
22
23
const videoRef = useRef (null );
@@ -27,7 +28,10 @@ function() {
27
28
ffmpeg .on (" log" , ({ message }) => {
28
29
messageRef .current .innerHTML = message;
29
30
});
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
+ });
31
35
setLoaded (true );
32
36
}
33
37
You can’t perform that action at this time.
0 commit comments