Skip to content

Commit c1b0706

Browse files
committed
Add mime type in usage
1 parent 2b2fb4c commit c1b0706

File tree

1 file changed

+36
-9
lines changed
  • apps/website/docs/getting-started

1 file changed

+36
-9
lines changed

apps/website/docs/getting-started/usage.md

Lines changed: 36 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,14 @@ function() {
3131
// toBlobURL is used to bypass CORS issue, urls with the same
3232
// domain can be used directly.
3333
await ffmpeg.load({
34-
coreURL: await toBlobURL(`${baseURL}/ffmpeg-core.js`),
35-
wasmURL: await toBlobURL(`${baseURL}/ffmpeg-core.wasm`),
34+
coreURL: await toBlobURL(
35+
`${baseURL}/ffmpeg-core.js`,
36+
"text/javascript",
37+
),
38+
wasmURL: await toBlobURL(
39+
`${baseURL}/ffmpeg-core.wasm`,
40+
"application/wasm",
41+
),
3642
});
3743
setLoaded(true);
3844
}
@@ -89,9 +95,18 @@ function() {
8995
// toBlobURL is used to bypass CORS issue, urls with the same
9096
// domain can be used directly.
9197
await ffmpeg.load({
92-
coreURL: await toBlobURL(`${baseURL}/ffmpeg-core.js`),
93-
wasmURL: await toBlobURL(`${baseURL}/ffmpeg-core.wasm`),
94-
workerURL: await toBlobURL(`${baseURL}/ffmpeg-core.worker.js`),
98+
coreURL: await toBlobURL(
99+
`${baseURL}/ffmpeg-core.js`,
100+
"text/javascript",
101+
),
102+
wasmURL: await toBlobURL(
103+
`${baseURL}/ffmpeg-core.wasm`,
104+
"application/wasm",
105+
),
106+
workerURL: await toBlobURL(
107+
`${baseURL}/ffmpeg-core.worker.js`,
108+
"text/javascript",
109+
),
95110
thread: true,
96111
});
97112
setLoaded(true);
@@ -148,8 +163,14 @@ function() {
148163
// toBlobURL is used to bypass CORS issue, urls with the same
149164
// domain can be used directly.
150165
await ffmpeg.load({
151-
coreURL: await toBlobURL(`${baseURL}/ffmpeg-core.js`),
152-
wasmURL: await toBlobURL(`${baseURL}/ffmpeg-core.wasm`),
166+
coreURL: await toBlobURL(
167+
`${baseURL}/ffmpeg-core.js`,
168+
"text/javascript",
169+
),
170+
wasmURL: await toBlobURL(
171+
`${baseURL}/ffmpeg-core.wasm`,
172+
"application/wasm",
173+
),
153174
});
154175
setLoaded(true);
155176
}
@@ -203,8 +224,14 @@ function() {
203224
// toBlobURL is used to bypass CORS issue, urls with the same
204225
// domain can be used directly.
205226
await ffmpeg.load({
206-
coreURL: await toBlobURL(`${baseURL}/ffmpeg-core.js`),
207-
wasmURL: await toBlobURL(`${baseURL}/ffmpeg-core.wasm`),
227+
coreURL: await toBlobURL(
228+
`${baseURL}/ffmpeg-core.js`,
229+
"text/javascript",
230+
),
231+
wasmURL: await toBlobURL(
232+
`${baseURL}/ffmpeg-core.wasm`,
233+
"application/wasm",
234+
),
208235
});
209236
setLoaded(true);
210237
}

0 commit comments

Comments
 (0)