Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SharedArrayBuffer is not defined #13

Open
ottoptika opened this issue Mar 22, 2022 · 4 comments
Open

SharedArrayBuffer is not defined #13

ottoptika opened this issue Mar 22, 2022 · 4 comments

Comments

@ottoptika
Copy link

Hey
I'm trying to convert Blob data from RecordRTC from webm to mp4. The script seems to be working and initialized, but React/NextJS throws a SharedArrayBuffer. Searching for that term gives me some answers about some vulnerability in SAB, but I don't understand what's up and down. It says there's a way to re-enable it though?
Is it a bug in ffmpegwasm or is there something deeper to it? As I'm creating a ReactJS website, I should be able to follow your example of your 'react-app' no?

Thanks

@skogsbrus
Copy link

From https://github.com/ffmpegwasm/ffmpeg.wasm:

Only browsers with SharedArrayBuffer support can use ffmpeg.wasm, you can check HERE for the complete list.

@DavraYoung
Copy link

make sure you add setupProxy.js file in your src folder

@DavraYoung
Copy link

the contents should be:

module.exports = (app) => {
    app.use((_, res, next) => {
        res.setHeader('Cross-Origin-Opener-Policy', 'same-origin');
        res.setHeader('Cross-Origin-Embedder-Policy', 'require-corp');
        next();
    });
};

@libo1106
Copy link

libo1106 commented Jun 8, 2023

  1. copy ffmpeg-core in you public folder, like this
image
  1. set corePath with createFFmpeg()
  const ffmpeg = createFFmpeg({
    corePath: "/ffmpeg/[email protected]/ffmpeg-core.js",
    log: true,
  });
  1. npm start with HTTPS env

HTTPS=true npm start

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants