|
- type ProcessEvent = { type: string, phase: string, command?: string };
-
- type ProcessEventCallback = (event: ProcessEvent) => void;
-
- type ErrorEventCallback = (event: Error) => void;
-
- export interface VideoClipEventEmitter extends NodeJS.EventEmitter {
- process(): void;
- on(eventType: 'process', callback: ProcessEventCallback): this;
- on(eventType: 'error', callback: ErrorEventCallback): this;
- on(eventType: 'end', callback: ErrorEventCallback): this;
- }
-
- export const FILE_TYPES: Record<string, string> = {
- mkv: 'video/x-matroska',
- webm: 'video/webm',
- mp4: 'video/mp4',
- };
-
- export interface CreateBaseClipperParams {
- url: string;
- start?: number | string;
- end?: number | string;
- }
|