From 0e26424355bf685a1bfc8dfb76b9fc5b7be59114 Mon Sep 17 00:00:00 2001 From: wukko Date: Wed, 15 Jan 2025 22:25:59 +0600 Subject: [PATCH] web/libav: remove environment import to fix the worker --- web/src/lib/libav.ts | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) 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 | 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; }