How it was
This commit is contained in:
parent
1026974e23
commit
e39194d993
1 changed files with 0 additions and 2 deletions
|
@ -201,13 +201,11 @@ const ffmpegExec = async (
|
|||
|
||||
/** Lazily create a singleton instance of our worker */
|
||||
class WorkerFactory {
|
||||
private _comlinkWorker: ComlinkWorker<typeof DedicatedFFmpegWorker>;
|
||||
private _instance: Promise<Remote<DedicatedFFmpegWorker>>;
|
||||
|
||||
async instance() {
|
||||
if (!this._instance) {
|
||||
const comlinkWorker = createComlinkWorker();
|
||||
this._comlinkWorker = comlinkWorker;
|
||||
this._instance = comlinkWorker.remote;
|
||||
}
|
||||
return this._instance;
|
||||
|
|
Loading…
Add table
Reference in a new issue