diff --git a/apps/website/docs/getting-started/usage.md b/apps/website/docs/getting-started/usage.md index f17e8f0..9a87bd5 100644 --- a/apps/website/docs/getting-started/usage.md +++ b/apps/website/docs/getting-started/usage.md @@ -31,8 +31,14 @@ function() { // toBlobURL is used to bypass CORS issue, urls with the same // domain can be used directly. await ffmpeg.load({ - coreURL: await toBlobURL(`${baseURL}/ffmpeg-core.js`), - wasmURL: await toBlobURL(`${baseURL}/ffmpeg-core.wasm`), + coreURL: await toBlobURL( + `${baseURL}/ffmpeg-core.js`, + "text/javascript", + ), + wasmURL: await toBlobURL( + `${baseURL}/ffmpeg-core.wasm`, + "application/wasm", + ), }); setLoaded(true); } @@ -89,9 +95,18 @@ function() { // toBlobURL is used to bypass CORS issue, urls with the same // domain can be used directly. await ffmpeg.load({ - coreURL: await toBlobURL(`${baseURL}/ffmpeg-core.js`), - wasmURL: await toBlobURL(`${baseURL}/ffmpeg-core.wasm`), - workerURL: await toBlobURL(`${baseURL}/ffmpeg-core.worker.js`), + coreURL: await toBlobURL( + `${baseURL}/ffmpeg-core.js`, + "text/javascript", + ), + wasmURL: await toBlobURL( + `${baseURL}/ffmpeg-core.wasm`, + "application/wasm", + ), + workerURL: await toBlobURL( + `${baseURL}/ffmpeg-core.worker.js`, + "text/javascript", + ), thread: true, }); setLoaded(true); @@ -148,8 +163,14 @@ function() { // toBlobURL is used to bypass CORS issue, urls with the same // domain can be used directly. await ffmpeg.load({ - coreURL: await toBlobURL(`${baseURL}/ffmpeg-core.js`), - wasmURL: await toBlobURL(`${baseURL}/ffmpeg-core.wasm`), + coreURL: await toBlobURL( + `${baseURL}/ffmpeg-core.js`, + "text/javascript", + ), + wasmURL: await toBlobURL( + `${baseURL}/ffmpeg-core.wasm`, + "application/wasm", + ), }); setLoaded(true); } @@ -203,8 +224,14 @@ function() { // toBlobURL is used to bypass CORS issue, urls with the same // domain can be used directly. await ffmpeg.load({ - coreURL: await toBlobURL(`${baseURL}/ffmpeg-core.js`), - wasmURL: await toBlobURL(`${baseURL}/ffmpeg-core.wasm`), + coreURL: await toBlobURL( + `${baseURL}/ffmpeg-core.js`, + "text/javascript", + ), + wasmURL: await toBlobURL( + `${baseURL}/ffmpeg-core.wasm`, + "application/wasm", + ), }); setLoaded(true); }