ffmpegwasm / react-app

An example to use ffmpeg.wasm in react.js
201 stars 55 forks source link

ffmpeg-core unpkg NotSameOriginAfterDefaultedToSameOriginByCoep #16

Open dvnrsn opened 2 years ago

dvnrsn commented 2 years ago

The initial problem faced running this app is an inability to successfully fetch from unpkg

image

However, disabling the cross origin leads to the SharedArayBuffer problem as described in installation. Does this mean the ffmpeg core needs to be loaded from same origin?

  const ffmpeg = createFFmpeg({
    corePath: "node_modules/@ffmpeg/core/dist/ffmpeg-core.js",

Doing so creates a problem that I originally faced trying this out in codesandbox

image
dvnrsn commented 2 years ago

Related https://github.com/ffmpegwasm/ffmpeg.wasm/issues/263

dvnrsn commented 2 years ago

"why it doesn't work in my local environment" section https://github.com/ffmpegwasm/ffmpeg.wasm#why-it-doesnt-work-in-my-local-environment

dvnrsn commented 2 years ago

Was able to resolve this in nextJS context by moving all scripts (ffmpeg-core.js, wasm, worker, min) to public/. This does not seem preferable but working for now.

0x-sen commented 1 year ago

The same error

402329651 commented 1 year ago

The same error