Skip to content

Commit

Permalink
Updated classes
Browse files Browse the repository at this point in the history
  • Loading branch information
LostBeard committed Sep 13, 2023
1 parent c7ab0f9 commit 718816a
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 deletions packages/ffmpeg/src/classes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -166,14 +166,10 @@ export class FFmpeg {
*/
public load = (config: FFMessageLoadConfig = {}): Promise<IsFirst> => {
if (!this.#worker) {
if (!config.workerLoadURL) {
this.#worker = new Worker(new URL("./worker.js", import.meta.url), {
type: "module",
});
if (config.workerLoadURL) {
this.#worker = new Worker(config.workerLoadURL);
} else {
this.#worker = new Worker(config.workerLoadURL, {
type: "module",
});
this.#worker = new Worker(new URL("./worker.js", import.meta.url));
}
this.#registerHandlers();
}
Expand Down

0 comments on commit 718816a

Please sign in to comment.