Add unpkg script tag installation example

Helpful for newbies like me who don't use browserify, and didn't realise it was as easy as including a script tag (until I saw the codepen examples).
This commit is contained in:
josephrocca 2020-01-20 14:59:48 +11:00 committed by GitHub
parent 546e64154e
commit 8920b60dbd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -63,6 +63,16 @@ $ npm install @ffmpeg/ffmpeg
> As we use `worker_threads` which was introduced in Node.js v10.5.0, please remember to add `--experimental-worker` if you are using Node.js v10, and you don't have to add anything if you are using Node.js v12 > As we use `worker_threads` which was introduced in Node.js v10.5.0, please remember to add `--experimental-worker` if you are using Node.js v10, and you don't have to add anything if you are using Node.js v12
Or, using a script tag in the browser:
```
<script src="https://unpkg.com/@ffmpeg/ffmpeg@0.6.0/dist/ffmpeg.min.js"></script>
<script>
const { createWorker } = FFmpeg;
...
</script>
```
## Documentation ## Documentation
- [API](https://github.com/ffmpegjs/ffmpeg.js/blob/master/docs/api.md) - [API](https://github.com/ffmpegjs/ffmpeg.js/blob/master/docs/api.md)