ffmpegwasm / ffmpegwasm/ffmpeg.wasm

Uncaught ReferenceError: FFmpeg is not defined

未關閉
#256 3 則留言 3 個 reaction 已指派 0 人 在 GitHub 檢視
主要語言
C
星號
17.8k
分支
1.1k
PR 合併指標
30 天內沒有已合併 PR

描述

I was having the [SharedArrayBuffer error as described in this other issue](https://github.com/ffmpegwasm/ffmpeg.wasm/issues/231) and to fix I added the cross origin isolation as suggested by adding the headers

```
Cross-Origin-Opener-Policy: same-origin
Cross-Origin-Embedder-Policy: require-corp
```

After that, now when I try to run the code I just got **Uncaught ReferenceError: FFmpeg is not defined**. The error is happening on Firefox

My code is:
```


const { createFFmpeg, fetchFile } = FFmpeg; //error happens here
const ffmpegInstance = createFFmpeg({
corePath: 'https://unpkg.com/@ffmpeg/core@0.10.0/dist/ffmpeg-core.js',
log: true,
});

```

On Brave browser the process ran ok without having to add the Cross origin headers and also `FFmpeg` variable was defined.

貢獻指南

開啟貢獻指南

評估

這個 Issue 還沒有評估資料。

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。