mirror of
https://github.com/wukko/cobalt.git
synced 2025-01-22 10:46:19 +01:00
web/libav: remove environment import to fix the worker
This commit is contained in:
parent
1ed2eef65a
commit
0e26424355
1 changed files with 1 additions and 2 deletions
|
@ -2,7 +2,6 @@ import mime from "mime";
|
||||||
import LibAV, { type LibAV as LibAVInstance } from "@imput/libav.js-remux-cli";
|
import LibAV, { type LibAV as LibAVInstance } from "@imput/libav.js-remux-cli";
|
||||||
import type { FFmpegProgressCallback, FFmpegProgressEvent, FFmpegProgressStatus, FileInfo, RenderParams } from "./types/libav";
|
import type { FFmpegProgressCallback, FFmpegProgressEvent, FFmpegProgressStatus, FileInfo, RenderParams } from "./types/libav";
|
||||||
import type { FfprobeData } from "fluent-ffmpeg";
|
import type { FfprobeData } from "fluent-ffmpeg";
|
||||||
import { browser } from "$app/environment";
|
|
||||||
|
|
||||||
export default class LibAVWrapper {
|
export default class LibAVWrapper {
|
||||||
libav: Promise<LibAVInstance> | null;
|
libav: Promise<LibAVInstance> | null;
|
||||||
|
@ -11,7 +10,7 @@ export default class LibAVWrapper {
|
||||||
|
|
||||||
constructor(onProgress?: FFmpegProgressCallback) {
|
constructor(onProgress?: FFmpegProgressCallback) {
|
||||||
this.libav = null;
|
this.libav = null;
|
||||||
this.concurrency = Math.min(4, browser ? navigator.hardwareConcurrency : 0);
|
this.concurrency = Math.min(4, navigator.hardwareConcurrency || 0);
|
||||||
this.onProgress = onProgress;
|
this.onProgress = onProgress;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue