Add mime type in usage
This commit is contained in:
		
							parent
							
								
									fdf682eab0
								
							
						
					
					
						commit
						7fae2e8b34
					
				| @ -31,8 +31,14 @@ function() { | |||||||
|         // toBlobURL is used to bypass CORS issue, urls with the same |         // toBlobURL is used to bypass CORS issue, urls with the same | ||||||
|         // domain can be used directly. |         // domain can be used directly. | ||||||
|         await ffmpeg.load({ |         await ffmpeg.load({ | ||||||
|             coreURL: await toBlobURL(`${baseURL}/ffmpeg-core.js`), |             coreURL: await toBlobURL( | ||||||
|             wasmURL: await toBlobURL(`${baseURL}/ffmpeg-core.wasm`), |                 `${baseURL}/ffmpeg-core.js`, | ||||||
|  |                 "text/javascript", | ||||||
|  |             ), | ||||||
|  |             wasmURL: await toBlobURL( | ||||||
|  |                 `${baseURL}/ffmpeg-core.wasm`, | ||||||
|  |                 "application/wasm", | ||||||
|  |             ), | ||||||
|         }); |         }); | ||||||
|         setLoaded(true); |         setLoaded(true); | ||||||
|     } |     } | ||||||
| @ -89,9 +95,18 @@ function() { | |||||||
|         // toBlobURL is used to bypass CORS issue, urls with the same |         // toBlobURL is used to bypass CORS issue, urls with the same | ||||||
|         // domain can be used directly. |         // domain can be used directly. | ||||||
|         await ffmpeg.load({ |         await ffmpeg.load({ | ||||||
|             coreURL: await toBlobURL(`${baseURL}/ffmpeg-core.js`), |             coreURL: await toBlobURL( | ||||||
|             wasmURL: await toBlobURL(`${baseURL}/ffmpeg-core.wasm`), |                 `${baseURL}/ffmpeg-core.js`, | ||||||
|             workerURL: await toBlobURL(`${baseURL}/ffmpeg-core.worker.js`), |                 "text/javascript", | ||||||
|  |             ), | ||||||
|  |             wasmURL: await toBlobURL( | ||||||
|  |                 `${baseURL}/ffmpeg-core.wasm`, | ||||||
|  |                 "application/wasm", | ||||||
|  |             ), | ||||||
|  |             workerURL: await toBlobURL( | ||||||
|  |                 `${baseURL}/ffmpeg-core.worker.js`, | ||||||
|  |                 "text/javascript", | ||||||
|  |             ), | ||||||
|             thread: true, |             thread: true, | ||||||
|         }); |         }); | ||||||
|         setLoaded(true); |         setLoaded(true); | ||||||
| @ -148,8 +163,14 @@ function() { | |||||||
|         // toBlobURL is used to bypass CORS issue, urls with the same |         // toBlobURL is used to bypass CORS issue, urls with the same | ||||||
|         // domain can be used directly. |         // domain can be used directly. | ||||||
|         await ffmpeg.load({ |         await ffmpeg.load({ | ||||||
|             coreURL: await toBlobURL(`${baseURL}/ffmpeg-core.js`), |             coreURL: await toBlobURL( | ||||||
|             wasmURL: await toBlobURL(`${baseURL}/ffmpeg-core.wasm`), |                 `${baseURL}/ffmpeg-core.js`, | ||||||
|  |                 "text/javascript", | ||||||
|  |             ), | ||||||
|  |             wasmURL: await toBlobURL( | ||||||
|  |                 `${baseURL}/ffmpeg-core.wasm`, | ||||||
|  |                 "application/wasm", | ||||||
|  |             ), | ||||||
|         }); |         }); | ||||||
|         setLoaded(true); |         setLoaded(true); | ||||||
|     } |     } | ||||||
| @ -203,8 +224,14 @@ function() { | |||||||
|         // toBlobURL is used to bypass CORS issue, urls with the same |         // toBlobURL is used to bypass CORS issue, urls with the same | ||||||
|         // domain can be used directly. |         // domain can be used directly. | ||||||
|         await ffmpeg.load({ |         await ffmpeg.load({ | ||||||
|             coreURL: await toBlobURL(`${baseURL}/ffmpeg-core.js`), |             coreURL: await toBlobURL( | ||||||
|             wasmURL: await toBlobURL(`${baseURL}/ffmpeg-core.wasm`), |                 `${baseURL}/ffmpeg-core.js`, | ||||||
|  |                 "text/javascript", | ||||||
|  |             ), | ||||||
|  |             wasmURL: await toBlobURL( | ||||||
|  |                 `${baseURL}/ffmpeg-core.wasm`, | ||||||
|  |                 "application/wasm", | ||||||
|  |             ), | ||||||
|         }); |         }); | ||||||
|         setLoaded(true); |         setLoaded(true); | ||||||
|     } |     } | ||||||
|  | |||||||
		Loading…
	
		Reference in New Issue
	
	Block a user
	 Jerome Wu
						Jerome Wu