Fix Worker.terminate()
This commit is contained in:
15
docs/api.md
15
docs/api.md
@@ -10,6 +10,7 @@
|
||||
- [Worker.trim](#worker-trim)
|
||||
- [Worker.concatDemuxer](#worker-concatDemuxer)
|
||||
- [Worker.run](#worker-run)
|
||||
- [Worker.terminate](#worker-terminate)
|
||||
|
||||
---
|
||||
|
||||
@@ -230,3 +231,17 @@ Worker.run() is similar to FFmpeg cli tool, aims to provide maximum flexiblity f
|
||||
await worker.run("-i flame.avi -s 1920x1080 output.mp4");
|
||||
})();
|
||||
```
|
||||
|
||||
<a name="worker-run"></a>
|
||||
|
||||
### Worker.terminate(): Promise
|
||||
|
||||
Worker.terminate() terminates web worker / worker\_threads, after terminate(), you cannot use this worker anymore.
|
||||
|
||||
**Examples:**
|
||||
|
||||
```javascript
|
||||
(async () => {
|
||||
await worker.terminate();
|
||||
})();
|
||||
```
|
||||
|
||||
Reference in New Issue
Block a user