Skip to content

best way to save what you love

web/libav: remove environment import to fix the worker

wukko0e26424355bf
diff --git a/web/src/lib/libav.ts b/web/src/lib/libav.ts
index 048323e1..af5c2e8a 100644
--- a/web/src/lib/libav.ts
+++ b/web/src/lib/libav.ts
@@ -2,7 +2,6 @@ import mime from "mime";
import LibAV, { type LibAV as LibAVInstance } from "@imput/libav.js-remux-cli";
import type { FFmpegProgressCallback, FFmpegProgressEvent, FFmpegProgressStatus, FileInfo, RenderParams } from "./types/libav";
import type { FfprobeData } from "fluent-ffmpeg";
-import { browser } from "$app/environment";
export default class LibAVWrapper {
libav: Promise<LibAVInstance> | null;
@@ -11,7 +10,7 @@ export default class LibAVWrapper {
constructor(onProgress?: FFmpegProgressCallback) {
this.libav = null;
- this.concurrency = Math.min(4, browser ? navigator.hardwareConcurrency : 0);
+ this.concurrency = Math.min(4, navigator.hardwareConcurrency || 0);
this.onProgress = onProgress;
}