mirror of
https://github.com/OpenCut-app/OpenCut.git
synced 2026-07-13 21:52:53 +02:00
23 lines
389 B
TypeScript
23 lines
389 B
TypeScript
import { ExportFormat } from "@/types/export";
|
|||
|
|
|
||
|
|
export function getExportMimeType({
|
||
|
|
format,
|
||
|
|
}: {
|
||
|
|
format: ExportFormat;
|
||
|
|
}): string {
|
||
|
|
const mimeTypes: Record<ExportFormat, string> = {
|
||
|
|
webm: "video/webm",
|
||
|
|
mp4: "video/mp4",
|
||
|
|
};
|
||
|
|
|
||
|
|
return mimeTypes[format];
|
||
|
|
}
|
||
|
|
|
||
|
|
export function getExportFileExtension({
|
||
|
|
format,
|
||
|
|
}: {
|
||
|
|
format: ExportFormat;
|
||
|
|
}): string {
|
||
|
|
return `.${format}`;
|
||
|
|
}
|