タイトルの通り昨日まで本番環境で問題なく機能してたライブラリが使えなくなりました。
調べたら恐らく以下のトラブルと一緒で、Google Chromeの更新によって機能しなくなっている感じです。
SharedArrayBuffer is not defined in chrome 92 | ffmpegwasm/ffmpeg.wasm
ライブラリからは以下のエラーが出ます。
ef8f87eb-2d66-4bad-9f9e-d11c8e8a0401:22
Uncaught (in promise) ReferenceError: SharedArrayBuffer is not defined
解決策が記述してあるところで翻訳しても意味がわかりませんでした。申し訳ないです。
ffmpegライブラリからの例外エラーとして
requested a shared WebAssembly.Memory but the returned buffer is not a SharedArrayBuffer, indicating that while the browser has SharedArrayBuffer it does not have WebAssembly threads support - you may need to set a flag"),h&&console.log("(on node you may need: --experimental-wasm-threads --experimental-wasm-bulk-memory and also use a recent version)
他に気になる点として、googleのISSUESからメッセージがありました。
SharedArrayBuffer usage is restricted to cross-origin isolated sites
SharedArrayBuffers (SABs) can be used to construct high-resolution timers. High-resolution timers simplify Spectre attacks on cross-origin resources.
To mitigate security risks across browsers, SharedArrayBuffers are gated behind cross-origin isolated contexts starting with Chrome 92 (July 2021). To continue using SharedArrayBuffers, please ensure that this page opts-into cross-origin isolation by setting Cross-Origin-Opener-Policy and Cross-Origin-Embedder-Policy appropriately.
Note that for each iframe, only the first issue is reported for performance reasons.
1 violation
Source Location Trigger Status
ffmpeg-core.js:22 Instantiation warning
Learn more: Enabling SharedArrayBuffer
就活用のポートフォリオとして出そうとしてたもので急なエラーで焦っています。ご助力のほどよろしくお願いします。
<script src="https://unpkg.com/@ffmpeg/ffmpeg@0.9.4/dist/ffmpeg.min.js"></script>
0.9.4です。サイトの通り0.9.8や他のバージョンも試してみましたが現状変わらないです。 本当にすみませんが解決したいのでお手数おかけしますが、またサポートしていただけると助かります。