initial commit
This commit is contained in:
39
lib/types.ts
Normal file
39
lib/types.ts
Normal file
@@ -0,0 +1,39 @@
|
||||
export type VideoFormat = 'mp4' | 'webm' | 'mkv' | 'avi';
|
||||
export type AudioFormat = 'mp3' | 'wav' | 'm4a' | 'opus';
|
||||
|
||||
export type FormatType = 'video' | 'audio';
|
||||
|
||||
export interface DownloadRequest {
|
||||
url: string;
|
||||
format: VideoFormat | AudioFormat;
|
||||
formatType: FormatType;
|
||||
}
|
||||
|
||||
export interface DownloadResponse {
|
||||
success: boolean;
|
||||
downloadUrl?: string;
|
||||
filename?: string;
|
||||
error?: string;
|
||||
videoInfo?: VideoInfo;
|
||||
}
|
||||
|
||||
export interface VideoInfo {
|
||||
title: string;
|
||||
duration: number;
|
||||
thumbnail?: string;
|
||||
formats?: FormatOption[];
|
||||
}
|
||||
|
||||
export interface FormatOption {
|
||||
formatId: string;
|
||||
ext: string;
|
||||
resolution?: string;
|
||||
filesize?: number;
|
||||
formatNote?: string;
|
||||
}
|
||||
|
||||
export interface TranscodeRequest {
|
||||
fileId: string;
|
||||
format: VideoFormat | AudioFormat;
|
||||
formatType: FormatType;
|
||||
}
|
||||
Reference in New Issue
Block a user