mirror of
https://github.com/wukko/cobalt.git
synced 2025-02-13 14:16:25 +01:00
web/types/libav: replace "extension" with "format" in FileInfo
This commit is contained in:
parent
c31c484894
commit
ff62a4c2e6
3 changed files with 8 additions and 6 deletions
|
@ -39,6 +39,8 @@ export default class LibAVWrapper {
|
||||||
if (!this.libav) throw new Error("LibAV wasn't initialized");
|
if (!this.libav) throw new Error("LibAV wasn't initialized");
|
||||||
const libav = await this.libav;
|
const libav = await this.libav;
|
||||||
|
|
||||||
|
console.log('yay loaded libav :3');
|
||||||
|
|
||||||
await libav.mkreadaheadfile('input', blob);
|
await libav.mkreadaheadfile('input', blob);
|
||||||
|
|
||||||
try {
|
try {
|
||||||
|
@ -65,11 +67,11 @@ export default class LibAVWrapper {
|
||||||
if (!this.libav) throw new Error("LibAV wasn't initialized");
|
if (!this.libav) throw new Error("LibAV wasn't initialized");
|
||||||
const libav = await this.libav;
|
const libav = await this.libav;
|
||||||
|
|
||||||
if (!(output.extension && output.type)) {
|
if (!(output.format && output.type)) {
|
||||||
throw new Error("output's extension or type is missing");
|
throw new Error("output's format or type is missing");
|
||||||
}
|
}
|
||||||
|
|
||||||
const outputName = `output.${output.extension}`;
|
const outputName = `output.${output.format}`;
|
||||||
const ffInputs = [];
|
const ffInputs = [];
|
||||||
|
|
||||||
try {
|
try {
|
||||||
|
|
|
@ -33,7 +33,7 @@ export const createRemuxPipeline = (file: File) => {
|
||||||
],
|
],
|
||||||
output: {
|
output: {
|
||||||
type: file.type,
|
type: file.type,
|
||||||
extension: file.name.split(".").pop(),
|
format: file.name.split(".").pop(),
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
}];
|
}];
|
||||||
|
@ -80,7 +80,7 @@ export const createSavePipeline = (info: CobaltLocalProcessingResponse) => {
|
||||||
output: {
|
output: {
|
||||||
// TODO: return mime type from api to avoid dragging a big ass package into web build
|
// TODO: return mime type from api to avoid dragging a big ass package into web build
|
||||||
type: mime.getType(info.filename) || undefined,
|
type: mime.getType(info.filename) || undefined,
|
||||||
extension: info.filename.split(".").pop(),
|
format: info.filename.split(".").pop(),
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
|
|
|
@ -2,7 +2,7 @@ import type { CobaltFileReference } from "$lib/types/storage";
|
||||||
|
|
||||||
export type FileInfo = {
|
export type FileInfo = {
|
||||||
type?: string,
|
type?: string,
|
||||||
extension?: string,
|
format?: string,
|
||||||
}
|
}
|
||||||
|
|
||||||
export type RenderParams = {
|
export type RenderParams = {
|
||||||
|
|
Loading…
Reference in a new issue