File tree Expand file tree Collapse file tree 2 files changed +14
-4
lines changed Expand file tree Collapse file tree 2 files changed +14
-4
lines changed Original file line number Diff line number Diff line change @@ -9,7 +9,7 @@ function App() {
9
9
const messageRef = useRef ( null ) ;
10
10
11
11
const load = async ( ) => {
12
- const baseURL = "https://unpkg.com/@ffmpeg/[email protected] .1 /dist/esm" ;
12
+ const baseURL = "https://unpkg.com/@ffmpeg/core-mt @0.12.2 /dist/esm" ;
13
13
const ffmpeg = ffmpegRef . current ;
14
14
ffmpeg . on ( "log" , ( { message } ) => {
15
15
messageRef . current . innerHTML = message ;
@@ -22,6 +22,10 @@ function App() {
22
22
`${ baseURL } /ffmpeg-core.wasm` ,
23
23
"application/wasm"
24
24
) ,
25
+ workerURL : await toBlobURL (
26
+ `${ baseURL } /ffmpeg-core.worker.js` ,
27
+ "text/javascript"
28
+ ) ,
25
29
} ) ;
26
30
setLoaded ( true ) ;
27
31
} ;
Original file line number Diff line number Diff line change 1
- import { defineConfig } from ' vite'
2
- import react from ' @vitejs/plugin-react'
1
+ import { defineConfig } from " vite" ;
2
+ import react from " @vitejs/plugin-react" ;
3
3
4
4
// https://vitejs.dev/config/
5
5
export default defineConfig ( {
6
6
plugins : [ react ( ) ] ,
7
- } )
7
+ server : {
8
+ headers : {
9
+ "Cross-Origin-Opener-Policy" : "same-origin" ,
10
+ "Cross-Origin-Embedder-Policy" : "require-corp" ,
11
+ } ,
12
+ } ,
13
+ } ) ;
You can’t perform that action at this time.
0 commit comments