64 lines
1.2 KiB
TypeScript
64 lines
1.2 KiB
TypeScript
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 DirectDownloadRequest {
|
|
id: string;
|
|
format: VideoFormat | AudioFormat;
|
|
formatType: FormatType;
|
|
}
|
|
|
|
export interface DownloadResponse {
|
|
|
|
success: boolean;
|
|
downloadUrl?: string;
|
|
filename?: string;
|
|
filePath?: string;
|
|
error?: string;
|
|
videoInfo?: VideoInfo;
|
|
}
|
|
|
|
|
|
export interface DirectDownloadRequest {
|
|
videoId: string;
|
|
format: VideoFormat | AudioFormat;
|
|
formatType: FormatType;
|
|
}
|
|
|
|
export interface DownloadResponse {
|
|
success: boolean;
|
|
downloadUrl?: string;
|
|
filename?: string;
|
|
filePath?: 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;
|
|
}
|