Add an example server in README.md

This commit is contained in:
Jerome Wu 2021-07-26 16:49:02 +08:00
parent a99e15e02b
commit 8e6d6cea5e

View File

@ -46,7 +46,7 @@ $ node --experimental-wasm-threads --experimental-wasm-bulk-memory transcode.js
Or, using a script tag in the browser (only works in some browsers, see list below): Or, using a script tag in the browser (only works in some browsers, see list below):
> SharedArrayBuffer is only available to pages that are [cross-origin isolated](https://developer.chrome.com/blog/enabling-shared-array-buffer/#cross-origin-isolation). So you need to host your own server with `Cross-Origin-Embedder-Policy: require-corp` and `Cross-Origin-Opener-Policy: same-origin` headers to use ffmpeg.wasm. > SharedArrayBuffer is only available to pages that are [cross-origin isolated](https://developer.chrome.com/blog/enabling-shared-array-buffer/#cross-origin-isolation). So you need to host [your own server](https://github.com/ffmpegwasm/ffmpegwasm.github.io/blob/main/server/server.js) with `Cross-Origin-Embedder-Policy: require-corp` and `Cross-Origin-Opener-Policy: same-origin` headers to use ffmpeg.wasm.
```html ```html
<script src="static/js/ffmpeg.min.js"></script> <script src="static/js/ffmpeg.min.js"></script>